Windows 任务栏(100分)

  • 主题发起人 主题发起人 JackyKen
  • 开始时间 开始时间
J

JackyKen

Unregistered / Unconfirmed
GUEST, unregistred user!
&nbsp; &nbsp;我在程序中将屏幕分辨率由低改到高后,Windows 任务栏总是停留在屏幕中央,我想用<br>以下代码将它放到屏幕底部,却总是不行,请各位告诉我应该怎样做才行,最好给出代码,<br>谢谢。<br>&nbsp; &nbsp;var abp:Tappbardata;<br>&nbsp; &nbsp;begin &nbsp;<br>&nbsp; &nbsp; &nbsp; …… <br>&nbsp; &nbsp; &nbsp; abp.hWnd:=FindWindow('shell_traywnd',0);<br>&nbsp; &nbsp; &nbsp; abp.uEdge:=ABE_BOTTOM;<br>&nbsp; &nbsp; &nbsp; SHAppBarMessage(ABM_SetPos,abp);<br>&nbsp; &nbsp; &nbsp; ……<br>&nbsp; &nbsp;end;
 
TAppbardata是D5的类吧!?
 
应该重新初始化一次就行了。
 
TO CathyEagle:怎样初始化?快一点告诉我吧,please!Thank.
 
怎么富翁们越来越不热情了?哪一位帮帮忙吧,嫌分少可以再加。
 
&gt;&gt;我在程序中将屏幕分辨率由低改到高后,Windows 任务栏总是停留在屏幕中央<br>因为你修改分辨率时,没有更新注册表<br>function TForm1.DynamicResolution(X, Y: word): BOOL;<br>var<br>&nbsp; lpDevMode: TDeviceMode;<br>begin<br>&nbsp; Result := EnumDisplaySettings(nil, 0, lpDevMode);<br>&nbsp; if Result then<br>&nbsp; begin<br>&nbsp; &nbsp; lpDevMode.dmFields := DM_PELSWIDTH Or DM_PELSHEIGHT;<br>&nbsp; &nbsp; lpDevMode.dmPelsWidth := X;<br>&nbsp; &nbsp; lpDevMode.dmPelsHeight := Y;<br>&nbsp; &nbsp; Result := ChangeDisplaySettings(lpDevMode, CDS_UPDATEREGISTRY) = DISP_CHANGE_SUCCESSFUL;<br>// &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ^^^^^^^^^^^^^^^^^^<br>&nbsp; end;<br>end;<br>
 
多人接受答案了。
 
后退
顶部