unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,unit2, StdCtrls;type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
Procedure MsgcommProcess(Var Message:Tmessage); Message Wm_commnotify;
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;const
Wm_commNotify=Wm_User+12;
implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
Comthread.Create(false);
end;procedure TForm1.MsgcommProcess(var Message : TMessage);
begin
showmessage('A');
end;
end.unit Unit2;interfaceuses
Classes,Windows,Messages;type
Comthread = class(TThread)
private
{ Private declarations }
protected
procedure Execute; override;
end;implementationuses unit1;
procedure Comthread.Execute;
begin PostMessage(Form1.Handle,WM_COMMNOTIFY,0,0);
end;end.
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,unit2, StdCtrls;type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
Procedure MsgcommProcess(Var Message:Tmessage); Message Wm_commnotify;
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;const
Wm_commNotify=Wm_User+12;
implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
Comthread.Create(false);
end;procedure TForm1.MsgcommProcess(var Message : TMessage);
begin
showmessage('A');
end;
end.unit Unit2;interfaceuses
Classes,Windows,Messages;type
Comthread = class(TThread)
private
{ Private declarations }
protected
procedure Execute; override;
end;implementationuses unit1;
procedure Comthread.Execute;
begin PostMessage(Form1.Handle,WM_COMMNOTIFY,0,0);
end;end.
解决方案 »
- 关于WinXP中的网关设置
- 关于类似OICQ的编程问题,请高手帮我一下。
- DBgrid显示“备注”数据类型的问题。
- 我想请问一下treeview中结点的StateIndex属性有什么用?
- 各位高人,能给我个用DELPHI+SQLSEVER做的类似MIS系统的原代码吗?
- 如何实现所有分店数据的异地传输?
- 你的软件是否当过白菜一样买过!!!!!!!!!!(有感中国软件行业)
- 谁能帮帮我啊?关于ActiveX Form 发布使用的问题!!!
- 请问高手:如何可以随时的知道db数据库中数据记录的总和啊
- 对于大图像的转换?
- 急::postMessage() 传消息 消息函数不响应 在线等
- 单列多结果以逗号分隔输出??
begin
showmessage('Send');
PostMessage(Form1.Handle,WM_COMMNOTIFY,0,0);
end; 有沒有 send;
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs,unit2, StdCtrls;
const
Wm_commNotify=Wm_User+12; // 放到這裏來type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
Procedure MsgcommProcess(Var Message:Tmessage); Message Wm_commnotify;
{ Private declarations }
public
{ Public declarations }
end; var
Form1: TForm1;
implementation {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject);
begin
Comthread.Create(false);
end; procedure TForm1.MsgcommProcess(var Message : TMessage);
begin
showmessage('A');
end;
end. unit Unit2; interface uses
Classes,Windows,Messages; type
Comthread = class(TThread)
private
{ Private declarations }
protected
procedure Execute; override;
end; implementation uses unit1;
procedure Comthread.Execute;
begin PostMessage(Form1.Handle,WM_COMMNOTIFY,0,0);
end; end.