VCL Forms App: Getting list of Open windows

I have a VCL Forms application.
Sometimes there are many Windows (Forms) open, but there is currently no way to pickup one which is hidden behind the others.

It there a way where I can copy an Application message when a Form.Show is called, and from that message get an handle, and using that handle grab the Caption so I can make a list of open windows?
And after that, I need the code to use same Handle to call a BringToFront...

Thanks, Bart


--
Bart Kindt / SARTrack Limited New Zealand
www.sartrack.co.nz
0
Bart
5/10/2013 2:17:14 AM
embarcadero.delphi.general 4258 articles. 0 followers. Follow

2 Replies
1226 Views

Similar Articles

[PageSpeed] 28

Bart wrote:

> Sometimes there are many Windows (Forms) open, but there is
> currently no way to pickup one which is hidden behind the others.

Actually, there is.  Loop through the global TScreen.Forms list.  The order 
of the TForm objects in that list is the same as their current z-order in 
relation to each other.  You can loop through the list, getting each Form's 
rectangle onscreen and look for rectangles that overlap each other, and if 
you find any matches then compare their order in the list.

> It there a way where I can copy an Application message when a
> Form.Show is called, and from that message get an handle, and
> using that handle grab the Caption so I can make a list of open
> windows?

You don't need to go that far.  You can simply loop through the global TScreen.Forms 
list when needed, reading the Caption property of every active TForm object 
in it.

> And after that, I need the code to use same Handle to call a
> BringToFront...

You have direct access to all of the TForm objects in the TScreen.Forms list.

--
Remy Lebeau (TeamB)
0
Remy
5/10/2013 2:33:37 AM
Great! 

Thanks Remy,

Bart

> {quote:title=Remy Lebeau (TeamB) wrote:}{quote}thers.
> 
> Actually, there is.  Loop through the global TScreen.Forms list.  The order 
> of the TForm objects in that list is the same as their current z-order in 
> relation to each other.  You can loop through the list, getting each Form's 
> rectangle onscreen and look for rectangles that overlap each other, and if 
> you find any matches then compare their order in the list.

> Remy Lebeau (TeamB)

--
Bart Kindt / SARTrack Limited New Zealand
www.sartrack.co.nz
0
Bart
5/10/2013 4:21:04 AM
Reply:

Similar Artilces:

superreview requested: [Bug 355352] [Cocoa] while the app is running, if no browser windows are open, clicking on the app in the dock doesn't open a browser window : [Attachment 248569] New and improv
Josh Aas <joshmoz@gmail.com> has asked Benjamin Smedberg [:bs] (bsmedberg@) <benjamin@smedbergs.us> for superreview: Bug 355352: [Cocoa] while the app is running, if no browser windows are open, clicking on the app in the dock doesn't open a browser window https://bugzilla.mozilla.org/show_bug.cgi?id=355352 Attachment 248569: New and improved patch https://bugzilla.mozilla.org/attachment.cgi?id=248569&action=edit ------- Additional Comments from Josh Aas <joshmoz@gmail.com> The minor changes remaining (comments mostly) can be made on checkin. ...

superreview granted: [Bug 355352] [Cocoa] while the app is running, if no browser windows are open, clicking on the app in the dock doesn't open a browser window : [Attachment 248569] New and improved
Benjamin Smedberg [:bs] (bsmedberg@) <benjamin@smedbergs.us> has granted Josh Aas <joshmoz@gmail.com>'s request for superreview: Bug 355352: [Cocoa] while the app is running, if no browser windows are open, clicking on the app in the dock doesn't open a browser window https://bugzilla.mozilla.org/show_bug.cgi?id=355352 Attachment 248569: New and improved patch https://bugzilla.mozilla.org/attachment.cgi?id=248569&action=edit ------- Additional Comments from Benjamin Smedberg [:bs] (bsmedberg@) <benjamin@smedbergs.us> moa=bsmedberg (I didn't revi...

