Hi,
I have started using SHAppBarMessage to create an AppBar for a news ticker. It creates a new bar to reserve the screen space, queries and sets the position correctly, however when i then use the MoveWindow command, it doesn't do anything.
If i put in a MsgBox command between initialising the bar and MoveWindow, it works perfectly, as per:
If i remove the MsgBox line, the MoveWindow fails. Can anyone suggest why? I don't know what the MsgBox is forcing that makes the next line work.
Cheers!
I have started using SHAppBarMessage to create an AppBar for a news ticker. It creates a new bar to reserve the screen space, queries and sets the position correctly, however when i then use the MoveWindow command, it doesn't do anything.
If i put in a MsgBox command between initialising the bar and MoveWindow, it works perfectly, as per:
SHAppBarMessage(ABM_NEW, ABD)
SHAppBarMessage(ABM_QUERYPOS, ABD)
SHAppBarMessage(ABM_SETPOS, ABD)
MsgBox("Moving window")
MoveWindow(ABD.hwnd, ABD.rc.Left, ABD.rc.Top, ABD.rc.Right, ABD.rc.Bottom, True)
SHAppBarMessage(ABM_QUERYPOS, ABD)
SHAppBarMessage(ABM_SETPOS, ABD)
MsgBox("Moving window")
MoveWindow(ABD.hwnd, ABD.rc.Left, ABD.rc.Top, ABD.rc.Right, ABD.rc.Bottom, True)
If i remove the MsgBox line, the MoveWindow fails. Can anyone suggest why? I don't know what the MsgBox is forcing that makes the next line work.
Cheers!