473,396 Members | 2,010 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,396 software developers and data experts.

VB.NET: Multiple forms

26
hello all,
I have a project due by the end of the this week. with this particular project, we are to use "multiple forms." I'm a little shaky on this concept. So here is the description of the problem we are doing. (this is supposed to be a skateboard designer-calculator)

"Create an application that allows the user to select one deck from a form, one truck assembly from a form , and one wheel set from a form. The application should also have a form that allows the user the select any miscellansous product, using check boxes. The application should display the subtotal, the amount of sales tax (at 6%), and the total of the order. Do not apply sales tax to assembly." In addition to the requirements, add a simple menu and a SplashScreen to the form.

They gave us a variety of decks/wheels etc with prices. So all that information is ready. Besides creating multiple forms, what would be a good way to start the code for this one?
Any help/suggestions is/are appreciated.
Apr 16 '07 #1
12 5113
Killer42
8,435 Expert 8TB
The experts on this site are more than happy to help you with your problems but they cannot do your assignment/program for you. Attempt the assignment/program yourself first and post questions regarding any difficulties you have or about a particular function of the code that you don't know how to achieve.

Please read the Posting Guidelines and particularly the Coursework Posting Guidlines.

Then when you are ready post a new question in this thread.

MODERATOR
Apr 17 '07 #2
rents
26
I apologize. I really wasn't looking for anyone to actually do the work for me. I asked where/how I should start. If that is a problem, then I understand.
I had a project the other week and I posted pretty much the same way. I explained the problem I was working on and no one said I coulnd't start it out that way.
Regardless, I apologize if I violated the terms.
Apr 17 '07 #3
Killer42
8,435 Expert 8TB
I apologize. I really wasn't looking for anyone to actually do the work for me. I asked where/how I should start. If that is a problem, then I understand.
I had a project the other week and I posted pretty much the same way. I explained the problem I was working on and no one said I coulnd't start it out that way.
Regardless, I apologize if I violated the terms.
Yeah sorry, that's a standard response we're supposed to post for any homework questions. Sometimes it seems a bit over the top.

The problem is, we get tons of people who simply paste in a homework assignment and add "please send me the code". This causes ethical problems for us, and it doesn’t help them if we do it, since they haven’t learned the subject, just copied someone else’s work. Plus, since the professors and so on also know about sites like this, students have been caught at this sort of thing in the past, and ended up being failed as a result.

That being said, I believe you’ll find most people here will be happy to try and help you understand the subject, as long as you are making a serious effort.

As for using multiple forms, I think you may need to fill us in a bit more on what the problem is. But here are a couple of general tips...

If you can create a form, then you can create another one just as easily, so I'll assume creating the forms isn't a problem. Passing data between forms would generally use one of two methods. Either your code (anywhere in the project) explicitly refers to the controls on the form to access their properties (such as MyString = Form1.Text1.Text), or you define Public variables in a code module (not a form), and use them to hold information so you can use it anywhere in your code.
Apr 17 '07 #4
rents
26
Thanks Killer. I guess we just had a miscommunication..or at least I did :)

I've created mulitple forms and have succesfully coded them so they open from the prompt on the main form.
The probelm I'm having now is something you kind of touched on in you last post...

For this skateboard designer, I have four additional forms (trucks, wheels, decks, and miscellaneous) Let's take the trucks form.
On there I have a drop down menu with three selections and a button labeled "Ok" (as in "you have made your choice)
I was going to use "select case" to have the user's selection go to the main form where there is a label waiting for the input (does this make sense? :) )

So right now, that's what I'm stuck on
Apr 17 '07 #5
rents
26
I think I would have to use a modual too? (Did I spell that the right way?)
Apr 19 '07 #6
SammyB
807 Expert 512MB
Thanks Killer. I guess we just had a miscommunication..or at least I did :)

I've created mulitple forms and have succesfully coded them so they open from the prompt on the main form.
The probelm I'm having now is something you kind of touched on in you last post...

