Creating NEW Construct In A Class?

Dec 31, 2009

I have an application in VB.Net and now I find out an API is not compatible and requires VB6. I am trying to convert it back to VB6 and have an issue in a Class Module. In VB.Net, I have:

[Code]...

View 7 Replies


ADVERTISEMENT

Construct A Generic Interface Class With Generic Functions

Nov 25, 2011

I am trying to construct a generic interface class with generic functions. My goal was to use this to implement multiple worker classes for database interaction that have the same basic functionality. Each class will deal with different object for example, category, product or supplier but unless the the functions in the interface are generic that this won't work.This is the interface code that I have but I don't know if I have done it correctly. [code]

View 2 Replies

Creating An Instance Of A Class From A Class Library?

May 18, 2010

I've createda vb.net class library where I've defined a number of small classes... nothing complicated, just working with strings, sending emails, etc.In another project, I reference the class library and I'm seemingly able to create an instance ofone of tclasses - intellisense shows me all of the plic properties, methods, etc... all looks perfect. No compile errors at all, nothing b gumdropsand lollipops.When I run the app I'm working on that references the class library, it fails at the point where I'm creating an instance of the class and gives me a vague exception, "System.TypeLoadException".

View 2 Replies

Construct A Data Array?

Oct 27, 2009

I need to construct a data array and I am not sure if I can do what I need to do given the data. I probably should opt to store in a new class but that's too advanced for now

the data describes a series of points. each point has its index in a list a boolean, binary value and a list of integers of its neighbour points. so i thought it would be three columns and the third column would store a list. can you do this?

I presume i could get rid of the column dedicated to storing the integers..

View 13 Replies

Construct XML From A Custom Object?

Dec 20, 2009

I need to construct an XML transaction of the following format[code]...

I was thinking of creating a "GetXml" function on my object that returns the XML representation of the values in the object instance.I could do all the string concatenation myself, but surely there is a cleaner way.

View 4 Replies

Construct A Master-Details Form?

Jun 21, 2010

Im having some trouble to construct a Master-Details form. When I navigate through each record on the master nothing happens on the details. This is so even if there exit a relation between the two tables in the database and in the dataset between the data table. Can anyone provide me with some samples or examples of coding how to proceed?

Furthermore I have tried to programmatically create the relation but the following error occurs: child list for field cannot be created etc

View 1 Replies

Construct A String And Use It To Call A Variable?

Aug 3, 2011

This is probably a dumb question but I have to call one of 30 or so global variables by constructing the variable name to be called from another information. However when i do that it treats it as a string. Any ideas on how to make this work?eg something like this:

Public gsNewYork As String
public sub Getinfo
dim lslocation as string

[code].....

View 1 Replies

Construct A VB Program That Will Calculate Dog And Cat Ages?

Mar 11, 2009

I am going to construct a VB program that will calculate dog and cat ages, i plan to have a user interface to ask the user if they have a cat or a dog, then id like another window appear to ask how many human years of age is your dog/cat, up to the age of 20 (in human years) with that input the calculator will give you the age equivilent in dog/cat years.

View 1 Replies

Construct Enumerator At Runtime From XML File

Jul 17, 2010

I am looking for a way to read an XML file at run time and construct an Enumerator from it. I got the reading and writing all working, it's just getting all the strings to create an enumerator that's the tricky part. I could get them into a collection of strings or maybe a dictionary, but not sure how to go about converting from these into an enumerator. The goal of this is to allow users to add and delete items from the underlying enumerators and eliminate writing hard coded enumerators. My idea is to allow users to extend the program without coding. This is a Winform vb app thats not using any database but just XML files to store and retrieve things.

View 7 Replies

Construct Object Names At Runtime?

Jul 15, 2011

Is it possible to construct the name of an object (in this case, a Panel control) at runtime?

What I want to do is change the Backcolor of one Panel that is a member of about fifty panels. I can get the string of the name from the Sender in a RadioButton CheckedChanged event. So what I want to do is something like:

PanelName = sender.parent.name & ".BackColor"
PanelName = Color.Red

