Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Command Bars
  New Posts New Posts RSS Feed - Workspace w/ Max MDI child fails
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Workspace w/ Max MDI child fails

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


Joined: 14 May 2004
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote markmbaker Quote  Post ReplyReply Direct Link To This Post Topic: Workspace w/ Max MDI child fails
    Posted: 17 May 2004 at 11:11am
In the MDISample application, if I force the MDI child window to maximize itself but turn *off* the Max button for the window, the Workspace fails to appear.  The same also is true if I just turn off the Min button.  Essentially, I want to force the MDI child windows to appear maximized with no ability to minimize or restore them.    Is this a bug?
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 18 May 2004 at 7:00am
CommandBars(1).SetFlags xtpFlagHideMDIButtons, xtpFlagHideClose
Back to Top
nighthawk View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 June 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote nighthawk Quote  Post ReplyReply Direct Link To This Post Posted: 11 June 2004 at 9:15am
I have tried this and it is only partially working.  When the program loads, the minimize/restore/close buttons are there and all the loaded child forms appear maximized.  Only after I click the minimize or restore button and then maximize the child form again do the minimize and restore buttons dissapear.  How do I get them to disappear from the beginning when the program initially loads?
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 11 June 2004 at 9:23am
The line of code I provided will hide the minimize and maximize buttons, leaving only the close button appearing in the upper right corner on the menu bar.

You must set the WindowState to Maximized at design time for your child form.  This way your child form is automatically maximized when it is opened.
Back to Top
nighthawk View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 June 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote nighthawk Quote  Post ReplyReply Direct Link To This Post Posted: 11 June 2004 at 9:45am
My problem is not getting the child forms to appear maximized when they are loaded, it is that the minimize and maximize buttons are not hidden when the program initially loads even though I include your line of code. 

So when my program loads, the child forms are maximized and the minimize/restore/close buttons are visible.

I click the restore or minimize buttons and the child forms change accordingly.

I then click the maximize button and the child forms change accordingly.

Only at this point do the minimize and restore buttons become hidden and the close button is the only visible option.  I want just the close button visible from the very beginning.
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 11 June 2004 at 9:51am
Where in your code are you hidding the buttons?  Maybe you can post a sample?  That same code is working fine for me.
Back to Top
nighthawk View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 June 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote nighthawk Quote  Post ReplyReply Direct Link To This Post Posted: 11 June 2004 at 10:01am
I put it at the end of my MDIForm_Load event.  The name of my CommandBars control is "cbMain":

Set objWorkspace = cbMain.ShowTabWorkspace(True)
cbMain.VisualTheme = xtpThemeOffice2003
cbMain(1).SetFlags xtpFlagHideMDIButtons, xtpFlagHideClose




Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 11 June 2004 at 11:23am
That looks correct.  Attach a sample project so I can debug.
Back to Top
nighthawk View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 June 2004
Status: Offline
Points: 167
Post Options Post Options   Thanks (0) Thanks(0)   Quote nighthawk Quote  Post ReplyReply Direct Link To This Post Posted: 15 June 2004 at 4:55am
I moved the code to be towards the beginning of the MDIForm_Load event and it is working now.  Something in the event, which I haven't yet identified, was keeping it from working correctly.  Thanks for your help.
Back to Top
ccalhoun View Drop Down
Newbie
Newbie


Joined: 29 June 2004
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote ccalhoun Quote  Post ReplyReply Direct Link To This Post Posted: 29 June 2004 at 7:37am

What commandbar is being used for this example?

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 29 June 2004 at 7:46am
The MDI buttons we are talking about appear in in the Menu Bar.  This is accessed via CommandBars(1) or CommandBars.ActiveMenuBar.  

Is this what you meant by "What commandbars is being used?" ?
Back to Top
ccalhoun View Drop Down
Newbie
Newbie


Joined: 29 June 2004
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote ccalhoun Quote  Post ReplyReply Direct Link To This Post Posted: 29 June 2004 at 8:01am

Is this set flag functionality exposed for toolbar controls?

If not how can you accomplish this independently of the CommandBars or the navigation mechanism?

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 29 June 2004 at 8:08am
The SetFlags method is only used for a CommandBar, specifically the MenuBar.  This is only used to add/remove the Maximize, Minimize, and Close buttons that appear at the far right of the MenuBar when a child window is maximized.

"If not how can you accomplish this independently of the CommandBars or the navigation mechanism?"

What specifically are you trying to accomplish?
Back to Top
ccalhoun View Drop Down
Newbie
Newbie


Joined: 29 June 2004
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote ccalhoun Quote  Post ReplyReply Direct Link To This Post Posted: 29 June 2004 at 8:12am

I would like to accomplish removing the minimize, maximize and close buttons from child forms when they are opened.

Any ideas?

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 29 June 2004 at 8:16am
CommandBars(1).SetFlags xtpFlagHideMDIButtons, 0

Back to Top
ccalhoun View Drop Down
Newbie
Newbie


Joined: 29 June 2004
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote ccalhoun Quote  Post ReplyReply Direct Link To This Post Posted: 29 June 2004 at 8:18am
What if the MDI child form is open from a toolbar click event?
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 29 June 2004 at 8:24am
You only need to specify the line of code I posted one time.  Then the buttons will not appear until you add some code to make them visible.  It doesn't matter how the form is opened.  Have you tried the code above to see if it does what you want?
Back to Top
ccalhoun View Drop Down
Newbie
Newbie


Joined: 29 June 2004
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote ccalhoun Quote  Post ReplyReply Direct Link To This Post Posted: 29 June 2004 at 9:43am

I have  tried this code but I use a Main Menu ManMenu1

Which doesn't expose SetFlags.

I am using a windows application with a MDI parent form and two children

With a MainMenu and a Toolbar.

the menu has to items (form1.form2)
the toolbar has two buttons(form1,form2)

Which object that I am using will expose setflags?

 

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 29 June 2004 at 10:10am
You are using the CommandBars control, right?  You can post a sample project to this post by clicking on the button that looks like a Winzip logo.
Back to Top
ccalhoun View Drop Down
Newbie
Newbie


Joined: 29 June 2004
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote ccalhoun Quote  Post ReplyReply Direct Link To This Post Posted: 29 June 2004 at 10:20am
No I am not I am just using windows controls.2004-06-29_102047_MDITest.zip
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 29 June 2004 at 10:47am
That code will only work with the Codejcok CommandBars control.  Why are you not using the Codejock CommandBar? 
Back to Top
ccalhoun View Drop Down
Newbie
Newbie


Joined: 29 June 2004
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote ccalhoun Quote  Post ReplyReply Direct Link To This Post Posted: 29 June 2004 at 12:04pm

How could I from within VB.NET.

I downloaded the Toolkit but I don't see any assemblies that could be referenced from .NET

 

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 29 June 2004 at 3:59pm
I'm sorry, I forgot that this is only possible in the next release.  You will be able to use all the ActiveX controls in VB.NET when the next release come out.   I guess you will just have to wait, the next relese should be ready soon.
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.