VS 2005 Referencing A Form?

Apr 16, 2009

example:textbox1.text = "frmHelp"...is it possible to go to the form (.show) by simply using the form's name, also how?

View 2 Replies


ADVERTISEMENT

Converting A VB 6 Dll To .Net And Referencing In VS 2005

Jun 30, 2011

I was directed to update an old VB6 dll to VB .net as we are moving away from COM objects. The dll contains one function that does a bunch of high math calculations. I opened up a new class project in VS 2005, Imported System.Math, and then basically copied the function code from the VB6 project into the new class. When compiling, I made the assemble COM-Visible and also checked the Register for COM Interop in the project properties. I then copied the dll and tlb files to Windows/system32 and tried to register using Regasm.exe.

Even though I'm using the correct version for .Net 2, I still get error RegAsm : error RA0000 : Failed to load 'C:WINDOWSsystem32eagetairmiles.dll' because it is not a valid .NET assembly. When attempting to add a reference to it in my new .Net project, I see it in the COM tab - but in the location it was developed in, and I receive the following error: Converting the type library to a .Net assembly failed. Type library mydllname was exported from a CLR assembly and cannot be re-imported as a CLR assembly.

View 3 Replies

VS 2005 Referencing A COM Object?

Oct 5, 2009

I have a VB6 app that I'm updating to .Net. This app interfaces with PeachTree Accounting through there type library, which I have a reference. When I try to create a reference to Peachtree in .Net,

1. Select References from Myproject
2. Click "Add"
3. Select the "COM" tab
4. Select the "Peachtree Accounting 17.0 Type Library"

When I add the reference, the Path says "<The system cannot find the reference specified>".

There is something different about the way the path is listed. All the other paths are listed like "C:Program Files..." but the Peachtree library is listed like "C:PROGRA~1SagePEACHT~1PAWLegacy.dll"

This is how the old DOS use to list names longer than 8 characters. In my VB6 app the reference path is "C:Program FilesSagePeachtreePAWLegacy.dll"I tested other references with simular paths like "c:progra~1..." and they work fine. It's probably something else. I'm fairly new to .Net so can anyone point me in the right direction?

View 2 Replies

VS 2005 Referencing Classes In Another Project?

Jun 30, 2010

I'm making an application that will be available as both a Windows App and an ASP.Net App. The web app has a much scaled-down version of the functionality of the window app. I want to reference the classes contained with the windows app from my web app. The thing is, my classes in the windows app may have some modifications: if I reference them in my web app, will this pick up the changes made automatically? Also, referencing the project is for development work, when I go to deploy the web app, I will probably need to reference the classes as dll's. So the next questions are: 1. Is this the right way to go about doing this?
2. How do I make the Classes I have into self-contained dll files?

View 2 Replies

Referencing Controls On Another Form?

Jul 12, 2011

I have 2 Forms in a VS 2010 Project. Form1 is the Startup Form and can, with intellisense see Form2, but NOT the Controls on Form2.

Form2 can with intellisnse, see Form1 AND the Controls on Form1.

Why can't Form1 see the Controls on Form2? I've not seen this issue before in VS or VB6.

The error message is :-

Reference to a non-shared member requires an object reference.

The Controls on Form2 have the Property of Friend.

View 2 Replies

Referencing ListBox On Another Form?

May 3, 2012

I have 2 forms in my project. Form1 does all the grunt work and Form2 is a setup form.

In a module I have placed this
Public myForm2 As New Form2
In Form1 I have this in a routine
For Y = 0 To myForm2.lstCallWatch.Items.Count - 1

The listbox has 12 items in it but the items count is ALWAYS 0

What am I doing wrong to read the number of items in the Listbox?

View 8 Replies

Referencing Another Variable In Form Class

Dec 24, 2011

How do you reference a variable in another Class?
Public Class Form1
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
TextBox1.Text = "Class1_Text" ' Would like to replace w/correct code
End Sub
End Class
Public Class Class1
Public Class1_Text As String = "Class1 Text"
End Class
I can reference the Form1 data in Class1 but not vice-verse.

