Registriert seit: 29. Mai 2002
37.621 Beiträge
Delphi 2006 Professional
|
Re: Desktop machen
14. Jun 2005, 00:09
Delphi-Quellcode:
{
Author : Michael Puff - [url]http://developer.luckie-online.de[/url]
Date : 2005-01-08
License : PUBLIC DOMAIN
}
program SwitchDesktop;
{$APPTYPE CONSOLE}
uses
Windows;
procedure BaitAndSwitchDesktop;
var
OldDesk : HDESK;
NewDesk : HDESK;
begin
OldDesk := GetThreadDesktop(GetCurrentThreadID);
NewDesk := CreateDesktop(PChar(' Foobar'), nil, nil, 0, DESKTOP_CREATEWINDOW or
DESKTOP_SWITCHDESKTOP or DESKTOP_CREATEMENU, nil);
if NewDesk <> 0 then
begin
SetThreadDesktop(NewDesk);
Windows.SwitchDesktop(NewDesk);
MessageBox(0, ' Here I am', ' Foobar Desktop', MB_ICONINFORMATION);
Windows.SwitchDesktop(OldDesk);
SetThreadDesktop(OldDesk);
CloseDesktop(NewDesk);
end;
CloseDesktop(OldDesk);
end;
begin
BaitAndSwitchDesktop;
end.
Michael Ein Teil meines Codes würde euch verunsichern.
|
|
Zitat
|