En sökning på internet ger lätt svaret Koden på formuläret:Sv: Alltid överst
* = bra, tydligt
http://www.allapi.net/apilist/SetWindowPos.shtml
* http://support.microsoft.com/default.aspx?scid=KB;EN-US;q184297&
* http://members.aol.com/danp600/vbfaq.html#TopSv: Alltid överst
Private Sub ListView1_Click()
frmShowPost.Show
SetWindowPos frmShowPost.hwnd, HWND_TOPMOST, 0, 0, 0, 0, hWndFlag
End Sub
Koden som ligger i en modul:
Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, _
ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal Y As Long, _
ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Public Const Swap_NoMove = &H2
Public Const Swap_NoSize = &H1
Public Const Swap_Create = &H3
Public Const HWND_TOP = 0
Public Const HWND_TOPMOST = -1
Public Const HWND_NOTOPMOST = -2
Public Const hWndFlag = Swap_NoMove Or Swap_NoSize
Den koden har jag fått.
Anna-Karin