(I realize that the syntax above is invalid. I'm just using it to try to get the idea across.)

I can do what I need with big, fifty-element Select Case blocks, but the code is so repetitive that I was hoping there was a more elegant way.

View 7 Replies

How To Manage Hyperlink Construct Macro

Aug 23, 2009

I have a spreadsheet with Proj Numbers: "049410-001" in column B6:B60. I have the URL to the Database: I want the links to show up in the A column with the Tag being the Proj Number "049410-001".

Also, if I could clear the A column and use it "A column" to enter the Proj Numbers and then run the Macro to enable the Hyperlinks I could eleminate the Proj number taking up 2 columns. I have 80 rows set aside for projects so it needs to go through and enable the links that have text in them.

i used =HYPERLINK(E24,B105) (E24 was another wasted cell that combined the static first part of the link, and the proj) as the formula way to do it, but I'm trying to make a Macro that does it behind the scene. but I am just getting into VBA, and I have no idea what i'm looking at when I look at a code.

View 3 Replies

Use CheckedListBox CheckChanged States In An If Construct?

Mar 1, 2010

I have a CheckedListBox populated with specific records from an Sql table . I want to update each record in the table, only if the checkbox checkedState = True, so far I can update all or none. This unworkable code will hopefully give an idea of what I need to do.

[Code]....

View 8 Replies

Creating An Exe And Best Use Of A Class?

Aug 2, 2010

I have a project where I need to create an exe that will execute through a scheduler every five minutes The visual basic file will call a SQL Stored procedure, get values and then write these values to a separate database system (that is NOT SQL).

View 4 Replies

Construct A 3D Object From Stack Of 2D Images In Program?

Jun 4, 2010

I have a stack of 2D dicom images and want to convert to a 3D object using VB.NET. I suppose I can solve it using openGL but any clue would help a lot. Do you know a free (or at least cheap) pack to do it?

View 1 Replies

Construct IP Header Information And Raw ICMP Packet

Mar 1, 2009

I was trying to figure out if anyone had any example of sending ICMP packets over a Socket, when it is in raw mode?It would need to construct the IP Header information, and the raw ICMP packet.

View 1 Replies

Select Case Construct Vb - Days In A Month

Feb 13, 2009

I need to use select case to input a month by using its number IE: january = 1, february = 2 etc. when the month is inputted, how many days in that month is the output. I have to take into consideration leap year. the years I am using to determine leap year is 2004,2008,2012,2016 Here is the code I have so far:

Module Module1
Sub Main()
Dim monthnumber As Integer

[code].....

View 12 Replies

Creating A Class And Referencing It

Feb 20, 2009

how to create a class yet, and I think I need to learn how.I am wanting to shorten my code in a form, thinking of creating several classes to do so.Lets use a Listview as a reference if you dont mind.Say there is a listview, you have a numeral amount of if statments to fill by. Is there a way to create a class(is this the way to go) so that you can open the class to modify that specific block of code? Example of questionYou have multiple items you need to add for each if statement. Animal as a group Dog as an item 14 years as a sub item Cat as an item 11 years as a sub itemIs this the way to go, if so how do you create a class and call it from a form?Davids Learning

View 4 Replies

Creating A Combobox From A Class?

Jan 30, 2012

my query is:

file: read.vb
Friend Function Nav()
Dim NavBox As New ComboBox()
NavBox.Size = New System.Drawing.Size(44, 21)

[code]....

Now what i need is, a access to its control so i can parss value from mainFrom.vb to read.vb to manipulation the SelectionChangeCommitted activity.

View 1 Replies

Creating A Datagridview Class?

Jun 18, 2012

I have a one form with code that has lots of subs and was wondering if i can shift some of these subs to a class or module to make the main form coding less clutered.

View 4 Replies

Creating A Dice Class

May 24, 2010

I'm working on the code I used to make the animated dice program in my sig. I've done a bit of modding on it so I can re-use parts and it still worked fine, until I tried to put everything in a class so that I could just create new instances of a certain die.

I was heading towards the idea of creating a new instance of the die by a number in a textbox on the main form. Right now I am just working on the basic d6 just to get it up and running.

QuoteAn error occurred creating the form. See Exception.InnerException for details. The error is: The form referred to itself during construction from a default instance, which led to infinite recursion. Within the Form's constructor refer to the form using 'Me.'

I am probably going about this the wrong way all together and could use some help because I can't see how the class is referring to itself at all.

[code...]

doesn't look much better in the original program, but it actually works in that so if it helps just click the link in my sig to go to the post with the original download.

Since I am going to want all the various dice to Rotate() and Move(), I am wanting these to be generic so that I can use them no matter which die is trying to access it which is why I have tried putting them separately in their own subs and just passing the picture ByVal. I'm not sure if, or how, to put these in classes of their own or not.

And I have looked at just about every dice roller and Yahtzee example I can find, but none of them actually try to rotate the dice like I have, and they pretty much just calculate by using simple random values...which is okay, but does squat when the values are actual objects instead of numbers (if that makes sense).

Nothing I can find tries to put this stuff in classes, which makes it even harder to determine what really should go in the class files themselves. I really just can't find an example that I have been able to get to work for my purpose, nor figure this out on my own.

View 14 Replies

Creating A List In A VBA Class

Nov 18, 2011

I would like to know how I can get the list of possible choices to Intellisense for my class object, like it does with MsgBox.For example, when creating a message box you type MsgBox "Test Message Text", vbYesNo, "Test Message Title".In typing that, when you type the comma just before the vbYesNo, it gives you the possible selections for button types in a drop down list: i.e., vbYesNo, vbOKOnly, etc.I have a class called clsKeyState. what it does is turn on/off/toggle key states, such as CAPS LOCK, SCROLL LOCK, NUM LOCK, etc... I have set my property for it as Get/Let "State". When I call it to set a key to on/off I will be doing it like this: KeyState.State WhichKey, On/Off/Toggle.I would like the WhichKey part to automatically display all the possible selections that I define, such as CapsLock, NumLock, Scroll Lock; and I want the On/Off/Toggle to display those specific items also (On, Off, Toggle). I will be using the ability to create these displayable options for many more things in my project than just this one simple class.

View 3 Replies

Creating An Array Of Class

Jan 15, 2012

How can I create an array of a class that I have declared? I have this class named partswith properties of frame, engine and date, and i want to know how could I store them in an array .

View 1 Replies

Prevent Creating New Class

Mar 12, 2011

I am making a class that will behave like a collection class. I want to prevent the end-user from creating a new class of this. For example, the following should give error:

[Code]...

View 10 Replies

.net - Creating A New Instance Of A Class Object Box()

Sep 29, 2011

my aim is to create a new instance box at the push of a button, the box has strings name and Id to be filled concatenating the auto generated ID i.e. 0 to 210 plus a string "Box" added by the user. I had problems earlier creating a structure within the class box, frankly I am not sure if the code below will work, as i try to run it in VB I get an error indicating that I am using the variables strBoxPositions() and strBoxNumbers() without assigning a value to it. The thing is the strBoxPositions() should automatically be filled by arrPosition() which will be created at the same time the new object box is created and the strNumbers() will be created with empty strings to be filled at latter stage by the used as and when necessary.

how could I initialise those arrays to get the program to run and perhaps ill be able to see if the code works or not, or just correct this code with a better way of code with comments, also if possible some indication on how could I update the strNumbers array inputing the strings one at a time on a text box field.

Public class form1
Public Class Box
Public intBoxID As Integer

[Code].....

View 2 Replies

.net - Creating Geometric Shapes As A Class?

Apr 17, 2011

how do I create a geometric shape as a class? Visual basic has a Rectangle class pre-defined object that I would like to use, but I need to use a rectangle class that can use decimals for the 4 points to set its location. I do not want to draw a shape on the form for graphical reasons but I want to use the shape for an algorithm, how can I create a class for a rectangle using decimals?

View 1 Replies

Creating A Class That Contains Other Classes/Objects?

Aug 27, 2010

I'm wondering on how you would go abouts instantiating a class that contains other complex objects. for example an Payment Class which has Date,Time, etc.. and it also holds a reference to a paymethod object which has id,Type,Description etc.. How do you instantiate the payment class with all the other objects without one or the other failing, how do you create the payment class which doesn

View 4 Replies

Creating A Partial Class For A Form?

Nov 30, 2010

I would like to create a partial class for my form. I have a lot of events, and it gets messy, so I would like to break up sections into their own files. The problem: When I create a partial class of my form, say:

Partial Public Class Form1
End Class

Visual Studio decides I need another form for this partial class.

1. How do I create a partial class for a form?

2. If I cant do that, how can I break up all the events in my form into different files?

View 3 Replies

Creating A Proxy Class From Wsdl?

Feb 9, 2009

I am a complete Newbie to VB.NET and am migrating up from VB4, so please forgive my mistakes.I am trying to create a proxy class using the WSDL tool included in Visual Basic 2008 Express Edition. I have managed to create the file successfully through WSDL tool, and then am able to add this file as an item in my VB project, however, the file that is added, comes up with 11 errors that I am not familiar with. The command I am using to create the file with WSDL tool is as follows:

wsdl /l:vb /protocol:soap http://direct.racetab.com.au/LiveOdd...gin/Login.wsdl This creates a file called Login, however it creates it, inside the folder that the WSDL tool is located in, which happens to be:Program Files/Microsoft SDKs/Windows/v6.0A/bin I then go to the solution explorer and right click the 'My Project' folder and select ADD>Existing Item, and then navigate it to the file that was just created.

This creates a new item in my solution explorer called Login.vb however, as soon as it is created, I get 9 errors and 2 warnings, that absolutely confuse the hell out of me, and all point to this new item 'Login.vb'

[Code]...

I am doing wrong, what I have forgotten to do, or how I can work to get around this problem? If I need to supply any more information, please let me know what you need to know. Also, if it helps, the only method that I plan to use from the above file is the GETKEY(userName, password) method.

View 2 Replies

Creating Custom Generic Class?

Jan 1, 2011

Here are essential excerpts for the code creating the class and the page using it:

Imports System.Collections.ObjectModel
Public Class Test (Of T as xyz)
Inherits Collection (Of T)

[code].....

View 7 Replies

Creating Instances Of Own Class At Runtime?

Sep 3, 2011

info on creating instances of my own class at runtime. Simple project for family recipes but would like the option to add new recipes with new instances of my own food Item class at runtime. Creating my own class,no problem. Storing the data in an XML file, OK on that as well. My issue is creating new instances of different food item class as I use this program over time

View 13 Replies







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