Referring Between Classes?

Feb 21, 2010

I am trying to do is get interoperability between my "mainwindow" and a class. As far as I know the way to do this is to create an instance of the class (in "mainwindow") for example and then use that instance to call the functions etc... This works. However I want to allow the class to call functions in the "mainwindow" The moment I declare the instance on the class as well it goes into an endless loop.

View 4 Replies


ADVERTISEMENT

Custom 404 With Referring URL?

Dec 9, 2011

The redirect .NET uses to send users to my custom 404 page, wipes out the referringURL.[code]...

View 1 Replies

Get The Referring Method In .NET?

Apr 3, 2009

See this example:

''//file1.vb
Sub Something()
''//...
Functions.LogInfo("some text")
''//...
End Sub

[Code]...

View 4 Replies

Variable Referring To Itself?

Jul 14, 2010

I need a string of code that refers to it's filename on the computer. Basically like how batch has %0% to refer to the batch file's name.

View 4 Replies

Close Form By Referring To Name?

Feb 24, 2009

I�m using a loop to open up a number of forms in my app. The forms are named after dates from a db. They are "created" at runtime so to speak.

Everytime a form is opened, the name adds to a dropdown list in an mdi parent form. The first item in that dropdown is a "close all". I want that item to do just that - close all the forms corresponding to the names in the dropdown list. I�m thinking of looping with an integer, starting on 1 (since the "close all" is 0).

So I need something like:

