Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
在鐵鋒等地區(qū),都構(gòu)建了全面的區(qū)域性戰(zhàn)略布局,加強(qiáng)發(fā)展的系統(tǒng)性、市場前瞻性、產(chǎn)品創(chuàng)新能力,以專注、極致的服務(wù)理念,為客戶提供網(wǎng)站設(shè)計(jì)、網(wǎng)站建設(shè) 網(wǎng)站設(shè)計(jì)制作定制網(wǎng)站,公司網(wǎng)站建設(shè),企業(yè)網(wǎng)站建設(shè),品牌網(wǎng)站制作,全網(wǎng)營銷推廣,成都外貿(mào)網(wǎng)站建設(shè)公司,鐵鋒網(wǎng)站建設(shè)費(fèi)用合理。
Dim i, j
j = GetRndNotRepeat(1, 10, 10)
If j(0) Then
For i = 1 To 10
MsgBox(j(i))
Next
End If
End Sub
Public Function GetRndNotRepeat(ByVal NumMin As Integer, ByVal NumMax As Integer, ByVal n As Integer)
'編制:xsfhlzh
'功能:取NumMin到NumMax間的n個(gè)隨機(jī)整數(shù)
'說明:取數(shù)標(biāo)志數(shù)組是Byte,每一位表示NumMin到NumMax間某個(gè)數(shù)的狀態(tài)
Dim arr() As Integer
If n NumMax - NumMin + 1 Then
ReDim arr(0)
arr(0) = 0
Return arr
Else
ReDim arr(n)
Dim m As Integer
Dim b() As Byte
m = Int((NumMax - NumMin) / 8)
ReDim b(m)
'取數(shù)標(biāo)志
Dim i
Dim x, y, z As Integer
Randomize()
arr(0) = 1
For i = 1 To n
Do
'找到x的位置,y表示x在數(shù)組的第幾個(gè)字節(jié),z表示x在該字節(jié)的第幾位
x = Int(Rnd() * (NumMax - NumMin + 1)) + NumMin
y = x - NumMin
z = 2 ^ (y Mod 8)
y = y \ 8
Loop While b(y) And z
b(y) = b(y) Or z
arr(i) = x
'找到未取的數(shù),并放入數(shù)組,設(shè)置標(biāo)志位
Next i
End If
Return arr
End Function
1、首先我們新建一個(gè)工程,并新建一個(gè)標(biāo)準(zhǔn)Exe工程。
2、這時(shí)候我們找到工具箱中標(biāo)簽框。
3、這時(shí)候我們可以直接雙擊控件即可成功繪制。
4、或者我們可以選中他,然后在頁面上繪制。
5、如果對(duì)它的外觀不滿意,我們?cè)趯傩源翱谥行薷摹?/p>
6、雙擊控件即可進(jìn)入代碼窗口。完成效果圖。
你可以在打開文檔時(shí)設(shè)置一個(gè)標(biāo)志位(比如為1)用來表示文檔打開了,其他任何關(guān)閉文檔的語句后面都加一條對(duì)標(biāo)志位的更改(比如改為0),在你判斷文檔是否是打開狀態(tài)時(shí)直接判斷這個(gè)標(biāo)志位就好了。。
用bitarray類和BitVector32類實(shí)現(xiàn)
VB實(shí)現(xiàn)大致如下:
Imports?System.Collections.Specialized
...
Dim?bvData?as?BitVector32
Dim?sec1?As?BitVector32.Section?=?BitVector32.CreateSection(255)
Dim?sec2?As?BitVector32.Section?=?BitVector32.CreateSection(255,sec1)
Dim?sec3?As?BitVector32.Section?=?BitVector32.CreateSection(255,sec2)
Dim?sec4?As?BitVector32.Section?=?BitVector32.CreateSection(255,sec3)
Dim?Buf(4096)?as?Byte?'receive?byte?size?matched?with?DSP?send?data:?1024*4Byte
Dim?recCount?as?Integer
Dim?Data(1024)?as?long
....
For?recCount?=?0?To?1023
bvData(sec4)?=?buf(recByte*4)
bvData(sec3)?=?buf(recByte*4+1)
bvData(sec2)?=?buf(recByte*4+2)
bvData(sec1)?=?buf(recByte*4+3)
Data(recCount)?=?bvData.Data?'這樣數(shù)據(jù)肯定是-398
Next
....
網(wǎng)站名稱:vb.net怎么加標(biāo)志位,vb標(biāo)簽位置怎么設(shè)置
文章位置:http://jinyejixie.com/article34/hsshse.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站設(shè)計(jì)公司、云服務(wù)器、建站公司、自適應(yīng)網(wǎng)站、Google、網(wǎng)站設(shè)計(jì)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)