mdi

Difference between .Owner property and ShowDialog(IWin32Window owner)?

流过昼夜 提交于 2019-12-03 12:32:25
问题 I presume a winform's owner can be set explicitly via the .Owner property OR by passing the owner in the overloaded method ShowDialog(IWin32Window owner) I am unable to understand why these methods exhibit different behavior when working with MDI forms . I have created an MDIParent and an MDIChild. I also have a simple winform MyDialogBox that displays its owner on load. MessageBox.Show("Dialog's owner is " + this.Owner.Name); Method A - In the load of MDIChild I have the following code,

Difference between .Owner property and ShowDialog(IWin32Window owner)?

人走茶凉 提交于 2019-12-03 03:04:00
I presume a winform's owner can be set explicitly via the .Owner property OR by passing the owner in the overloaded method ShowDialog(IWin32Window owner) I am unable to understand why these methods exhibit different behavior when working with MDI forms . I have created an MDIParent and an MDIChild. I also have a simple winform MyDialogBox that displays its owner on load. MessageBox.Show("Dialog's owner is " + this.Owner.Name); Method A - In the load of MDIChild I have the following code, which causes the MyDialogBox's owner to be set to MDIChild MyDialogBox box = new MyDialogBox(); box.Owner =

How to hide a MDI Child form in Delphi?

匿名 (未验证) 提交于 2019-12-03 00:56:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: 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. 回答1: There is a protected procedure in TCustomForm defined as: procedure TCustomForm.VisibleChanging; begin if (FormStyle = fsMDIChild) and Visible and (Parent = nil) then raise

014.Delphi插件之QPlugins,MDI窗口

匿名 (未验证) 提交于 2019-12-03 00:02:01
不知道为什么,这个DEMO编译出来报错,运行不了,在QDAC群里问了一下也没人响应。 效果如下 主程序代码如下 unit Frm_Main ; interface uses Winapi . Windows , Winapi . Messages , System . SysUtils , System . Variants , System . Classes , Vcl . Graphics , Vcl . Controls , Vcl . Forms , Vcl . Dialogs , Vcl . Menus , QPlugins , qplugins_params , qplugins_formsvc , qplugins_vcl_formsvc , qplugins_loader_lib ; { 注意使用 MDI 子窗体做为插件,宿主和插件都必需同时引用 rtl / vcl 运行时包 } type TForm_Main = class ( TForm ) MainMenu1 : TMainMenu ; File1 : TMenuItem ; procedure FormCreate ( Sender : TObject ); procedure File1Click ( Sender : TObject ); procedure FormClose ( Sender :

I want to remove icon from windows MDI child form

元气小坏坏 提交于 2019-12-02 19:50:36
问题 There is same problem related with icon. I am satisfy with your answer that seticon property to false. But my form is child of MDI form, then this problem is remain same that icon is not remove. Can you help me. 回答1: Yes, this is a "feature" of the Windows MDI implementation. Design guides require the child form to have an icon so it is easy for the user to see what child was maximized and where to click to activate the system menu. The Windows Forms designer should have disabled the

VB.NET Picturebox on top of MDI Child

喜欢而已 提交于 2019-12-02 17:56:20
问题 Any idea why a picturebox in a MDI parent would show on top of a MDI child? (even when MDI child = topmost) When calling picturebox.SendToBack the picturebox disappears in the MDI parent. 回答1: What I did was, created a borderless form with the picturebox on it, and threw it on the MDI parent as a MDI child, seems to do the job! 来源: https://stackoverflow.com/questions/7814968/vb-net-picturebox-on-top-of-mdi-child

Add a form to a MDI child

笑着哭i 提交于 2019-12-02 13:26:20
In Form1 I'm enabling IsMdiContainer and I added a MenuStrip . In Form1_Load I "new" Form2 and I'm assiging Form2.MdiParent to this which is Form1 . I'm also maximizing Form2 and this operation works well. In Form2 I have a treeView on the left side of the form and on the right side of the form I would like to display a number of different forms with various editing capabilities which will be dependent upon the node or level selected in the treeView . I would like to create a number of different forms for editing data that would be displayed in Form2 depending on the selection from the

I want to remove icon from windows MDI child form

只谈情不闲聊 提交于 2019-12-02 13:01:00
There is same problem related with icon. I am satisfy with your answer that seticon property to false. But my form is child of MDI form, then this problem is remain same that icon is not remove. Can you help me. Yes, this is a "feature" of the Windows MDI implementation. Design guides require the child form to have an icon so it is easy for the user to see what child was maximized and where to click to activate the system menu. The Windows Forms designer should have disabled the "ShowIcon" property and force it True but it can't because it doesn't know yet that the form will become an MDI

How to make an MDI child window stay on top of its siblings?

最后都变了- 提交于 2019-12-02 12:34:41
问题 This question is related to my previous one. I have an MFC (VC6) MDI Application which has several MDI child windows acting as different views for one document. Is it possible to set one of those frames to stay on top of the others? I have tried to call SetWindowPos( &GetParentFrame()->wndTopMost, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE); and ModifyStyleEx(0, WS_EX_TOPMOST); from the CMDIChildWnd but neither appears to work. 回答1: In your CMDIChildWnd class (usually CChildFrame), add a static HWND

VB.NET Picturebox on top of MDI Child

蓝咒 提交于 2019-12-02 12:28:20
Any idea why a picturebox in a MDI parent would show on top of a MDI child? (even when MDI child = topmost) When calling picturebox.SendToBack the picturebox disappears in the MDI parent. What I did was, created a borderless form with the picturebox on it, and threw it on the MDI parent as a MDI child, seems to do the job! 来源: https://stackoverflow.com/questions/7814968/vb-net-picturebox-on-top-of-mdi-child