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


ADVERTISEMENT

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 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 2008 - How To Edit Share Permissions (not NTFS)

Jul 8, 2009

I need to build an app that can create a network share and give it full read/write permissions to everyone.
I have this code to create/delete network shares: [Code] But it only changes the NTFS permissions, not the share permissions. I'm running Windows 7 RC (64-bit) using Visual Basic 2008 Express. Does anyone have any ideas on how to change the share permissions, not ntfs?

View 1 Replies

Share Settings Variables With Projects?

May 27, 2009

I have multiple Projects in one solution and i want to share settings variables with projects how i can?

View 4 Replies

VB 2010 - Linking Variables To Other Forms?

Feb 13, 2012

I have already made my GUI with multiple forms using VB2010 and made buttons that would open and close them (me.hide and form#.show)My problem is how could I use a variable I've computed and displayed on a sub-total (cashier of sorts) to be used on the main form where it would display the bill on a listbox?Here's how the button works to compute for the item sub total

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim cstotal As Integer

[code].....

View 10 Replies

VS 2010 - Modules VERSUS Forms For Global Variables

Dec 19, 2010

I was a VB6 programmer. And back in the day global variables, functions and subroutines were put in a module. The program started in the module using a sub named Main(). Now in vb2010 it looks like using sub Main() is possible only for console apps, which is not what I want, I'm still trying to write a windows app but it looks like everything has to go at the top of the starting form?? How is this good coding practice? Shouldn't public vars and functions be in their own module?What is considered best practice?Are there any links that would walk me through the differences between vb6 and vb2010?

View 2 Replies

VS 2010 Storing Variables - Access And Use On Several Windows Forms

Apr 5, 2011

I've got a dictionary<string,string> that I need to access and use on several windows forms. In asp.net, I could store it in Session and use it from any aspx page. How would I do this in forms?

[Code]...

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

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 A String With Multiple Forms?

Apr 13, 2009

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

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

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

VS 2010 How To Share Files

Dec 22, 2011

A thing which i've discovered with vb2010 is that you can't share files like a form or something that way it comes at least. If you attach a form or usercontrol from a different folder it will automatically copy it into the current project folder and then save to that. How can i stop vb from doing this? It won't always be but in this case i need to share a few forms among multiple projects and it would be a royal pain to have to copy them each time manually.

View 4 Replies

VS 2010 Different Applications Share Same Sessions?

Oct 19, 2010

just wanted to ask if it is possible to have different applications sharing the same session (i.e. database session)... i'm planning on creating a web-based application and a form-based application using asp.net for web and vb.net for forms but i need to have them share sessions since some global variables will be session based and also authentication to one application should also authenticate on the other.

View 2 Replies

Retrieving Remote Share Permissions - .net 2010?

May 7, 2010

I can seem to find is vbs code for retrieving remote share permissions using WMI.I've tried to convert this code to run on vb.net but don't seem to be getting anywhere.should I try to convert the below code or are there other methods I can use to retrieve the permissions. I can easily get the list of remote shares using win32_share but not the permissions

Code:
strComputer = WScript.Arguments(0)
Set objWMI = GetObject("winmgmts:\" & strComputer & "
ootcimv2")

[code]....

View 1 Replies

Retrieving Remote Share Permissions - VB 2010?

Jul 6, 2009

I've search tons of .net pages and all I can seem to find is vbs code for retrieving remote share permissions using WMI.I've tried to convert this code to run on vb.net but don't seem to be getting anywhere.hould I try to convert the below code or are there other methods I can use to retrieve the permissions. I can easily get the list of remote shares using win32_share but not the

View 4 Replies

VS 2010 - Saving Projects To Network Share

Jul 13, 2011

I've had this problem with both VS 2010 and Visual Web Developer 2010. I want to save my projects on a network share (which I have as a mapped drive), because our network drives are backed up daily. For some reason though, VS only shows local drives when I try to save a project - all my network drives do not show up.

View 1 Replies

VS 2010 List Folders Under A Specific Share?

Feb 29, 2012

I am trying to list folders under a specific share example: \servernameshare I want the list to display in a listbox named folderlistBx I do not want to see file names or subfolders, just a list of folders

Private Sub ListBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBtn.Click
Dim FS As New FileSystemObject

[Code].....

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

VS 2010 SQL Server Compact On A Network Share?

Oct 26, 2011

Greetings, I'm a little bit confused about SQL Server Compact behavior.I have a small app that uses a small sdf file located on a network share.The problem is that while the app itself is working perfectly well using the connection string that points the location of the sdf file on a network drive, when I try to open the same sdf using the Server Explorer I get this error:

SQL Server Compact does not support opening database files on a network share.Obviously, if the app IS working it does indeed support network shares, then why Server Explorer cannot open it?

I copied the database file to a local drive but it's not very convenient. What might be the problem?

View 3 Replies

Forms :: Passing Variables Between Forms

Nov 27, 2009

I seem to be running into an issue. This may seem like a noob question (which it really is, I only have experience in vb6 from years ago) but what Im trying to do is pass a variable from one form to another. Ive tried telling the first form to set the value of the variable on the second form like so frmsecond.variable = "value" but that does not work. Ive tried placing a public variable in a module to do it, but again, no luck. The only way seem to be able to get it to work is the second form setting the variable by reading the value from the first form like so [code]The problem I have with that code is what if for some reason the selected line gets changed as the form is loading or something to that nature. It doesnt seem very secure.

View 5 Replies

Forms :: Variables That Can Be Accessed By All Forms?

Aug 29, 2009

i am writing an application that will require users to provide login details. After the user has logd in a second form will be shown. Allowing the user to change his/her own details. What i have a problem is, im not able to pass the variables, containing username and password in the login form to the second form. Ive tried declaring the variables as Public but when the login form closes the variable are reset to zero.

View 7 Replies

VS 2010 WMI Code To List Remote Share Permissions?

Apr 30, 2010

I've been struggling for hours now to get some working code to list the share permissions of a remote share. I've got WMI code which uses win32_share which lists the shares and path and it works great. I"m now trying to add in a routine to get the share permissions as well.

I've searched just about every site for some sample code and can only find some C# (I think) code.

[Code]...

View 1 Replies

Add / Edit Mode For Forms?

Sep 10, 2010

When in "Add" mode, I have all controls on the form enabled with the exception of a listview that is disabled until the record is saved. The listview needs the primary key from the saved record in order for items to be added to the listview.

When in "Edit" mode, the form is populated when a record is selected on a search form. Specific controls are disabled. When a value in a control is changed, I have a RecordModified property that is set to True and then the Save button is enabled. I also have combo boxes that need to be populated but the selected value needs to correspond to the value pulled from the database

View 6 Replies

Edit Sql Database Using Forms?

Apr 12, 2010

I'm trying to edit my sql database using VB Forms.I went ahead and connected my database to VB and I see how to pull data from my database to VB, but I'm not understnading how to use a form to add/edit/delete data from the database.Basically I would be looking to add to a table:

Table Name: People
Row 1: First Name
Row 2: Last Name

Edit would be the same type of thing except I think I would pull the data from the database to populate a table, than how would I save the changes after I changed the information To delete I'm assuming would be similar to edit I would simply pull the data from the database than using a delete button would delete it.What I don't understand is how to create the SQL statement in VB so that it'll execute it properly in my database.

View 10 Replies

Forms :: Edit Line In RTB?

Mar 4, 2010

I have RTB witch I can edit with text by using .

RichTextBox1.text = RichTextBox1.text & "stuff" & VbcrLf

Great but I loose any editing to colour/font I may of done previously. Is there a way of just adding a new line. I am thinking along the lines of finding the last character then adding my new line.

View 5 Replies

How To Variables Between Forms

Sep 29, 2010

I'm sure this gets asked a lot, but I can't seem to find an answer for it. I want to have my Form2 change a variable in Form1.

View 9 Replies

Variables From Different Forms

Jan 22, 2012

i need to call upon variables from different forms, in my first form i make a variable called "temp" i then use [code]to open the new form and hide the first, is there a way to access temp ( the variable declared in the first form) in the second form?

View 6 Replies







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