小妹最近剛剛進了一家新公司。有一款軟件,是用Delphi7開發的。 有一點小地方需要修改,有些急。 但是我從來沒有用過Delphi7,完全不熟悉。 自己看了一兩天代碼,根本找不到頭緒。 在一个页面填写信息后,点击预览会出现一个表单。 设置表单里面那个格式和文字的代码,应该在哪里找啊? 我要改那个表单里面的一栏文字,但是怎么也找不到源代码到底在哪? 怎么办啊? 求助……各种求助。求助Delphi高手
如果没有文档,你就复制那行文字,挨个pas文件里ctrl+f 找,找到定义的地方就行了。
var
str,zaiyao,price,cbbm:string;
i,sd,s,m,n:integer;
begin
if edit1.Text ='' then
begin
showmessage('請選擇查詢到的記錄');
exit;
end;
// if edit6.Text <>'0' then
//begin
f_askltdprintmod.QRExprMemo1.Lines.Clear ;
f_askltdprintmod.QRExprMemo2.Lines.Clear ;
f_askltdprintmod.QRExprMemo3.Lines.Clear ;
f_askltdprintmod.QRExprMemo4.Lines.Clear ;
f_askltdprintmod.QRExprMemo5.Lines.Clear ;
f_askltdprintmod.QRExprMemo6.Lines.Clear ;
f_askltdprintmod.QRExprMemo7.Lines.Clear ;
f_askltdprintmod.QRExprMemo8.Lines.Clear ;
f_askltdprintmod.QRLabel71.Caption :='⊙';
f_askltdprintmod.QRLabel72.Caption :='⊙';
f_askltdprintmod.QRLabel73.Caption :='⊙';
f_askltdprintmod.QRLabel74.Caption :='⊙';
f_askltdprintmod.QRLabel75.Caption :='⊙';
f_askltdprintmod.QRLabel76.Caption :='⊙';
f_askltdprintmod.QRLabel77.Caption :='⊙';
f_askltdprintmod.QRLabel78.Caption :='⊙';
f_askltdprintmod.QRLabel79.Caption :='⊙';
f_askltdprintmod.QRLabel80.Caption :='';
f_askltdprintmod.QRLabel81.Caption :='';
f_askltdprintmod.QRLabel82.Caption :='';
f_askltdprintmod.QRLabel83.Caption :='';
f_askltdprintmod.QRLabel84.Caption :='';
f_askltdprintmod.QRLabel100.Caption :='';
f_askltdprintmod.QRLabel47.Caption :='';
if trim(combobox9.Text)='RMB' then
combobox9.Text:='チ刽';
if trim(combobox9.Text)='HKD' then
combobox9.Text:='翠刽';
if trim(combobox9.Text)='JPY' then
combobox9.Text:='ら刽';
if trim(combobox9.Text)='USD' then
combobox9.Text:='';
if trim(combobox9.Text)='EUR' then
combobox9.Text:='稼じ';
if trim(combobox9.Text)='TWD' then
combobox9.Text:='刽';
f_askltdprintmod.QRLabel24.Caption :='璸:'+combobox9.Text;
f_askltdprintmod.QRLabel86.Caption :='';
f_askltdprintmod.QRLabel51.Caption :='';
我應該怎麼找到report窗体啊?
是exe里嵌html,通过html的form实现交互的?
一般的d程序是自己的form
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;type
TForm1 = class(TForm)
Panel1: TPanel;
Edit1: TEdit;
PopupMenu1: TPopupMenu;
Label1: TLabel;
procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);
begin
/////
end;procedure TForm1.FormShow(Sender: TObject);
begin
////
end;end.
把你这部分贴上来看看type
TForm1 = class(TForm)
Panel1: TPanel;
Edit1: TEdit;
PopupMenu1: TPopupMenu;
Label1: TLabel;
procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
f_askltdprintmod: Tf_askltdprintmod;
chardx:string;
implementation
我剛剛是找不到這段代碼的。 然後按照百度上的安裝了quickrep,才有的
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, QRCtrls, QuickRpt, ExtCtrls, ToolWin, ComCtrls;type
Tf_askltdprintmod = class(TForm)
QuickRep1: TQuickRep;
TitleBand1: TQRBand;
QRShape1: TQRShape;
QRShape5: TQRShape;
QRShape7: TQRShape;
QRShape9: TQRShape;
QRShape10: TQRShape;
QRShape23: TQRShape;
QRShape24: TQRShape;
QRShape25: TQRShape;
QRShape26: TQRShape;
QRShape27: TQRShape;
QRShape12: TQRShape;
QRShape11: TQRShape;
QRShape14: TQRShape;
QRShape15: TQRShape;
QRShape16: TQRShape;
QRShape30: TQRShape;
QRShape31: TQRShape;
QRShape32: TQRShape;
QRShape33: TQRShape;
QRShape34: TQRShape;
QRShape35: TQRShape;
QRLabel2: TQRLabel;
QRLabel4: TQRLabel;
QRLabel5: TQRLabel;
QRLabel6: TQRLabel;
QRLabel7: TQRLabel;
QRLabel9: TQRLabel;
QRLabel11: TQRLabel;
QRLabel12: TQRLabel;
QRLabel13: TQRLabel;
QRLabel10: TQRLabel;
QRLabel14: TQRLabel;
QRLabel15: TQRLabel;
QRLabel16: TQRLabel;
QRLabel17: TQRLabel;
QRLabel18: TQRLabel;
QRLabel19: TQRLabel;
QRLabel20: TQRLabel;
QRLabel21: TQRLabel;
QRLabel23: TQRLabel;
QRLabel55: TQRLabel;
QRLabel57: TQRLabel;
QRLabel58: TQRLabel;
QRLabel59: TQRLabel;
QRLabel63: TQRLabel;
QRLabel65: TQRLabel;
QRLabel67: TQRLabel;
QRLabel69: TQRLabel;
QRLabel70: TQRLabel;
QRLabel86: TQRLabel;
QRShape43: TQRShape;
QRLabel24: TQRLabel;
QRLabel71: TQRLabel;
QRLabel26: TQRLabel;
QRLabel72: TQRLabel;
QRLabel28: TQRLabel;
QRLabel73: TQRLabel;
QRLabel25: TQRLabel;
QRLabel74: TQRLabel;
QRLabel27: TQRLabel;
QRLabel75: TQRLabel;
QRLabel68: TQRLabel;
QRLabel76: TQRLabel;
QRLabel85: TQRLabel;
QRLabel77: TQRLabel;
QRLabel87: TQRLabel;
QRLabel78: TQRLabel;
QRLabel88: TQRLabel;
QRLabel79: TQRLabel;
QRLabel89: TQRLabel;
QRShape22: TQRShape;
QRShape36: TQRShape;
QRLabel80: TQRLabel;
QRLabel30: TQRLabel;
QRShape44: TQRShape;
QRLabel81: TQRLabel;
QRLabel32: TQRLabel;
QRShape45: TQRShape;
QRLabel82: TQRLabel;
QRLabel33: TQRLabel;
QRShape46: TQRShape;
QRLabel83: TQRLabel;
QRLabel35: TQRLabel;
QRShape47: TQRShape;
QRLabel84: TQRLabel;
QRLabel37: TQRLabel;
QRShape8: TQRShape;
QRShape21: TQRShape;
QRShape37: TQRShape;
QRLabel38: TQRLabel;
QRLabel39: TQRLabel;
QRLabel1: TQRLabel;
QRLabel40: TQRLabel;
QRLabel41: TQRLabel;
QRLabel42: TQRLabel;
QRShape20: TQRShape;
QRShape3: TQRShape;
QRLabel43: TQRLabel;
QRShape40: TQRShape;
QRRichText1: TQRRichText;
QRShape4: TQRShape;
QRShape6: TQRShape;
QRRichText2: TQRRichText;
QRShape41: TQRShape;
QRShape42: TQRShape;
QRLabel44: TQRLabel;
QRLabel45: TQRLabel;
QRLabel46: TQRLabel;
QRExprMemo1: TQRExprMemo;
QRShape2: TQRShape;
QRShape48: TQRShape;
QRShape49: TQRShape;
QRLabel31: TQRLabel;
QRRichText3: TQRRichText;
QRLabel34: TQRLabel;
QRLabel36: TQRLabel;
QRShape18: TQRShape;
QRShape13: TQRShape;
QRLabel47: TQRLabel;
QRLabel48: TQRLabel;
QRRichText4: TQRRichText;
QRRichText5: TQRRichText;
QRLabel51: TQRLabel;
QRShape38: TQRShape;
QRShape39: TQRShape;
QRShape50: TQRShape;
QRShape29: TQRShape;
QRShape51: TQRShape;
QRShape52: TQRShape;
QRShape53: TQRShape;
QRShape54: TQRShape;
QRShape55: TQRShape;
QRShape56: TQRShape;
QRShape57: TQRShape;
QRShape58: TQRShape;
QRShape59: TQRShape;
QRShape60: TQRShape;
QRShape61: TQRShape;
QRShape62: TQRShape;
QRShape63: TQRShape;
QRShape64: TQRShape;
QRShape66: TQRShape;
QRShape67: TQRShape;
QRLabel52: TQRLabel;
QRLabel53: TQRLabel;
QRLabel54: TQRLabel;
QRLabel56: TQRLabel;
QRLabel60: TQRLabel;
QRShape68: TQRShape;
QRLabel62: TQRLabel;
QRLabel90: TQRLabel;
QRLabel8: TQRLabel;
QRRichText6: TQRRichText;
QRShape69: TQRShape;
QRShape70: TQRShape;
QRLabel22: TQRLabel;
QRLabel29: TQRLabel;
QRRichText7: TQRRichText;
QRExprMemo2: TQRExprMemo;
QRExprMemo3: TQRExprMemo;
QRLabel66: TQRLabel;
QRExprMemo4: TQRExprMemo;
QRLabel92: TQRLabel;
QRShape71: TQRShape;
QRLabel93: TQRLabel;
QRLabel94: TQRLabel;
QRLabel95: TQRLabel;
QRLabel96: TQRLabel;
QRLabel50: TQRLabel;
QRLabel64: TQRLabel;
QRLabel3: TQRLabel;
QRLabel49: TQRLabel;
QRLabel61: TQRLabel;
QRExprMemo5: TQRExprMemo;
QRExprMemo6: TQRExprMemo;
QRLabel91: TQRLabel;
QRShape17: TQRShape;
QRLabel100: TQRLabel;
QRShape19: TQRShape;
QRShape28: TQRShape;
QRShape65: TQRShape;
QRShape73: TQRShape;
QRLabel99: TQRLabel;
QRShape74: TQRShape;
QRShape75: TQRShape;
QRShape76: TQRShape;
QRShape77: TQRShape;
QRLabel97: TQRLabel;
QRExprMemo7: TQRExprMemo;
QRLabel98: TQRLabel;
QRExprMemo8: TQRExprMemo;
QRShape72: TQRShape;
QRShape78: TQRShape;
QRLabel101: TQRLabel;
QRLabel102: TQRLabel;
procedure QuickRep1BeforePrint(Sender: TCustomQuickRep;
var PrintReport: Boolean);
procedure convert(var length :integer);
private
{ Private declarations }
public
{ Public declarations }
end;var
f_askltdprintmod: Tf_askltdprintmod;
chardx:string;
implementationuses umake;
窗體代找到了,但是沒有窗體啊~~
那現在能確定是用Quickrep控件做的么?
如圖,怎樣是已經安裝好了Quickrep嗎?
否则会报错的话。你就Component下的Install Packages打开
C:\Program Files\Borland\Delphi7\Bin\dclqrt70.bpl加入就行了。Quickrep不是窗体,他是窗体里面的一个控件,一般是被拉了很小。或是移到了超出窗体之外的位置。
你按F11,呼出Object TreeView看一下QuickRep1的属性是在那里,也就是Top 和Left 的值,看一下是不是在窗体外。
如果你按F12也没有窗口的话,那说明你的 Delphi有问题,最好重装一下Delphi。再装QReport。
最后,再打开你的工程看看能不能用F12呼出窗口。如果还是不行,你就把 cgaskltdprintmod.pas, cgaskltdprintmod.dfm,umake.pas,如果有umake.dfm的话,一起复制到一个文件夹中,,在Delphi中,新建一个工程。把 cgaskltdprintmod.pas, cgaskltdprintmod.dfm,umake.pas,umake.dfm加入,测试一下是什么问题。
F11是能出來的,F12也能出來。只是和那個表單有關的那個F12,窗體不出來。我在一個個窗體找那個QuickRep1控件,希望能找到。