473,378 Members | 1,721 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.

Please help a Windows Forms Dummy


Dear Group

My apologies for the pretty basic questions following. Feeling like an
idiot. Tried finding out from MSDN and Groups but still not wise. I'll
worship your replies and be grateful for information about resources.

Thanks very much for your help and efforts!

Martin

Simple Case:
Application with three forms, Form1 as startup. Each form contains two
buttons for the purpose to display one of the other two forms.
E.g. clicking on button ShowForm2 on Form1 will display Form2 and hide
Form1.

Now I wonder:
What do I put in the ShowForm1 Button_Click event to show Form1?
I saw examples of declaring a New Form1 but then I end up with two.
If I say Form1.ActiveForm then an exception is thrown.

The other thing is do I load all forms when the application starts and
hide them till needed? Seems to me like a waste of resources.

Nov 21 '05 #1
2 1130
hi, i think you must to put

dim myForm as new form2
myform.show

if you put me.close then all the application shut down... but you can put
the me.hide()
we better wait that somebody come with the truth...
"th************@hotmail.com" wrote:

Dear Group

My apologies for the pretty basic questions following. Feeling like an
idiot. Tried finding out from MSDN and Groups but still not wise. I'll
worship your replies and be grateful for information about resources.

Thanks very much for your help and efforts!

Martin

Simple Case:
Application with three forms, Form1 as startup. Each form contains two
buttons for the purpose to display one of the other two forms.
E.g. clicking on button ShowForm2 on Form1 will display Form2 and hide
Form1.

Now I wonder:
What do I put in the ShowForm1 Button_Click event to show Form1?
I saw examples of declaring a New Form1 but then I end up with two.
If I say Form1.ActiveForm then an exception is thrown.

The other thing is do I load all forms when the application starts and
hide them till needed? Seems to me like a waste of resources.

Nov 21 '05 #2
Never apologize for asking questions. I've been coding in VB.Net for years
and still end up having to ask basic questions on a regular basis (just
posted one!), because there's always something I haven't done or a part of
the framework I haven't explored, or an answer I can't find using help or
google. Learning is all about being willing to acknowledge ignorance in
yourself, no matter how much you already know, for the sake of finding
answers. Welcome to the path we all tread daily.

You seem pretty new, and I'm not sure I understand what you don't
understand, but to display a form -

Dim frm as new Form2
frm.Show

I could get into a huge, huge heap of things you need to understand beyond
this - but my advice to you is use Google to download samples of code to get
you started, and you can see for yourself how things are done.

I found this link googling "vb.net tutorial":
http://samples.gotdotnet.com/quickstart/winforms/

There is a ton of VB.Net code out there for you to download and play with,
you just have to look.

HTH,
Paul

<th************@hotmail.com> wrote in message
news:11*********************@g43g2000cwa.googlegro ups.com...

Dear Group

My apologies for the pretty basic questions following. Feeling like an
idiot. Tried finding out from MSDN and Groups but still not wise. I'll
worship your replies and be grateful for information about resources.

Thanks very much for your help and efforts!

Martin

Simple Case:
Application with three forms, Form1 as startup. Each form contains two
buttons for the purpose to display one of the other two forms.
E.g. clicking on button ShowForm2 on Form1 will display Form2 and hide
Form1.

Now I wonder:
What do I put in the ShowForm1 Button_Click event to show Form1?
I saw examples of declaring a New Form1 but then I end up with two.
If I say Form1.ActiveForm then an exception is thrown.

The other thing is do I load all forms when the application starts and
hide them till needed? Seems to me like a waste of resources.

Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Programatix | last post by:
Hi, I'm previously haunted by a bug which is now in Knowledge Base Article 818587 (Fix: Regression in Dataset Serialization in Visual Studio .NET 1.1 when a datarow contains a rowError or a...
0
by: Jamie | last post by:
Just thought i'd post this tip for developers who are having problems submitting HTML forms which reside inside a parent ASPX web form. basically, HTML forms wont submit correctly if they're...
7
by: Juan Romero | last post by:
Hey guys, please HELP I am going nuts with the datagrid control. I cannot get the damn control to refresh. I am using soap to get information from a web service. I have an XML writer output...
4
by: Blaxer | last post by:
I have read approximately 30 articles now on various methods to make your vb.net application automatically update itself and I can't see how they apply to a vb.net windows services projects. The...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
2
by: kkb | last post by:
Hello! First, I'm sorry because of my english... I'll try to be understandable! I've got a strange problem using .NET 2003 C# and I haven't figured it out for a long time. I'm implementing an...
0
by: Control Freq | last post by:
Dear all, Below is my first C# program. Please be gentle with me. I was asked to produce a simple Windows Forms program to save Key/Value pairs, along with the a couple of sorting choices. ...
9
by: quyvle | last post by:
I can't seem to get this function to work correctly. I'm wondering if anyone could help me out with this. So I'm using the fscanf function to read the input stream and store each string in the...
1
by: Muneera | last post by:
Hi everybody. i made a "Personal Assistan" program using vb.net it was working realy good. and suddenly while i was trying to run the "To-do List" section, this exception occured: ...
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: 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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.