conver a windows forms app into a aspx web forms app
Hi, i remember reading somewere that a windows forms application can be "translated" to web forms application in .Net. ¿Is that true?. ¿How can I do it?¿does it work in visual studio 2003? Thanks a lot! Mikel There is no automatic wizard that will convert an ASP.NET app to WinForms, or a WinForms app to ASP.NET.  However, a number of the concepts are similar between the two models and you will be able to re-use all of your non-UI specific code.  The broader .NET Framework class library is also the same.Hope this helps you  If y...

Can I get list of all open windows?
PB 8 Is there a way for me to get the references to ALL open windows objects without having to create and manage my own "open windows" array? In other words, I want something similar to: GetFirstSheet() GetNextSheet() without having the limitations of it only giving me back sheets. So, for example, if I have the following windows open: (1) w_employees_screen (opened as a sheet) (2) w_employee_information (response window) I want to cursor through a list of open windows where both (1) and (2) are returned - in no particular order. Thanks! Julie No -- ...

Get List of Open Windows on desktop.
Hello, Can someone tell me how to find windows that are on the desktop that are actual windows. I.E. If I have Internet Explorer and OutLook opened on the desktop, then I want the handle to these windows and not every name in the book on the desktop. I have tried EnumDesktopWindows but it returns over 100 names, which is not Internet Explorer and Outlook windows. Thanks What are you trying to do? This might help us answer your quesiton better.. Also, nativeapi is probably a better group to post on. Mike C "James Williams" <Jim_L_Williams@hotmail.com> wr...

How to get to list of opened windows in SDI application
PB7.0.2, 8046 ...

How to get DataSet from WebService into Windows Forms app.
Hi, i want to get from WebService DataSet of Users, I don't know how to do this. For now i have:using (var svc = new ServiceReference1.clientSoapClient("clientSoap")){dataGridView1.DataSource = svc.GetOfficeUsers();}And i'm getting exception:The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://localhost/ws/:GetOfficeusersResponse. The InnerException message was 'There was an error deserializing the object of type program.ServiceReference1.GetOfficeUsersResponseBody. End element ...

Transfering VCL Form App from Delphi to Builder
Hey all. Is there any way I can transfer my VCL forms application from Delphi to C++ Builder? I don't need to transfer the functionality, I'm recoding everything but I just need to copy the layout. So I thought maybe theres a way I can duplicate or export/import the form layout to C++ Builder? It's an mp3 player I was working on last year in Delphi code, and I'm recoding it in C++ but I'm still going to use the same layout. And it's a simple layout, just a couple of listboxes, buttons, scrollbars etc. Any ideas? In article <113629@forums.codegear.com>, And...

window.open(): page doesn't get reloaded if the window is already open
Hi guys,Any ideas?I use window.open() to open up the new page, however, the page doesn't get refreshed if it is already open. Anyone knows how can I force the page to refresh every time I call window.open() method.  I can do it!  One way I can think of isvar win=null; function someFunction(){ if(win ==null || win.closed) { win = window.open(...);} else{ win.history.go(0);} } Regards,PrashantDont forget to click "Mark as Answer" on the post that helped you.  Hi Prashant,Thank you for the reply.Unfortunately, it seem...

Web app and Windows Forms app
I've done a lot of .NET web development, but I'm trying to write a Forms App.  I'm trying to populate a GridView Control with a simple "SELECT *" query, but I'm not having any luck.  I keep getting this error:"An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections." I enabled remote connections on my SQL Server, then as a test I built a local web app that conne...

window.open and window.opener
Sorry for a really dumb post. I am not a scripting person... I find the whole thing a bit strange really with losely coupled types ect...Anyway, I am putting together a ASP.NET v2 application. One of the pages I am planning on implementing a link to open a pop-up window. In this popup window, the user will select the location of somthing, the window close and the value returned back to one of the parent browsers controls. I know this is not rocket science and I have done endless searches to try and find the answer. I am loading up the page and passing in the ClientID of the control I wish to...

