473,378 Members | 1,420 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,378 software developers and data experts.

How do I open a form in .net

maxamis4
295 Expert 100+
Simply put I have a button, and I want to open another form with this button, and have it close the currently open form.

How is this accomplished?

thanks
Jan 11 '07 #1
3 1049
prenap
4
This is how I did it:

Dim ListMng As New frmListMng(dataClass)
' Display the child form.
ListMng.MdiParent = Me.MdiParent
ListMng.Show()
Me.Close()
Jan 11 '07 #2
maxamis4
295 Expert 100+
listMng I assume is the actual form right?
Jan 11 '07 #3
Frinavale
9,735 Expert Mod 8TB
This is how I did it:

Dim ListMng As New frmListMng(dataClass)
' Display the child form.
ListMng.MdiParent = Me.MdiParent
ListMng.Show()
Me.Close()

This code will create a new form and then close the current one...the parent one.

A much simpler way to do this is to create a form in your project, say frm_test. Then in the button (or whatever the user clicks to open frm_test) just simply put: frm_test.show()

That will show the form and keep the other window open.

Have fun coding
-F
Jan 11 '07 #4

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

Similar topics

1
by: Konstantin | last post by:
Can someone help me figure out a way to open a form only once in an MDI app. I have an MDI app that contains several forms. I use each form depending on the type of document that the user needs...
1
by: petersk | last post by:
Firstly I am an older person trying to teach myself to create a project and teach myself Access VBA programming along the way. I anticipate a number of problems I will need help with but here...
2
by: Konstantin | last post by:
Can someone help me figure out a way to open a form only once in an MDI app. I have an MDI app that contains several forms. I use each form depending on the type of document that the user needs...
19
by: =?Utf-8?B?R3JlZw==?= | last post by:
How can I tell via code if a Form is already open. Each time my forms load I have some initialization code that runs, but if the form is already open and hidden I don't want that initialization...
8
by: martinsmith160 | last post by:
Hi all I have a picture box placed within a panel so i can scroll across the picture due to it being very wide. My problem is I want to draw an image over the picture box when a user clicks at a...
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: 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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.