Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Problems with modal forms
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Problems with modal forms

 Post Reply Post Reply
Author
Message
rkaupins View Drop Down
Newbie
Newbie


Joined: 10 October 2006
Location: Australia
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote rkaupins Quote  Post ReplyReply Direct Link To This Post Topic: Problems with modal forms
    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.
 
 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
rkaupins View Drop Down
Newbie
Newbie


Joined: 10 October 2006
Location: Australia
Status: Offline
Points: 9
Post Options Post Options   Thanks (0) Thanks(0)   Quote rkaupins Quote  Post ReplyReply Direct Link To This Post Posted: 29 October 2007 at 8:40pm
Thanks!
Back to Top
satyakvv View Drop Down
Groupie
Groupie


Joined: 07 July 2008
Location: India
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote satyakvv Quote  Post ReplyReply Direct Link To This Post 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. 
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 08 July 2008 at 6:29am

Hi,

I sure it was fixed after 10.4 release.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
satyakvv View Drop Down
Groupie
Groupie


Joined: 07 July 2008
Location: India
Status: Offline
Points: 10
Post Options Post Options   Thanks (0) Thanks(0)   Quote satyakvv Quote  Post ReplyReply Direct Link To This Post 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.
 
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.