whats wrong with this?

Posts 1–4 of 4 · Page 1 of 1
whats wrong with this?
[html]Public Function PutWindowOnTop(pFrm As Form)
Dim lngWindowPosition As Long LngWindowPosition = SetWindowPos(pFrm.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE)[/html]



it says error.
im using vb 6...
thanks!
well it's for a crosshair...
this is my code for the buttons:
[html]Private Sub Command1_Click()
Call PutWindowOnTop(Form2)
Form2.Show
Call PutWindowOnTop(Form3)
Form3.Show
End Sub

Private Sub Command2_Click()
Call PutWindowOnTop(Form2)
Form2.Hide
Call PutWindowOnTop(Form3)
Form3.Hide
End Sub
[/html]
You used Public Function instead of Public Sub?
Posts 1–4 of 4 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

Talk with us