VS 2010 Accessing Unloaded Form

Jan 18, 2011

Im quite new to VB.Net so, this is what i have. A simple "console" form. Its just a form with a ListBox in it. To add stuff to the ListBox, i have to open the console, to let other forms know what the ListBox there is.

[Code]...

View 7 Replies


ADVERTISEMENT

VS 2010 Accessing Same Form But For Different Actions?

Jun 12, 2012

I have a datagridview on a form and this shows up my list of suppliers. I have a textbox which when i click shows up the supplier list and from there when i double click on a row, the supplier's name is shown in the textbox. The thing is i have to do same on the same page for search purposes which got its own textbox. But the cell double-click event already contains code that will display it in some other textbox like i mentioned previously. What i thought is to make another form with a datagridview. So this datagridview will be used to display the supplier's name in search textbox. But what if i have to access this form several times. Do i have to create several forms everytime?

View 7 Replies

VS 2010 Difficulty Accessing 'disposed' Form?

Jan 18, 2012

I'm having a strange difficulty. Here is the order of events:User presses button on form1 New Form object is created for from 2 New form object '.show' command is fired Form 2 opens correctly In the Load Event of Form 2, the form attempts to do various things in a try, catch, finally clause On catch, I close form2 down '.close' as it cannot be used as something has gone wrong with the execution However, my problem is this. It is acceptable for things to go wrong on the from 2 load event which is why I have implemented the try - catch functionality. However, when I close the form2 down as a result of the problem, a real error ocurrs 'Cannot access a disposed object' and the VB IDE refers me to Form1's '.show' event for Form2.

It is almost as if the form hasn't fully 'shown' before I am closing it down. Does anyone have any idea what the problem is here? Do I need to close down Form2 ourside of it's Load event handler so that Form1 thinks it has loaded correctly?

View 3 Replies

VS 2010 : Multithreading And Accessing Other Routines/form Properties?

Mar 1, 2011

I'm writing a really simple file updater which downloads files off from a website and saves them. The download routine is working well, except that it freezes the project while attempting to connect to the host. Easily solved with threading except now when I try to access other form items such as text boxes, labels, form caption, it says I am not doing it in a safe manner and prompts an interrupt in debug. I did some reading on it and I'm still not sure what to do, I'm very new to vbnet and it is still a little confusing to me.

Error: Cross-thread operation not valid: Control 'Form1' accessed from a thread other than the thread it was created on.
Imports System.Threading
Imports System.Net
Imports System.IO

[code]....

View 8 Replies

Accessing Datasets Loaded In Main Form From A Child Form?

Aug 11, 2009

I have a program I've been working on for some time now and I'd like to try to streamline it somewhat. I have a main menu form that has a split panel, in the left panel is a treeview that displays forms you can open and when one is selected, it opens in a child window in the right panel. Each time I open form I called DWNForm, it does a series of dataset loads which are the populating items for a series of listviews.

What I would like to do is have these datasets load once during the mainMenu load and then have the DWNForm be able to access the datasets once it is called from the treeview selection.

View 8 Replies

Accessing Variables On A Parent Form From A Child Form

Aug 13, 2011

I have an array of variables called VolumeArray(12) which is declared as publlic shared in the main form1.I have a second form2 which allows the user to input various values. When this form2 is closed, I need the data the user has entered to update the values for VolumeArray(12) within Form1.

View 3 Replies

Accessing A Form In A Different Project?

Nov 30, 2011

how to access a form in a different project but within the same solution? Say I click a button on one form to display another form which is a part of the same solution but resides in a different project.

View 11 Replies

Accessing A Threaded Form?

Apr 11, 2011

