|
-
Feb 22nd, 2012, 12:46 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] Main form focus
I have an application that just stores shortcuts to most used applications on users desktops. My problem is that when the machine loads after they login the app window looses focus and sometimes doesn't show in the taskbar. I tried to use Me.Focus() but that just gives the treeview focus and not the form itself. I mean the parent has focus in the treeview but the form is not highlighted, I can then click on the form and it gets selected.
What is a good way to get the whole form focus? I used me.focus in the form load too.
any ideas?
-
Feb 22nd, 2012, 12:58 PM
#2
Re: Main form focus
I'm assuming this happens beause the Me.Focus is in the form_load event. Try switching it to the form_shown event.
-
Feb 22nd, 2012, 12:59 PM
#3
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Feb 22nd, 2012, 03:39 PM
#4
Thread Starter
Frenzied Member
Re: Main form focus
Thanks paul, that "appears" like it will work. I will have to test for a couple of days or lots of reboots.
If not I will try yours dday9, thank you
-
Feb 29th, 2012, 12:04 PM
#5
Thread Starter
Frenzied Member
Re: Main form focus
Thank you guys, Me.Activate seems to do the trick, just have to play with the timing. I have it set to 30 seconds after the form comes up to then Activate. So all looks good from here
-
Feb 29th, 2012, 12:16 PM
#6
Re: [RESOLVED] Main form focus
dday was right about using the form_shown event too...
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Feb 29th, 2012, 09:26 PM
#7
Thread Starter
Frenzied Member
Re: [RESOLVED] Main form focus
so you think I should put it there and not have a timeset on it? Will it work the same no matter what the timing is on the desktop?
-
Feb 29th, 2012, 09:40 PM
#8
Re: [RESOLVED] Main form focus
the form_shown event doesn't fire until the form is fully loaded + visible
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Mar 7th, 2012, 09:05 AM
#9
Thread Starter
Frenzied Member
Re: [RESOLVED] Main form focus
Thanks again guys. It is better than what it use to be. At least it has more of a chance to load than the other way. I used the form_shown event. It still depends on the machine but it's still an big improvement.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|