forms(mdiparent.toolstripmenu.dropdownitems(i).close

View 3 Replies

Getting The Title From A Referring Html <map>?

Sep 16, 2009

I have a map of the us that is broken into an html image map. (not asp). What I'm wondering is it possible to get the title of the refering link on the map?

[Code]......

View 1 Replies

Referring To Self In A Class Function?

Apr 1, 2010

I want to create a function inside my class that will return a boolean on the existence of some data within any structures created with the class.

Public Class MyObject
Public Object1 as String
Public Object2 as String

[code]....

What I don't know how to do is refer to the object that called the function to get values, including the number of items in the referring objects array.

View 2 Replies

Referring To A 2nd Imported Project, Within The Same Solution?

Jan 23, 2011

I Imported 2 programs that I made into one solution. I made a "BIG" main menu (new windows form), put two buttons. I code one button to open up the first project (that works fine). I code the other button to open the project I imported, however it says that the name is not declared. Am I doing something wrong?

here is my code for the "BIG" main menu:

[Code]...

now only the "Original name of first project" appears to be not declared, if I delete "Original name of first project", then "the project I imported"is not declared and so forth. Note: These are not the exact names I called my forms. I'm just trying to explain it clearer.

View 2 Replies

Referring To A Class In The Solution Explorer?

Jul 20, 2009

I have added some classes to my project and now i want to define a variable as one of the classes, for example the class is called xml and i want to create a variable called XMLfile and have it as the class XML.

Can this be done? Or can variables only be declared as types (like Integer, string, etc)?If you're not living on the edge, you're taking up too much room

View 4 Replies

Referring To A Previously Existing DataSet?

Jul 21, 2011

I'm working on a very basic VB.net frontend for an Access database and have stumbled upon a problem.

Dim ds As DataSet
MaxRows = ds.Tables("Course_assignmentsDataSet.tblCourse").Rows.Count
i = 0
Private Sub Navigate()
txtCourseReference.Text = ds.Tables("Course_assignmentsDataSet.tblCourse").Rows(i).Item(1)
txtCourseName.Text = ds.Tables("Course_assignmentsDataSet.tblCourse").Rows(i).Item(2)
End Sub

I get the error that Object Reference is not set to an instance of an Object. I think this is because I haven't defined the DataSet as "Course_assignmentsDataSet"- the one I want to use- but I'm not sure how to do this.

View 1 Replies

VS 2008 Referring To The Object As New ListView

Jul 16, 2010

My LiveView Property is named lstView and is called by this line:

[Code]...

The first reference to objListItem gets this exception: I am referring to the object as new but obviously not in the right way. objListItem is not Null when this line executes.

View 12 Replies

Use LINQ To Filter Collection Of Nested Classes To Yield Dictionary Of Unique Properties Of Those Classes?

Jan 23, 2012

I have two classes, one nested in the other. [code]Neither "Name" or "ID" are unique between operations and records.I wish to construct a dictionary using LINQ = Dictionary(Of String, Of List(Of Integer), whereby the keys are uniqe examples of Names in my collection and the values are the collective set of distinct IDs that are associated with those names.

View 2 Replies

VS 2010 Structure Classes So That The User Interfaces Though A Single Class While The Supporting Classes Are Hidden From Their View?

Jun 13, 2012

How can I structure my classes so that the user interfaces though a single class while the supporting classes are hidden from their view? I think its best understood in an example:

Public Class MyInterface
Public Economic as EconomicClass
Public Sub New()
MyBase.New()

[code].....

So you might ask why am I even separating them? It's strictly for others who will be working with this interface. I need to funnel them though a logical structure:

interface.Economic.MyMethod
interface.Currency.MyMethod
etc

This way everything is already handled for them in the background and they only need to run the method they need. I don't know if I can have it both ways in VB.NET.

View 23 Replies

Cannot Create Proper Formula - Cell Referring

Aug 18, 2006

Does anyone know how I can include an existing dimensioned integer in VB code in a formula when using location indices (either R2C2 or R[2]C[2])?

I have integer Location set to the value 6 in some earlier programming steps, and now I'd like to be able to create other formulas and someimes use this Location integer into these formulas. More specifically at the RC and R[]C[] locations in formulas.[code]...

View 3 Replies

Referring To Separate Lines In A Multiline Textbox

Feb 15, 2012

[code]...It is a multiline textbox, and I want to be able to enter different pieces of information (info1, info2, info3) into each line.

View 16 Replies

VS 2010 External Web Pop-up Referring To A Webbrowser Within A VB2010 App?

Mar 5, 2012

I have an app that pulls up a webpage that has a button on it with the following ( I CANT change the webpages, but I can change anything in the App.)

[Code]...

View 1 Replies

VS 2010 Get The Original Path Of EXE To Which The Shortcut Is Referring To

May 22, 2011

I use the following code to get the shortcut files in a folder and to list them in a Listview control. But is there a way to extract the path of the EXE to which this shortcut is referring to ?

vb.net
Dim di As New IO.DirectoryInfo("C: est")
Dim aryFi As IO.FileInfo() = di.GetFiles()
Dim fi As IO.FileInfo

[Code]...

View 2 Replies

VS 2010 Calling Subs And Functions Within Classes That Are Within Classes?

Oct 24, 2009

Here is some example code of what I mean:

vb
Public Class Form1
Private Sub Button1_Click(ByVal sender as Object, e as systemEventArgs) Handles Button1.Click

[Code]....

View 5 Replies

Error Referring To Dynamically Created Control In Code

Sep 29, 2009

I am developing an application which created a series of labels using code such as this below[code]...

View 3 Replies

[2005] Export The Data From Datagridview Without Referring To Dataset/datatable?

Jan 22, 2009

I'm using VB.net 2005 and sql server 2000 i'm fetching the data into datagridview, but datagridview has several datasource depending on the "select case " Now can i export the data from datagridview without referring to dataset/datatable?

View 1 Replies

Derived Classes Cannot Raise Base Classes

Jul 10, 2009

I m trying to raise Click event of Textbox explictly but I m getting "Derived classes cannot raise base classes" error.[code]....

View 1 Replies

Remove Item From ListBox And Line Of Text From TextFile Referring To Same String?

Nov 17, 2010

How would one remove an item from a ListBox and then remove that line from the TextFile and repopulate the ListBox with new data in Visual Basic.Net?[cod]...

View 2 Replies

Why Would A .sln File Open As Empty In VB2010Express When It Should Open Referring To Projects Etc

Mar 6, 2012

Why would a .sln solution file open and appear empty in Microsoft Visual Basic 2010 Express - i.e. no windows showing projects and code files etc.When I inspect the file in a text editor, it contains references to vbproj files (which are present) which indicate that it should not appear as empty.No error messages are reported when the file is opened.

View 2 Replies

Loop And Enumerate Properties Of Nested Classes In Nested Classes?

Sep 24, 2010

so far i got

code
For Each item As Reflection.FieldInfo In GetType(NameSpace.ClassWithNestedClasses).GetFields
rtfAppend(item.Name & ":" & Tab & item.GetValue(Me))
Next
For Each item As Reflection.PropertyInfo In GetType(NameSpace.ClassWithNestedClasses).GetProperties()

[code]...

which gets me the simple string vars and properties of my top class, but how can i apply this to loop through all sub classes and get there vars and props?

View 1 Replies

VB XML Classes Vs String Classes?

Oct 13, 2011

Searching the internet finds no less than 700 different ways and opinions to accomplish what I'm trying to do, and I would just like to know the simplest, most bullet-proof way possible.

[Code]...

I simply want to extract the string "bar," which is inside <hostName></hostName>I can do this easily enough with simple string functions, but I'd like to do it with one of the .NET XML classes/methods.

View 2 Replies

Best Pratice In Inheritance - Three Classes Employee, Manager And Salesman. Manager And Salesman Classes Inherits Employee Class

Jul 27, 2010

I have three classes Employee, Manager and Salesman. Manager and Salesman classes inherits Employee class.

Employee :

Public MustInherit Class Employee
' Field data.
Protected empName As String
Protected empID As Integer
Protected currPay As Single

[CODE]...

Manager :

Public Class Manager
Inherits Employee

[CODE]...

Salesman :

Public Class Salesman
Inherits Employee

[CODE]...

Now I have created a object of salesman and manager using the following code:

Dim objSalesMan as Employee=new Salesman("xyz",1,2000,5000)
Dim objManager as Employee=new Manager("abx",2,5000,"production")

Is this a good programming pratice or should I use:

Dim objSalesMan as new Salesman("xyz",1,2000,5000)
Dim objManager as new Manager("abx",2,5000,"production")

View 6 Replies

.net - Events In Classes?

Jun 17, 2010

I find that I write a lot of code within my classes to keep properties in sync with each other. I've read about Events in Classes, but have not been able to wrap my head around how to make them work for what I'm looking for.For example, in this one I always want to keep myColor up to date with any change whatsoever in any or all of the Red, Green or Blue properties.

Class myColors
Private Property Red As Byte
Private Property Green As Byte

[code]....

If one or more of those changes, I want myColor to be updated. Easy enough as above, but is there a way to work with events that would automatically do this so I don't have to put myColor = Color.FromArgb(Red, Green, Blue) in every sub routine?

View 3 Replies

.net - Use Classes In Several Projects?

Jun 8, 2011

How can I create a namespace and classes in it, then save it, and reuse the namespace in other projects? Do I have to click on Create Class Library in Visual Studio?

View 2 Replies

Asp.net - Project Which Has Set Of Classes In .net?

Jan 12, 2012

I am new to .net and was wondering if there are any projects which have sets of vb.net classes online which i can use. For example we have Flourish — PHP Unframework which has lots of php classes therefore a programmer doesn't not to replicate code on each project. Is there a asp.net (vb) resource website or any open source project which has built in vb.net functions.

View 3 Replies

Calling Sub From Other Classes - No Value?

Oct 28, 2009

created class TestA. There is Sub mysub defined inside it. Now I want to use this Sub in other class. So far I did like this:

Dim oTestA As New TestA
Dim dblA As Double
dblA = oTestA.mysub

[code].....

View 3 Replies







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