.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Delphi Win32 MDI Parent with C# Windows Forms child form

Posted By:      Posted Date: September 06, 2010    Points: 0   Category :Windows Application
I have created an assembly containing a form that i want created as a MDI child form in a Delphi Win32 application's MDI parent control. I can create the .NET form fine from my Delphi code. I can even use the Delphi window handle to let my .NET form be a child in the Win32 application by using the SetParent API. However minimizing the child form makes it disappear (instead of the regular minimize action for MDI children), and it also doesn't cause the MDI container to get scroll bars when you drag the child form under the edge of the MDI container. I have the feeling that the child form is not yet correctly aware that it is a MDI child. For instance, its MdiParent property is null. And i read somewhere that i might need to call some more Win32 API"s to hook everything up correctly. I can't, however, for the life of me not find which ones to call, and where to do it. Is there anyone here that is well versed in hooking up managed Windows Forms with native Win32 applications that can lend a helping hand?

View Complete Post

More Related Resource Links

make a form parent to all other forms in visual studio c#

i have created 2 forms child.cs and parent.cs. I have added the menustrip in parent form. I want that menu strip to be displayed in the child form also. How can i do that? Or else I want to make the parent.cs as the common form to my child.cs. Please help me with the coding that i can understand

Creating Menu Dynamically and Show form dynamically in Windows Forms


Dear All,

I am using a splitter control in windows forms. Left panel is having menus which I have populated from Database. And Right panel should display forms according to the selection from left pan.

For Eg. I  have a Main menu called Forms and got 5 Sub menus names  form1,form2,form3,form4 and form5 .When I click Form1 in Menustrip it should display Form1 on the right panel . And the same goes for all the menus.

Can you somebody guide me how can I achieve that

Best Regards


parent-child relationships with forms not lists


When I use http://office.microsoft.com/en-us/sharepoint-designer-help/introduction-to-building-sharepoint-applications-HA010239046.aspx it tells me how to build a parent-child relationship.

But is this possible using forms instead of lists?

If so can someone point me in the right direction?



label in MDI parent form do not remain in background of child form ?



Please guide and help me.

I have a mdi partent form which has a lable in center of it (to display application name in center). On opening a form in this mdi parent this lable should appear on back side of newly opened form  but on showing a child form label appears in front of newly opend form (appears like newly opened form is between label and mdi parent).
How to manage it please guide me.


GridView Parent Child View with JQuery Effects

I was just checked how to add some more cool effects to the GridView control using JQuery. In this post I will display parent-child data in the GridView control with some help of the wonderful JQuery library.

Let's first populate the GridView control.

Application Architecture in Windows Forms 2.0

Applications have special support in Windows Forms. For starters, you can manage and tailor your application's lifetime, and, when the work flow is disrupted by an unhandled exception, you can choose from several methods of response. Then, there are several application models that you can employ, including Single Document Interface (SDI) and Multiple Document Interface (MDI) applications, each of which can support either multiple-instance or single-instance mode, the former the VS05 default and the latter requiring special consideration. All applications, however, can discover and use a wide variety of information about the system and environment they execute in.

Application Architecture in Windows Forms 2.0-Single-MDI Applications

Consider an MDI application like Microsoft Excel; files opened from the file system (by double-clicking) are all opened as separate child windows within the parent Excel window.7 For the first instance of an MDI application to open a new child window to display the file that was passed to the second instance of the application, the second instance must be able to communicate with the initial instance.

How to programmatically add controls to Windows forms at run time by using Visual C#

Create a Windows Forms Application
Start Visual Studio .NET or Visual Studio 2005 or a later version, and create a new Visual C# Windows Application project named WinControls. Form1 is added to the project by default.
Double-click Form1 to create and view the Form1_Load event procedure.
Add private instance variables to the Form1 class to work with common Windows controls. The Form1 class starts as follows:

How to Localize Windows Forms and Change the Language at Runtime

Localization is the process of customizing your application to a particular language, culture or locale. Visual Studio provides support for localizing Windows Forms with much ease. In this article, we will see how to localize windows forms and give the user the ability to change to his preferred language at runtime.
When you run a localized application, the appearance is determined by two culture values. The UICulture property is used to specify which resource files will be loaded for the form. The Culture property, on the other hand, determines how strings such as dates, numerals, and currency amounts are formatted.
Let us see the steps required to create a localized form. You can then expand this example and adopt the same approach for the rest of the forms in your project

Localizing Windows Forms

The Visual Studio project system provides considerable support for localizing Windows Forms applications. There are two ways to generate resource files using the Visual Studio development environment: one is to have the project system generate the resource files for localizable UI elements such as text and images on the form. The resource files are then built into satellite assemblies. The second way is to add a resource file template and then edit the template with the XML Designer. A reason for doing the latter is to make localizable strings that appear in dialog boxes and error messages. You must then write code to access these resources.

This walkthrough topic demonstrates both processes in a single Windows Application project.

You can also convert a text file to a resource file; for more information, see Resources in Text File Format and Resource File Generator (Resgen.exe).


How to keep the hover for Parent menu and set the selected menu item css for child menu item?



I'm using cssfriendly control adapter for menu. My asp.net menu control's datasource is a sitemap file I'm using which contains all the urls.

I have the following questions:

  1. Is there a way to keep the parent menu item hovered while hovering over the respective child menu items?
  2. Is there a way to keep the child menu item selected? I am able to set the css for the parent menu, however I was wondering if the same is possible with the child items.

Please help! Smile


Moneka Smile

CLR Inside Out: Extend Windows Forms Apps Using System.AddIn


See how Windows Forms applications can be adapted to use the new .NET Add-in framework (System.AddIn) this month.

Mueez Siddiqui

MSDN Magazine July 2008

GUI Library: Bring the Simplicity of Windows Forms to Native Apps


In this article, author John Torjo presents a guide to his C++ GUI library called eGUI++ and explains how it makes user interface programming easier.

John Torjo

MSDN Magazine June 2008

Managed Spy: Deliver The Power Of Spy++ To Windows Forms With Our New Tool


Spy++ displays Win32 information such as window classes, styles, and messages. Now you can get that same functionality for managed code using our ManagedSpy. Get it here.

Benjamin Wulfe

MSDN Magazine April 2006

Winning Forms: Practical Tips For Boosting The Performance Of Windows Forms Apps


This article discusses techniques you can use to ensure that Windows Forms-based apps provide optimal performance to match the rich UI responsiveness they're known to provide.

Milena Salman

MSDN Magazine March 2006

Text Rendering: Build World-Ready Apps Using Complex Scripts In Windows Forms Controls


The System.Windows.Forms.TextRenderer class provides support for complex scripts in Windows Forms controls so you can render text the way you want and support international locales.

Miguel A. Lacouture

MSDN Magazine March 2006

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend