delphi 隐藏任务栏程序,取消自动对齐和网格对齐


本文整理自网络,侵删。

 

 隐藏任务栏中的程序

showwindow(application.handle,sw_hide); //隐藏图标

 setwindowlong(application.Handle, gwl_exstyle,
  getwindowlong(application.Handle,gwl_exstyle) or 
ws_ex_toolwindow and not ws_ex_appwindow);  


获取桌面句柄后

取消自动对齐和网格对齐

  nStyle := GetWindowLong(hand, GWL_STYLE);
  nStyle := nStyle and (not LVS_AUTOARRANGE);
  SetWindowLong(hand, GWL_STYLE, nStyle);    //取消自动对齐
  nStyle := ListView_GetExtendedListViewStyle(hand);
  nStyle := nStyle and (not $80000);
  ListView_SetExtendedListViewStyle(hand, nStyle);   //取消对齐到网格

设置为自动对齐和网格对齐

  nStyle := GetWindowLong(hand, GWL_STYLE);

  nStyle := nStyle or LVS_AUTOARRANGE;

  SetWindowLong(hand, GWL_STYLE, nStyle); //自动对齐


  nStyle := ListView_GetExtendedListViewStyle(hand);

  nStyle := nStyle and (not $80000);

  ListView_SetExtendedListViewStyle(hand, nStyle);//对齐到网格


相关阅读 >>

Delphi 抓屏技巧

base64.pas

Delphi 内存管理[4]

Delphi 打造mygetprocaddress函数(Delphi源码)

Delphi xe3中使用tidftp的示例

Delphi copy 从字符串中复制指定范围中的字符

Delphi操作usb摄像头类

Delphi xe7上启用android蓝牙

Delphi 收集了比较全的字符串进制转换

Delphi如何获取硬盘所有的分区容量

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...