Basically I have a form that goes full screen automatically. But while Inet runs, this doesn't happen. After Inet finishes, app goes to full screen.
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
Private Declare Function ShowCursor Lib "user32" _
(ByVal bShow As Long) As Long
Private Sub Form_Load()
Dim x As Integer
Call AlwaysOnTop(Me, True)
x = ShowCursor(True)
Dim Download() As Byte
Download() = Inet1.OpenURL("http://www.site.com/23423/server.txt)
Open ("server.txt") For Binary Access Write As #1
Put #1, , DownloadData()
Close #1
End Sub
Sub AlwaysOnTop(FrmID As Form, OnTop As Boolean)
Const SWP_NOMOVE = 2
Const SWP_NOSIZE = 1
Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
If OnTop Then
OnTop = SetWindowPos(FrmID.hwnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
Else
OnTop = SetWindowPos(FrmID.hwnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
End If
End Sub