View 8 Replies

Referencing Cell Values On DataGridView From Another Form?

Oct 6, 2010

This is bugging me. I have a "main" form named frmMain with a DataGridView object named objDataGrid.When a user double clicks on a row or clicks another button, I hide the main form, open a new form and want to reference the values in the row selected by the user but I keep getting an error when I try to access some, but not all, of the datagridview's properties.

[Code]...

View 1 Replies

Referencing Control On One Form From Another Form?

Dec 17, 2010

Usually I would just do Form.Control.Property but that doesn't work.It just seems overly complicated with public classes, etc.Is there a more simpler way to do this? I'm ready to throw in the towel and just use a global variable at this point.I have the form containing the control I want to reference, frmGenerate which has a textbox called txtCustomerNo.From this form through a button's click event I want to show another form, frmCustomers, and have that form reference the value in txtCustomerNo.

frmCustomers.ShowDialog()

View 6 Replies

Forms :: Referencing All Items On Form With Handles Keyword?

Sep 15, 2011

I have a form in VB with many (over 100 - fields, labels, the form itself etc...) items on. I wondered if there was a way of refering to all the items on the form without having to list them all individually in the Handles keyword, which is extremely long winded! I want to carry out the same action wherever the user clicks on the form. At present I have the following

[Code]...

View 4 Replies

Store PDF File Into Sql Server 2005 And Display In A Picture Box On VB 2005 Window Form?

Mar 13, 2009

I am using memorystream to get and store images into sqlserver 2005 table image field. This process is working and I am able to display image in picture box. I need to be able to store PDF files into the same field and be able to display in a picture box.

View 2 Replies

VS 2005 Copy Form Within VB 2005 Project?

Oct 12, 2009

I'm attempting to copy a rather complex form from one part of my project and use it (modified) within another part (ie, depending on whether it's maintenance or an outage, you'll get a slightly different email screen).

My first attempt failed miserably, as I had simply right-clicked and pasted the form within the project, assuming renaming the controls would work. nope, I didn't realise that there was stuff in the original form that was renamed as well, and that created a monstrous pile of errors.My second through fourth attempts also failed, generating errors in forms that (I thought) weren't related or connected. Once I deleted the copied form, all was fine.

