Start setup program WM_HIDE

Hi!

how can i start a setup.exe program wm_hide and all child windows, just all program will start hide, not the first window all window?

Palli
palli011000Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JaymolCommented:
Use ShowWindow with SW_HIDE on the Application, not the windows.

John.
0
VendiCommented:
I'm not sure I exactly understand your question (i.e. which windows you want to hide).  But if you want the main form of the delphi application to be hidden, you can edit the project source code as follows:
..
..
Application.Initialize;
{the next line is the one to add}
Application.ShowMainForm := false;
..
..
The program name will still be visible in the Close program dialog if the user presses CTRL-ALT-DEL.

0
palli011000Author Commented:
no i start another program and i want it to be sw_hide (always)
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

VendiCommented:
var
  StartInfo  : TStartupInfo;
  ProcInfo   : TProcessInformation;
begin

FillChar(StartInfo,SizeOf(TStartupInfo),#0);
FillChar(ProcInfo,SizeOf(TProcessInformation),#0);

  StartInfo.cb := SizeOf(TStartupInfo);

{next two lines specify SW_HIDE}
  StartInfo.dwFlags := STARTF_USESHOWWINDOW;
  StartInfo.wShowWindow := SW_HIDE;
  CreateProcess(nil,'c:\windows\notepad.exe', nil, nil,False,0,nil, nil, StartInfo, ProcInfo);
  end;

You may have to experiment to get this to work for you.  I have used CreateProcess to start the application.
0
VendiCommented:
if you have any questions about CreateProcess, let me know.
0
palli011000Author Commented:
do you know CreateProcessAsUser?
0
VendiCommented:
I have never used CreateProcessAsUser but I took a quick look at it and it also uses the STARTUPINFO and PROCESS_INFORMATION structures.  You could try passing it the same structures as my last comment.
0
palli011000Author Commented:
can you try build some code with these function ?
0
VendiCommented:
Hi Palli,
the code for the Startupinfo and Process_information should look similiar except a call to CreateProcessAsUser and whatever additional parameters.  I should have said if you have any questions about how I used CreateProcess in my comment, let me know.  I'm not sure but I think we've gotten off your original question and I'm proposing my preceding comments as an answer to that one.  I did try the code I posted and it worked.  Maybe you could describe your situation in more detail and why the posted code won't or doesn't work for you.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
palli011000Author Commented:
Let me know if you have any code for CreateProcessAsUser
0
palli011000Author Commented:
Let me know if you have any code for CreateProcessAsUser
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.