O
otqsoft
Unregistered / Unconfirmed
GUEST, unregistred user!
我在作一个管理软件,用的是ADO + Oracle8i + Delphi7 ,主控台在本机运行没有问题,可是到EXE放到其它机器上就不能运行了,出现stack overflow提示,不知道怎么回事儿?
那位哥哥知道,帮帮忙吧,不胜感谢。。。
主窗的创建与显示事件如下:
procedure TfrmMain.FormCreate(Sender: TObject);
var
str: string;
tmpWin: FWinSet;
begin
if not LinkADOComm(ADOLink) then
begin
MessBox('数据库连接失败,请速与管理员联系!',MBOk,MsgCaption);
Application.Terminate;
end;
str:= ExtractFilePath(paramstr(0))+'top.swf';
if PanDH2.Visible then PanDH1.Visible:= False;
GetUnitName;
if not FileExisTs(str) then PanFlash.Visible:= False else
begin
showFlash.Movie:= str;
PanFlash.Visible:= True;
PanFlash.Enabled:= False;
end;
tmpWin:= WinSet(self,'read');
lblID.Caption:= tmpWin.Title;
if tmpWin.Statu = 1 then WindowState:= wsMaximized else
begin
WindowState:= wsNormal;
Left:= tmpWin.Left;
Top:= tmpWin.Top;
Height:= tmpWin.Height;
Width:= tmpWin.Width;
frmLeft:= Left;
frmTop:= Top;
end;
FrmOpen:= THCControlList.Create;
MsgDll:= THCDllList.Create;
RegFlag:= GetUserReg;
if RegFlag then
begin
Application.CreateForm(TfrmLogin, frmLogin);
frmLogin.ShowModal;
frmLogin.Free;
Application.ProcessMessages;
end
else
begin
Application.CreateForm(TfrmReg, frmReg);
frmReg.ShowModal;
frmReg.Free;
Application.ProcessMessages;
end;
if RegFlag then Caption:= MsgCaption + ' [ 已注册 ] ' else Caption:= MsgCaption + ' [ 未注册 ] ';
end;
procedure TfrmMain.FormShow(Sender: TObject);
var
str: string;
begin
DoubleBuffered:= True;
tmpMenu:= TMenuExample.Create(nil);
tmpMenu.ADOLink:= ADOLink;
tmpMenu.MainMenu:= MenuTool;
tmpMenu.MainForm:= frmMain;
tmpMenu.DeleteMDIBorder;
tmpMenu.RoleFlag:= RegFlag;
tmpMenu.GroupBar:= GroupBar;
tmpMenu.MUserName:= UserName;
tmpMenu.CreateSysMenu(UserID);
lblMemo.Caption:= ' ' + UnitName;
str:= ReadAndWriteIni('Read','Read');
if str <> '' then ImgID.Picture.LoadFromFile(str);
lblDate.Caption:= TodayDate;
lblUser.Caption:= ' 员工编号:' + UserID + ' 姓名:' + UserName;
GetIniValue('GroupBar','DHList','read');
if PanDH2.Visible then
begin
menuStatu.Color:= GroupBar.Color;
PageControl.BackgroundColor:= GroupBar.Color;
end;
Application.ProcessMessages;
end;
那位哥哥知道,帮帮忙吧,不胜感谢。。。
主窗的创建与显示事件如下:
procedure TfrmMain.FormCreate(Sender: TObject);
var
str: string;
tmpWin: FWinSet;
begin
if not LinkADOComm(ADOLink) then
begin
MessBox('数据库连接失败,请速与管理员联系!',MBOk,MsgCaption);
Application.Terminate;
end;
str:= ExtractFilePath(paramstr(0))+'top.swf';
if PanDH2.Visible then PanDH1.Visible:= False;
GetUnitName;
if not FileExisTs(str) then PanFlash.Visible:= False else
begin
showFlash.Movie:= str;
PanFlash.Visible:= True;
PanFlash.Enabled:= False;
end;
tmpWin:= WinSet(self,'read');
lblID.Caption:= tmpWin.Title;
if tmpWin.Statu = 1 then WindowState:= wsMaximized else
begin
WindowState:= wsNormal;
Left:= tmpWin.Left;
Top:= tmpWin.Top;
Height:= tmpWin.Height;
Width:= tmpWin.Width;
frmLeft:= Left;
frmTop:= Top;
end;
FrmOpen:= THCControlList.Create;
MsgDll:= THCDllList.Create;
RegFlag:= GetUserReg;
if RegFlag then
begin
Application.CreateForm(TfrmLogin, frmLogin);
frmLogin.ShowModal;
frmLogin.Free;
Application.ProcessMessages;
end
else
begin
Application.CreateForm(TfrmReg, frmReg);
frmReg.ShowModal;
frmReg.Free;
Application.ProcessMessages;
end;
if RegFlag then Caption:= MsgCaption + ' [ 已注册 ] ' else Caption:= MsgCaption + ' [ 未注册 ] ';
end;
procedure TfrmMain.FormShow(Sender: TObject);
var
str: string;
begin
DoubleBuffered:= True;
tmpMenu:= TMenuExample.Create(nil);
tmpMenu.ADOLink:= ADOLink;
tmpMenu.MainMenu:= MenuTool;
tmpMenu.MainForm:= frmMain;
tmpMenu.DeleteMDIBorder;
tmpMenu.RoleFlag:= RegFlag;
tmpMenu.GroupBar:= GroupBar;
tmpMenu.MUserName:= UserName;
tmpMenu.CreateSysMenu(UserID);
lblMemo.Caption:= ' ' + UnitName;
str:= ReadAndWriteIni('Read','Read');
if str <> '' then ImgID.Picture.LoadFromFile(str);
lblDate.Caption:= TodayDate;
lblUser.Caption:= ' 员工编号:' + UserID + ' 姓名:' + UserName;
GetIniValue('GroupBar','DHList','read');
if PanDH2.Visible then
begin
menuStatu.Color:= GroupBar.Color;
PageControl.BackgroundColor:= GroupBar.Color;
end;
Application.ProcessMessages;
end;