Process("notepad.exe")->GetWindows()->Hide()

delphi package - easy access to kernel objects etc.
Post Reply
Teerayoot
Posts: 10
Joined: Tue May 18, 2004 5:04 pm

Process("notepad.exe")->GetWindows()->Hide()

Post by Teerayoot »

void __fastcall TForm1::Button2Click(TObject *Sender)
{
Process("notepad.exe")->GetWindows()->Hide();
}
If have notepad.exe in process list ,main notepad window hide.
But when i close notepad.exe(notepad.exe not in process list) , all windows in my system hide.

What's wrong ,i just want to hide only main notepad windows
if notepad not in process list it will do nothing.
madshi
Site Admin
Posts: 10753
Joined: Sun Mar 21, 2004 5:25 pm

Post by madshi »

Sounds like a madKernel bug. Thanks for letting me know! I'd suggest using this:

DelphiInterface<IProcess> Notepad;
Notepad = Process("notepad.exe");
if Notepad->IsValid()
Notepad->Windows_()->Hide();

That should work around the problem.
Post Reply