使用print方法在窗体中央显示一行文字
1个回答
展开全部
Private Sub Form_Click()
Dim l As Integer
Dim h As Integer
Dim i As Integer
Dim s As String
s = "你好"
Me.ScaleMode = 4
l = Me.ScaleWidth
h = Me.ScaleHeight
h = h / 2
l = l / 2
For i = 1 To h + 1
Print
Next i
For i = 1 To l
Print " ";
Next i
Print s
End Sub
Dim l As Integer
Dim h As Integer
Dim i As Integer
Dim s As String
s = "你好"
Me.ScaleMode = 4
l = Me.ScaleWidth
h = Me.ScaleHeight
h = h / 2
l = l / 2
For i = 1 To h + 1
Next i
For i = 1 To l
Print " ";
Next i
Print s
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询