So, short of trying to rebuild the form from scratch (using a different naming convention for my controls etc.), is there a simple way of doing this? This seems to be such a simple task, but alas I was wrong....(or, at least it's not easy with the information I have right now.

View 7 Replies

VB 2005 - Register Form - Store The Added Username And Pasword To The Login Form?

Mar 11, 2010

i have a main menu on my program which has the option of registering. I have enter name and password ..and a button Confirm

i want to be able to store the added username and pasword to the login form so that it will work...

what must i do? also where would this data be stored...

View 4 Replies

VS 2005 Child Form Remain Enabled While Modal Form Displayed?

Oct 28, 2010

I have a VB. Net App where I want the user to open a modeless form which contains reference information about items in a select box. If the user double clicks the item selected in the list box a modal form is opened to edit the item.I want the previously opened reference form to remain active/enabled, that is, I want the user to be able to click on it, move it, etc.I was able to get the form to at least show up on the task bar by setting it's "ShowInTaskBar" property to true, however, when it comes to the front the user can still not move it to the side to view all of the Edit Forms information.

View 7 Replies

Forms :: [2005] Form-To-Form ComboBox Item Defaulting?

Jan 18, 2011

I have been creating a call management application and I am having a problem with something that I have spent weeks on trying to get working and nothing I try is working for me. My application is an MDI application written in VB.NET 2005 Professional, using .NET Framework 2.0. It uses a back end database using Microsoft SQL Server 2005.When the MDI application launches, a form is displayed to the end user asking for phone number (MaskedTextBox) and a partner name. The partner names are within a ComboBox.

When the end user types in the phone number and selects a value from within the ComboBox, s/he clicks on the start button. This then opens a second form. The phone number from the MaskedTextBox is to default in a second MaskedTextBox (this I am able to get working without issue.) The partner name selected from the ComboBox is to default on the second ComboBox. This is the part where I have been working on it for weeks and not able to get it to function.

The second form has many ComboBoxes, all of which pull down items from a particular table within the database. Some of them are editable and some are not. The ones that are editable are also auto complete Suggest/Append on the ListItems.I wrote a sub to handle the population of these ComboBoxes and also to handle if they are editable or not. All of this is working. However, my main issue is that I can't get the value on the second form to default to what ever was selected on the first form. I do not get any errors but regardless of what I do, the second form always stays as the first item in the list regardless.

The code I am using is as follows:

<CLSCompliant(True)> Public Sub PopulateDropDownListFromDB(ByVal cboName As Elegant.Ui.ComboBox, _
ByVal TableName As String, ByVal ColumnName As String, _
ByVal UseAutoComplete As Boolean, _
ByVal UseSQLDistinct As Boolean)

[code]....

View 2 Replies

VS 2005 Moving Rich Text Box String From Form To Form?

Apr 15, 2009

simple problem Basically in form1 i have a line of SQL code in a rich text box called rtb_select

what i would like..This code to run under a connection string called strSQLSelectQuery in form2

I have been told someting like strSQLselectQuery = rtb_select.text would work however because rtb_select is in a different form in the same project it does not recognise rtb_Select

View 2 Replies

VS 2005 - Generate Form Code - Put The Buttons On The Form

Oct 30, 2009

I'm making a game maker, and I just need to know how to put the buttons on the form. where to add the button code in the Form1.Designer.vb file? I just need to know what the syntax of InitializeComponent is.

View 7 Replies

VS 2005 Event Is Lost When A Second Form Is Called From The First Form

Dec 31, 2009

I have two forms. Form1 and Form2. The user is supposed to fill out some information in form2 which then will be used to compute some data in form1. However when I used the code, Form2.Show, within a function in form1, the form2 is diplayed but when the user fills the data and submits them using the ok button, the code does not return back to the function in Form1.

View 3 Replies

VS 2005 Form Load Vs Form Shown Events?

Aug 25, 2010

aside from the difference mentioned below, what are other difference the two events might have and how will affect the application as a whole? What is more preferred to use and why?

Form Load:
*Do stuff*
Form shows up on monitor
Form Shown:
Form shows up on monitor
*Do stuff*

View 9 Replies

VS 2005 Pass A Value From An Independent Form To A Child Form?

Nov 24, 2009

how to pass a value from an Independent form to a Child form...

here whis is the data from..

the indenpendent data is selected from the datagridview by just double clicking the cell the selected data will pass into the combox of child form (Note: this is combobox not textbox)...

i'm done with textbox it work fine..

look:

Independent form when user duble click the datagridview

Private BoxToUpdate As TextBox
Public Sub Start(ByRef DescItem As TextBox)
' Me.Close()

[Code]....

how could i able the value into combobox from independent form into child form...

View 1 Replies

[2005] How To Use Bindingsources From Main Form On Dialog Form?

Mar 2, 2009

My project has a single dataset with about 6 datatables. Each of those datatables has a TableAdapater and a Bindingsource on the main form (due to various databound controls).

Now, I want to have a second form for adding a new record. If I bind the controls to the datasource it creates new TableAdapaters and new Bindingsources on that form. I was wondering if it's possible to simply use the ones from the main form instead like this

[code...]

View 3 Replies

Referencing .xls In VB?

Apr 24, 2012

I am a self-taught noob and have been given the task of developing someone elses code. I have rebuilt someone elses solution into my dev machine and able to run with some minimal bugs. I don't know where to add an .xls file into my solution

System.IO.FileNotFoundException was unhandled
FileName=TestRec.xls
Message=Could not find file 'TestRec.xls'.

[code].....

View 5 Replies

Referencing An Int Value In VB?

Apr 25, 2010

I have a line of VB code which looks like this : If GroupTagDropDownList.SelectedValue Is "1" Then The system doesn't throw up any errors for it but the statement doesn't appear to work.

I think that the problem must lie in how I've referenced the '1' value - I've tried putting single quotation marks around it but it appears to make no difference at all.

There is definitely a value in the drop down list of value '1' but it doesn't appear to be read at all.

View 3 Replies

Referencing C++ DLL In .NET?

Sep 9, 2010

I have been given a .dll file (implemented in C++) that I want to use in my VB.NET application.When I try to add a reference to this dll using Visual Studio I get the following error:A reference to 'path-to-dll' could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component.

Based on this error I concluded that I need to register the dll. Since it has been implemented with unmanaged code I tried to use the regsvr32 tool to register it. But when I try to register the dll using this tool I get the following error:Name-Of-DLL was loaded, but the DllRegisterServer entry point was not found. This file cannot be registered. how do I add a reference to this dll in my VB.NET application?If I have to register it, how?

View 1 Replies

Referencing In .net?

Aug 10, 2011

Imports System.Runtime.CompilerServices
Module StringExtensions
<Extension()>
Public Sub Print(ByVal aString As String)

[code].....

View 6 Replies

C++ - Referencing A Dll In Java?

Sep 28, 2010

I need to reference a C++ dll from my Java project. The method that I need to expose is actually written in Visual Basic. Is there any way to access the Visual Basic code in C++, so that it can eventually be accessed in the Java project?

View 6 Replies

Referencing A .jar File?

Dec 7, 2010

I have a java class that is used to for ssl connections to a web server. I have got some of it converted however there are serveral java libraries that i have been unable to figure out how to call or reference in vb.net. First off i'm not even sure if it's possible to reference them. In Java code they look like this:

import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.DataInputStream;

[code].....

I'll use the last one for example: I get a "Namespace or type specified in the Imports 'org.xml.sax.SAXExeption' doesn't contain any public member or cannot be found. make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use aliases.

View 6 Replies

.net - 'cross-referencing' DataTable's?

Jun 15, 2010

I have a DataGridView that is being filled with data from a table. Inside this table is a column called 'group' that has the ID of an individual group in another table.

What I would like to do, is when the DataGridView is filled, instead of showing the ID contained in 'group', I'd like it to display the name of the group. Is there some type of VB.net 'magic' that can do this, or do I need to cross-reference the data myself?

Here is a breakdown of what the 2 tables look like:

table1
id
group (this holds the value of column id in table 2)
weight

[code]....

BTW - I am using Visual Studio Express.

View 1 Replies

.net - Referencing My.Settings Across Projects?

Apr 19, 2011

I've been poking around in some projects written by one of our contractors, and he seems to be storing a lot of settings in the main "app.config" file for the application, using, for example:

<add key="SomeClass/SomeValue" value="False"/>
And then referencing the key value in the "SomeClass" class in "SomeProjectLibrary" using
ConfigurationManager.AppSettings.Get("SomeClass/SomeValue")

While this works, I guess, it also pretty much sucks. I was wondering if anyone knew of some more elegant way of creating variables in the "app.config" file, which could then be used across various applications within a Solution?

View 1 Replies

Asp.net - VB/C# Dynamic Calculations & Referencing?

Jun 11, 2012

I'm developing an app in which there's hundreds of different calculations involved and would like for my app's admins to be able to tweak these calculations by specifying the formulas.For example, my database table contains price and quantity. One of the columns 'X' might contain "(price * quantity) over the past 7 days". How can I allow my app's admins to change the calculation from "7 days" to "14 days"?

Is there some way to make calculations dynamic within VB.NET or do I have to rely on stored procedures and write some code to alter those procedure if a change is needed? What are the best practices in this type of a scenario?Ideally, I would like to use something similar to the "Tags" box used when posting questions on here to bring up the available fields and add mathematical operators in between them to perform calculations. It might be adding more complexity, but would be great if an existing calculation isn't overwritten so that it could be used in building a new formula.

View 2 Replies







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