Dodaj u deklaracije ovo
Code:
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Const SWP_NOSIZE = &H1
Const SWP_NOMOVE = &H2
Const SWP_NOACTIVATE = &H10
Const SWP_SHOWWINDOW = &H40
Private Declare Sub 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)
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Const SWP_NOSIZE = &H1
Const SWP_NOMOVE = &H2
Const SWP_NOACTIVATE = &H10
Const SWP_SHOWWINDOW = &H40
Private Declare Sub 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)
i promeni form load da izgleda ovako
Code:
Private Sub Form_Load()
'KPD-Team 1999
'URL: http://www.allapi.net/
'E-Mail: [email protected]
Dim Pid As Long
Me.WindowState = vbMaximized
'Lock the window update
LockWindowUpdate GetDesktopWindow
Pid = Shell("cmd.exe", vbNormalFocus)
If Pid = 0 Then MsgBox "Error starting the app"
mWnd = InstanceToWnd(Pid)
SetParent mWnd, Me.hWnd
SetWindowPos mWnd, 0, -4, -24, Me.Width, Me.Height, SWP_NOZORDER Or SWP_SHOWWINDOW
Putfocus mWnd
LockWindowUpdate False
End Sub
Private Sub Form_Load()
'KPD-Team 1999
'URL: http://www.allapi.net/
'E-Mail: [email protected]
Dim Pid As Long
Me.WindowState = vbMaximized
'Lock the window update
LockWindowUpdate GetDesktopWindow
Pid = Shell("cmd.exe", vbNormalFocus)
If Pid = 0 Then MsgBox "Error starting the app"
mWnd = InstanceToWnd(Pid)
SetParent mWnd, Me.hWnd
SetWindowPos mWnd, 0, -4, -24, Me.Width, Me.Height, SWP_NOZORDER Or SWP_SHOWWINDOW
Putfocus mWnd
LockWindowUpdate False
End Sub