[DUG] Delphi 2007 & Vista
John Bird
johnkbird at paradise.net.nz
Mon May 16 00:00:57 NZST 2011
I have found a couple of minor oddities like this with one program starting another under Windows 7 – I also have a menu program that starts others, one of them an update program. This update program does run but does not show over other windows – mainly because I get a UAC prompt about allowing it, which I do, and then the program runs OK but the main form does not maximise always, but can see it on the task bar.
Other things to check out are if the program stores data – eg in an ini file on the same path as the application. If this is under the “Program Files” folder you are very likely to get problems as this is a no-no place to write data and Windows will try to move such files elsewhere. Check the Activate or FormShow event of the program to see if it is writing any data just in case.
Also my firewall (COMODO) has a habit of blocking a newly built program by saying its trying to install a global hook and asking me to OK that. This blocks showing of the main form too. After OKing it there is still a delay of several seconds until the form appears. Subsequent runs of the same exe are OK.
Aside - UAC is quite smart – I have deduced that a UAC permission can inherit to a program started by the original process if it has been OK’d with a UAC prompt, because subsequent runs of the program started by another will not ask for UAC, as long as one of the previous programs that started it was granted that permission. Restarting the programs concerned brings another UAC prompt. (Lets not start a discussion here on the merits of UAC btw – although my opinion is anyone from the Unix/linux world is likely to approve of it).
John
From: Charlie Kerscher
Sent: Sunday, May 15, 2011 11:17 PM
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Delphi 2007 & Vista
I think that I found the culprit - Google Chrome. When it is running the app doesn't appear outside or inside the IDE. When it isn't running then it appears. Can't believe I've spent 12 hours dealing with this because of Google/Vista ugh
Charlie
--- On Sun, 5/15/11, David Brennan <dugdavid at dbsolutions.co.nz> wrote:
From: David Brennan <dugdavid at dbsolutions.co.nz>
Subject: Re: [DUG] Delphi 2007 & Vista
To: "'NZ Borland Developers Group - Delphi List'" <delphi at delphi.org.nz>
Date: Sunday, May 15, 2011, 4:48 AM
If the form is off screen there is a way of getting it back. Focus the application then do the following:
Hit Alt-Space. That should bring up the windows menu (ie from the top left of the window) for the current window. You may not be able to see it though if the form is offscreen.
Press the down arrow once (this will move focus to the Move command). Hit enter (to select Move). Do Ctrl-Left (as in left arrow key, or in fact any of the arrow keys). This will move the window one pixel BUT more usefully it also locks the form into drag mode with the mouse cursor. Move your mouse now and the form should appear on screen following the mouse cursor.
Cheers,
David.
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz] On Behalf Of David O'Brien
Sent: Sunday, 15 May 2011 1:27 p.m.
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Delphi 2007 & Vista
What code is used to launch the programs?
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz] On Behalf Of Charlie Kerscher
Sent: Sunday, 15 May 2011 1:18 p.m.
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Delphi 2007 & Vista
David, I did as you suggested and the program still doesn't appear. Oh, the settings are in afd.ini.
Charlie
--- On Sat, 5/14/11, David O'Brien <wlmailhtml:/mc/compose?to=Dave at iccs.co.nz> wrote:
From: David O'Brien <wlmailhtml:/mc/compose?to=Dave at iccs.co.nz>
Subject: Re: [DUG] Delphi 2007 & Vista
To: "NZ Borland Developers Group - Delphi List" <wlmailhtml:/mc/compose?to=delphi at delphi.org.nz>
Date: Saturday, May 14, 2011, 8:50 PM
Where does it store the positions? Registry or .ini file? Have a look where the forms left and top are... Set them to 0,0.
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz] On Behalf Of Charlie Kerscher
Sent: Sunday, 15 May 2011 12:38 p.m.
To: NZ Borland Developers Group - Delphi List
Subject: Re: [DUG] Delphi 2007 & Vista
Thanks David, the original application is Accounting for Delphi. It does, as best as I can determine, "remember" last screen size/position.
I can not start the other programs (modules) although the task manager says they are running.
The curious thing, to me, is that when I start the 'real' main menu, the splash screen appears, the user id/pw screen appears and the "main" menu screen appears. I even moved the main menu to a different screen position and when I restarted the app the main menu appeared where I had placed it. But when I select another program/module from that main menu that program does show.
So I'm still at a lost as to what to do.
Charlie
--- On Sat, 5/14/11, David O'Brien <Dave at iccs.co.nz> wrote:
From: David O'Brien <Dave at iccs.co.nz>
Subject: Re: [DUG] Delphi 2007 & Vista
To: "NZ Borland Developers Group - Delphi List" <delphi at delphi.org.nz>
Date: Saturday, May 14, 2011, 8:19 PM
Do you save and restore the last positions of the windows?
I’ve fallen into the trap of having left or top positions outside the screen on start up.
Also, what code are you using to start the other programs? Can you start them manually?
From: delphi-bounces at delphi.org.nz [mailto:delphi-bounces at delphi.org.nz] On Behalf Of Charlie Kerscher
Sent: Sunday, 15 May 2011 12:12 p.m.
To: delphi at delphi.org.nz
Subject: [DUG] Delphi 2007 & Vista
Hi, Until Wednesday I was developing using an XP laptop with Delphi 2007 and DBase files. My computer died and I borrowed my son's laptop which has Vista. I installed Delphi 2007 with the 3rd party controls, copied my program (.pas files) and recompiled my program. Actually I did this with two programs. The second one runs both within the IDE and outside the IDE. The first program will load the main form (outside of the IDE) but when I click a button to open another form which is data dependent the form doesn't show. Actually the application has exe's that are called in the onclick event of the buttons; for example order entry, inventory, customer add/edit, etc. I click the order entry button and task manager shows the exe is running; however the form doesn't show on the laptop.
I sincerely appreciate any suggestions.
Charlie
-----Inline Attachment Follows-----
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: wlmailhtml:/mc/compose?to=delphi at delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to wlmailhtml:/mc/compose?to=delphi-request at delphi.org.nz with Subject: unsubscribe
-----Inline Attachment Follows-----
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi at delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject: unsubscribe
-----Inline Attachment Follows-----
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: wlmailhtml:/mc/compose?to=delphi at delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to wlmailhtml:/mc/compose?to=delphi-request at delphi.org.nz with Subject: unsubscribe
--------------------------------------------------------------------------------
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi at delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject: unsubscribe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20110516/1eb7e70a/attachment-0001.html
More information about the Delphi
mailing list