Forms :: Retaining Data Across Multiple Forms

Sep 8, 2010

VB.NET newbie here... I have an vb.net windows application set up. It has multiple forms, about 6 in all. There's a main menu form, and then 5 other forms to collect data. The user will collect data on each form and bounce back and forth between forms. How do I get the forms to retain the data that has been entered into the text boxes and/or other controls on the forms? For example, they might fill out a few textboxes on a form, but then need to go to a different form and fill something out... and then back to the previous form. Right now, when they come back to the form, all the data previously entered in to the text boxes is gone.

View 1 Replies


ADVERTISEMENT

Forms Retaining Values After Closing

Jan 4, 2011

Throughout our program, forms are opened like this[code]...

The problem is that when forms are closed, they seem to not really be closed, only hidden - if I add some text to a textbox and close/reopen the form, the text is still there, rather than the textbox being cleared like normal. This is presumably because the form always uses the same instance.

Is there any easy way to fix this other than going through the entire program and creating a new form instance for every ShowDialog() call (there are hundreds)?

View 4 Replies

Application That Has Multiple Front Ends Developed Using Windows Forms / WPF / ASP / Compact Framework Mobile Forms

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

Forms :: Multiple Forms, Closing Events And Sub Routines?

May 25, 2010

I have googled high and low to find an answer to this but I must be searching wrong.I have an application which has a listview displaying some items that are stored in a SQL Compact database. I am using a second form to add new items to this list directly into the database.When the second form closes I want to call the sub in my first form to refresh the list from the database.

How can I get it to fire the form1 sub routine on the close event of form2

View 3 Replies

Multiple Forms Program Needs To Open Successive Forms Somehow?

Nov 3, 2009

i was doing a fair amount of programming many years ago, like 10 it feels like, so I'm sorely not up to date on how my newly downloaded Visual Basic Express expects me to communicate with it.I am writing a program that pulls a cell from a database after the user has gone through several forms to determine which cells they want. When I write it like that, it doesn't sound very efficient, but I've designed it this way for usability.Here's where I have a problem: Should I store the path the user takes in a string, an array, what?

Here's an example:Someone wants baseball stats and trivia. They run my program, main form pops up, they select National League button, the NL Form pops up. Now the way my program is set up right now, is there are two ListBoxes on the form, one is populated, and as the user selects a Team from ListBox1, it jumps to ListBox2. Once they've selected all the teams they want info for, they click a button Next.

What I now need the program to do is show the next form "Team: name" once for each team, and insert the name of the team on the form in the appropriate label which I'll have blank. This form will also do the Listbox thing except the first listbox will populated with Topics like HR Stats, Pitching Stats, Coach History, etc.

View 1 Replies

Handling Data Between Multiple Forms

Nov 12, 2010

i am coding in vb2008 express.Can u suggest me any tutorial or sample code for "Handling Data between multiple forms".

View 3 Replies

How To Retain Data Across Multiple Forms

Sep 8, 2010

I have an vb.net windows application set up. It has multiple forms, about 6 in all. There's a main menu form, and then 5 other forms to collect data. The user will collect data on each form and bounce back and forth between forms. How do I get the forms to retain the data that has been entered into the text boxes and/or other controls on the forms? For example, they might fill out a few textboxes on a form, but then need to go to a different form and fill something out and then back to the previous form. Right now, when they come back to the form, all the data previously entered in to the text boxes is gone.

View 7 Replies

Use Data To Fill In Multiple Forms

Mar 11, 2010

I have a database set up in Access. Currently I have 12 exact copies so individuals can enter data. We use the data to fill in multiple forms.I know that VB can be used to allow everyone to access one database. Does anyone have this as a runtime module since I have never written in VB and don't know where to start. My last code writing was on a AS400.

View 3 Replies

Linq To SQL Using Data Across Multiple Windows Forms

Mar 10, 2010

I have to forms, form1 and form 2. On form1 I have datagridview with all the fields in it. If I double click on it I would like a new form to open where I can add a new record.

Then I have a edit button on the form, If I click the edit button I would like another form to open where I can edit the data in.

In this post it explains it, I need the same but for linq to sql.

[URL]

View 4 Replies

Multiple Forms - Using Data In List From Another Class

Jan 13, 2010

I am trying to develop a vb program where i am using List to store data. I want to use all datas saved in that list from another class. In Class 1, i am trying to include a method that will return my list. And form class 2, i will call that method and get that list. But code isn't working. [Code]

View 2 Replies

Forms :: Maintaining Multiple Forms Positioning?

Jul 26, 2010

Launch a dialogue window from the main form, and then another dialogue window from that dialogue window. If you close the second dialogue window and call dispose the main form vanishes under any other open windows. This doesn't happen by closing a dialogue window normally, but I am attempting (rightly or wrongly) to stop memory useage creeping up by disposing of it.

So, the question is - what method can be employed to maintain the position of the windows?

