Griffyn,
Sorry, that config.ini of mine screwed things up and I can't get to the reply area anymore. (I don't know how you did it.)
The access violation is gone, but I don't seem to be getting much of the formatting. (See below.)
It seems to be treating strings as code and vice versa. I probably did misuse your properties parameter: I listed properties common to many controls.
I'll post the results again with TGML off so you can see the real output.
Sorry, that config.ini of mine screwed things up and I can't get to the reply area anymore. (I don't know how you did it.)
The access violation is gone, but I don't seem to be getting much of the formatting. (See below.)
Code:
[navy][i]// for automatic syntax highlighting see faq102-6487
[/i][/navy][navy][i]// [b]for[/b] automatic syntax highlighting see faq102-6487
[/i][/navy]Private Sub Form_Click()
Static i As Integer
If i < [purple]4[/purple] Then
Unload txtMoney(i + [purple]2[/purple])
i = i + [purple]1[/purple]
End If
End Sub
Private Sub Form_Load()
Dim i As Integer
Const SPACING = [purple]10[/purple]
With txtMoney([purple]0[/purple])
.Move [purple]0[/purple], [purple]0[/purple]
.Text = [navy]"Text Box [b]in[/b] control [b]array[/b] [teal]#0[/teal]."[/navy]
.Width = TextWidth([navy]" TextBox [b]in[/b] control [b]array[/b] [teal]#0[/teal]. "[/navy])
End With
With txtMoney([purple]1[/purple])
.Move [purple]0[/purple], txtMoney([purple]0[/purple]).Top + txtMoney([purple]0[/purple]).Height + SPACING
.Text = [navy]"Text Box [b]in[/b] control [b]array[/b] [teal]#1[/teal]."[/navy]
.Width = TextWidth([navy]" TextBox [b]in[/b] control [b]array[/b] [teal]#1[/teal]. "[/navy])
End With
For i = [purple]2[/purple] To [purple]5[/purple]
Load txtMoney(i)
txtMoney(i).Text = [navy]"Text Box [b]in[/b] control [b]array[/b] [teal]#[/teal]"[/navy] & Str$(i)
txtMoney(i).Move [purple]0[/purple], txtMoney(i - [purple]1[/purple]).Top + txtMoney(i - [purple]1[/purple]).Height + SPACING
txtMoney(i).Visible = True
Next
End Sub
[green][i][teal]'Private Sub txtMoney_Change(Index As Integer)
[/i][/green][green][i]'[/teal][teal]' If Index = 0 Then
[/i][/green][green][i]'[/teal][teal]' MsgBox "You typed in text box[0]."
[/i][/green][green][i]'[/teal][teal]' Else
[/i][/green][green][i]'[/teal][teal]' MsgBox "You typed in text box[1]."
[/i][/green][green][i]'[/teal][teal]' End If
[/i][/green][green][i]'[/teal]
[/i][/green][green][i][teal]' MsgBox "You typed in text box " & Index
[/i][/green][green][i]'[/teal]End Sub
[/i][/green]
I'll post the results again with TGML off so you can see the real output.