Hmm, ich habe beide Codes mal in VB6 und C++ übersetzt und bei mir funktionieren sie ebenfalls nicht unter Windows XP & 7.
Edit: Doch in c++ gehts
Code:
#include <cstdlib>
#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
HWND hwnd;
hwnd = FindWindow("Progman",0);
ShowWindow(hwnd,0);
getchar();
}
Versuche mal anstatt FindWindowEx die FindWindow API.
Edit2:
Und in VB6 gehts auch:
Code:
Public Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Function ShowDesktop(ByVal bShow As Boolean)
Dim lhandle As Long
lhandle = FindWindow("Progman", vbNullString)
If bShow = False Then
Call ShowWindow(lhandle, 0)
Else
Call ShowWindow(lhandle, 5)
End If
End Function
Poste mal dein Code, du musst was falsch kopiert haben.
mfG