🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #7587

Re: Programatically maximize a window?

#7587
From: JD
Date: Fri, 21 Jan 2005 10:46
37 lines
2399 bytes
"mike knoblock" <mknoblock@gmail.com> wrote:
>

Please wrap your lines when you post. Your editor may visually
wrap them for you but you need to enter a hard return at the
end of each line.

>This must be trivially easy. I have an app that generates many child forms that come and go; the user may have 8-9 forms open. I need to manage these so that I can have a enumerated list of open forms and a way to maximize/set focus on one that got lost behind others.  
>
>Has anyone done this? Any help appreciated...

Your question is vauge and you haven't provided enough
information in regards to your design.

If you want to create a list of open forms, there already
exists multiple such lists but which to use depends if your
application is MDI or SDI and if you're dynamically allocating
the forms and if so, are you assigning an Owner.

As for making a particular form the active form, again, there
are multiple ways using TForm methods and win32 API calls.

For an SDI application, look at the TScreen Forms and FormCount
properties. For an MDI application, use the TForm (main form's)
MDIChildren and MDIChildCount properties to iterate open forms.

To set focus, you could use BringToFront, or SetFocus or look
at win32 API's such as SetWindowPos, If you want to minimize,
restore or maximize the form, you can directly change the TForm
WindowState property or use it's Perform method or you can use
win32 API's such as SendMessage.

If that doesn't answer your question, then you need to be more
specific.

~ JD
Technical Details
Message-ID: <41f0dd90$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <41eeef12$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,38ef1b65c9fee192
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "JD" <nospam@nospam.com>
Sender: "JD" <nospam@nospam.com>
Reply-To: "JD" <nospam@nospam.com>
Subject: Re: Programatically maximize a window?
Newsgroups: borland.public.cppbuilder.nativeapi
X-User-Info: 172.131.106.70     
References:  <41eeef12$1@newsgroups.borland.com>
NNTP-Posting-Host: 207.105.83.66
Message-ID: <41f0dd90$1@newsgroups.borland.com>
Date: 21 Jan 2005 02:46:40 -0800
X-Trace: newsgroups.borland.com 1106304400 207.105.83.66 (21 Jan 2005 02:46:40 -0800)
Lines: 38
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail