小男孩‘自慰网亚洲一区二区,亚洲一级在线播放毛片,亚洲中文字幕av每天更新,黄aⅴ永久免费无码,91成人午夜在线精品,色网站免费在线观看,亚洲欧洲wwwww在线观看

分享

用VB編寫的雙色球選號程序

 hjr231 2019-04-12

         用VB編寫的雙色球選號程序

程序簡要介紹:

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

代碼如下:

Option Explicit
Private Sub Command1_Click()    '開始選號
   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)添加選出的號碼
             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è)人知識管理的網(wǎng)絡(luò)存儲空間,所有內(nèi)容均由用戶發(fā)布,不代表本站觀點(diǎn)。請注意甄別內(nèi)容中的聯(lián)系方式、誘導(dǎo)購買等信息,謹(jǐn)防詐騙。如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊一鍵舉報(bào)。
    轉(zhuǎn)藏 分享 獻(xiàn)花(0

    0條評論

    發(fā)表

    請遵守用戶 評論公約

    類似文章 更多