![]() |
CreateProcess [Frage!]
Guten morgen,
habe hier folgendes problem:
Delphi-Quellcode:
Kann mir da jemand weiter helfen? :gruebel:
procedure TForm1.Benutzerkonten1Click(Sender: TObject);
var temp : integer; StartupInfo: TStartupinfo; ProcessInfo: TProcessInformation; begin try FillChar(Startupinfo,Sizeof(TStartupinfo),0); Startupinfo.cb:=Sizeof(TStartupInfo); temp := GetWindowLong(Handle, GWL_EXSTYLE); temp := temp or WS_EX_LAYERED; SetWindowLong(Handle, GWL_EXSTYLE, temp); SetLayeredWindowAttributes(Handle, 0, 200, LWA_ALPHA); Application.ProcessMessages; if CreateProcess(nil,'notepad.exe',Nil,Nil,false,normal_priority_class,Nil, Nil, Startupinfo,ProcessInfo) then {Wollte rundll32.exe mit dem Parameter netplwiz.dll,UsersRunDll starten! Wie kann ich das übernehmen?} begin WaitforSingleObject(Processinfo.hProcess, infinite); CloseHandle(ProcessInfo.hProcess); temp := GetWindowLong(Handle, GWL_EXSTYLE); temp := temp or WS_EX_LAYERED; SetWindowLong(Handle, GWL_EXSTYLE, temp); SetLayeredWindowAttributes(Handle, 0, 255, LWA_ALPHA); end; except Form5.Label3.Caption:='Error_On_rundll32.exe'; inherited; FehlerX; end; end; Vielen dank, gruß CoRe.eXtreem |
Re: CreateProcess [Frage!]
Delphi-Quellcode:
Im prinzip sollte der Transparens grad nur auf null gehen wenn das programm wieder geschlossen wurden!
var
temp : integer; begin try temp := GetWindowLong(Handle, GWL_EXSTYLE); temp := temp or WS_EX_LAYERED; SetWindowLong(Handle, GWL_EXSTYLE, temp); SetLayeredWindowAttributes(Handle, 0, 200, LWA_ALPHA); ShellExecute(0, Nil PChar('rundll32.exe'), Pchar('netplwiz.dll,UsersRunDll'), Nil, SW_NORMAL); If CloseQuery then begin temp := GetWindowLong(Handle, GWL_EXSTYLE); temp := temp or WS_EX_LAYERED; SetWindowLong(Handle, GWL_EXSTYLE, temp); SetLayeredWindowAttributes(Handle, 0, 255, LWA_ALPHA); end; except Form5.Label3.Caption:='Error_On_rundll32.exe'; inherited; FehlerX; end; end; Das funktioniert aber nicht so ganz mit CloseQuery? Was ich nicht verstehe wieso funktioniert dann das hier:
Delphi-Quellcode:
Gruß Core
var
temp : integer; begin try temp := GetWindowLong(Handle, GWL_EXSTYLE); temp := temp or WS_EX_LAYERED; SetWindowLong(Handle, GWL_EXSTYLE, temp); SetLayeredWindowAttributes(Handle, 0, 200, LWA_ALPHA); ShellAbout(self.Handle, 'Admin-ToolZ v1.6 by CoRe.eXtreem', 'Copyright © 2003-2004 XTreem-Base' + #13 + '', Application.Icon.Handle); If CloseQuery then begin temp := GetWindowLong(Handle, GWL_EXSTYLE); temp := temp or WS_EX_LAYERED; SetWindowLong(Handle, GWL_EXSTYLE, temp); SetLayeredWindowAttributes(Handle, 0, 255, LWA_ALPHA); end; except Form5.Label3.Caption:='Error_On_UeberShow'; inherited; FehlerX; end; end; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 00:58 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz