Welcome to the forum X, Do not forget to read the forum
Posting Guidelines.
Regarding your question,
Define and Break your problem down.
Your end result is a block of text 11 columns wide by 10 cows tall.
You could just write each line verbatim to the picturebox with the Picture1.Print <Text> method but you wouldn't learn much about loops or variables.
The For..Next loop will allow you to loop for a given number of iterations. Say perhaps for the number of rows you want to write.
As far as the contents of each line goes an easy way to handle the problem would be to use two string variables. One for the Dollar signs the other for the Plus signs.
On each interation of the loop increase one and decrease the other. Print the combined result.
To follow good programming practice you wouid want to write this as a procedure that could take a picturebox, any two characters and any number of rows to print.
Something like this,
Code:
Private Sub Command1_Click()
' Draw a pattern
DrawTextBlock Picture1, "A", "B", 6
msgbox "Press OK to continue
DrawTextBlock Picture1, "X", "O", 4
msgbox "Press OK to continue
DrawTextBlock Picture1, "9", "6", 12
End Sub
Private Sub DrawTextBlock(ByRef Pic As PictureBox, _
ByVal Char1 As String, ByVal Char2 As String, _
ByVal Rows As Integer)
'Uses the string(<Count>,<Character>) Function
Dim myText As String ' Temporary holder (Makes code clearer)
Dim n As Integer ' counter
Pic.Cls 'Clear the picturebox
For n = 1 To Rows
' Build a string variable
' (We add one to rows before subtraction so at the last pass
' through the loop it's count will be 1.)
myText = String(n, Char1) & String(Rows + 1 - n, Char2)
'Print myText to the picturebox and move the text cursor down one line.
Pic.Print myText
Next n
End Sub