Error In When Make An MDI Parent Form To Call Other Forms
Nov 17, 2009
I'm trying to make an MDI parent form to call other forms. I have put this code which I found in a post here into the main form which I added to my project as an MDI parent form:
[Code]...
I get an error message which say FrmEmbed is not defined. How can I correct this?
I have two forms. Form A and Form B. Form A has a datagrid that is populated from a SQL Database Table query. When a button is pressed Form B is launched that allows you to add a record to the database table. I need for the datagrid to be refreshed and show the newly added record when I close form B and go back to the parent.
I need to know the proper way, or maybe I should say, the different ways to call another form from a parent or preceding form. I am currently using ex: formname.showdialog() to call my next form, but I am uncertain if I should be using that in every situation. [code] Whats the difference between these different methods? (ex: .showdialog() , .show() )I tried both of these to open a temporary form to retrieve a persons name from a database, so as the users progresses through my training program they can keep track of their scores.But, I also call other forms as I branch through my program, from the main page, to a secondary page, to a testing page, to a results page and then back to the secondary page
I have a class inhert ToolStripButton. it builds a new toolstrip button. the button will be added to the toolstrip which is on main form.
I will need call function in the main form. what's the right way to do this?
now, I pass the main form when create the class. but I guess the right way is to raise the event in main form.
but, how about the properties in main form?
if I raise the event, will it run the event first, then go to the next line of the class? or, just raise event, then go to the next line in the class immediately?
I am trying to create a project in VB 2010 like I have in VB6. In VB6 I have a parent form which opens a child form. The child form displays calls (customers) on a spread sheet control that are on hold. The user selects the call in the child form, it calls a sub in the parent form passing a record number to identify the customer. The parent form then "pulls" up the call and and connects the user to the caller with all of the customers information.So, I haven't done this in VB NET and I have searched to see if this would be done the same way in .NET as it was in VB6, but I haven't found much decisive information. Is a parent/child form the way to do this?
I would like to know if its possible to start up a second windows forms inside the parent form. Ex: A button is pressed and a new form is showed. I would like to keep that new form inside the parent form, and have it not be able to go outside the parent form.
This is a challenging one that got me stumped while I was coding today. Suppose I am running the Sub Test1() and Test2() and would like to print out the value of the Shadows method of the instance of the object I am passing in to TestCall() (see below - it is clearer) using the following restrictions:
Can't change the contents of Class A, B, and C Can't change Sub Test1() and Sub Test2() TestCall() can't have an if, select case etc. statement that tries to figure out the type
How will i close all the forms within my main form? Everytime I click on the menus of my main form,I'm setting my main form as MDI-Parent form and then loading a new form as it it is the child form if I'm not mistaken. I have a log-out menu, and what I want to happen is everytime I log-out all the forms within my parent form will be closed. How will I do it? Here are some of my codes.
im making a 'program' and its a Head form. with 3 Subforms in it. Well. i added a Menustrip.As soon as the forum starts i have a Load timer. (see Image 1)
1.Thats how it needs to be. Also when the Subforms are loaded.But, Now the problem. When the forms are loaded. The Menustrip ends up wrong placed and Resized?
2.How to work this away? The menu strip needs to stay On top of all the others. and the Menustrip goes back to normal as soon as i click one of the Title bars of the Subforms?
I have a main form that stays in the background of my program. Other windows open and are owned by the main form. Think of it as your desktop.It's not a MDI form; I can't use a MDI form for this project because it's too limited for me.
hey I have a piece of code which gives fade effect to a form at load eventBut it works only with normal forms and doesnt work for the forms which gets loaded into a mdi parent form
When my application first loads the parent opens and I select my child form from toolstrip:
'In parent open the form when option is clicked Public Sub Showfrmitemreview(ByVal sender As Object, ByVal e As EventArgs) Handles itemreivewStripMenuItemA.Click, itemreviewStripMenuItemB.Click
[Code]....
Nothing happens I don't even get an error message. I've played around with the code numerous times and the only thing that worked was to have it open outside of the parent which I do not want to happen.
I have a MDI Parent Form and some Child forms.I have some controls on MDI Parent form but as i open child form all the controls of MDI Parent form display in child forms...I m stuck with my application
I'm writing an MDI app in vb.net vs2010. The MDI form has the default MDIMenustrip menu with several menu items. Each has some subitems. None of the child forms have a menustrip defined. I thought it would be easy to call a public subroutine in the MDI that would disable or enable the MDIMenustrip items. If I execute the routine from the MDI form, the menu items disable/enable just fine. THe problem I have is when I call the routine from a child form. How can I control the MDI menu from a child form?
I have created a parent form and 2 child forms. Each of the forms have menustrips. When i run the application the menu strip appears on the parent form but not on the child forms. I have the menu strip set to visable.
I am working on my final project and I need to have 1 MDI Form. For the life of me I cannot figure out what to do. My book mentions doing this:
Dim childForm as New ChildFormClass() childForm.MdiParent = parentForm childForm.Show()
When I put that in the Parent form it doesn't like the ChildFormClass(). I wouldn't think it would be too hard to make a parent child relationship? I have tried looking for the MdiList property but I cannot seem to find it. I think I need to have some menu items to have a child form. If there is a way to have an MDI form without that I would like that. Does anyone know a good tutorial that explains creating MDI forms well, and what to do/put in the parent and child forms code?
I have a main form, and some sub forms, and each sub form can have some sub forms. When I have multiple sub forms open, and I try to get data from the parent form, it returns the data from the wrong parent form.For example I have two instances of Mainform.subform running. If I do something like this in a child form of one instance of the subform. It returns data from the other subform.
dim l = Mainform.subform.listofdata
Edit:I am using visual Studio 2008. Winforms, form designed using designer. In my mainform I am doing this
Protected Friend frmMain as Mainform frmmain = new mainform
In frmMain I am doing this
Protected Friend frmsub as new Subform' frmsub = new subform
I want a set of child forms to keep their relative sizes and locations to their parent form when parent form is resized. So if one child form is opened and covers the lower right quadrant.. it will remain a quadrant for whatever resize is done on parent form.
I'm experimenting with a plugin architecture for my company's internal business system. I have managed to read all .DLLs in a Plugin folder which implement a specific interface. What I am trying to figure out is the best method of communication between the "host" MDI parent application and forms that will be in the .DLLs which I intend to make MDI children.
Currently, I am returning just ToolStripMenuItem objects from the .DLLs to add to the MDI Parent. I've also tested that events wired in the .DLLs to the ToolStripMenuItems do propagate to the code in the .DLLs. I've also managed to return a Form object via the interface and open that form, as the Plugin folder is being "scanned".
However, I am not clear how I would make these forms MDI children. Also, any other forms living in the .DLLs will also have to be MDI children. I created a VS 2008 Addin project just to see what's going on, and it seems that the Addin accepts an Application object on which it adds to the ToolStripMenuItems and does other operations. The code to build the menu inside the .DLL. This is opposite of what I have done so far, where the MDI requests a ToolStripMenuItem from each .DLL and adds the returned object to its own menu.
Would designing my plugin architecture to accept an application object in the same manner the only way I could get forms to open as an MDI child? Am I asking for other, currently unknown to me, headaches by NOT passing in the application object to the .DLL?
Just wondering if anyone has any tips on calling some sort of visual studio app (untimately a form) from within excel. so something along the lines of having a button in excel which calls this dll/ocx and opens a form for data populating.
Going around in circles here. I have an Exit button (Barbuttonitem6) on my form and would like the FormClosing event to handle this. The code works fine for the FormClosing event but when i try to call the Formclosing event from Barbuttonitem6, it does not work (The form does not close if i choose Yes to save or No)
Public Sub BarButtonItem6_ItemClick(ByVal sender As System.Object, ByVal e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem6.ItemClick
i need to call mdi form toolstripmenuitem name using the string variable. for ex, mdi form is Form1. toolstripmenuitem is customer master if i do like that "Form1.customer master.Enabled=True" its working
but my issue is i stored customer master in a string variable like mystring="customer master" i need to enabled using the string variable like Form1.mystring.enabled=True