Classes And Multiple Form - Doesn't Put The CustName And AcctNo In The ListBox

Mar 18, 2010

I will attach a pic of the errors I have left to resolve. And in addition, when I run it, it doesn't put the CustName and AcctNo in the ListBox. I could attach more code to get a bigger picture of what I'm trying to do. Here is where I have the errors on the list:

[Code]...

View 2 Replies


ADVERTISEMENT

.net - Performance Concerns Of Instantiating Multiple Classes In One Form?

Nov 6, 2009

I would like to know how will performance go when I instantiate multiple classes in one form.e.g

Public Class frmClass
Dim obja As New ClassA
Dim objb As New ClassB

[code]....

View 3 Replies

VS 2010 Module With Multiple Classes Shows As A Windows Form In Solution Explorer

Mar 29, 2012

I am having this strange thing happen where I have a Module that contains multiple classes in my project. In the Solution Explorer, the module shows up as a Windows Form and if I double click on it to open it, it tries to open the Form Designer. What could be causing VS to think that it is a Windows Form instead of a module?

[Code]...

View 3 Replies

COM Interface From Multiple Classes

Sep 10, 2009

I downloaded a .net component that I would like to make consumable by COM clients. This component allows one to create a DXF file (Cad drawing). The problem is that the component is composed of quite a few class files, some inherit another. All the examples I found only show one file no namespaces etc. [Code]

View 1 Replies

Use A Structure In Multiple Classes?

Mar 19, 2012

I want to use this Structure in multiple .vb files within my project:

Structure MyStruct
Dim Name As String
Dim Good As Boolean
End Structure

If I define it in one file, the other files can't use it. How do I define it globally?

View 1 Replies

VS 2008 Adding Only Distinct Classes To Listbox

Apr 23, 2009

I have a List(Of SomeClass) containing a number of SomeClass items. SomeClass is just a small class with two properties, a Name string and an Int integer:

[Code]....

View 6 Replies

.net - Use Readonly Property Across Multiple Classes?

Jun 7, 2011

I have created a read-only property(name) in class1. How can I use this name property in class2?

Public Class Class1
ReadOnly Property name() As String
Get[code].....

Can I directly carry this name variable value into class2?

View 3 Replies

.net - Storing An Object To Use In Multiple Classes?

Mar 23, 2010

I am wondering the best way to store an object in memory that is used in a lot of classes throughout an application. We have multiple databases, 1 per customer. We also have a master table and each row is detailed information about the databases such as database name, server IP it's located and a few config settings.

I have an application that loops through those multiple databases and runs some updates on them. The settings I mentioned above are updated each loop iteration into memory. The application then runs through series of processes that include multiple classes using this data. The data never changes during the processes, only during the loop iteration.

The variables are related to a customer, so I have them stored in a customer class. I suppose I could make all of the members shared or should I use a singleton for the customer class? I've never actually used a singleton, only read they are good in this type of situation. Are there better solutions to this type of scenario? Also, I could have plans for this application to be multithreaded later.

View 3 Replies

Forms :: Multiple TabPage Classes?

Jun 21, 2009

I'm a long-time developer but semi-new to Visual Studio .NET and VB.NET. I've been working on an application for months, written in Visual Basic .NET. It's a rewrite of a popular IDE of mine that's originally written in assembly. What I'm trying to do in VB.NET is have multiple TabPage classes that inherit from TabPage, ofcourse, but each having it's own methods for common functions like Cut, Copy, Paste, etc. so that when I call tab.Cut(), the TabPage class for the currently-selected tab is the one used. In each custom TabPage class, I'll have a New instance of the main control that goes in that tab.

I think there would be a problem when I loop through the TabPages since the Foreach routine can only use one object type, as far as I know (TabPage).Currently I have only one custom TabPage class called Page that obviously inherits from TabPage, has additional properties and also methods that allow editing functions for whatever control is selected to be displayed for the tab. For example, when I call the New constructor, I supply the editor type as a parameter: dim tab as New Page(HEX_EDITOR).I have edit controls such as text, syntax editor, hex editor, bitmap editor, HTML editor, HTML browser. This means I get a new instance of all of those controls each time a new Page is added to the TabControl. I'm currently disposing of the unneeded editors depending on which editor is the one needed. The scheme is not preferred but it works great for now as I work on other areas of the IDE.

[Code]...

View 3 Replies

Multiple Classes For Serialize Objects?

May 9, 2009

I have one class with <Serialize> attribute called Tree. And Tree class has an arraylist of TreeNode classes. Is it possible to use Soap to convert the Tree class and arraylist of TreeNode classes to one xml file or binary file? If it is possible, do i need to use <Serialize> attribute on TreeNode classes too? If not, what should i do then?

