CnPack Forum


 
Subject: 程序任务栏隐藏问题
菜鸟一号
新警察
Rank: 1



UID 41423
Digest Posts 0
Credits 14
Posts 5
点点分 14
Reading Access 10
Registered 2008-12-9
Status Offline
Post at 2008-12-9 17:48  Profile | Blog | P.M. 
程序任务栏隐藏问题

写了一个程序是做提示用的
不想再任务栏有窗口 ,网上搜了下资料发现代码如下


SetWindowLong(Application.Handle, GWL_EXSTYLE, WS_EX_TOOLWINDOW);

经过测试发现程序依然显示在任务栏不解,请大牛指点
修改Application.MainFormOnTaskBar:=False;也不行

编译器 D2007

[ 本帖最后由 菜鸟一号 于 2008-12-9 18:00 编辑 ]
Top
Passion (LiuXiao)
管理员
Rank: 9Rank: 9Rank: 9


UID 359
Digest Posts 19
Credits 6838
Posts 3591
点点分 6838
Reading Access 102
Registered 2004-3-28
Status Offline
Post at 2008-12-9 17:49  Profile | Blog | P.M. 
试一试Application.MainForm.Handle?
Top
菜鸟一号
新警察
Rank: 1



UID 41423
Digest Posts 0
Credits 14
Posts 5
点点分 14
Reading Access 10
Registered 2008-12-9
Status Offline
Post at 2008-12-9 17:54  Profile | Blog | P.M. 


  Application.Initialize;
  Application.CreateForm(TFrm_Test, Frm_Test);
  SetWindowLong(Application.MainForm.Handle,GWL_EXSTYLE,WS_EX_TOOLWINDOW );
  Application.Run;

依然显示

[ 本帖最后由 菜鸟一号 于 2008-12-9 17:56 编辑 ]
Top
菜鸟一号
新警察
Rank: 1



UID 41423
Digest Posts 0
Credits 14
Posts 5
点点分 14
Reading Access 10
Registered 2008-12-9
Status Offline
Post at 2008-12-9 17:57  Profile | Blog | P.M. 
是不是 这个窗口WS_EX_TOOLWINDOW 类型有问题
只改变了窗口的外观 任务栏没变化
Top
stanleyxu2005
新警察
Rank: 1



UID 5617
Digest Posts 1
Credits 45
Posts 15
点点分 45
Reading Access 10
Registered 2007-2-11
Status Offline
Post at 2009-1-1 08:00  Profile | Site | Blog | P.M. 
Application.MainFormOnTaskBar := False;
ShowWindow(Application.Handle, SW_HIDE);




http://getgosurf.com/forum/
Top
 




All times are GMT++8, the time now is 2024-12-18 09:57

    本论坛支付平台由支付宝提供
携手打造安全诚信的交易社区 Powered by Discuz! 5.0.0  © 2001-2006 Comsenz Inc.
Processed in 0.007802 second(s), 7 queries , Gzip enabled

Clear Cookies - Contact Us - CnPack Website - Archiver - WAP