delphi 隐藏任务栏程序,取消自动对齐和网格对齐  
官方Delphi 学习QQ群: 682628230(三千人)
频道

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);//对齐到网格



推荐分享
图文皆来源于网络,内容仅做公益性分享,版权归原作者所有,如有侵权请告知删除!
 

Copyright © 2014 DelphiW.com 开发 源码 文档 技巧 All Rights Reserved
晋ICP备14006235号-8 晋公网安备 14108102000087号

执行时间: 0.036568164825439 seconds