Solved

Browser to cover part of screen

Posted on 2013-05-16
2
401 Views
Last Modified: 2013-05-19
I am using the following code to open a browser window full size:
ShellExecute(0,'Open', PChar'http://google.com'), nil, nil, SW_SHOWNORMAL);

I only want to have the browser cover half (or part) of the screen.  What code can I use to do this?

I am using Delphi 6.  Your help greatly appreciated.  Thanks.
0
Comment
Question by:rincewind666
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 27

Accepted Solution

by:
Sinisa Vuk earned 500 total points
ID: 39171452
Find browsers window handle with FindWindow
http://www.delphipages.com/forum/showthread.php?t=137431
....and set size/position with SetWindowPos:
http://msdn.microsoft.com/en-us/library/windows/desktop/ms633545%28v=vs.85%29.aspx
SetWindowPos(WBhandle,HWND_BOTTOM,Left,Top,Width,Height,SWP_SHOWWINDOW);

Open in new window

But, because it is hard to find right window I suggest to use approach used here:
http://stackoverflow.com/questions/13796063/how-to-get-handle-of-a-console-window-launched-from-my-gui-application
... a goal is to run browser different way, get process id and find main window from that proc. id.
0
 

Author Closing Comment

by:rincewind666
ID: 39178212
Many thanks for your help sinisav.  Greatly appreciated.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
can't find the executable in Simulator 1 128
control image tags in a string ? 12 166
Tvertscrollbox like a whatsapp layout 5 65
Typecasting TBytes to Integer in Delphi XE8 2 61
A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question