解决方案 »
- dephi调用基于soapheader认证的webservice(c#)
- 为什么用idftp get() 下载一个文件后修改日期被改成了系统当前的日期
- 一个关于qrdbtext的问题?望各位帮帮忙啊?
- 一个问题(不知道这个问题的名词叫什么)
- 请问谁知道如何用delphi来发送网络封包?
- 把客户端图片传到服务器上,客户端需要时在从服务器端传过来怎么做
- DBGRID问题
- 一个基于c/s模式得程序,如果数据库服务器不在局域网,在因特网上的一台机子上,客户端怎么连到后台数据库上?
- 请问还有几位高手在场?
- 【开源】小说全全全本小说阅读器
- xe5自带的TJSONObject如何解析这种json
- delphi dcc32编译的问题
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, AppEvnts;type
TForm1 = class(TForm)
rg1: TRadioGroup;
rg2: TRadioGroup;
// 放个TApplicationEvents 控件
aplctnvnts1: TApplicationEvents;
procedure aplctnvnts1Message(var Msg: tagMSG; var Handled: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}// 处理TApplicationEvents 的OnMessage事件
procedure TForm1.aplctnvnts1Message(var Msg: tagMSG; var Handled: Boolean);
var
i: Integer;
ctr: TWinControl;
begin
if Msg.message = WM_LBUTTONDOWN then
begin
for i := 0 to ControlCount - 1 do
begin
if ctr is TWinControl then ctr := Controls[i] as TWinControl;
if (ctr.ClassNameIs('TRadioGroup')) and (ctr.Handle = Msg.hwnd) then
ShowMessage(‘点击了’ + ctr.Name);
end;
end;
end;end.
如果是这样,处理radiogroup的OnClick事件,2楼说完了