View 4 Replies

Forms :: Multiple Forms Open And Close

Apr 16, 2009

I have two forms frmMain and frmNew, and one module modMain. In modMain I hold public variables which are needed for application. My question is how to open and close those two forms when needed? I ask this because if i set frmMain as startup form, then when closed, application will end, and one of those two forms will always be displayed. Also if I set frmNew as startup form, then when I close this form, application will also end. Is there a way to do this from module or something so my application won't end after closing and opening any of those two forms?

View 2 Replies

Forms :: Write Code With Multiple Forms?

Apr 17, 2009

I am trying to write code with multiple forms. The first screen is splash screen then is supposed to close and have a calculations screen. In the timer of the splash screen I wrote the following code

Option Explicit On
Option Strict On
Public Class uiHinsbrookSplashScreen

[code]....

This opens the second screen, but when I Hit Exit on the Second Screen The first screen is still open. What do I need to do next?

View 2 Replies

Handling Multiple Data Entry Forms Which Can Conflict With One Another?

Aug 6, 2009

How do you handle the screnario wherein multiple data entry forms are open and modifying one could potentially affect the record being modified in other forms?

View 3 Replies

Multiple Full-Screen Forms Sharing Data?

Sep 13, 2011

My question is in two parts:

1) I am writing an application for a touchscreen which will have several different Forms - each of which will be full-screen. What is the best way to achieve this? Hide/show each Form as the user navigates between screens? MDI Parent with multiple Child Forms becoming visible 'on top'? Or is there a more elegant solution?

2) I would also like a 'banner' on the top of each Form (or always visible on the top of the MDI Parent, etc) similar to a 'navigation frame' on a website. This banner will display a clock with the current time, and the current GPS location (meaning that a Timer will be used to get/set these values every 1000 milliseconds). I thought of using a UserControl for the banner - but if this is used on multiple Forms then I will end-up with multiple Timers all waiting 1000 milliseconds to update essentially the same information.

Is there a best practice for this type of scenario? - my thoughts so far are using the "Main" Form for Global Timers, etc - but then how do I update all Form clocks each second? (without iterating through all visible Forms... which seems messy).

View 5 Replies

VS 2008 CSV Or XML - Make Data Available To Multiple Forms At The Same Time?

Nov 4, 2010

I have used CSV files before for a simple database of about 12,000 items - this was a simple one page form... Now I want to have the same database but with the data available to multiple forms at the same time.. eg.. Form 1 displaying persons 1,2,3,5,7 name, addy, phone etc and form 2 pulling info for persons 2,3,4,8... Is this possible with CSV files?? or even XML?... The only other thing is that I do it all in .NET 2.0....

View 3 Replies

VS 2005 Accessing The Controls Of Multiple Data Window(mdw) Forms

Oct 21, 2009

I have to make some automatization on a web server, I use Visual Studio 2005 Visual Basic Windows Console Application. I want to make a load/performance test of the web server, so I open several Internet Explorer instances, and I login the application, that is not a problem. But after that I have a mess on the page and I cannot make any more automatization...The composition of the page after the login is like this: I have the default form, another form and a multiple data window(mdw) controller, which dinamically can switches the forms on this part.

The problem is that I don't know how to access the controls of this mdw forms. I couldn't find much about this mdw controller and I am not an expert.

My code is here:

Imports System
Imports System.Diagnostics
Imports System.Web.Ui.Webcontrols

[Code].....

View 5 Replies

Forms :: Multiple Forms Within A Class?

May 13, 2010

I'm still learning vb.net, so I'm not terribly familiar with all the terminology, otherwise I would have searched a little harder before posting. I'm working on a program where the user can add various forms to a MDI parent.I would like each of the child forms to be part of the same array, all of the child forms will be of various types.Some forms may display a textbox, some forms may contain a graph, some forms may contain an image, etc.[code]

View 7 Replies

Forms :: Work With Multiple Forms In .net?

Dec 15, 2009

i've been working with multiple forms. here's the situation.. i have 2 forms form1 and form2 every time i show the form2 from the cmd Bttn in form1 then i close and reopen it again it always prompts me with disposal error.

View 3 Replies

Passing Data Between Forms Without Any Public Methods Or Properties On The Forms

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

Forms :: Way To Return Multiple Rows Of Data To Calling Method Via Class Property?

Jan 28, 2009

I have this application which has one class. I need to return a recordset of data to the calling form. If i use Properties to return, it can only return only a single value at a time. Right now i'm returning a datareader object with one of the properties.Can anyone suggest a better way to return multiple rows of data to the calling method via Class Property?

View 1 Replies

Show A Large Amount Of Data That Spans Across Multiple Forms And Text Boxes?

Jan 15, 2011

I am trying to find a way to show a large amount of data that spans across multiple forms and text boxes. I am making a somewhat summery of the input strings.

View 3 Replies

