mdi

Contain a VB6 form in a .Net MDI

可紊 提交于 2019-11-29 12:07:39
I'm porting an old VB6 app into .Net but one Vb6 form is too big to migrate in this release. I Shell the Vb6 exe to show the VB6 form from .Net, but the VB6 form is not contained in the .Net MDI. I have a gut feeling its not possible to embed the VB6 form in the .NET MDI , does anyone know if this is possible? I'm after something like Interop Forms Toolkit 2.1 or even an API It is indeed possible. It's just neither simple, nor a particularly a good idea... You'll need to create an ActiveX container for the form, which you can then embed the VB 6 form into. See this article on CodeProject for

How to hide a MDI Child form in Delphi?

陌路散爱 提交于 2019-11-29 11:31:40
How can I hide a MDIChild window in Delphi? I'm using this code in FormClose() event of my MDI children, but it doesn't seem to work: procedure TfrmInstrument.FormClose(Sender: TObject; var Action: TCloseAction); begin Action := caNone; ShowWindow(Handle, SW_HIDE); frmMainForm.MDIChildClosed(Handle); end; My child window is minimized instead of being hidden. There is a protected procedure in TCustomForm defined as: procedure TCustomForm.VisibleChanging; begin if (FormStyle = fsMDIChild) and Visible and (Parent = nil) then raise EInvalidOperation.Create(SMDIChildNotVisible); end; Override it in

WPF MDI children

99封情书 提交于 2019-11-29 10:45:35
This question has been posted before, but I can't find a good answer. I want MDI children in my WPF application. And I want those children to be fully WPF compliant. .Net WPF doesn't have MDI children (windows within main window) any more. Some say it’s because the design is obsolete and GUI apps shouldn't be designed that way. Those people can refrain from answering this post. I know what I need. :) What (preferably free) alternatives is there for WPF MDI? Will they work with MVVM? EDIT: PEOPLE - don't vote up comments that say "MDI IS NOT GOOD". I specifically asked people to avoid that. I'm

Visually remove/disable close button from title bar .NET

倖福魔咒の 提交于 2019-11-29 09:59:10
I have been asked to remove or disable the close button from our VB .NET 2005 MDI application. There are no native properties on a form that allow you to grey out the close button so the user cannot close it, and I do not remember seeing anything in the form class that will allow me to do this. Is there perhaps an API call or some magical property to set or function to call in .NET 2005 or later to do this? ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ More information: I need to maintain the minimize/maximize functionality I need to maintain the original title bar because the form's drawing methods are

How to implement mdi in a WPF application

放肆的年华 提交于 2019-11-29 09:22:36
I really like MDI applications. It allows me to move quickly between windows and compare the content of different windows. Furthermore, sometime the content of one window is useful for another, so I can copy and paste. I think it's a great user experience for working mode. Right or wrong practice, I love it. I saw Stack Overflow question MDI applications in WPF , and there they gave the Visual Studio 2010 environment as an example. I didn't understand if and how it is possible to implement that environment: like having tabs that can be tear off to independent screen (less important for me) and

Assembly reference not found in XAML, but code compiles when referenced in xaml.cs class

£可爱£侵袭症+ 提交于 2019-11-28 23:24:54
I've got a strange problem adding a dll reference. I've got a WPF application and am trying to use the WPF MDI library: http://wpfmdi.codeplex.com/ As stated in the instructions (which are very vague), I right-clicked on references in VS2012, clicked on Add reference.. , clicked on Browse.. and added my dll which I downloaded. Next, I added the following line in the XAML of my window: xmlns:mdi="clr-namespace:WPF.MDI;assembly=WPF.MDI" as stated in the instructions. However, when trying to add an <mdi:MdiContainer> in the XAML, the following error messages are displayed: The type 'mdi

Size/Location of Winforms MDI Client Area

馋奶兔 提交于 2019-11-28 11:04:05
Inside an MDI form is a client area that hosts the mdi child forms. How do I find out how big that area is? The best I can come up with so far is finding the total size of the parent's potential client area (mdiparent.ClientRectangle) and then subtracting off the sizes of components like toolbars, etc that take away from the client area. Is there a better way? There is no property on a form that gives you access to the MDI client window. But you can find it back like this: public MdiClient GetMdiClientWindow() { foreach (Control ctl in this.Controls) { if (ctl is MdiClient) return ctl as

Is there still a place for MDI? [closed]

梦想与她 提交于 2019-11-28 09:28:14
Even though MDI is considered harmful , several applications (even MS Office, Adobe apps) still use it either in its pure form or some as a hybrid with a tabbed/IDE-like interface. Is an MDI interface still appropriate for some applications? I'm thinking of an application where one typically works with several documents at one time, and often wants to have multiple documents side to view or copy/paste between them. An example would be Origin , where one has multiple worksheet and graph windows in a project; a tabbed or IDE-like interface would be much more inconvenient with a lot of switching

MDI Form detecting with a child form is added or removed

五迷三道 提交于 2019-11-28 08:48:46
问题 Is there an event I can use to tell if a child form has been added or removed from the MDI parent? 回答1: No, there is not. You would have to subclass Form and expose specific events that would indicate when the child is added and then route all attachments of child forms through a method that would wire up the child form, as well as raise the event. 回答2: Yes. On your main MDI form, wire up to the MdiChildActivated Event. Like so: public partial class Form1 : Form { public Form1() {

Prevent duplicate MDI children forms

巧了我就是萌 提交于 2019-11-28 08:31:27
Is there a way to prevent the opening of a certain form within an MDI container if that said form is already opened? You can interate over the OpenForms collection to check if there is already a form of the given type: foreach (Form form in Application.OpenForms) { if (form.GetType() == typeof(MyFormType)) { form.Activate(); return; } } Form newForm = new MyFormType(); newForm.MdiParent = this; newForm.Show(); AFAIK there is no standard way. You'll have to implement it yourself. I'd do it this way: class TheForm: Form { private static TheForm Instance; private TheForm() // Constructor is