Sorry For Double Post.. when i de.bug everything i only get a little tiny Dot..
Here is all codes for forms/modules
Form 1
[php]ublic Class Form1
Public Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey As Int32) As UShort
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Call PutWindowOnTop(Form2)
Form2.Show()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Call PutWindowOnTop(Form2)
Form2.Hide()
End Sub
Dim f11 As Boolean
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
f11 = GetAsyncKeyState(Keys.F11)
If f11 = True Then
Call PutWindowOnTop(Form2)
Form2.Show()
End If
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
If GetAsyncKeyState(Keys.F12) Then
Call PutWindowOnTop(Form2)
Form2.Hide()
End If
End Sub
End Class[/php]
Form 2
Module Form
[php]Module Module1
Private 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
Const HWND_TOPMOST = -1
Const SWP_NOMOVE = &H2
Const SWP_NOSIZE = &H1
Public Function PutWindowOnTop(ByVal pFrm As Form)
Dim lngWindowPosition As Long
lngWindowPosition = SetWindowPos(pFrm.Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE)
End Function
End Module
[/php]
and all it shows is a tiny little Dot Top left corner :S
