MDI Tabs -- improve functionality |
Post Reply |
Author | |
faakher
Groupie Joined: 26 June 2010 Location: Saudia Arabia Status: Offline Points: 24 |
Post Options
Thanks(0)
Posted: 28 November 2011 at 10:34am |
nice tip
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.1
Platform: Windows XP Professional - SP2 Language: Visual Basic 6.0 SP6 |
|
chrisABC
Senior Member Joined: 05 June 2008 Status: Offline Points: 258 |
Post Options
Thanks(0)
|
Using MDI Tabs with Groups (ActiveX in VB6) I find it useful to sometimes set a childForm.Enabled = False. This lets user view the form but they cannot edit it or give it focus.
However, because of the way CommandBars works, you can get get into situation where the not-enabled Form is on top, and it is impossible to select any other Form. Secondly, because CommandBars seems to store the current Tab for each Group, it can be difficult for user to switch to different Group (ie. clicking on the current Tab is ignored by CommandBars, even if it is in a different Group). I found that adding the following code in the Workspace_BeforeItemClick event solves both of the above problems, and does not appear to have any side-effects. Dim X as Long For X = 1 to Forms.Count - 1 'ignore Forms(0) the MIDForm If Forms(X).hwnd = Item.Handle then Forms(X).ZOrder 0 'Force this Form (and hence this Tab) to be selected End If Next |
|
Chris (Manchester, UK) -- www.abc6.co.uk ---- Using CodeJock ActiveX Suite 13.1.0 with Windows8, VB6 SP6
|
|
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 |