日韩黑丝制服一区视频播放|日韩欧美人妻丝袜视频在线观看|九九影院一级蜜桃|亚洲中文在线导航|青草草视频在线观看|婷婷五月色伊人网站|日本一区二区在线|国产AV一二三四区毛片|正在播放久草视频|亚洲色图精品一区

分享

用VB編寫的雙色球選號(hào)程序

 hjr231 2019-04-12

         用VB編寫的雙色球選號(hào)程序

程序簡要介紹:

    新建一個(gè)窗體,在該窗體內(nèi)放入9個(gè)標(biāo)簽控件,其中l(wèi)abel2--label8分別放入選出的號(hào)碼;有一個(gè)組合框控件,準(zhǔn)備存入每次選中的號(hào)碼;兩個(gè)命令按鈕,分別為“開始選號(hào)”與“退出”。

代碼如下:

Option Explicit
Private Sub Command1_Click()    '開始選號(hào)
   Dim q As Integer
   Dim a As Integer
   Dim b As Integer
   Dim c As Integer
   Dim d As Integer
   Dim e As Integer
   Dim f As Integer
   Dim g As Integer
  
   For q = 1 To 7
       Select Case q
          Case 1
              Randomize (Time)
              a = Int(Rnd * 33 + 1)
              Label2.Caption = a
         
          Case 2
             Do
                Randomize (Time)
                b = Int(Rnd * 33 + 1)
             Loop Until b <> Label2.Caption
             Label3.Caption = b
            
           Case 3
             Do
                Randomize (Time)
                c = Int(Rnd * 33 + 1)
             Loop Until c <> Label2.Caption And c <> Label3.Caption
             Label4.Caption = c
            
            Case 4
             Do
                Randomize (Time)
                d = Int(Rnd * 33 + 1)
             Loop Until d <> Label2.Caption And d <> Label3.Caption And d <> Label4.Caption
             Label5.Caption = d
  
            Case 5
             Do
                Randomize (Time)
                e = Int(Rnd * 33 + 1)
             Loop Until e <> Label2.Caption And e <> Label3.Caption And e <> Label4.Caption And e <> Label5.Caption
             Label6.Caption = e
  
            Case 6
             Do
                Randomize (Time)
                f = Int(Rnd * 33 + 1)
             Loop Until f <> Label2.Caption And f <> Label3.Caption And f <> Label4.Caption And f <> Label5.Caption And f <> Label6.Caption
             Label7.Caption = f
  
  
            Case 7
               Randomize (Time)
               g = Int(Rnd * 16 + 1)
               Label8.Caption = g
            Case Else
         End Select
      Next q
        
          Dim w  As Variant      '在組合框內(nèi)添加選出的號(hào)碼
             w = a & "  " & b & "  " & c & "  " & d & "  " & e & "  " & f & "--" & g
          Combo1.Text = w
          Combo1.AddItem w, 0
         
        
  
  
End Sub

Private Sub Command2_Click()   '退出程序
  End
End Sub

    本站是提供個(gè)人知識(shí)管理的網(wǎng)絡(luò)存儲(chǔ)空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請(qǐng)注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評(píng)論

    發(fā)表

    請(qǐng)遵守用戶 評(píng)論公約

    類似文章 更多