View 3 Replies

Optimization - Initialisation Of Multiple Classes

Jul 16, 2009

In a project of mine I'm currently doing this:

[code]...

all classes inherit docMain and addTemplateToList( X ) adds x to a List(Of docMain). Now my question is: Is there a better way to do what's done in the code sample? I thought of something like:

[code]...

Is this somehow possible in VB.net (Reflection?)?

View 3 Replies

VB - Break Out Functions Into Multiple Classes?

Jan 13, 2011

I am integrating two disparate data sources where each value may depend on one or more other derived elements.This app runs as a windows service.Currently all my code is in a single class.I am upgrading to 2010 and wondering if best practices would be to break out my functions into multiple classes - there are over 100 data elements that need to be constructed. The following is an example of a couple derived items:(Is there a better way to do this - when complete I will pass this app off to someone else to support and want to make sure I give them the best beginning.[code]......

View 2 Replies

VS 2010 Multiple Classes In Namespace?

Oct 26, 2011

Is it possible to have multiple classes in a namespace and be able to reference the functions within the clases if the Major class is instaniatated from another class?? for instacnce:

Namespace Database
Public Class Data
Public Class Prepare

[code]....

View 1 Replies

Wpf - Add Multiple Classes To An Observable Collection?

Jan 30, 2012

I'm still teaching myself how to bind and use observable collection. One problem that I'm a little confused on is binding multiple classes/observable collection to one page. In other words, if I have a PersonName class and a AnimalName class, I have to create two separate observalbe collections for each? How would I set the datacontext when a page only allows one?

[code]...

Now If I add another class, how would I combine the two on the binding part and collection part.

View 2 Replies

Create Multiple Classes Of Different Names That Use That Class?

Mar 6, 2009

Okay, say I have a class named "ChannelList", and it raises an event named "FoundChannel"

But what I'M wanting to do is create multiple classes of different names that use that class, but I want to have all of the "FoundChannel" events be handled under one single sub routine?

View 15 Replies

Include Common Definitions To Multiple Classes?

Jul 26, 2011

I want to be able to incorporate some constant definitions and enum types in multiple classes of mine.Something akin to including a header file in C++. How do I do this best in VB.NET? I'm having a hard time because the only way I can see to do it is to inherit a class with the definitions in it but there is no multiple inheritance in vb.net so I am having some issues with that.

View 6 Replies

Sending Irc Commands From Multiple Forms & Classes?

Feb 13, 2012

while making my irc bot i need to send many different irc commands such as join channel, change mode, kick user message, topic channel message and so on. All these commands are currently process individually in a public sub on the irc connection thread.

Public Sub Write(ByVal command As String)
_streamWriter.WriteLine(command)
_streamWriter.Flush()

[Code]....

Would you have a load of public sub's to handle each or maybe something else?

View 2 Replies

Website With Multiple Languages Can't Use Classes In C# Code?

Feb 23, 2012

I'm developing a new functionality for web site project with VB.NET default language in VS 2008. As my preferred language is C# I create subfolder for C# code in the App_Code folder and add appropriate codeSubDirectories element to web.config file. The problem is that I can't refer VB.NET classes in my C# code. All VB.NET classes and structures are placed in global namespace in the App_Code. But even if I place some VB.NET class in the same namespace I've use for my classes in C#, I still can't use them.

View 2 Replies

Asmx Asp.net Webservice Return Multiple Classes Wsdl?

Aug 18, 2011

We are developing a webservice for a client. We are not supose to throw SoapExceptions, so instead, we catch every exception server side, and return a custom Exception class.

Public Class Order
...
End Class

[Code]....

The problem now is, that since my webmethod is returning the type [Object]. The wdsl that is generated does not contain the order, or the exception.

I can change the [Object] to [Order] Or [MyException], but only one of them is generated in the wsdl.

I want both the MyException type and the Order type in my wsdl, but i just cant get it working.

View 2 Replies

How Often Do Professional Developers Use Multiple Forms/classes Per Project

Apr 6, 2010

I am in college taking computer programming and we are now in multiple classes and forms. It was very hard to get ahold of at first but now that I understand it a bit better I am curious as to how often in a professional enviornment do developers create multiple classes for a project? Besides the use of custom functions what else is beneficial for it?

View 4 Replies

Forms :: Select Multiple Value In Listbox A And Copy To Listbox B?

Jun 16, 2010

I have a question here.. pls kindly advise.I need to design a simple form that allow user to choose the value from Listbox A to Listbox B. For example, in Listbox A, have value A, value B and value C, then user can choose (or highlight value B and value C) and copy into the listbox B.

May i know how can i do this in vb.net? Any reference link?

View 2 Replies

Select An Item In One Listbox On One Form And Then Click A Button And It Show Up In A Listbox On Another Form?

Apr 27, 2010

I have a multiple form application with a listbox on each form. I want to be able to select an item in one listbox on one form and then click a button and it show up in a listbox on another form.

View 3 Replies

Using Instances Of Multiple Classes In Single File Without Recursive DB Calls?

Feb 3, 2011

2. FunctionLayer -deals with Common Operations which get results from DataLayer and return results to Forms.3. User - deals with User. (For Reusing the User Class in other projects, i have separated this class)Here in Class2 - I have an instance of Class1( ie., DataLayer) for DB Operations.imilarly in Class3- I have an instance of Class1( ie., DataLayer) for DB Operations.Now in my form, If i create Instance of Class2. But When I need user functionality in this form, I have to create an instance of Class3 to this form.

View 6 Replies

VB Listbox Total - Doesn't Add Decimals

Oct 25, 2010

When i add it up it doesn't add decimals.

Example: 12.5 + 1 = 13

I need it to be 13.5

Code:

Dim total As Integer
Dim counter As Integer

[CODE]...

View 3 Replies

Visual Studio - Manage Multiple Files That Are Part Of One Class - Classes, Modules?

Sep 23, 2009

My VB project is large enough that it requires several files. It was originally developed as a Console App and I created each file as a MODULE. All modules could use subroutines, data structures and constants from other MODULES and everything worked fine. I needed to add basic windowing to the app and this required that the app be converted from a Console App to a Windows Forms App. The main window is Form1 which is not a MODULE but a CLASS. The problem is that some MODULE based functions cannot access subroutines, data and constants that are defined within the CLASS Form1 unless they are incorporated into the CLASS file and this makes the CLASS file very large. If I add a new Class file to the project, it also cannot interoperate with Class Form1 in the same way that multi-MODULE code interoperates.

How does one spread CLASS code across several files and still allow it to interoperate as if it were in a single file? Alternatively, how does one create several CLASS files that operate the way multiple MODULE files operate.I am sure that there are all kinds of best practices that I am violating but the goal to to get some prototype software working and interfaced to some lab equipment.

View 2 Replies

Forms :: ListBox Doesn't Update Contents

Nov 29, 2010

I have a form called 'Bookmarks' that loads a bookmark file that contains a single word on one line. I have put buttons on the form for sorting this list, deleting items and changing the character case to lowercase, uppercase or Sentence Case.Now, deleting and sorting the list works fine, but when I try to change character cases,nothing happens. I started the debugger and found that my case changing code does work, but the listbox doesn't seem to update it's contents.I tried listbox.Update() and listbox.Refresh() but that didn't work either.

Here's my code for 'Set Case':

Private Sub setCase_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles setCase.Click
If bookCase = "default" Then Exit Sub
If bookCase = "lower" Then

[code]....

View 4 Replies

Sorted In Listbox Doesn't Work Properly

Dec 16, 2011

i add this values to listbox

6
7
15
6

[code]....

but in button function when i press the key is shows me this:

15
5
6
6

[code]....

code:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ListBox1.Sorted = True
End Sub

View 2 Replies

VS 2010 Remove From Listbox If It Doesn't Exist?

Mar 7, 2011

What i need is, if a item in a listbox Doesn't exist, it needs to remove it from the other.

In the pic i have attached. Basically If it doesn't exist in Listbox2 then it needs to be removed from Listbox1 and tell the user which one has been removed.

i.e Test 02 doesn't exist. So messagebox would show "test02 has been removed" then remove it from listbox 1

It probably something simple thats sitting in the back of my mind, but for the life of me can't figure it out lol

View 2 Replies

Download Multiple Files, It Doesn't Work?

Nov 1, 2011

I have a class that is a downloader (I didnt make it). You create an instance of it like so:

Dim _Down As New WebFileDownloader_Down.DownloadFileWithProgress(URL, Location)URL and Location are replaced by strings. This all works fine. But when I try to download multiple files, it doesn't work, I just add this bit for another file to be downloaded:

[Code]...

View 3 Replies

Key Down Event Doesn't Work If There Is Multiple Forms Open

Apr 3, 2012

I am currently making a game with multiple levels when you complete one level the form hides and shows the form for the next level. But the keydown event doesnt work on the second level. How can I make it work?

View 1 Replies







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