Click here to Skip to main content
15,910,358 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: How can I write a program about Call Logs?? Pin
Christian Graus28-Aug-05 17:17
protectorChristian Graus28-Aug-05 17:17 
GeneralRe: How can I write a program about Call Logs?? Pin
sp04.tw28-Aug-05 18:15
sp04.tw28-Aug-05 18:15 
QuestionData grid Pin
Uberto28-Aug-05 4:56
Uberto28-Aug-05 4:56 
AnswerRe: Data grid Pin
Dave Kreskowiak28-Aug-05 5:03
mveDave Kreskowiak28-Aug-05 5:03 
Questionbinding a DataGrid Pin
microuser_200028-Aug-05 0:02
microuser_200028-Aug-05 0:02 
AnswerRe: binding a DataGrid Pin
Dave Kreskowiak28-Aug-05 3:20
mveDave Kreskowiak28-Aug-05 3:20 
GeneralRe: binding a DataGrid Pin
Oakman28-Aug-05 21:12
Oakman28-Aug-05 21:12 
QuestionArray of classes within a Class Pin
bonio5527-Aug-05 13:38
bonio5527-Aug-05 13:38 
Hello,

I currently have a problem that i have thought of a soultion for but im unsure of how i can implement this.

Problem:

I have an new instance of a class, lets call it "Temp_Class" and within that class there are some properties x,y,z and say 6 instances of another class "Sub_Class". There may be 1 instance of "Sub_Class" or as many as 100 depending on Property X which is an integer.

Just like the "Temp_Class", "Sub_Class" contains some Properties A,B,C and up to 5 instance of a thrid class "Sub_Sub_Class" which just contains properties D,E,F.

I wanted to be able to referance each of the "Sub_Sub_Class" properties by using arrays so that i can set a varing amount of Sub_Classes or Sub_Sub_Classes where nessercary but for this i would need to create a new instance of each class. The problem with defining an array as a class is that it wont allow me to define it as a new class for some reason.

Public Temp_Class<br />
<br />
Private X_Value<br />
Private Y_Value<br />
Private Z_Value<br />
<br />
Public Property X .............(Get and Set are tested and are known to work)<br />
Public Property Y .............<br />
Public Property Z .............<br />
<br />
Public Array_1(X_Value) as Sub_Class<br />
<br />
End Class<br />
<br />
Public Sub_Class<br />
<br />
Private A_Value<br />
Private B_Value<br />
Private C_Value<br />
<br />
Public Property A .............<br />
Public Property B .............<br />
Public Property C .............<br />
<br />
Public Array_2(Y_Value) as Sub_Sub_Class<br />
<br />
End Class<br />
<br />
Public Sub_Sub_Class<br />
<br />
Private D_Value<br />
Private E_Value<br />
Private F_Value<br />
<br />
Public Property D .............<br />
Public Property E .............<br />
Public Property F .............<br />
<br />
End Class


The Idea is that you can then Referance any D,E,F propery as follows.

<br />
Dim Test as new Temp_Class<br />
<br />
Test.Sub_Class(0).Sub_Sub_Class(0).D = "Hello"             '(assuming 'D' is a String)<br />
Test.Sub_Class(0).Sub_Sub_Class(1).D = "Test"<br />
Test.Sub_Class(0).Sub_Sub_Class(2).D = "Hello"<br />
Test.Sub_Class(0).Sub_Sub_Class(3).D = "Test"<br />
<br />
Test.Sub_Class(1).Sub_Sub_Class(0).D = "Hello"<br />
Test.Sub_Class(1).Sub_Sub_Class(1).D = "Test"<br />
Test.Sub_Class(2).Sub_Sub_Class(2).D = "Hello"<br />
Test.Sub_Class(2).Sub_Sub_Class(3).D = "Test"


I have been able to get this working but only if dont use arrays, but then everything becomes alot more complicated.

i.e. (tested and works, where items have been defined as new instances)

Test.Sub_Class_0.Sub_Sub_Class_0.D = "Hello"<br />
Test.Sub_Class_0.Sub_Sub_Class_1.D = "Test"<br />
Test.Sub_Class_1.Sub_Sub_Class_0.D = "Hello"<br />
Test.Sub_Class_1.Sub_Sub_Class_1.D = "Test"


If anyone can help me with this problem or if they know if this idea would even work it would be much apprechated.

Shaun Bone
Bonio55@hotmail.com
AnswerRe: Array of classes within a Class Pin
bonio5527-Aug-05 15:40
bonio5527-Aug-05 15:40 
QuestionHow can I connect WebCam to my Application Pin
deepak_rai27-Aug-05 6:29
deepak_rai27-Aug-05 6:29 
AnswerRe: How can I connect WebCam to my Application Pin
bonio5527-Aug-05 14:03
bonio5527-Aug-05 14:03 
QuestionPass image as argument in vb.net to Matlab dll Pin
sscome27-Aug-05 0:09
sscome27-Aug-05 0:09 
QuestionUsing dual processor machine for vb.net apps Pin
msali26-Aug-05 23:43
msali26-Aug-05 23:43 
AnswerRe: Using dual processor machine for vb.net apps Pin
Dave Kreskowiak27-Aug-05 6:02
mveDave Kreskowiak27-Aug-05 6:02 
QuestionGetting USB unique ID Pin
Dinakara K26-Aug-05 23:12
Dinakara K26-Aug-05 23:12 
AnswerRe: Getting USB unique ID Pin
Dave Kreskowiak27-Aug-05 6:00
mveDave Kreskowiak27-Aug-05 6:00 
GeneralRe: Getting USB unique ID Pin
Dinakara K28-Aug-05 20:10
Dinakara K28-Aug-05 20:10 
GeneralRe: Getting USB unique ID Pin
Dave Kreskowiak29-Aug-05 0:53
mveDave Kreskowiak29-Aug-05 0:53 
QuestionDataGrid...? Pin
_mubashir26-Aug-05 22:14
_mubashir26-Aug-05 22:14 
AnswerRe: DataGrid...? Pin
Sarvesvara (BVKS) Dasa27-Aug-05 1:53
Sarvesvara (BVKS) Dasa27-Aug-05 1:53 
QuestionCrystal Report 9 Pin
Jeeva Jose26-Aug-05 20:39
Jeeva Jose26-Aug-05 20:39 
AnswerRe: Crystal Report 9 Pin
Rizwan Bashir26-Aug-05 23:26
Rizwan Bashir26-Aug-05 23:26 
QuestionProgress Bar Pin
kenexcelon26-Aug-05 18:57
kenexcelon26-Aug-05 18:57 
AnswerRe: Progress Bar Pin
_mubashir26-Aug-05 20:15
_mubashir26-Aug-05 20:15 
GeneralRe: Progress Bar Pin
kenexcelon26-Aug-05 20:32
kenexcelon26-Aug-05 20:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.