Delphi language is highly advocated by its efficient, simple and powerful features. However, until the recently launched version 6.0, because they are all English version, when using Delphi to develop database applications, their report preview controls are all in English characters, which is the program for developing Chinese interfaces. Not coordinated. The author has found that Delphi6.0 calls the form file qrprev.dfm when performing a report preview, which is located under the / program files / borland / delphi6 / lib folder. Toolbars, buttons, etc. on the report premonfare are all defined in this file! It is relatively simple to find the key to the problem. Use Delphi6.0 to open the qrprev.dfm file, it will find a TQRStandPreView object class, and under this class, the Status (TSTATUSBAR), TTOOLBAR, Preview Form (TQRPREVIEW), and a graphic list ( Timagelist four classes. We are to conduct Chinese in English on the Caption, Hint, and State Bar on the toolbar. After the article, the list of procedures has indicated the revision of the author, in which the statement is marked with a *, the author's Chinese modification is made, and there are two * numbers that the author is added to support Chinese fonts and beautification interfaces. Scriptures. The program cannot be fill // and} annotation statements (of course, the * number before the statement is not retained). If you want, you can also define some buttons on the toolbar, even add a picture. Of course, apply this method, you can also conduct Chinese resources to other system resources of Delphi, so that you have more friendly software interfaces, more in line with the operation requirements of Chinese users.
//Qrprev.dfm file content: Object QrstandardPreview: tqrstandPreview Left = 229 TOP = 191 width = 652 height = 579 * caption = '"Xi'an University of Electronic Science and Technology Exhaus Technology" Report Preview' Color = CLBTNFACE ** FONT. charset = GB2312_CHARSET ** Font.Height = -12 ** Font.Name = 'Arial' ParentFont = True KeyPreview = True OldCreateOrder = True Position = poScreenCenter ShowHint = True OnClose = FormClose OnCreate = FormCreate OnKeyDown = FormKeyDown OnResize = FormResize PixelsPerInch = 96 * TextHeight = 12 object StatusBar: TStatusBar Left = 0 Top = 533 Width = 644 Height = 19 Panels =
ZoomTo100Click end object ZoomToWidth: TToolButton Left = 54 Top = 0 ** AutoSize = True * Hint = 'fit the screen width' * Caption = 'width' Grouped = True ImageIndex = 2 Style = tbsCheck OnClick = ZoomToWidthClick end object Separator1: TToolButton Left = 77 Top = 0 Width = 8 Caption = 'separator1' ImageIndex = 3 Style = tbsDivider end object FirstPage: TToolButton Left = 85 Top = 0 ** AutoSize = True * Hint = 'first page' * Caption = 'Home' ImageIndex = 3 OnClick = FirstPageClick end object PreviousPage: TToolButton Left = 108 Top = 0 ** AutoSize = True * Hint = 'Previous' * Caption = 'Previous' ImageIndex = 4 OnClick = PrevPageClick end object ToolButton2: TToolButton Left = 131 Top = 0 ** AutoSize = True * Hint = 'Next' * Caption = 'the page' ImageIndex = 5 OnClick = NextPageClick end object LastPage: TToolButton Left = 154 Top = 0 ** AutoSize = True * Hint = 'last One page '* caption =' Last page 'imageindex = 6 onclick = lastpageClick end object separator2: Ttoo lButton Left = 177 Top = 0 Width = 8 Caption = 'Separator2' ImageIndex = 7 Style = tbsDivider end object PrintSetup: TToolButton Left = 185 Top = 0 ** AutoSize = True * Hint = 'Printer Setup' * Caption = 'set' Enabled = false imageindex = 7 onclick = printsetupClick end object print: ttoolbutton left = 208 TOP = 0 ** AutoSize = true * hint = 'Print' * caption =
'Print' Enabled = False ImageIndex = 8 OnClick = PrintClick end object Separator3: TToolButton Left = 231 Top = 0 Width = 8 Caption = 'Separator3' ImageIndex = 9 Style = tbsDivider end object SaveReport: TToolButton Left = 239 Top = 0 ** AutoSize = True * Hint = 'save to file' * Caption = 'save' ImageIndex = 10 OnClick = SaveClick end object LoadReport: TToolButton Left = 262 Top = 0 ** AutoSize = True * Hint = 'file loaded from the' * Caption = 'load' ImageIndex = 9 OnClick = LoadClick end object Separator4: TToolButton Left = 285 Top = 0 Width = 8 Caption = 'Separator4' ImageIndex = 11 Style = tbsDivider end object exitButton: TSpeedButton Left = 293 Top = 0 Width = 50 Height = 22 Caption = 'off' OnClick = ExitClick end end object QRPreview: TQRPreview Left = 0 Top = 32 Width = 622 Height = 501 HorzScrollBar.Tracking = True VertScrollBar.Tracking = True Align = alClient TabOrder = 2 OnPageAvailable = QRPreviewPageA vailable OnProgressUpdate = QRPreviewProgressUpdate PageNumber = 1 Zoom = 100 end object Images: TImageList Left = 54 Top = 42 Bitmap = {494C0101 ......} // end end Zhang omitted zhangking@263.net QQ: 9365822 http: //soft.why100000 .com