MarkNieuwoudt
asked on
SHOWWINDOW API - Hide then show the same window.
I have the following procedure... I hide the window then I want to show it again, this code does not work. You can try this with calculator. Does anyone have a soultion to this problem.
Thanks in advance
Mark
Public Sub Dock_Window( _
ByVal sAppHandle As Long, _
ByVal lParentHandle As Long)
Dim lOriginalParent As Long
lOriginalParent = GetParent(sAppHandle)
Call ShowWindow(sAppHandle, 0) 'Hides the window
Application.DoEvents()
Call SetParent(sAppHandle, lOriginalParent)
Call ShowWindow(sAppHandle, 1)
End Sub
Thanks in advance
Mark
Public Sub Dock_Window( _
ByVal sAppHandle As Long, _
ByVal lParentHandle As Long)
Dim lOriginalParent As Long
lOriginalParent = GetParent(sAppHandle)
Call ShowWindow(sAppHandle, 0) 'Hides the window
Application.DoEvents()
Call SetParent(sAppHandle, lOriginalParent)
Call ShowWindow(sAppHandle, 1)
End Sub
where are you API declarations?
... and as far as i know, you want to use Integer instead of Long now...
Public Sub Dock_Window( _
ByVal sAppHandle As Integer, _
ByVal lParentHandle As Integer)
Dim lOriginalParent As Integer
Public Sub Dock_Window( _
ByVal sAppHandle As Integer, _
ByVal lParentHandle As Integer)
Dim lOriginalParent As Integer
ASKER
s-Twilley
Here is the API declaration. Where can I find a list of all the declarations which return integers instead of longs.
Public Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Thanks
Mark
Here is the API declaration. Where can I find a list of all the declarations which return integers instead of longs.
Public Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Thanks
Mark
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Are you working with windows external to your application?
Bob
Bob
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.