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?
 
VendiConnect With a Mentor Commented:
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
 
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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
palli011000Author Commented:
no i start another program and i want it to be sw_hide (always)
0
 
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
 
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
All Courses

From novice to tech pro — start learning today.