vb.net 如何随机产生汉字,
http://zhidao.baidu.com/question/113215596.html在VB中有ChrB可以用,但是在VB.net里面不能使用VB.net如何实现...
http://zhidao.baidu.com/question/113215596.html
在VB中有ChrB可以用,但是在VB.net里面不能使用
VB.net如何实现随机输出一个汉字
或者调用文本也可以,本人初学者,请尽量详细 展开
在VB中有ChrB可以用,但是在VB.net里面不能使用
VB.net如何实现随机输出一个汉字
或者调用文本也可以,本人初学者,请尽量详细 展开
展开全部
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim HzAsc1 As Integer, HzAsc2 As Integer
Randomize()
HzAsc1 = Int(Rnd() * 10) + 127
HzAsc2 = Int(Rnd() * 10) + 127
TextBox1.Text = ChrW(HzAsc1 * 256 + HzAsc2)
End Sub
Dim HzAsc1 As Integer, HzAsc2 As Integer
Randomize()
HzAsc1 = Int(Rnd() * 10) + 127
HzAsc2 = Int(Rnd() * 10) + 127
TextBox1.Text = ChrW(HzAsc1 * 256 + HzAsc2)
End Sub
展开全部
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim i As Long, wc As Integer
Dim s As String = ""
For i = 1 To 100
Randomize()
wc = CInt("&H" & Hex$(Rnd() * (&H9FA5& - &H4E00&) + &H4E00&))
s = s & CLng("&H" & Hex$(wc)) & " " & Hex$(wc) & " " & ChrW(wc) & vbTab
Next
TextBox1.Text = s
End Sub
Dim i As Long, wc As Integer
Dim s As String = ""
For i = 1 To 100
Randomize()
wc = CInt("&H" & Hex$(Rnd() * (&H9FA5& - &H4E00&) + &H4E00&))
s = s & CLng("&H" & Hex$(wc)) & " " & Hex$(wc) & " " & ChrW(wc) & vbTab
Next
TextBox1.Text = s
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询