i created a threaded form class that i call when i know an update is going to take a while....it is a simple form with a label and an animated marquee progress control. the code is listed at the bottom....whenever i try to set the message, it says i cant do it with error "{System.InvalidOperationException: Cross-thread operation not valid: Control 'MessageLabel' accessed from a thread other than the thread it was created on." from my form (in my SAVE function, i put the following line:[code]....

View 6 Replies

Accessing Controls From Another Form?

Jan 19, 2011

how can i access the controls that i made from another form? i'm also going to also use function (on the same form as the controls) that access that controls?

View 3 Replies

Accessing Database From Another Form?

May 17, 2012

i started using VB 2008 recently (with perl background, its a big leap) and having a problem with database.i am trying to access a database that is attached to a different form. i managed to get my code to work if i was writing on the same form.example of code that will work just fine Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

[Code]...

View 2 Replies

Accessing Dataview In New Form?

Jul 31, 2009

I have a form where I open an Access database with 3 tables. I have defined datasets and dataviews for these three tables in the main form. I want to open a new form and access and update the tables using the dataviews I've already defined. When I try to access a record from the dataview using the new form, it's not defined. Can I pass the data between forms or do I need to redefine it in the new form? This is the first time I've tried to use multiple forms.

View 6 Replies

Accessing Tabs Within A Form

Apr 5, 2010

I have two tabs on a form, and I would like to know how can I display the second one when a button is clicked? The name of my tab control is tabSurvey.

View 5 Replies

Accessing Second Form Listbox From First Form

Mar 1, 2010

how can i getting data from listbox in second form named listform while i am at first form..i have search it a lot on google but not find any usefull ans...

View 1 Replies

Accessing Data From Access To Form?

Jan 22, 2009

Private Sub btnsave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsave.Click
'If inc <> -1 Then

[Code]......

i got an error at the time of execution .

View 1 Replies

Accessing Logic Value On Parent Form?

May 12, 2010

I have a button on my form that loads a dialog. I have a logic on here that I want to test, what ever method I try I alway's get 'Object reference not set to an instance of an object'dialog1.vb:

Code:Public mainform As SettingsMainForm If mainform.LogicCheck.Checked Then textbox1.text = true End if

View 2 Replies

Accessing MDI Parent From Child Form?

Jan 31, 2011

I am trying to access a control (statusbar panel) on my MDI parent form from a child form.

Here's my
(located in child form)
Dim frmParent As frmMain
frmParent = DirectCast(Me.MdiParent, frmMain)

[Code]....

Object reference not set to an instance of an object.

View 4 Replies

Accessing Properties Of Form Classes?

Feb 4, 2010

Accessing Properties Of Form Classes

View 1 Replies

Accessing Value In Textbox From The Different Form In Vb2008

Sep 29, 2011

I'm using visual basic 2008. I am done coding the CRUD... but i want it to have confirmation first. Then, i tried using panel, it works. but, my interface looks not organize. Is it possible to access the values in the text boxes from the other form?

For example: the client's information text box are on the form1 and once add button is click, the confirmation box will pop out. and the pop out box is in the form2. Is it possible to access the form1 text boxes from the form2?

View 9 Replies

Forms - Accessing Declared Form From Another

Jul 18, 2009

Basically what I need to do is change a textbox on Form1 (AKA mainwin) from Form2 (AKA loginwin) using data that is inputted into Form2. I've done this before with applications by declaring Form1 in Form2, but this time I just get a NullReferenceException error. Here's the code I'm currently using for Form2. Maybe someone here can tell me why it's not working. [Code] I can't figure out why it's not working. I've used this same method before and it always worked.

View 1 Replies

VS 2010 Accessing Controls Using Strings?

Dec 19, 2011

I want to be able to use a loop and reference controls using a string. The following code works for textboxes.

dim myControl as Control
dim ControlName as string
dim LoopCount as Integer
For LoopCount = 1 to 3

[code].....

View 5 Replies

VS 2010 Accessing Saved Records?

Feb 17, 2011

I am using VS 2010 and Access 2010 and in a table I have a Primary Key called Counter which is an Autonumber.When I save a record I need to be able to access the value of the counter field for the new record. When I try and access the field I get a value of zero.I can see the value in Access but I cannot set it in Vb.Net. I have set the fields and then

[Code]...

View 6 Replies

VS 2010 Accessing To Added TextBoxes

Feb 28, 2012

I've a problem with accessing to values of added TextBoxes. I'm adding TextBoxes in my application using NumericUpDown control (event of NumericUpDown1_ValueChanged). It' s value is 1 to 10 and by each step it adds 2 new TextBoxes (named TBC11i and TBC12i, i=1-10). I've created a second event (ButtonClick) where I want to use their values in a For Loop named like this:

[Code]...

View 5 Replies

VS 2010 Dynamically Accessing Variables?

Feb 26, 2011

I have a script where I make separate routines with identical code

Example:
sub AddToA {
ATotal += 1
}
sub AddToB {
BTotal += 1

[Code]...

View 10 Replies

VS 2010 Express Accessing Files?

Jun 1, 2011

My problem is that I have a program which needs to access images for multiple choice questions, hundreds of them. Now when I publish the program it is not taking the images with it. I have read some information by 'kleinma' regarding publishing and he says to right click on the Bin and click include in project, but when I do this there is no command in the menu for this.

I have included all of my image files in the Bin and have also added them using the resource editor, but to no avail As I have indicated it is the Express edition, could this make a difference

View 5 Replies

Accessing Class Obect From Another Form Within A Project?

Jul 22, 2009

I have created a project, and with form3, created a class for datagridview called MyDtGrd.nd when I created a form4 I used that same MyDtGrd. When I used before to publish the program no problem.But after publishing When I tried to make changes, giving error like"The variable MyDtGrd is either undeclared or was never assigned"Is there any technique to access the same class oject to use in other forms?

View 1 Replies

Accessing Multiple Form Controls Using A Variable For The Name?

May 23, 2012

I'm trying to iterate through a group of ComboBoxes and set a property using a concatenated string & variable to represent the name of the control. However, I can't get the instance of the form to recognize the (String & Integer_Variable) as one of its controls -- and so it doesn't recognize any of the appropriate properties or subroutines as members of the System.Windows.Forms.Control.Is there a cleaner way to do this?

For myTempCount = 1 To 6
If tempValue < Me.("ComboBox" & myTempCount).Items.Count Then
ComboBox.SelectedIndex = tempValue 'appears to work -- how?[code].....

This code was originally VBA / VB6, which I put through ArtinSoft's Visual Basic Upgrade Companion (VBUC). FWIW, I'm using Microsoft Visual Basic 2010 Express.

View 3 Replies

Accessing Public Shared Function From Another Form

Mar 1, 2011

[Code]...

i have a function that i have in my data access class now i want to access it then declare and assign parameters and then insert data into database.

View 4 Replies

User Control Accessing A Form Within The Project?

May 1, 2010

I have a "windows form" user control--that is, not on a web page etc. This user control has a form within the user control project. However, code from within the user control can't 'see' the form even though it is a public class---I don't understand why this is the case.

So how can I access the controls (a couple of radio buttons) on the form from code within the user control? I tried creating public properties on the form to return the state of the radiobuttons, but this still doesn't work. I get a "Reference to a non-shared member requires an object reference." error

Should I not be able to see the form since it is a public class?

View 2 Replies

VS 2008 Accessing The Controls On A Form Which Is Not Created?

Jan 30, 2011

When I try to access the controls of a form which is not yet created (i.e. to modify the contents of a text box , to press a button etc) , I fail , usually without even an error message . I found out that the only way to make my program go right is to take care that the form is first created before I try to access anything on that form . However this means I must use the Show method to create it and then to Hide it , which leads to an instant awful optical effect . I remember back in VB6 there wasn't such a problem ; it seems that in VB6 each time I accessed a control on a not-created form led to the form being created silently . Is there any way I could do that in .NET too in order to access my precious controls ?

View 15 Replies

Accessing MySQL Database Through 2010 Express

Sep 16, 2011

I am trying to follow this userguide url... to basically build an application that will allow users to connect to my database, from an exe file. I'll try to explain as best i can. The plan is, users will launch an exe file that i have built in Visual Basic(VB) 2010 Express. When they launch the application they will see a 'login screen'.I am following the example guide (see link above), and will customise it once i can connect to the database. For some reason whenever i connect to the database it gives me two errors, the first is if i use the 'debug' mode in VB to test the script (note it doesn't produce any build errors), the second is if i build the application and run it as my users would.

1)Error Connecting to Database:Access denied for user 'mike'@'92.**.**.***' (using password:YES)

2)Error Connecting to Database:Unable to access any of the specified MySQL hosts..The ip address starred out (*) is my local machine ip address.The server is the server in which my Database runs on. 'mike' is a listed user on my 'user' table, the password i use is the password assigned to this user on my table.

3)I've rebuilt the whole VB project, but still no joy, wern't expecting it to as there were no errors generated.

4) I've read, but don't really understand that it could be something to do with my database not being able to be controlled remotely, only locally. I started digging into 'Access Your MySQL Server Remotely Over SSH', didn't really know if i was going completely off the mark, it didn't mention needing to do any of this in the guide i've been following, but just a thought. It might be the case as i've tried to access my database through a programme called MySQL Administrator. I punch in the host,username etc and connect to my database, for some reason it won't allow me to add new users, could this be because i can't control my database remotely? Would this stop what i'm trying to do working?

5) When trying to install the MySQL.Data.dll file i had great difficulty in choosing one and finding it, adding it to my project using the 'Add reference' in VB. Finnally got it how it should be (i think), installed MySQL.Data.dll Ver 6.1.2.0 into my project.

View 8 Replies







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