Problems with modal forms |
Post Reply |
Author | |
rkaupins
Newbie Joined: 10 October 2006 Location: Australia Status: Offline Points: 9 |
Post Options
Thanks(0)
Posted: 29 October 2007 at 1:58am |
We're using the CodeJock Command Bar version 10.4.1 with VB6.
We've found that if a form is show modally from another form with a Command Bar, the parent form can be selected from the Windows Taskbar and accelarators on the parent form can be run from the keyboard.
For example, say i have Form1 with a Command Bar. I then show Form2 modally from Form1. I can then select Form1 from the Windows Taskbar and hit F2 (an accelerator we've set on the command bar) which then shows another modal form.
This causes problems with our application as we don't expect the user to be able to execute other events when a form is displayed modally.
Is there a way to stop this from happening?
Thanks.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Thanks, you are right.
Easy solution is in Execute method check WS_DISABLED style of form.
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
#define GWL_STYLE (-16)
#define WS_DISABLED 0x08000000 we will change it in our sources.
Thanks.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
rkaupins
Newbie Joined: 10 October 2006 Location: Australia Status: Offline Points: 9 |
Post Options
Thanks(0)
|
Thanks!
|
|
satyakvv
Groupie Joined: 07 July 2008 Location: India Status: Offline Points: 10 |
Post Options
Thanks(0)
|
Hi, Is there a fix available from CodeJock for this issue ? I do not find this issue mentioned in the release notes. Please specifiy which version. Meanwhile, we tested with 11.2.1 CommandBars. We also use SkinFrameWork 11.2.1 in the same module.
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, I sure it was fixed after 10.4 release.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
satyakvv
Groupie Joined: 07 July 2008 Location: India Status: Offline Points: 10 |
Post Options
Thanks(0)
|
Hi,
One more issue on the similar lines. Using the disabled property, we could stop the commandbars execute method. But, in this case, if the user pressed Alt+F4, windows responds to this event and closes the application even though the modal form is still on. But, the exe remains in the Task Manager.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |