Form does not have focus

G

Guest

I have an application where a hidden form displays a system tray icon. The hidden form calls a second form. When the second form is displayed on screen it does not have focus and I am not able to use the Activated event to automatically set focus to the first control on the form as I’d like. Any suggestions would be appreciated

Thanks

Jeremy
 
G

Guest

I am not sure, but can't you use something like this

(C#
frmMain form = new frmMain()
form.Show()
form.Focus();
 
G

Guest

I'm using

System.Windows.Forms.DialogResult res=frm.ShowDialog();
di=frm.DocumentInfo

to display the form. Since I need to wait for user input to save to my DocumentInfo object.
 
D

DalePres

Can't you just do it with TabIndex?

Dale

I have an application where a hidden form displays a system tray icon.
The hidden form calls a second form. When the second form is displayed on
screen it does not have focus and I am not able to use the Activated event
to automatically set focus to the first control on the form as I'd like.
Any suggestions would be appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top