Print Page | Close Window

Problems with modal forms

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=8565
Printed Date: 07 October 2024 at 2:27pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Problems with modal forms
Posted By: rkaupins
Subject: Problems with modal forms
Date 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.
 
 



Replies:
Posted By: Oleg
Date Posted: 29 October 2007 at 2:50am
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


Posted By: rkaupins
Date Posted: 29 October 2007 at 8:40pm
Thanks!


Posted By: satyakvv
Date Posted: 07 July 2008 at 11:50am

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. 


Posted By: Oleg
Date Posted: 08 July 2008 at 6:29am

Hi,

I sure it was fixed after 10.4 release.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: satyakvv
Date Posted: 07 August 2008 at 6:18am
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.
 



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net