Connect Two Or More Forms Together In VB?
Apr 10, 2009
I'm new to the forum and very new to visual basic, and my knowledge base and experience with visual basic is very limited. I'm taking a class and working on my final project. For this project I am to create several forms such as a form where the end user would select a general item types to buy such as a shirt of running shoes, on the next form they would choose a specific shirt or running shoe, and the last form would be a totals form where there is to be sales tax added to each item purchased on the previous screens. The following are my issues:
-Should I keep all the forms under one Project with one Solution page i.e. all encompassed under the one overall project design titled something like Running Store Project, if so how can I add an additional forms to an existing project? Or should I start a new Project w/a new Solutions page for each individual form and then link them together in some fashion? I know just a little tiny bit of what I should do when linking the forms together, I believe I need to choose true or false under view in the properties window, but I don't remember where that is on the properties page and don't know if that is actually correct.
-Also, (and this question might be taken care of w/the previous question), how can I get the taxation amount to be coded for each item purchased? Is there a way to link up the controls in one form to the controls in another form? I assume there has to be a way to do this or it wouldn't make any sense, the info labeled in the controls must be able to flow from one form to another or this wouldn't work anywhere.
So, as you can tell I'm pretty lost on this whole thing, and on this assignment my instructor has asked that no one ask him any questions, unfortunately this is the first assignment where it has been necessary to link individual forms together. I have about 3wks to complete this project and am trying to get it started early enough that it won't be too stressful to complete.
View 5 Replies
ADVERTISEMENT
Apr 9, 2009
I have 2 forms (Form1, Form2). Form1 seems to recognize Form2 with no additional coding. From Form1 I can load a Combo Box in Form2 with a button and this code;
Form2.CBequations.Items.Add(txtVariable.Text)
txtVariable being a textbox in Form1 and CBequations being the combobox in Form2.But from Form2 I cannot do the same to Form1. It says "Name 'Form1' is not declared." Form2 doesn't recognize Form1 orany of the objects on Form1.
View 5 Replies
Feb 15, 2012
Connect our vb.net forms with database.I know make forms and connecting that forms.i know creating tables in database and inserting values in it.
View 3 Replies
Nov 18, 2011
how to create forms and connect them to a database etc. When you see some applications for using databases you dont just get the form in the middle of the screen you get a sort of form inside a surrounding platform. A bit like running Access DB inside the runtime environment.How do I do this in VB Express?
View 5 Replies
Aug 28, 2009
How do I connect the two or many forms in database MS Access 2007?
When do to click the Add, Edit and Delete buttons, How do gather the record in database Access?
View 1 Replies
Sep 1, 2009
2 VB programs connect to the same ms access database, if 2 programs are open then in the 1st program u add data , i want that data will show on the list view of the another program
View 3 Replies
Nov 13, 2011
I have a desktop WinForms app that I would like to be able to connect to my Sql Server database that I have through my GoDaddy webhost. Problem is not all ISP's forward the 1433 port (like mine) so I can't connect directly to the DB from any of my home computers without buying the expensive dedicated IP address package, which has me thinking since my website can connect directly to the DB I was wondering if it might be possible for me to make a dll that would have all of the database interaction through subs and functions and all my WinForms app would have to do is connect to that dll through http or something, anyone know if I could do something along those lines?
Reason for this is I would like other people to be able to connect to this database (the winforms app would have screens for creating and managing accounts, etc) without worrying about whether their ISP would block the DB port(s) it would just work.
View 5 Replies
Apr 16, 2010
I've got a big database driven project...15 forms 50+ input boxes and im wondering how to do it effieciently. I've got code to connect to the mysql databse but i dont want to put it inside each form over and over for every form. How can i do it so that i only have to clal one method to connect to the db or leave the db connected constantly from the start of the app. here is the code that i got to put in every form -_-
Dim conn = New MySqlConnection()
conn.ConnectionString = "server=localhost;" & "user id=root;" & "password=;" & "database=project"
Try
conn.Open()
[CODE]...
View 3 Replies
Aug 31, 2010
When I make an application using an HTTPWebRequest to connect to the internet, the GUI freezes whenever it's doing something. When I run the WebRequest on another thread, it still freezes a bit. Is there a way to completely stop the freezing?
View 3 Replies
May 4, 2009
I wanted to ask you how I can make vb 2008 connect to web forms, fill them out & submit them all from vb 2008 objects/fields.
E.g. My vb form will have a gui that consists of textboxes, buttons etc... that will enter the data to web forms.
Here is Google accounts Sign-Up page & I want to automate the Sign-Up process: [URL]
Take a look at this Account Creator app. that automate sign-up & see if you can assist me on this: [URL]
All I need is for you to tell me how to connect to the fields on any webpage that I want from VB 2008 fields/objects to any Web forms fields/objects.
View 2 Replies
May 21, 2009
I am trying to build a user control that will do exactly what the SQL 2005 Connect to Server interface do, eventually create a connection string and store in a app.config file. It should allow user to select server type, server name, authentication, user name and password. It should also automatically load available servers and domain login by default.
View 11 Replies
Sep 30, 2011
We have a VB.Net application which works fine in our tests in different Windows XP SP3 machines. However there is one machine in which is displaying this error:
Unable to connect to any of the specified MySQL hosts
Using the mysql command, we can successfully connect to the database. We already checked for any other application or firewall that could be blocking the connection but it seems fine. We also reinstalled the system (no errors during the installation) but the MySQL error message doesn't change.
The system settings are exactly the same as in the other computers. We are using "localhost" as server in the connection string. The "hosts" file has its default values (nothing strange in there).
View 1 Replies
Jan 16, 2012
I'm working on an application where I'm using an webcam image. I have code that works when using the built in iSight (It's an Apple running boot camp windows 7) camera. However after installing a second USB powered Microsoft Life Cam I am unable to connect to this second camera. When runnign this code I only ever get one input device:
Private Sub LoadDeviceList()
Dim strName As String = Space(100)
Dim strVer As String = Space(100)
[Code].....
View 3 Replies
May 29, 2012
I am trying to connect to my remote MySql Database within Visual Studio using the compact framework.
I can successfully add a data source and preview the data within the IDE so assume that the connection is ok regarding Connection strings and remote access.
However, when I attempt to access the data using any run time control I get the following error when the table is loaded using the .fill method.
MySql.Data.MySqlClient.MySqlException was unhandled
ErrorCode=-2147467259
Message="Unable to connect to any of the specified MySQL hosts."
[Code]....
View 9 Replies
Jun 5, 2011
when connecting to sql server i get getting this error . please help how to resolve this problem
[Code]..
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)
[Code]..
View 2 Replies
Jul 9, 2010
I have a basic three form application. It doesn't seem to close after navigating through forms. If I were to open the application, and the main form is displayed. If I press the X button, the application closes fine(Goes from processes) If I were to open the application, and then navigate from the main form to another form using me.hide & form1.show, and press the red X on Form1, the application again, closes fine.
[Code]...
View 6 Replies
Jun 4, 2011
.NET developing and have a simple question, i've been stuck on this for a while and searched many forums first with no solution so i'm posting myself. In VB for excel i've used Screenupdating=false to disable the screen updating however now i'm creating a visual studio 2010 windows forms application and its not showing up as a property. Here's the code i've tried.
[Code]...
View 4 Replies
Jul 28, 2009
just wondering if it is possible to add a method to all forms in my project without having to do it on one form and Inherit all my other forms from that one
View 3 Replies
Jun 22, 2011
I'm using VB 2010 and need to multiply 2 user input numbers in forms, so basically: TextBox5 = TextBox2 * TextBox3 That obviously didn't work but it shows what I want it to do.
View 3 Replies
Sep 21, 2010
I'm working on a website where we'll be getting a lot of videos to be uploaded. To keep things simple and secure, I'm just writing VB.net windows app to suck all the files in a directory in, allow you to set some options, and start the encode by spawning a new FFMpeg process.
[Code]...
View 5 Replies
Apr 9, 2010
I have the requirement to create an application that has multiple front ends developed using Windows Forms, WPF, ASP and Compact Framework Mobile Forms.I would like to be able to create a series of obejct representing the business logic and have this logic accessible from the various front ends available. My first thought was to use remoting as I'd like to be able to pass the business objects back and forth between client and server but the compact framework doesn't support remoting and also transferring a full framework business object to a compact framework business object doesn't seem possible.My next thought was to use web services but again the passing of business objects seems to be very hard to accomplish. Without doing this I would have to create individual web methods for each business operation.
Finally my next option is to use sockets and write the whole client/server logic within some classes and expose them to the UI/Business layer. My only problem with this is it is not scaleable should the number of clients increase dramatically whereas using remoting or web services I can host the solution via ASP.Net.Does anybody have an ideas on the best way forward for this or even have any input on how they would write an application that required a windows form, wpf, asp website and mobile device GUI all of which want to use the same business logic?
View 3 Replies
Nov 10, 2011
We have an application that has a main form with a map on it. Right now the paradigm is to have forms that are displayed using menu items to display information to the user. Most of these forms are modal forms, but a couple are non-modal forms that interact with the map. For some of the forms, it really would make for a better user experience if we could dock them in the main form of the app and allow the user to see both the form and the map. For instance. We could have a list of map features in a docked window, and select one of the items on the list and have the map zoom to that feature. Or do the reverse: let the users select a map item and have a docked window that shows details of the feature. Sounds great, but I wonder about what sort of gotchas we may encounter. In particular, what if we have two windows docked at the same time? Could we get tangled up in our event code?
View 2 Replies
Aug 26, 2010
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.
View 2 Replies
Mar 31, 2010
I am writing a program for my A-level coursework But for some reason I got this build error this has never occurred to me before, I have no idea why I can't use string for the name of my form.
View 8 Replies
Jan 9, 2012
a program and i need to have a button put a file into a folder, i know how the button works i already have it doing some other stuff. i just don't know the code to copy and past it to a folder.
View 1 Replies
Mar 5, 2012
When I add a new, empty form to my VB.NET VS9 project, the linenherits System.Windows.Forms.Formis missing.What am I doing wrong here?I thought it would be added automatically.I experienced that some thing get weird if this line is not there (Form_Load is not firing, I think).
View 3 Replies
Dec 28, 2009
Passing data between forms without any public methods or properties on the forms. everything but the "Controller" class, which I would like you furnish. I just changed the title from "Intermediate" to "Beginner" This solution is an example of the Observer Pattern. The "Controller" class is the "observed" class, which in this case means it publishes events.
' File Definitions.vb
Public Delegate Sub MessageDelegate(ByVal sender As Object, ByVal e As MessageEventArgs)
Public Class MessageEventArgs : Inherits EventArgs
Public Message As String
[CODE]...
The program should initially display Form1, and Form2. Clicking of the button on either form will modify the Title Text of both forms. I think that you will find the final end result to be pretty neat, as it works with any number of open forms not just two. I think asking for the Controller class is easier than asking for the code in the forms. My solution for Controller class has 7 lines of content, 9 lines if you include Class, EndClass. A minimal solution could achieved with only 4 lines of content, but it would a textbook example of bad programming.
View 12 Replies
Dec 25, 2011
I'm looking forward to reading and adding more to the community here. I've created a text based rpg. Next semester we are learning Visual Basic. I'm on winter break and I would like to get a head start on my learning. I've been working on creating some forms and message boxes. What is throwing me off, is that I have a good feel for doing coding so that I get functionality the will produce effects in a console. Coding the forms is a bit confusing for me. Is this something that others have run into? Is their some good primers for VB? I don't have my text books yet.
View 10 Replies
Dec 11, 2009
I build my first Project composed of several forms and it�s working just fine. Id like now to redesign the project as a MDI Application. Once created the parent form, I can create child forms but thats not what I need. What I would need is convert my already designed and working forms to MDI child forms. How can that be done?
View 1 Replies
Jan 21, 2010
How to create a data forms with the data forms wizard in VB 2005
View 6 Replies