I don't think that is C++
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?