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 android实例-录音与回放(播放mp3)(xe8+小米2)

Delphi tidhttp 超时设置无效的解决方法

Delphi第三方控件通用安装方法

Delphi 设计一个有渐变色的标签

Delphi 自我拷贝复制

Delphi 日期相减 比较大小 过期时间函数

Delphi 10.2 ide界面

Delphi ord chr byte等转换

Delphi共享软件防破解的实用招法

Delphi trimleft 删除字符串左边的空格

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



打赏

取消

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

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

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

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

评论

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