Nevron Forum

how to control MdiStandard

https://www.nevron.com/Forum/Topic3018.aspx

By JSW W. - Thursday, February 4, 2010

m_DockManager.DocumentStyle.DocumentViewStyle = DocumentViewStyle.MdiStandard

How to control the document in this mode?
I mean when i maximized the document. There is no buttons or something to control it.


Also are the way to force all MdiStandard to be Maximized and no minimize allow?
By Angel Chorbadzhiev - Thursday, February 4, 2010

Hello JSW W.,

We had small issue with the mix, max, close buttons of the documents when they are in MdiStandard document style and they are maximized.

Yesterday (Feb,03,2010) we have released a service pack where this problem is fixed.

However, in order to be able to see these buttons you need to place NCommandBarsManager control with one NMenuBar in it where these buttons should resize.

 

Regarding the second question when the document style is MdiStandard the host of the panel is NMdiChild and you can do the following:

 

NUIDocument doc = new NUIDocument();

NMdiChild host = doc.Host as NMdiChild;

if (host != null)

{

host.WindowState = FormWindowState.Maximized;

host.MinimizeBox = false;

}

Regards,

Angel.

By JSW W. - Thursday, February 4, 2010

The code above works wonderfully. it is more stable than the one in your example...
with the

Dim hostDoc As INUIDocumentHost = TryCast(doc.Host, NMdiChild)

...

How/Where to get to the patch I have never done, this kind of thing before. Do we need a new license key?

If I already have the NMenuBar all it need to do is add buttons into it right?
By Angel Chorbadzhiev - Wednesday, February 10, 2010

Hello JSW W.,

Usually the service packs are replacing the downloads on the download page. So you just need to download it again.

If you have a license key for vol.1 2010 you won't need a new license key.

If you have a NMenuBar, when the documents are maximized the buttons will be displayed automatically.

Regards,

Angel.

By JSW W. - Thursday, February 11, 2010

Okay I will download your package again. Many thanks,
By JSW W. - Thursday, February 11, 2010

Hi There

I tested the new patch. The follow are my comments:

1) there will be a doc icon on left corner of the menubar which I am not sure how to format it.

2) The minimize, maximize, close boxes on menubar do not response to e.g.
host.MinimizeBox = False
host.MaximizeBox = False
host.CloseButton = False

3) Cannot format the looks and feels for the buttons.

4) How to get to WithEvents handle functions for the minimize and maximize?

Thanks
By Angel Chorbadzhiev - Friday, February 12, 2010

Hi JSW W.,

1) When maximize a NUIDocument the icon that is on the left corner of the menu bar is the documents small icon (NUIDocument.SmallIcon).

2) Each NUIDocument has its own host, so probably you have set these flags for different document.

3) You can only apply skin or Palette on the host caption buttons.

4) You can only attach to DocumentClosing or DocumentClosed events of the DocumentManager. There are no exposed events for minimize and maximize.

Regards,

Angel.