Share A String With Multiple Forms?

Apr 13, 2009

I need to share strings (array) with more then one form.

View 3 Replies


ADVERTISEMENT

Can Share Data And Methods With Multiple Threads

Jun 15, 2010

I've used mutiple threads in a VB.NET program but I don't know if I did it right.I would like to start about 3 threads.Can they all use the same methods?Will a separate instance of each method automatically be created for each thread?If not, how do you make sure that the data within the method that is used by one thread is not used by another thread?I would like some data to be shared by all threads.How is data shared among threads?What is the protocol for changing the data and checking for changed data?Is there a good tutorial / website that explains how to handle methods and data when using multiple threads?

View 3 Replies

Share Context Menu For Multiple Controls?

Dec 2, 2010

This is a conceptual question, so I'm not inluding code yet. I can't understand how to share a context menu strip between controls - how do I know which control the user was in when he right clicked it and made a selection?

Example: I have 3 text boxes that all use the same contextmenustrip and require the exact same functionality so no need to load new options. The user selects one of the options and an event fires something like this:

Private Sub mnuX_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuX.Click

how to determine which text box is responsible for it??

View 1 Replies

Share Similar Functions Across Multiple Controls?

Nov 6, 2011

Sharing similar functions across multiple controls

View 2 Replies

VS 2010 Share A Hashtable In Multiple Threads?

Dec 19, 2011

I have a program that are multiple thread. Each thread calculate some data independently. however, they will need share a hashtable which controls a hardware resource. because the resource is limited, so, it may need lock the resource for a thread, and then release it when thread is finished. and the resource can not be reused immediately, will have to wait for some time, say 5 or 10 minutes, for the device to reset.

View 3 Replies

How To Share DataSet Among Two Forms

Jan 13, 2009

I'm new to VB2008 and SQL Server. I have two forms (frmCustomer and frmDetail). The frmCustomer has a datagridview containing general data of customers, and a button to open frmDetail, which contains each customers detail information. All data modification is done on frmDetail (add, delete, and edit). Currently, both forms are binded to the dataset (same table). When the two forms are loaded, each form performs a FILL function that retrieves the data from SQL Server. In addition, all modifications done on frmDetail does not show up on frmCustomer until I perform the FILL function again on both forms. Seems like I'm maintaining 2 sets of data from the same table, and I think I'm doing more work than I have to. I'm sure there are ways to make this easier, such as bind both forms to a single dataset, so I don't have to do everything twice.

View 1 Replies

How To Share Variables Between Forms

Feb 17, 2012

Is it possible to share subscripted variables and their data between forms? So far I can't see the variables I made public in one form, in a second form.

View 5 Replies

Share Forms Between Projects?

Dec 19, 2009

I've recently noticed that a solution can contain multiple projects. I'd like to know if I can create a form that exists in multiple projects, so i can edit one form (or class) instead of six, and have it published in each one of them separately? I hope that makes sense....I seek not answers, but understanding, that I may not solve, but learn.
What good is a fish without the skill to catch it?

View 4 Replies

Share Variables With Other Forms?

Mar 6, 2010

Say I have public string variable called "_Test" on Form1, how can I allow Form2 to edit/read the variable from that form? I tried putting this on Form2:

Public _Test as String = Form1._Test

But if I start Form2 without Form1 being open, it gives me an exception.

View 4 Replies

VS 2010 Share A Menu Bar Between Two Forms?

Jun 17, 2010

I'm writing a small software similar to the calculator in Windows, the calculator in Windows has a menu bar; in the menu bar, you can find "scientific" and "standard" mode; once you select different mode, your form will be changed, but the two forms still share the same menu bar.

I want to create the same effect of this:

1. Two forms, only one is visible at any time

2. The menu bar on the top of the two forms should be shared between these forms

I just started learning VB for 2 weeks, I'm not sure my thinking can be achieved by VB, if not

View 4 Replies

VS 2005 Where To Declare A Class To Share Between Two Forms?

Aug 24, 2011

There are two forms, first form list's the employees and the second form is used to add,edit the employee record. So to pass the information between the two forms i want to use the Employee Objects.To do so, where should i declare the Employee Class?

View 6 Replies

VS 2010 : Share And Edit Variables Between Forms?

Jul 7, 2011

how to share and edit variables between forms? I want the user to be able to enter a value into a textbox and the program store it and then load another form and do calculations and display answers but I can't get it to work.

View 2 Replies

Share A String Into Two Strings?

Sep 16, 2010

I am working on a project and have a problem Suppose I have this text in a string, "timvisee, hi, this is some text"How should I schijden this text in two different strings.In the first string, I would like the name, that is' timvisee "in the second string should" hi, this is some text "will be shown.But the name (timvisee) may change.Also what the thing behind the name is changed to Deren. Only remains always between the name and the text are the following I hope it is clear what I mean.

[Code]...

View 3 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

Different Connection String Share Same Web Service

Dec 7, 2009

I have a web application that has a web services as a web reference. The web main application has the connection string value stored in the web config.The web services consist of a web config file that store the value of connection string. Sometimes, I have different version of main web application that use different connection string but share the same web service. So I want the web services get the connection string value stored in the web config file of the main web application. How to do that?

View 3 Replies

VS 2008 - TCP File Share (Sending String)

Feb 7, 2012

I didn't saw much samples about tcp file share. They look similar to what I am using to send string. My question is : Does these codes work with any kind of files? And May I have some hints about how to do it?

View 1 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

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 :: 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

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

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

Forms :: String Cannot Be Converted To System.windows.forms.label

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

Finding/replacing Multiple Sets Of String Within A Parent String?

Mar 28, 2012

I've got an issue with a program I am writing. The specific issue is replacing characters in a parent string by finding, and matching, specific characters within it that are parsed from an external xml file. It's for a chat-like client.Here's the 2 classes I am using to pull the emote strings, titles, and id from external XML:

Imports System.Text.RegularExpressions
Imports System.Xml.Serialization
Public Class emote

[code].....

View 1 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

VS 2010 String Conversion - EValue Of Type 'String' Cannot Be Converted To 'System.Windows.Forms.TextBox'

Apr 8, 2011

I'm trying to code a program but this error repeatedly shows up and I can't for the life of me figure it out EValue of type 'String' cannot be converted to 'System.Windows.Forms.TextBox'. It appears in relation to this code

[Code]...

View 8 Replies

Searching Multiple String In A String?

Aug 21, 2009

I got this

If File.Contains(Searchwhat) Then
Countnr = Countnr + 1
VinBox.Items.Add(filename)[code]....

That code works great to search for one string, but how can i search for multiple strings in the file? Lets say that "Searchwhat" looks like "GFR,EPB,IKJ" and if the file i am searching in can find all that in the file it will add the filename to the Pathlistbox.

View 5 Replies







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