【加试题】小强用VB编写正整数十进制转换为十六进制的程序,运行界面如图所示。程序功能如下:在文本框Text1中输入待转换的十进制值,单击“十进制转换十六进制”按钮Command1,在文本框Text2中输出转换结果。请在程序的划线处填写合适的代码。
![](http://tikupic.21cnjy.com/ae/96/ae96104c389a5dd8293afa9ec3b1d7ba.jpg)
Private Sub Command1_Click()
Dim a As String,s As String
Dim r As Integer,x As Integer
x = Val(Text1.Text)
s = ""
Do While x > 0
▲ ‘①
x = x \ 16
If r > 9 Then
a = Chr(r + 55)
Else
a = Str(r)
End If
▲ ‘②
Loop
Text2.Text = s
End Sub