mdi

How to check the “Z-position” of form in a MDI application?

妖精的绣舞 提交于 2019-12-23 01:25:10
问题 I have created MDI application in Delphi. Lets assume that I have a bunch of MDIChild forms in my application which are visible on the screen. I would like to perform a loop on those forms and check in what order each of the forms is displayed on the screen. For example if I have 3 MDICHild forms: FormA , FormB , FormC and FormB partly overlaps FormA and FormC partly overlaps FormB I want to mark their Z property (deepth) as follows: FormB.Z = 2 // that form is between FormA and FormC FormA.Z

Getting Cross-thread operation not valid in MDIParent [duplicate]

房东的猫 提交于 2019-12-22 11:28:52
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Cross-thread operation not valid I am trying to close the base of a form from another thread. I am getting the following error. System.InvalidOperationException: Cross-thread operation not valid: Control 'MDIParent' accessed from a thread other than the thread it was created on. for the below line: MDIParent.MDIParentRef.BaseClose(); 回答1: You need to perform the operation on the UI Thread: if (InvokeRequired)

用DLL方式封装MDI子窗体

穿精又带淫゛_ 提交于 2019-12-22 08:41:26
用DLL方式封装MDI子窗体是一种常用的软件研发技术,他的长处: 研发人员能够负责某一个模块的编写包括(界面+逻辑),能够互不干扰,模块研发完成后,主程式统一调用。 易于程式升级,当程式升级时,不用编译主exe文档,更新某个DLL就能够升级。 能够根据客户不同的需求、价钱给他们不同的模块。(奸商都愿意用这招) 最近用到这个技术,因为小弟没有用过,在网上google了一下,对他有了了解,我用的是基于COM的DLL,下面总结如下: 想在DLL中封装MDI子窗体,要注意以下几点: 您的DLL中的接口要有两个参数:第一,主程式的Application对象;第二,主程式窗体对象; 您要重写DLL入口函数 假如是基于COM的,要注意:因为COM没有TApplication和TForm类型,您在传入时需要强转为Integer。 需要注意的就这么多,下面结合例子看看(假设您已建立了工程): TComDllTest1 = class(TAutoObject, IComDllTest1) Private FMsgStr: WideString; function GetMDIForm(AForm: TForm): boolean; protected { Protected declarations } function Get_MsgStr: WideString; safecall;

MDI window list not updating child title bar texts

▼魔方 西西 提交于 2019-12-21 20:44:24
问题 I have a MDI container form, and some child forms that update their title bar texts themselves, independently. After the Text property is changed on the child form, the new title bar text from the child is not updated in the window list menu when the menu is opened. This is the auto-generated window list provided by .NET via the MdiWindowListItem property. The change only propagates when another event changes the window list physically (opening a new child, closing a child, switching to

TActionMainMenuBar, VCL-Styles and MDI buttons(Minimize, Close etc) not being styled.

血红的双手。 提交于 2019-12-21 04:39:19
问题 I'm trying to make TActionMainMenuBar display styled MDI buttons like a TMainMenu does. Any suggestions? I can't stop using MDI for this project. 回答1: Ok, first this is not a Vcl Styles bug , this is a VCL bug. This issue appears even if the Vcl Styles Are disabled. The issue is located in the TCustomMDIMenuButton.Paint method which uses the old DrawFrameControl WinAPi method to draw the caption buttons. procedure TCustomMDIMenuButton.Paint; begin DrawFrameControl(Canvas.Handle, ClientRect,

WinForms MdiContainer Menu

这一生的挚爱 提交于 2019-12-20 07:25:21
问题 All, I have a WinForms MDI control and in it I dock several child windows. When I first did this I managed (somehow) to get rid of the window list (shown above the tabbed forms below) I am not talking about the double window menu (on the right) I know that this is due to a bug in the WinForms control and that if you add MdiChild elements in the Load event instead of the Constructor, this behaviour resolves itsef (see this post for details). Here I am talking about the menu strip itself, I don

Bring mdi child infront of mdi parent objects

血红的双手。 提交于 2019-12-20 06:16:40
问题 I am working on a windows application form in visual studio 2012 where I am stuck in the UI design part. Actually, I am trying to open the child form in front of all the control objects (panel, table layout panel). This the parent form When I open a child form all the objects of parent form go back Here is the code inside my mdi parent form frmControlAccount x; private void controlToolStripMenuItem_Click(object sender, EventArgs e) { if (x == null || x.IsDisposed)//to avoid multiple opening

Disable MDI Parent when Child is Active

情到浓时终转凉″ 提交于 2019-12-20 05:45:56
问题 I menu strip in my software and when users click on about I want to open the another child window but I want to make the the parent window disabled which means only by closing or clicking kk make it available again. My current code opens the form but does not make the parent disable if (about == null) { about = new aboutForm(); about.ShowDialog(this); } I tried about.ShowDialog(); it's throws a error I appreciate any answers possible code solutions 回答1: Condition is not required because

Is it possible to change size of minimized window in MDI C# Winforms

左心房为你撑大大i 提交于 2019-12-20 02:52:12
问题 Users complain that when they have several minimized windows in MDI container it's impossible to distinguish them unless they resore each. I wonder if it's possible to make minimized window a little bit wider so the text in the caption can contain 6 characters? Thanks in advance! 回答1: No, this is not possible. Windows determines the width of a minimized window using the current system parameters, and there's no way to change this dynamically for a single application without changing the

Where is the composition root in a WPF MDI application?

佐手、 提交于 2019-12-19 21:47:26
问题 In traditional MDI applications some objects (Forms) will be created when a command occurs (Ex. pressing a ribbon button), so it maybe a composition point. I'm confiused about composition root in such applications. I read somewhere that we can use a ViewModelLocator which looks like Service Locator pattern. As you know the service locator pattern is denounced by some people. Now please advice me about this issue. Thanks in advance. 回答1: Whether or not a ViewModelLocator is a Service Locator