For this skateboard designer, I have four additional forms (trucks, wheels, decks, and miscellaneous) Let's take the trucks form.
On there I have a drop down menu with three selections and a button labeled "Ok" (as in "you have made your choice)
I was going to use "select case" to have the user's selection go to the main form where there is a label waiting for the input (does this make sense? :) )

So right now, that's what I'm stuck on
Is this VB6 or VB.NET?
Apr 19 '07 #7
Killer42
8,435 Expert 8TB
Is this VB6 or VB.NET?
Excellent question, Sammy.

rents, assuming VB6, you will need to create a module to hold any Public variables. It depends whether you want to use public variable to share the data, or just refer directly to the controls on the different forms, as I mentioned before.

And I don't really see how a Select Case would be involved there. When the user clicks OK, shouldn't the Click event procedure simply take the selection and place it in either a public variable or a control on the main form?
Apr 19 '07 #8
SammyB
807 Expert 512MB
Excellent question, Sammy.

rents, assuming VB6, you will need to create a module to hold any Public variables. It depends whether you want to use public variable to share the data, or just refer directly to the controls on the different forms, as I mentioned before.

And I don't really see how a Select Case would be involved there. When the user clicks OK, shouldn't the Click event procedure simply take the selection and place it in either a public variable or a control on the main form?
That's why I'm thinking that Rents is using VB.NET. It's a lot different there. http://www.thescripts.com/forum/thread614534.html when through most of the Net form communication schemes, but the code was in C#. If Rents is using VB.NET, I can translate.
Apr 19 '07 #9
rents
26
sorry guys, yeah I'm using vb.NET..please continue
Apr 19 '07 #10
SammyB
807 Expert 512MB
sorry guys, yeah I'm using vb.NET..please continue
Finally found where I explained this before, http://www.thescripts.com/forum/post2465195-7.html. I think that it makes the process of using two forms clear, but the original poster did not: I think that he just wanted us to write his code. So, follow the link, do the example, just as it is written. Then, try to apply it to your project. It is also possible for two forms to communicate by means of an event, but it is complicated and I don't think that you need to do that. Let us know how you are progressing. Unfortunately, I will be without a computer until Monday, so you are on your own. Hope it goes well! --Sam
Apr 19 '07 #11
rents
26
Thanks Sam. I'll check out that link and let you know how things turn out.
Apr 20 '07 #12
Hey, I have a question on multiple forms too.

Iv just been chucked into a Visual C# project at work even though I usually only code in Java.

I need to open a new form when an event happens but I keep getting errors.

Iv tried form2.Show;

and

Dim secondForm as new Form2;
secondForm.Show();

Any advice on what will actually work?
Aug 12 '08 #13

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

Similar topics

0
by: Dean Sabella | last post by:
Hi, I was trying to run a crystal report in the .net sample application given at: http://support.crystaldecisions.com/communityCS/FilesAndUpdates/ cppnet_win_subreport_basic.exe.asp (I've...
6
by: mark | last post by:
I have an asp.net ecommerce web application on a remote web server. I'm using an Access database on the back end. I've notice a few strange things. When I mimic an multiple user environment by...
2
by: Stephen Bartholomew | last post by:
Hi All, Firstly, apologies to anyone that notices the cross-post: i also posted this in microsoft.public.dotnet.general earlier this week. I have an ecommerce site that resides mainly on an...
6
by: David | last post by:
I am running into situtations where confining all forms to just one window (instance of broswer) is becoming overly restrictive. Does ASP.NET provide ways to have multiple windows to interact with...
5
by: ~~~ .NET Ed ~~~ | last post by:
Hi, As you all know when an ASP.NET web form is created that will include web controls and such, it contains a FORM that that identifies the web form and its containing controls. Well, I have a...
0
by: Brian Henry | last post by:
Here is another virtual mode example for the .NET 2.0 framework while working with the list view. Since you can not access the items collection of the list view you need to do sorting another...
0
by: shamirza | last post by:
· When was .NET announced? Bill Gates delivered a keynote at Forum 2000, held June 22, 2000, outlining the .NET 'vision'. The July 2000 PDC had a number of sessions on .NET technology, and...
0
by: shamirza | last post by:
· What is view state and use of it? The current property settings of an ASP.NET page and those of any ASP.NET server controls contained within the page. ASP.NET can detect when a form is requested...
6
by: Bob Alston | last post by:
Looking for someone with experience building apps with multiple instances of forms open. I am building an app for a nonprofit organizations case workers. They provide services to the elderly. ...
31
by: Scott M. | last post by:
Am I correct in thinking that because C# doesn't have the "Handles" keyword that VB .NET does, we have to register event delegates manually in C#, whereas in VB .NET using "Handles" takes care of...
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: 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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.