Serious Form Focus problem/chalange.
-
Hi i have a problem i don't know how to handle. it is not easy to explain so feel free to ask me more details.. my main program runs in the backround with notifyIcon. i have an extra class which is a form of notification (like msn notification message). the program should run on the background and pop up the small MSN-like form on the buttom of the screen. i want the user to type in any window and on some case i show the notification message. at first run of the programm(the user didnt choose items on the small notification message so from some reason it works in the beginning), the user is typing in notepad(just an example) and when i want , i pop up the small window.. if the user don't care about it he continue to type on the notepad without loosing the focus to the noification message. the first time that the user select an item (listbox) on the message notification, then everything changes: when he types on the notepad and i popup the message notification, the focus changes to the message notification form, but i want him to keep staying focused on the notepad. what can i do? please help.
R.Z
-
Hi i have a problem i don't know how to handle. it is not easy to explain so feel free to ask me more details.. my main program runs in the backround with notifyIcon. i have an extra class which is a form of notification (like msn notification message). the program should run on the background and pop up the small MSN-like form on the buttom of the screen. i want the user to type in any window and on some case i show the notification message. at first run of the programm(the user didnt choose items on the small notification message so from some reason it works in the beginning), the user is typing in notepad(just an example) and when i want , i pop up the small window.. if the user don't care about it he continue to type on the notepad without loosing the focus to the noification message. the first time that the user select an item (listbox) on the message notification, then everything changes: when he types on the notepad and i popup the message notification, the focus changes to the message notification form, but i want him to keep staying focused on the notepad. what can i do? please help.
R.Z
I believe the message you get when your app gets focus gives you the HWND of the app that lost focus, so you can just bounce the focus back.
-
I believe the message you get when your app gets focus gives you the HWND of the app that lost focus, so you can just bounce the focus back.
Hi, 1. it's the required work-around but how can i disable that? can i disable focsu from my application at all? 2. if not, then which event should i listen to? cause i have main form (not visible) and the notification form . so to which one? 3. can i listen to Application/Process gotFocus event? Thanks for your help.
R.Z
-
Hi i have a problem i don't know how to handle. it is not easy to explain so feel free to ask me more details.. my main program runs in the backround with notifyIcon. i have an extra class which is a form of notification (like msn notification message). the program should run on the background and pop up the small MSN-like form on the buttom of the screen. i want the user to type in any window and on some case i show the notification message. at first run of the programm(the user didnt choose items on the small notification message so from some reason it works in the beginning), the user is typing in notepad(just an example) and when i want , i pop up the small window.. if the user don't care about it he continue to type on the notepad without loosing the focus to the noification message. the first time that the user select an item (listbox) on the message notification, then everything changes: when he types on the notepad and i popup the message notification, the focus changes to the message notification form, but i want him to keep staying focused on the notepad. what can i do? please help.
R.Z
Hi all if it intrests anyone.. the notification message that i was talking about was set with TopMost=true this cause auto activation and force to get focus. thats why it got some last focus. why i did is overided the property ShowWithoutActivation and everything start to work. protected override bool ShowWithoutActivation { get { return true; } } thanks man.
R.Z