BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Modal form doesn't have focus if parent window is inactive

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Using
View previous topic :: View next topic  
Author Message
Guest






PostPosted: Thu Jul 27, 2006 12:15 am    Post subject: Modal form doesn't have focus if parent window is inactive Reply with quote



I have a main windows form called frmMain and another form called
frmLogin. I don't want frm Main to display until the user successfully
logins in. I call frmLogin.ShowModal from within the OnLoad event of
frmMain. This displays frmLogin but the focus is not really on the
form even though the cursor is blinking in the first textbox. If you
start typing, it windows will type into what ever is behind frmLogin.
So I found this article that solved my focus problem:

http://west-wind.com/weblog/posts/2080.aspx

However, now if I minimize a window that is behind frmLogin, frmLogin
is closed and frmMain is activated. Here are the steps to re-create:

1. Launch an App (say NotePad)
2. Launch frmMain which is not shown yet but shows frmLogin
3. Minimize Notepad
4. frmLogin is closed and frmMain is activated

Anyone have a clue?

Thanks,
Back to top
Riki Wiki
Guest





PostPosted: Sat Jul 29, 2006 2:44 pm    Post subject: Re: Modal form doesn't have focus if parent window is inacti Reply with quote



On 26 Jul 2006 12:15:13 -0700, tony.raimo (AT) gmail (DOT) com wrote:

Quote:
Anyone have a clue?

Hoi Tony

You need to repost your question on the Borland news server to make
everybody see it and possibly answer your question. Further, this news
group do not officially exist, the group to use is
b.p.d.vcl.components.using.general.

How to post to Delphi newsgroups:
<http://delphi.wikia.com/wiki/Delphi_Newsgroups>
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi VCL Components Using All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.