I.T. Discussion Community!
-Collapse +Expand
Delphi
Search Delphi Group:

Advanced
-Collapse +Expand Delphi To/From
To/FromCODEGuides
-Collapse +Expand Delphi Store
PRESTWOODSTORE

Prestwood eMagazine

March Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyPascal and Delphi Coding BoardDelphi Object PASCAL Topic   Print This     

CreateProcess and StartupInfo

CreateProcess and StartupInfo in Delphi Object PASCAL topic (part of our Pascal and Delphi Coding group).

Quick Search: CreateProcess   StartupInfo   CreateProcess StartupInfo  
Helix
San Diego, CA
Hi,
I am trying to write a Delphi5 app that will call the default browser into a specific size and location. I cannot seen to get this to work. Here is the code that I have for the CreateProcess and StartupInfo:

procedure TForm1.ExecNewProcess(ProgramName : String);
var
StartInfo : TStartupInfo;
ProcInfo : TProcessInformation;
CreateOK : Boolean;
begin
FillChar(StartInfo,SizeOf(TStartupInfo),#0);
FillChar(ProcInfo,SizeOf(TProcessInformation),#0);
StartInfo.cb := SizeOf(TStartupInfo);
StartInfo.lpDesktop := nil;
StartInfo.lpReserved2 := nil;
StartInfo.dwFlags := STARTF_USEPOSITION or STARTF_USESIZE;
StartInfo.dwX := 0;
StartInfo.dwY := 0;
StartInfo.dwXSize := 100;
StartInfo.dwYSize := 100;
// StartInfo.wShowWindow := SW_SHOWNORMAL;


CreateOK := CreateProcess(nil, PChar(ProgramName), nil, nil,False,
CREATE_NEW_PROCESS_GROUP+NORMAL_PRIORITY_CLASS,
nil, nil, StartInfo, ProcInfo);

{ check to see if successful }
if CreateOK then
//may or may not be needed. Usually wait for child processes
WaitForSingleObject(ProcInfo.hProcess, INFINITE);
end;

Any ideas why the browser (and I tried opening notepad and other apps and still cannot get this to work) still opens up in the size and location it wants to and not in the specified size and location?

Any help would be apperciated, thanks

Helix
 Posted 20 years ago (Thread Starter)
Comment Quote
About Helix -Collapse +Expand
Visit Profile
Membership pending.
Member subscribes to this thread but email is NOT VERIFIED.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #4606, 1 reply
Thread Started 12/14/2001 11:53:00 AM
View Counter=1900
Last Reply Posted 10/28/2020 12:47:54 AM)
Location=San Diego, CA  
Joined=20 years ago   MB Posts=2  
Most Recent Post
PS_3148
-- --

A long and deepening threat is found here for the judgment of the field. The mode of the class and best essay writing service for the reforms or the tings. Modes played for the turns for the changes for all issued items for humans.

 Posted 5 months ago
Comment Quote
About PS_3148 -Collapse +Expand
Visit Profile
Membership pending.
Member subscribes to this thread with a verified email.
Member pending approval.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #18218 (Level 2) and Parent is 4606
Reply Posted 10/28/2020 12:47:10 AM
Location=-- -- 
Joined=5 months ago   MB Posts=1  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P156A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #4606 Counter
1900
Since 4/2/2008

Follow PrestwoodBoards on: 


©1995-2021 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech