|
-
Apr 3rd, 2000, 11:06 PM
#1
Thread Starter
Hyperactive Member
Is there a possibility to switch to the Windows (95,98
NT 4-)desktop ?
In Windows 3.1 my second system I can switch to the
program-manager with a Shell. SEHLL("PROGMAN.EXE", 1)
I need this (in VB 3), because my
programm is a full-screen application with no 'start' button.
If you've some questions, ask me via eMail
Thanks fo some advice, Matt
-
Apr 4th, 2000, 04:05 AM
#2
Fanatic Member
Hi
Try this
In the declarations section
Declare Function SetActiveWindow Lib "user32.dll" (ByVal hwnd As Long) As Long
Declare Function GetDesktopWindow Lib "user32.dll" () As Long
Sub DoTheSwitch()
Dim DesktopHwnd as long
Dim Dummy as long
'get desktop window handle
'this is a win api call
DesktopHwnd=GetDesktopWindow()
'do the switch actual
'this is a win api call
dummy = SetActiveWindow(DesktopHwnd)
End Sub
Note
This technique will only work when the window doing/controlling the switching (the window executing this code) is the active window.
Use the statement as:
DOTHESWITCH
or
CALL DOTHESWITCH
and voila
DocZaf
{;->
[Edited by Zaf Khan on 04-04-2000 at 07:53 PM]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|