如何让我的应用程序运行后就隐藏起来 设主窗体Visible属性为False. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 设置主窗体visible位false是不行的我想你肯定没有试过!正确的做法是在工程文件里面加一句话,就想下面这样program Server;uses Forms, Main in 'Main.pas' {ServerForm};{$R *.RES}begin Application.Initialize; Application.CreateForm(TServerForm, ServerForm); Application.ShowMainForm := False;//这句话隐藏主窗口 Application.Run;end. 先声明:function RegisterServiceProcess(dwProcessId,dwType:dword):Integer;stdcall;external 'kernel32.dll'在主程序中调用:RegisterServiceProcess(GetCurrentProcessID,1); { 让ctrl+alt+del也无法发现进程 }RegisterServiceProcess(GetCurrentProcessID,0); { 恢复让ctrl+alt+del发现进程 }{ 是窗口不显示在任务栏,并隐藏窗口 }ShowWindow( Application.Handle, SW_HIDE );SetWindowLong( Application.Handle, GWL_EXSTYLE, GetWindowLong(Application.Handle, GWL_EXSTYLE) or WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW); netsong的方法很全面,如果只是想隐藏窗口,就在oncreate事件中调用函数showwindow(Application.Handle,SW_HIDE);要显示的时候,就调用showwindow(Application.Handle,SW_SHOW); 的确我是猜的,试了试果然不行.netsong讲的足够了.隐藏窗口用ShowWindow;要想在任务栏不显示用SetWindowLong,或开始就注册为ToolWindow. CreateOleObject 写了个图像缩放函数 查询问题,请教高手 Imagelib Library Corporate Suite 6.0 有没有去黑边的功能 求助:三层系统中BDE的问题 在一个程序的项目文件中要做好多加载,如何解决像系统死机的情况? 【【【DBgrid中的数据显示问题】】】 displayformat:='#0.00'怎么不行呀?? 我有一个delphi打印控件sreport,是dpk包,请问怎么装到组件面板上去?我怎样定义它的属性和方法! 关于在线程中的事务问题 初学者问题,望高手帮忙! 请教几个与驱动器有关的问题. 请问能把Botton改成2D效果吗?
我想你肯定没有试过!
正确的做法是在工程文件里面加一句话,就想下面这样
program Server;uses
Forms,
Main in 'Main.pas' {ServerForm};{$R *.RES}begin
Application.Initialize;
Application.CreateForm(TServerForm, ServerForm);
Application.ShowMainForm := False;//这句话隐藏主窗口
Application.Run;
end.
function RegisterServiceProcess(dwProcessId,dwType:dword):Integer;stdcall;external 'kernel32.dll'在主程序中调用:
RegisterServiceProcess(GetCurrentProcessID,1); { 让ctrl+alt+del也无法发现进程 }
RegisterServiceProcess(GetCurrentProcessID,0); { 恢复让ctrl+alt+del发现进程 }{ 是窗口不显示在任务栏,并隐藏窗口 }
ShowWindow( Application.Handle, SW_HIDE );
SetWindowLong( Application.Handle, GWL_EXSTYLE,
GetWindowLong(Application.Handle, GWL_EXSTYLE) or
WS_EX_TOOLWINDOW and not WS_EX_APPWINDOW);
如果只是想隐藏窗口,就在oncreate事件中调用函数
showwindow(Application.Handle,SW_HIDE);
要显示的时候,就调用
showwindow(Application.Handle,SW_SHOW);