关于网友提出的“ 谁能将这个十几行的delphi7程序改为vb6”问题疑问,本网通过在网上对“ 谁能将这个十几行的delphi7程序改为vb6”有关的相关答案进行了整理,供用户进行参考,详细问题解答如下:
问题: 谁能将这个十几行的delphi7程序改为vb6描述:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, shellAPI, StrUtils, StdCtrls;
const
TempHumid=WM_USER+61021;
type
TForm1 = class(TForm)
Label3: TLabel;
Label4: TLabel;
Label1: TLabel;
Label2: TLabel;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
procedure HandleMessage(var msg: TagMsg;var handled: Boolean); //message TempHumid;
public
{ Public declarations }
end;
var
Form1: TForm1;
// TempHumid:UINT;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
Application.OnMessage := HandleMessage;
// shellexecute(application.Handle,nil,'.\HumidServer.exe',nil,nil,sw_shownormal)
end;
procedure TForm1.HandleMessage(var msg: TagMsg;var handled: Boolean);
var
temp: double;
begin
if Msg.message = TempHumid then
begin
label1.Caption:= inttostr(Msg.wParam);
temp:= Msg.lParam/10;
label2.Caption:= floattostr(temp);
end;
end;
end.
解决方案1:
代码貌似不多,可惜我没学过VB
论坛签名====================================================================== http://blog.csdn.net/akof1314