源 源源 Unregistered / Unconfirmed GUEST, unregistred user! 2001-09-15 #1 如何汉化showmessage的窗口或者改变它的caption的值。
A antic_ant Unregistered / Unconfirmed GUEST, unregistred user! 2001-09-15 #2 查出showmessage的调用的函数 为 MessageDlgPos(Msg, mtCustom, [mbOK], 0, X, Y); 还可以再向下查找出MessageDlgPos调用的函数 不过不需要了 在这改就可以了 caption就是application.title
查出showmessage的调用的函数 为 MessageDlgPos(Msg, mtCustom, [mbOK], 0, X, Y); 还可以再向下查找出MessageDlgPos调用的函数 不过不需要了 在这改就可以了 caption就是application.title
A Alex_Y Unregistered / Unconfirmed GUEST, unregistred user! 2001-09-15 #4 Application.Title := '标题名' ShowMessage(''); 不过下次用ShowMessage('')的时候你还得改.
Z zhanggeye Unregistered / Unconfirmed GUEST, unregistred user! 2001-09-15 #5 还是用application.MessageBox吧.
B bobo158 Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-24 #8 messagebox故然好,但有一个讨厌的‘咚’声,在某些情况下显得对用户很不友好? 有无更好的替代方案?
M micro73 Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-24 #9 不是我写的,是从其它地方抄来的: function CustorMessageDlg(const aMsg, aCaption: string): integer; var DialogForm: TForm; AOkButton: TButton; aCancelButton: TButton; aLabel: TLabel; i: integer; begin Result := 2; DialogForm := TForm.Create(Application); AOkButton := TButton.Create(Application); aCancelButton := TButton.Create(Application); aLabel := TLabel.Create(Application); with aLabel do begin Font.Size := 8; Caption := '; for i := 1 to length(aMsg) do begin if (I mod 56 = 0) then Caption := Caption + aMsg + #13 else Caption := Caption + aMsg; end; Left := (400 - Width) div 2; Top := 10; Parent := DialogForm; end; with AOkButton do begin Font.Size := 8; Left := 110; Top := 20 + aLabel.Height; Width := 75; Height := 25; TabOrder := 0; Caption := '确定[&O]'; Parent := DialogForm; ModalResult := mrOk; end; with aCancelButton do begin Font.Size := 8; Left := 215; Top := 20 + aLabel.Height; Width := 75; Height := 25; TabOrder := 1; Caption := '取消[&C]'; Parent := DialogForm; ModalResult := mrCancel; end; with DialogForm do begin Font.Size := 8; Name := 'DlgForm'; Width := 400; Height := 25 + 30 + 25 + aLabel.Height; Caption := aCaption; Position := poDesktopCenter; BorderStyle := bsDialog; if ShowModal< > 2 then Result := 1; Free; end; end;
不是我写的,是从其它地方抄来的: function CustorMessageDlg(const aMsg, aCaption: string): integer; var DialogForm: TForm; AOkButton: TButton; aCancelButton: TButton; aLabel: TLabel; i: integer; begin Result := 2; DialogForm := TForm.Create(Application); AOkButton := TButton.Create(Application); aCancelButton := TButton.Create(Application); aLabel := TLabel.Create(Application); with aLabel do begin Font.Size := 8; Caption := '; for i := 1 to length(aMsg) do begin if (I mod 56 = 0) then Caption := Caption + aMsg + #13 else Caption := Caption + aMsg; end; Left := (400 - Width) div 2; Top := 10; Parent := DialogForm; end; with AOkButton do begin Font.Size := 8; Left := 110; Top := 20 + aLabel.Height; Width := 75; Height := 25; TabOrder := 0; Caption := '确定[&O]'; Parent := DialogForm; ModalResult := mrOk; end; with aCancelButton do begin Font.Size := 8; Left := 215; Top := 20 + aLabel.Height; Width := 75; Height := 25; TabOrder := 1; Caption := '取消[&C]'; Parent := DialogForm; ModalResult := mrCancel; end; with DialogForm do begin Font.Size := 8; Name := 'DlgForm'; Width := 400; Height := 25 + 30 + 25 + aLabel.Height; Caption := aCaption; Position := poDesktopCenter; BorderStyle := bsDialog; if ShowModal< > 2 then Result := 1; Free; end; end;
N naughtboy Unregistered / Unconfirmed GUEST, unregistred user! 2002-10-24 #10 如果觉得东的一声不好听,就把注册表里HKEY_CURRENT_USER/Control Panel/Sound的 beep值改为no就行了,呵呵