.net - Given A Large Number Of Objects, Create Multiple Forms In Designer For Them Or Use Code To Create The Forms?

Dec 29, 2010

If I have a large number of classes, each similar to the other in certain aspects (they all share a common base class, but each does things differently), and I need to create Windows forms for each to allow easy changing of their values through a GUI? Create one matching form for each object in VS' forms designer, Or Use code to create the forms dynamically at runtime.

#2 makes the most sense to me, because a lot of these objects will share very common features of the form, notably "Ok" and "Cancel" buttons. But one object might need to draw a textbox on the form while another might need to draw a combobox. Not to mention, if I want to put icons on the "Ok" and "Cancel" buttons, I'd have to do this for each copy of the form in designer, and that sounds like it could get out of hand quickly.But is drawing forms through code sane? VS' forms designer is pretty sophisticated and designed to make life easier. Am I wise to consider ignoring its functionality and diving into the trench warfare of forms design through code? Or are there examples of automating form creation based on an existing object's properties?

View 1 Replies

Forms :: Share Data Between Forms (as Opposed To Passing Data)

Nov 26, 2011

Quite a few threads on passing data from one form to another, but I'm struggling to work out how to share data between the two - back and forth.

For example:

Class1 is a class with 10 string properties

Form1 has 10 labels ("Label1", "Label2" etc) and a [Configure] button.
Form2 has 10 textboxes and a [Apply] button.

I want to load with Form1, and create an instance of Class1. Click the Configure button and load Form2, passing Class1. On Form2 I want to manually fill in the 10 textboxes and hit Apply. The Apply should update the Class1 instance and close the form.

Form1's Label controls should then be updated with the data from the Class1 instance.

I'm fine creating the forms and classes, as well as passing the class into Form2 with a custom Sub New(EmptyClass as Class1) constructor. This gets the empty class into Form2, but how can I get the populated class back to Form1?

As Form1 already exists I don't want to create a new instance with another custom Sub New(PopulatedClass as Class1)

It's also key to be able to use the Form2 multiple times, basically ending up with a Data class being displayed as part of Form1 but updated using Form2? (For example if the Class has already been created and populated with data when it's passed back to Form2 for the second time I would pre-load the Textboxes with the values already in the class).

View 3 Replies

Create A Data Forms With Forms Wizard In VB 2005?

Jan 21, 2010

How to create a data forms with the data forms wizard in VB 2005

View 6 Replies

Forms :: Passing Data Between Forms?

Nov 12, 2009

I have a gridview on a form pulling user data. I have also created a basic login system where users login and their username/password is checked against a table in SQL Server 2005.The gridview is on Form 2 but i am having great difficulty in returning the records in the gridview for the user that is currently logged in.

View 3 Replies

.net - Parent/Child Relationships Failing When Getting Data From Parent Class With Multiple Forms Open?

Jun 24, 2009

I have a main form, and some sub forms, and each sub form can have some sub forms. When I have multiple sub forms open, and I try to get data from the parent form, it returns the data from the wrong parent form.For example I have two instances of Mainform.subform running. If I do something like this in a child form of one instance of the subform. It returns data from the other subform.

dim l = Mainform.subform.listofdata

Edit:I am using visual Studio 2008. Winforms, form designed using designer. In my mainform I am doing this

Protected Friend frmMain as Mainform
frmmain = new mainform

In frmMain I am doing this

Protected Friend frmsub as new Subform'
frmsub = new subform

[code]....

View 1 Replies

Algorithm - Combine Multiple Lists, Resulting In Unique List And Retaining Order

Apr 28, 2010

I want to combine multiple lists of items into a single list, retaining the overall order requirements. i.e.:

1: A C E
2: D E
3: B A D

result: B A C D E

above, starting with list 1, we have ACE, we then know that D must come before E, and from list 3, we know that B must come before A, and D must come after B and A.If there are conflicting orderings, the first ordering should be used. i.e.

1: A C E
2: B D E
3: F D B

result: A C F B D E 3 conflicts with 2 (B D vs D B), therefore requirements for 2 will be used.

If ordering requirements mean an item must come before or after another, it doesn't matter if it comes immediately before or after, or at the start or end of the list, as long as overall ordering is maintained.

This is being developed using VB.Net, so a LINQy solution (or any .Net solution) would be nice - otherwise pointers for an approach would be good.

Edit: Edited to make example 2 make sense (a last minute change had made it invalid)

View 1 Replies

C# - Mvc.net Multiple Forms Childaction?

Oct 1, 2010

I have 2 forms on a page, they are included in the masterpage like so:

Html.RenderAction("Form1", "Controller")
and
Html.RenderAction("Form2", "Controller")

[code].....

View 3 Replies

Checkbox In Multiple Forms?

Oct 20, 2009

I have a secondForm that determines whether a checkbox.checked = true/false and I want the firstForm to verify whether the secondForms checkbox.checked = true/false in a function

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved