第一个界面的代码:
unit OuvasA;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, StdCtrls, ExtCtrls, Grids, DBGrids, ToolWin, ActnMan,
ActnCtrls, jpeg, Buttons;type
TForm1 = class(TForm)
stat1: TStatusBar;
lblTimeShow: TLabel;
pnl2: TPanel;
lbl9: TLabel;
lbl8: TLabel;
lblA: TLabel;
lbl11: TLabel;
lblB: TLabel;
lbl10: TLabel;
dbgrdPast: TDBGrid;
edtInput: TEdit;
img1: TImage;
lbl1: TLabel;
lblName: TLabel;
pnl1: TPanel;
lbl7: TLabel;
dbgrdFresh: TDBGrid;
lbl: TLabel;
lblSex: TLabel;
lbl3: TLabel;
lblid: TLabel;
lblToTime: TLabel;
img2: TImage;
Image1: TImage;
img3: TImage;
btn1: TSpeedButton;
btn2: TSpeedButton;
lbl2: TLabel;
lbl4: TLabel;
img4: TImage;
img5: TImage;
img6: TImage;
btnAnew: TButton;
procedure FormShow(Sender: TObject);
procedure btnAnewClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation
uses UnitCheck;{$R *.dfm}
procedure TForm1.FormShow(Sender: TObject);
var
sysTime:TSystemTime;
begin
//窗体加载的时候显示时间
GetSystemTime(sysTime);
lblTimeShow.Caption:=IntToStr(sysTime.wYear)+'-'+IntToStr(sysTime.wMonth) +'-'+IntToStr(sysTime.wDay);
//窗体加载时显示排药药师
stat1.Panels[1].Text:='java';
//窗体加载初始化新到患者的字体颜色显示
lblName.Font.Color:=clWhite;
lblSex.Font.Color:=clWhite;
lbl.Font.Color:=clWhite;
lbl3.Font.color:=clWhite;
lblid.Font.Color:=clWhite;
lblToTime.Font.Color:=clWhite;end;procedure TForm1.btnAnewClick(Sender: TObject);
begin
ForCheck.ShowModal;//重新打印按钮
end;end.
第二个界面的代码:unit UnitCheck;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, Grids, DBGrids, jpeg, Buttons, ComCtrls;type
TForCheck = class(TForm)
edtID: TEdit;
dbgrd1: TDBGrid;
lbl2: TLabel;
img1: TImage;
img2: TImage;
lbl3: TLabel;
img3: TImage;
lblName: TLabel;
lblSex: TLabel;
lbl: TLabel;
lblid: TLabel;
img4: TImage;
btn1: TSpeedButton;
stat1: TStatusBar;
lbl1: TLabel;
dbgrd2: TDBGrid;
btnOK: TButton;
btnAdd: TButton;
procedure FormShow(Sender: TObject);
procedure btnAddClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
ForCheck: TForCheck;implementation
uses UnitAdd;{$R *.dfm}procedure TForCheck.FormShow(Sender: TObject);
var
sysTime:TSystemTime;
begin
GetSystemTime(sysTime);
stat1.Panels[1].Text:='java';//显示药师姓名
stat1.Panels[3].Text:='null';//显示药师工号
stat1.Panels[5].Text:='null';//显示药师今日排药
stat1.Panels[7].Text:=IntToStr(sysTime.wYear)+'年'+IntToStr(sysTime.wMonth)+'月'+IntToStr(sysTime.wDay)
+'日'+'--'+IntToStr(sysTime.wHour)+'时'+IntToStr(sysTime.wMinute)+'分';//显示当前时间 //窗体加载初始化新到患者的字体颜色显示
lblName.Font.Color:=clWhite;
lblSex.Font.Color:=clWhite;
lbl.Font.Color:=clWhite;
lblid.Font.color:=clWhite;
end;procedure TForCheck.btnAddClick(Sender: TObject);
begin
ForAdd.ShowModal;
end;end.东西运行后,第一个窗体是好的,但是当我点击重新打印后想要预览第二个窗体的时候就会弹出改错误.而且重启也没有效,这个错误阻扰我的模块进程好多天了
unit OuvasA;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, StdCtrls, ExtCtrls, Grids, DBGrids, ToolWin, ActnMan,
ActnCtrls, jpeg, Buttons;type
TForm1 = class(TForm)
stat1: TStatusBar;
lblTimeShow: TLabel;
pnl2: TPanel;
lbl9: TLabel;
lbl8: TLabel;
lblA: TLabel;
lbl11: TLabel;
lblB: TLabel;
lbl10: TLabel;
dbgrdPast: TDBGrid;
edtInput: TEdit;
img1: TImage;
lbl1: TLabel;
lblName: TLabel;
pnl1: TPanel;
lbl7: TLabel;
dbgrdFresh: TDBGrid;
lbl: TLabel;
lblSex: TLabel;
lbl3: TLabel;
lblid: TLabel;
lblToTime: TLabel;
img2: TImage;
Image1: TImage;
img3: TImage;
btn1: TSpeedButton;
btn2: TSpeedButton;
lbl2: TLabel;
lbl4: TLabel;
img4: TImage;
img5: TImage;
img6: TImage;
btnAnew: TButton;
procedure FormShow(Sender: TObject);
procedure btnAnewClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation
uses UnitCheck;{$R *.dfm}
procedure TForm1.FormShow(Sender: TObject);
var
sysTime:TSystemTime;
begin
//窗体加载的时候显示时间
GetSystemTime(sysTime);
lblTimeShow.Caption:=IntToStr(sysTime.wYear)+'-'+IntToStr(sysTime.wMonth) +'-'+IntToStr(sysTime.wDay);
//窗体加载时显示排药药师
stat1.Panels[1].Text:='java';
//窗体加载初始化新到患者的字体颜色显示
lblName.Font.Color:=clWhite;
lblSex.Font.Color:=clWhite;
lbl.Font.Color:=clWhite;
lbl3.Font.color:=clWhite;
lblid.Font.Color:=clWhite;
lblToTime.Font.Color:=clWhite;end;procedure TForm1.btnAnewClick(Sender: TObject);
begin
ForCheck.ShowModal;//重新打印按钮
end;end.
第二个界面的代码:unit UnitCheck;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, Grids, DBGrids, jpeg, Buttons, ComCtrls;type
TForCheck = class(TForm)
edtID: TEdit;
dbgrd1: TDBGrid;
lbl2: TLabel;
img1: TImage;
img2: TImage;
lbl3: TLabel;
img3: TImage;
lblName: TLabel;
lblSex: TLabel;
lbl: TLabel;
lblid: TLabel;
img4: TImage;
btn1: TSpeedButton;
stat1: TStatusBar;
lbl1: TLabel;
dbgrd2: TDBGrid;
btnOK: TButton;
btnAdd: TButton;
procedure FormShow(Sender: TObject);
procedure btnAddClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
ForCheck: TForCheck;implementation
uses UnitAdd;{$R *.dfm}procedure TForCheck.FormShow(Sender: TObject);
var
sysTime:TSystemTime;
begin
GetSystemTime(sysTime);
stat1.Panels[1].Text:='java';//显示药师姓名
stat1.Panels[3].Text:='null';//显示药师工号
stat1.Panels[5].Text:='null';//显示药师今日排药
stat1.Panels[7].Text:=IntToStr(sysTime.wYear)+'年'+IntToStr(sysTime.wMonth)+'月'+IntToStr(sysTime.wDay)
+'日'+'--'+IntToStr(sysTime.wHour)+'时'+IntToStr(sysTime.wMinute)+'分';//显示当前时间 //窗体加载初始化新到患者的字体颜色显示
lblName.Font.Color:=clWhite;
lblSex.Font.Color:=clWhite;
lbl.Font.Color:=clWhite;
lblid.Font.color:=clWhite;
end;procedure TForCheck.btnAddClick(Sender: TObject);
begin
ForAdd.ShowModal;
end;end.东西运行后,第一个窗体是好的,但是当我点击重新打印后想要预览第二个窗体的时候就会弹出改错误.而且重启也没有效,这个错误阻扰我的模块进程好多天了
解决方案 »
- delphi odac控件问题
- 如何将 Image2 中与 Image1 中不同的部分提取并无闪烁的覆盖到 Image1 中相同的位置?
- 大家看我这样做对吗? 一个基础问题
- 如何获得一个文本的行数,在线等,急!
- 大虾帮忙看看http://expert.csdn.net/Expert/topic/2556/2556311.xml?temp=1.432437E-02
- 请帮忙!
- Delphi DragQueryFileW问题
- 关于打包的问题
- 哪有RXRichEdit或RichEdit98 For Delphi6下载
- web xmlhttprequest 怎么接收xml文件
- 如何响应窗体的最小化事件?
- 如何劫持dns,将某程序访问的ip地址以及端口改为本地
你窗口的FormStyle是什么?
formstyle是默认的啊 我也没有动它
你点击重新打印按钮,执行的是
ForCheck.ShowModal;//重新打印按钮下面的事件设置断点,看看会在什么地方出错:
procedure TForCheck.FormShow(Sender: TObject);
var
sysTime:TSystemTime;
begin
GetSystemTime(sysTime);
stat1.Panels[1].Text:='java';//显示药师姓名
stat1.Panels[3].Text:='null';//显示药师工号
stat1.Panels[5].Text:='null';//显示药师今日排药
stat1.Panels[7].Text:=IntToStr(sysTime.wYear)+'年'+IntToStr(sysTime.wMonth)+'月'+IntToStr(sysTime.wDay)
+'日'+'--'+IntToStr(sysTime.wHour)+'时'+IntToStr(sysTime.wMinute)+'分';//显示当前时间 //窗体加载初始化新到患者的字体颜色显示
lblName.Font.Color:=clWhite;
lblSex.Font.Color:=clWhite;
lbl.Font.Color:=clWhite;
lblid.Font.color:=clWhite;
end;