473,382 Members | 1,512 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Showing a form on the click of a MDIparent Menu Item

I have designed one MDIParent form with some menus. When I click on the Menu I need to pen a form in the click event of that menu item. The form which will be displayed already exists in the windows application. Please help me with this.
Nov 13 '08 #1
4 1324
MrMancunian
569 Expert 512MB
You mean something like this?

Expand|Select|Wrap|Line Numbers
  1. Private Sub btnMenuStripItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMenuStripItem.Click
  2.             Dim mdiChildForm As New AlreadyExistingForm
  3.             mdiChildForm.MdiParent = Me
  4.             mdiChildForm.WindowState = FormWindowState.Maximized
  5.             mdiChildForm.Show()
  6. End Sub
Steven
Nov 13 '08 #2
You mean something like this?

Expand|Select|Wrap|Line Numbers
  1. Private Sub btnMenuStripItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnMenuStripItem.Click
  2.             Dim mdiChildForm As New AlreadyExistingForm
  3.             mdiChildForm.MdiParent = Me
  4.             mdiChildForm.WindowState = FormWindowState.Maximized
  5.             mdiChildForm.Show()
  6. End Sub
Steven

Thanks a lot Steven but my code is in C#.So can you plz help me out with C# code??
Nov 14 '08 #3
MrMancunian
569 Expert 512MB
Thanks a lot Steven but my code is in C#.So can you plz help me out with C# code??
You'll have to figure that out yourself... Converting VB.NET code to C# should be pretty straight forward.

Steven
Nov 14 '08 #4
MrMancunian
569 Expert 512MB
This is to help you out a little bit:

http://www.harding.edu/fmccown/vbnet...omparison.html
Nov 14 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: Picho | last post by:
Hi all, Is there any .NET way (I am not rulling out API usage) to add button(s) to a form's title bar? I found some non-.NET solutions that did actually work in VB6 but not in the ..NET...
3
by: PK | last post by:
Hi, I've a MDI form and a child form that comes from a dll. Everything works fine until I had to uncheck or check a menu item in the MDI form based on the changes in the child form. How to acheive...
6
by: Claus Holm | last post by:
I'm trying to enable a menuitem in the parent form from a mdichild. Rather than making the menuitems public, I'd go for a public method in the parent form to do the change, but when I call the...
4
by: Baz | last post by:
Hi. I'm new to this VB.Net mullarkey, and I must say it is proving to be a very trying experience. Here is the latest in a long line of problems: The Scenario ========= I am building an...
4
by: raj_genius | last post by:
I hav two queries, whc are as follows: FIRSTLY: is it possible to access the controls(by name) of a parent form(MDI) from its child forms??if yes then how??plzz provide a coded example in VB if...
1
by: mabond | last post by:
Hi I've noticed a couple of postings on this topic. I'm either not uderstanding them or I'm missing something. My app uses an MDIParent form (frmCAD). A menu item on frmCAD shows a child form...
9
by: Anil Gupte | last post by:
I have a MDI Parent Child set of forms FormContainer --MDIParent FormStart --MDIChild FormMain-->MDIChild FormSliceInfo-->MDIChild I use the following in the beginning of FomrContainer ...
1
by: Miro | last post by:
VB 2005 Express. I can create a simple MDI app, with 2 forms. On Form1 I add a menustrip on top - and click on ( Insert Standard Items ) Add a ToolStrip as well and add 2 buttons. On Form2,...
0
by: =?Utf-8?B?a20=?= | last post by:
I've got a simple C# app built in VS2005. When I click a menu item a modal form opens and performs a lengthy operation in the Load event handler to populate a text control, so it takes a few...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.