Opening Child Form in External Application VB.NET - vb.net

I know it's possible to open an external application in an MDI form: Opening external application inside VB.NET MDI Form
But what I'm looking for is to open a VB.NET MDI Form inside an external application, notepad.exe for example. What I want to happen is for the form to open inside the external program(notepad in this case)

The only way you can do what you are asking is if the program allows "Add-ins". Some programs, like those in MS Office, will allow you to create add-ins to their programs which can be called in many different ways. I don't think I has see one that allows what you would call MDI Children but that does not mean there isn't something out there.
To get started creating add-ins for office, create a new project in visual studio using one of the supplied templates:
New Project
Templates
Visual Basic
Office
Or for visual studio:
New Project
Templates
Other Project Types
Extensibility

Related

How to add common dialog control in vb 2010

In a school tutorial document I need to add a common control dialog to my form through project menu then components, but I cannot find the components button. I am using visual basic 2010.
VB.NET doesn't use the Common Control Dialog. What you are looking for is the SaveFileDialog and OpenFileDialog.
Common Controls are what you would use in a COM-based language, like VB6.
Instead of commondialog control, VS 2010 had offered five individual controls located under Toolbox -> dialogs. these are ColorDialog, FolderBrowserDialog, FontDialog, OpenFileDialog, SaveFileDialog. you can use one of these as per your requirement.

How can I have one menu in all forms in VB.net Win Forms?

May I know if it is possible to have one header menu in all windows forms?
And if so, how can I make it?
Yes its possible to have one header menu in all windows forms using MDI.
MDI is a popular interface because it allows you to have multiple documents (or forms) open in one application. Examples of MDI applications include Microsoft Word, Microsoft Excel, Microsoft PowerPoint®, and even the Visual Studio integrated development environment itself. Each application consists of one (or more) parent windows, each containing an MDI client area—the area where the child forms (or documents) will be displayed. Code you write displays as many instances of each of the child forms that you want displayed, and each child form can only be displayed within the confines of the parent window—this means you can't drag the child forms outside the MDI container.
For more details refer this blog.
Hope this will help you.
Two ways:
Add a User Control to your solution, place a Menu in the User Control and build the application. Then in the ToolBox you have the menu control that you can use on all forms.
Make a WinForm with a Menu then Inherit all your other forms from the base one.
One solution for this is that you can create MDI application.

MS Project VSTO: Closing MS Project causes it to hang indefinetely

I have replicated this issue in both Project 2010 and 2013.
I developed a VSTO addin, using Visual Studio 2010. In this addin, I have exposed a COMVisible method.
I also have a different (non .NET) application, which then instantiates the Project COM object, searches for my addin and calls the method that I marked as COMVisible.
This causes Project to open a "new" Project file and write something to it.
This non-.NET application, after calling the COM method in my addin, stops execution (without closing MS Project).
I then close the newly created Project (not MS Project, just the file). Everything is fine; however, when I try to close MS Project, it hangs indefinitely. In the Task Manager, it is still shown as "Running" and clicking on the MS Project window brings up a "Switch To", "Retry", "Cancel" dialog, informing me that some other application is busy...
Surprisingly, if I choose to NOT close the newly created Project file, and simply close the MS Project window, it closes normally.
What might be going on here?
Ok, after much investigation, I found the answer to the problem. Basically the COM class exposed from my VSTO Addin needs to inherit "StandardOleMarshalObject".
The reason for this is because the COM method in my Addin was accessing the Project Object Model on a secondary thread (the thread of the calling application). This is a big no no. Deriving from that class marshals all call on that secondary thread to the primary UI thread, thus fixing the problem.

I want to make a control builder program when I add my custom control to the winform - VB.NET, VS2008

I am currently building custom user controls and would like to have a program (that I write) that sets the properties for the control when it is dragged onto the form.
I've seen this working with some controls I've been using - an external program opens (or is available by right clicking on the control).
How is this accomplished?
Edit: An example of an application I use that does this is Farpoint Spread Designer; You can right click on the component and launch the designer application.

Loading a Vb.net control inside a VB 6 form

I have a user control in vb.net application.
and i have a form in vb 6.
so in my vb.net applciation to this user control i need to mention the vb 6 form as its parent.
Means when i run a vb6 application i should see this user control as a part of that form.
Ahy help appreciated.
Take a look at the COM interop Toolkit.
It allows you to easily create com-visible .NET usercontrols, which can be used in VB6 for instance.
You can try saving it as a dom object in .net
After this, you can open it in vb6 in the menu components.
I've done it with guid class of .net but i don´t know what you and to do, but i think you should try it.
It is actually fairly easy to add some plumbing to a VB.NET User control to expose it via COM as an ActiveX control that can be used by VB6 and other COM clients.
Here is an article describing how to do that:
"Writing an ActiveX Control in VB.NET"