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


ADVERTISEMENT

Accessing A Form In One Project From Another Project?

Feb 11, 2010

I have a number of projects in a solution and want to be able to access forms in all of the projects from a form in the main project. I thought of doing this to keep each segment of the solution manageble. If something goes seriously wrong in one of the projects it is easier to fix that starting from scratch with the whole solution.I have found numerous suggestions on this topic from "It cannot be done" to suggestions that do not work. The closest that I have come and still does not work is as follows:

Imports VAT_List.Form1 'This is Form1 in Project 2
Public Class Form1 ' This is Form1 in the Main Project
Private Sub ListsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListsToolStripMenuItem.Click
'Imports VAT_List.Form1

[code]....

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

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

Accessing DataSets Throughout Project?

Dec 3, 2011

I have declared a dataset (let's call it 'Fred') as public in a VARs module. In the main form in a sub routine called at the start of the project I connect to an Excel spreadsheet and read it into the 'Fred' dataset into one table (called 'Table') I then bind the dataset table to a datagridview and I can see the spreadsheet. Which is very nice :-)

Having loaded the dataset I want to be able to get some values so I created a button and used the following

msg = Fred.Tables("Table").Rows(0).Item("Name")

I think this should get the value in the first row and in the column called 'Name' in the table called 'Table'

But I get an error when I click the button 'Object reference not set to an instance of an object' which I think means I need to use the 'New' keyword...

So I added to the button

Dim Fred = New DataSet

But I get the same error.

Now I have to admit that I've never really got my head around how to use the 'New' keyword and would have hoped to be able to get data from a dataset through my entire project - especially as I've declared it as 'Public'. Surely if I use 'New' all over the place then I create new datasets

View 3 Replies

Accessing Classes In A Separate Project

Dec 6, 2010

I have coded two seperate VB.net windows forms application as two seperate projects in seperate solutions. I now want to combine one project called "Reporting" into the other project called "AnalysisApp" and be able to call the Reporting apps main form.The Reporting app utilies a whole load of controls from DevExpress which are not included in the "AnalysisApp" I have added references in "AnalysisApp" to the DevEpress controls and also to the Reporting app, as well as combining the Reporting app into the same solution, but when I build the "AnalysisApp" it fails saying that it cannot find the DevExpress DLLs

View 3 Replies

VS 2008 Accessing Txt File In Project?

Apr 21, 2011

I have added a txt file to my project, how to access it.

This is what I thought it would be, but it is not correct,

Dim reader As StreamReader = New StreamReader(Me.Airports.Txt)

View 2 Replies

Accessing MySQL Database From 2008 Project

Feb 17, 2010

I developed a project in VB.NET..In this project I want to use data from MySQL that is resides in my WEB Server.I can communicate with the MySQL server of my localhost but can not communicate with the WEB Server.In my CPanel I added Host from the Remote Database Access..But I can't communicate with WEB MySQL Server.

View 2 Replies

In-project Components Fail If Project Is Opened With In-project Component Used On Initially Open Form?

Dec 20, 2010

Public Class ExtendedDateTimePicker Inherits DateTimePicker

View 5 Replies

VS 2008 - Timer - Project A References Project B So Can Open A Large Form In Project B

May 5, 2010

For reasons that are beyond my control, I have three Projects. Projects A and B reference project C. Project A references project B so that it can open a large form in project B. I now need to open that large form from project C, but VB won't allow me to add a reference from C to B because that would create a circular dependency. I found a way around it, though. I created a Timer in A, and when I opened C from A, I passed in that timer. When the user performs a certain action, I enable the Timer from A, and this causes C to open B for me.

View 2 Replies

Asp.net - Accessing External Final From Project Directory ASPX

Mar 11, 2012

I am trying to access the types file from the project directory for the web root directory. Currently it only accesses it from the C:/, how can I have it access this file from the web root. I would like the file to be in the project folder as types.txt.

[Code]...

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

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

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







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