|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Win Forms PositioningI need to position a normal form at a certain position above another
form....mainly I would like it to have a left of 0 (far left) and its top to start just below my toolbar. Other than using GetSystemMetrics API to determine height of menu and win caption, I have no idea how to do this. Any ideas? Or is that the only way? thanks, Shane Hi,
You can use the setwindowpos function. Use the hwnd_topmost flag to make window a topmost window. Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (ByVal hwnd As Integer, _ ByVal hWndInsertAfter As Integer, ByVal x As IntPtr, ByVal y As Integer, _ ByVal cx As Integer, ByVal cy As Integer, ByVal wFlags As Integer) As Integer Const HWND_TOPMOST As Integer = -1 Const SWP_NOMOVE As Integer = &H2 Const SWP_NOSIZE As Integer= &H1 SetWindowPos(Me.Handle.ToInt32, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE) Ken ------------------------ "Shane Story" <nospam@nothanks.com> wrote in message I need to position a normal form at a certain position above anothernews:ujdpzQrfFHA.1044@tk2msftngp13.phx.gbl... form....mainly I would like it to have a left of 0 (far left) and its top to start just below my toolbar. Other than using GetSystemMetrics API to determine height of menu and win caption, I have no idea how to do this. Any ideas? Or is that the only way? thanks, Shane
Does String mashal default to UnmanagedType.LPTStr
(newbie warning) vb.net, stdregprov, deletekey - Invalid cast Loop thru all subfolders and list all files under each Transparent Color in an Icon questions about VB.NET, and uses in education Two quick Questions Need a Strategy to store the Single Quotes in the Database Is there code to convert a c# module to VB? Error: Cast From String to type Integer not valid Loading two separate instance of the same assembly |
|||||||||||||||||||||||