AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

CreateProcess [Frage!]

Ein Thema von CoRe.eXtreem · begonnen am 29. Feb 2004 · letzter Beitrag vom 29. Feb 2004
Antwort Antwort
Benutzerbild von CoRe.eXtreem
CoRe.eXtreem

Registriert seit: 30. Nov 2003
61 Beiträge
 
Delphi 2005 Personal
 
#1

CreateProcess [Frage!]

  Alt 29. Feb 2004, 09:54
Guten morgen,
habe hier folgendes problem:

Delphi-Quellcode:
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;
Kann mir da jemand weiter helfen?
Vielen dank,
gruß CoRe.eXtreem
  Mit Zitat antworten Zitat
Benutzerbild von CoRe.eXtreem
CoRe.eXtreem

Registriert seit: 30. Nov 2003
61 Beiträge
 
Delphi 2005 Personal
 
#2

Re: CreateProcess [Frage!]

  Alt 29. Feb 2004, 12:08
Delphi-Quellcode:
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;
Im prinzip sollte der Transparens grad nur auf null gehen wenn das programm wieder geschlossen wurden!
Das funktioniert aber nicht so ganz mit CloseQuery?

Was ich nicht verstehe wieso funktioniert dann das hier:

Delphi-Quellcode:
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;
Gruß Core
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:36 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz