English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

i want to make an array command button. not just a usual array, but two-dimension array (i don't know the term for it).

like this:
variable(1,1)
variable(2,2)

not like this:
variable(1)
variable(2)

i cannot make them. i use vb 6.0. is there anyone who know how to make it? (command button) thx

2006-11-27 23:30:08 · 6 answers · asked by fii 3 in Computers & Internet Programming & Design

6 answers

how to define a 2-dimension array in VB6.0
with 10 rows and 10 columns

dim myArray(1 to 10, 1 to 10)

2006-11-28 00:38:26 · answer #1 · answered by Anonymous · 1 0

You may be trying to create a control array (e.g. an array of command buttons), in which case, in vb6 you can simply create a single control (button), copy and paste, and you will be promtped "Do you want to create a control array?", Answer yes and there it is. Keep pasting until you have the number you want.

If you are trying to create a two dimensional array you can simply write:
Dim myArr(5,5)

If you are really trying to create a two dimensional array of Command Buttons you can do it thus:
Dim myArr(5, 5) As CommandButton

Although I can't think why you'd want to do it that way! I'd suggest studying your solution further, there will be an easier way!

2006-11-28 00:50:31 · answer #2 · answered by Arius 2 · 0 0

An array and a command button are two completely different things - it's hard to know exactly what you mean.

Is your problem creating the array, or creating the button? How exactly do the two entities relate to each other?

Rawlyn.

2006-11-27 23:36:36 · answer #3 · answered by Anonymous · 0 0

You can only make a single-dimensional control array.

2006-11-27 23:39:55 · answer #4 · answered by Anonymous · 0 0

multi-dimensional arrays? Try doing a search for that keyword.

2006-11-28 00:44:52 · answer #5 · answered by comn8u 4 · 0 0

to do away with the charges, you ought to use replace() like this: Dim nonQuotedString As String = myQuotedString.replace("""", String.Empty) this could do away with all double costs out of your string. Edit: additionally, i'm not sure how your code seems, yet: myQuotedString.Trim("""") could artwork too (assuming there isn't whitespace formerly the 1st quote. If there is, you may desire to do something like: myQuotedString.Trim.Trim("""") ).

2016-10-13 06:41:30 · answer #6 · answered by ? 4 · 0 0

fedest.com, questions and answers