如何做中文对话框?(100分)

A

amourz

Unregistered / Unconfirmed
GUEST, unregistred user!
messagedlg('are u sure',mtwarning,[mbyes,mbno],0);将出现一个英文的对话框,我现在要中文的,如何做呢?
 
可以自己用窗体实现
 
不能调用系统本身的吗?
 
自己做。有提问的时候都做完了。
 
Application.MessageBox();
 
一种方法:汉化DELPHI的常数单元
找到Borland/Delphi6/Source/Vcl下的Consts.pas文件,修改如下行:
.......
SOKButton = '确定';
SCancelButton = '取消';
SYesButton = '是[&Y]';
SNoButton = '否[&N]';
SHelpButton = '帮助[&H]';
SCloseButton = '关闭[&C]';
SIgnoreButton = '忽略[&I]';
SRetryButton = '重试[&R]';
SAbortButton = '终止';
SAllButton = '全部[&A]';
.........
SMsgDlgWarning = '警告';
SMsgDlgError = '错误';
SMsgDlgInformation = '提示';
SMsgDlgConfirm = '确认';
SMsgDlgYes = '是[&Y]';
SMsgDlgNo = '否[&N]';
SMsgDlgOK = '确定';
SMsgDlgCancel = '取消';
SMsgDlgHelp = '帮助[&H]';
SMsgDlgHelpNone = '没有可用的帮助';
SMsgDlgHelpHelp = '帮助';
SMsgDlgAbort = '终止[&A]';
SMsgDlgRetry = '重试[&R]';
SMsgDlgIgnore = '忽略[&I]';
SMsgDlgAll = '全部[&A]';
SMsgDlgNoToAll = '全否[&O]';
SMsgDlgYesToAll = '全是[&A]';
........
在一个工程中加入此单元,编译工程,再在此单元中找到Consts.dcu文件并将它复制到
Borland/Delphi6/Lib中,覆盖原文件即可。

二种方法:调用Application.MessageBox函数,即可在中文系统中显示中文,在英文系统
中显示英文。
 
顶部