Open WIndow List not appearing under Windows
We use PB6 and one disconcerting thing I notice is that the list of open windows does not appear under 'Windows'. Instead, the list seems to 'jump around' - now you see it under 'File' now under 'Edit'. I am new to this newsgroup. This must be a known bug. I would appreciate any pointers to resolve this. Thanks. -- Rali RAD InfoTech India ------ Art and Science of Information Technology ------ Check out the help of opensheet function. If your 'window' is next to last menu item, then use 0 in the 'position'...

How do I get the window name that opened the window?
Hi I have two windows. for example: w_windowA and w_windowB. Both windows open a pop up window. example: w_popup. I want to catch on w_popup the window that open w_popup. w_windowA or w_windowB thanks Use OpenWithParm and pass the name of the window that opened it. Tyler "E.N." <edgardon@medicalcardsystem.com> wrote in message news:uQavRn1CDHA.283@forums-2-dub... > Hi > > I have two windows. for example: w_windowA and w_windowB. > > Both windows open a pop up window. example: w_popup. > > I want to catch on w_popup the windo...

superreview granted: [Bug 364497] When app is opened from a link, the link should respect the external app pref for opening in the same window as saved sessions
Mike Pinkerton <mikepinkerton@mac.com> has granted Stuart Morgan <stuart.morgan@alumni.case.edu>'s request for superreview: Bug 364497: When app is opened from a link, the link should respect the external app pref for opening in the same window as saved sessions https://bugzilla.mozilla.org/show_bug.cgi?id=364497 Attachment 261608: previous approach updated https://bugzilla.mozilla.org/attachment.cgi?id=261608&action=edit ------- Additional Comments from Mike Pinkerton <mikepinkerton@mac.com> sr=pink ...

Web resources about - VCL Forms App: Getting list of Open windows - embarcadero.delphi.general

Sean Penn Interviews Drug Lord El Chapo
Just one day after news broke that the drug lord El Chapo has been captured after seven months on the loose, Sean Penn has published the first-ever ...

Watch James Franco Travel Back In Time In '11.22.63' Trailer
James Franco and Sarah Gadon chat up their new mini-series, 11.22.63 , during the 2016 Television Critics Association Winter Tour held at Langham ...

Some key numbers about the giant Powerball drawing
Enthusiastic ticket-buyers have pushed the record Powerball jackpot to $949.8 million for Saturday night's drawing.

Lax enforcement weakens UN sanctions on nuclear North Korea
UNITED NATIONS (AP) — While the U.N. Security Council considers new sanctions on North Korea after its latest nuclear test, experts say existing ...

Merkel wants expulsion rules toughened after Cologne sex assaults
Both women's groups and supporters of the xenophobic PEGIDA movement mobilised in separate rallies in Cologne

New York Police Officer Is Shot Breaking Up a Brawl in the Bronx
It was around 2 a.m. on Saturday when police officers from the 40th Precinct’s anticrime unit arrived at the scene of a large brawl in the South ...

Hillary Clinton turns up the heat on Bernie Sanders
CNN Hillary Clinton turns up the heat on Bernie Sanders CNN Washington (CNN) A sense of anxiety is cascading through Hillary Clinton's campaign, ...

Oregon Militia Standoff Surrounded By Heavily Armed Pacific Patriot Network — Ammon Bundy ‘Blindsided’ ...
The Oregon militia standoff continues to this day, with Ammon Bundy’s group continuing to occupy parts of Malheur National Wildlife Refuge and ...

Suspect charged in shooting of Philadelphia policeman: prosecutor
(Reuters) - A man claiming allegiance to Islamic State militants was charged on Saturday with attempted murder in the shooting of a Philadelphia ...

CES 2016 drew more than 170,000 attendees for tech’s biggest trade show
The Consumer Electronics Show drew more than 170,000 people to Las Vegas this week to view more than 2.47 million square feet of exhibits. The ...

Resources last updated: 1/10/2016 5:56:28 AM