【正文】
on數(shù)量:Text1textFrame2Caption操作系統(tǒng)Option1CaptionWindows2000Option2CaptionWindows98Command1Caption 確定二、根據(jù)題意,對命令按鈕Command1的Click事件、復選框check的click事件和窗體的load事件編寫如下事件過程代碼:Private Sub Check1_Click()If = 1 Then = True = TrueElse = False = FalseEnd IfEnd SubPrivate Sub Check2_Click()If = 1 Then = True = TrueElse = False = FalseEnd IfEnd SubPrivate Sub Command1_Click()If = 1 Then = amp。 Chr(13) amp??丶Q屬性屬性值備注Text1textLabel1Caption請輸入:Label2Caption結(jié)果為:Label3CaptionCommand1Caption判斷二、根據(jù)題意,對命令按鈕Command1的Click事件和Text1的KeyPress事件編寫如下事件過程代碼:Private Sub Command1_Click() Dim n As Integer, k As Integer, L As Integer, c As String, s As String 39。控件名稱屬性屬性值備注Label1Caption簡單動畫Label2(0,1,2,3,4,5)CaptionTimer1intetervel1000Command1Caption演示Command2Caption停止二、根據(jù)題意,對命令按鈕的Click事件和計時器的Timer事件編寫如下事件過程代碼: Dim i As IntegerPrivate Sub Command1_Click()If = 演示 Then = True End IfEnd SubPrivate Sub Command2_Click()If = 結(jié)束 Then = False End IfEnd SubPrivate Sub Form_Load() = Falselabel2(1) .Visible= falselabel2(2) .Visible= falselabel2(3) .Visible= falselabel2(4) .Visible= falselabel2(5) .Visible= falseEnd SubPrivate Sub Timer1_Timer()If i = 5 Then i = 0 Label2(i).Visible = True Label2(5).Visible = FalseElse i = i + 1 Label2(i).Visible = True Label2(i 1).Visible = FalseEnd IfEnd Sub程序設計15題解:一、根據(jù)題目要求及樣例,在Form1窗體上畫出各控件,并根據(jù)題意按下表對窗體和各控件設置屬性值。控件名稱屬性屬性值備注Label1Caption歡迎您的使用HScroll1水平滾動條Command1Caption結(jié)束二、根據(jù)題意,對命令按鈕Command1的Click事件和水平滾動條數(shù)組Hscroll1的Change事件編寫如下事件過程代碼:Private Sub Command1_Click()EndEnd SubPrivate Sub Form_Load() = 0 =End SubPrivate Sub HScroll1_Change() = End SubPrivate Sub HScroll1_Scroll()HScroll1_ChangeEnd Sub程序設計19題解:一、根據(jù)題目要求及樣例,在Form1窗體上畫出各控件,并根據(jù)題意按下表對窗體和各控件設置屬性值。H000000FFamp??丶Q屬性屬性值備注Form1Caption密碼檢驗Label1Caption輸入密碼后按回車(提示:密碼1234567)Label2Caption初始清空AutoSizeTrueFront宋體、三號、常規(guī)ForeColor選紅色Text1Text初始清空PassWordChar*MaxLength7二、根據(jù)題意,對窗體的Load事件和文本框Text1的KeyPress事件編寫如下事件過程代碼:Private Sub Form_Load() = FalseEnd SubPrivate Sub Text1_KeyPress(KeyAscii As Integer)Static n As IntegerIf KeyAscii = 13 Then = True If = 1234567 Then = 歡迎光臨! Else = 密碼不符,請再輸入一遍! = n = n + 1 End If If n = 2 Then = 非法用戶,請退出程序! = False End IfEnd IfEnd Sub程序設計23題解:一、根據(jù)題目要求及樣例,在Form1窗體上畫出各控件,并根據(jù)題意按下表對窗體和各控件設置屬性值??丶Q屬性屬性值備注Form1Caption字體設置MinButtonFalseMaxButtonFalsemondialogCaption選擇時間Text1Multilanetruescrollbar2verticaltext憶江南最憶是杭州在窗體上添加菜單,分別是標題名稱字體Fontmenu文字顏色Wcolormenu背景顏色bcolormenu二、根據(jù)題意,編寫如下事件過程代碼:Private Sub bcolormenu_Click() = End SubPrivate Sub fontmenu_Click() = = = = = End SubPrivate Sub Form_Load() = 宋體 = 2End SubPrivate Sub wcolormenu_Click() = End Sub程序設計26題解:一、根據(jù)題目要求及樣例,在Form1窗體上畫出各控件,并根據(jù)題意按下表對窗體和各控件設置屬性值。當前表項被選中時刪除數(shù)據(jù) i i i i Text1(0).Text = Text1(1).Text = Text1(2).Text = Text1(3).Text = End IfEnd Sub程序設計28題解:一、根據(jù)題目要求,在Form1窗體上畫出各控件,并根據(jù)題意按下表對窗體和各控件設置屬性值??丶Q屬性屬性值備注Form1Caption倒計時MinButtonFalseMaxButtonFalseFrame1Caption選擇時間Option1(0、2)caption1分鐘、5分鐘、10分鐘是數(shù)組,由三個垂直排列的單選按鈕組成Option1(0)ValueTrueLabel1font宋體、粗體、三號Aligment2CenterCommand1Caption計時開始Timer1Interval1000enabledfalse二、根據(jù)題意,編寫如下事件過程代碼:Dim nSecond As IntegerPrivate Sub Command1_Click() If Option1(0).Value Then nSecond = 60 ElseIf Option1(1).Value Then nSecond = 300 Else nSecond = 600 End If nSecond = 60 = True = False = FalseEnd SubPrivate Sub Timer1_Timer() nSecond = nSecond 1 = nSecond \ 60 amp??丶Q屬性屬性值備注Form1Caption撥號盤Text1Text清空MaxLength10Font宋體、粗體、三號ForeColor蘭色Command(0)Caption0命令按鈕數(shù)組Command(1)Caption1……Command(9)Caption9Command2Caption重撥Timer1Interval500二、根據(jù)題意,對命令按鈕數(shù)組Command1和Command2的Click事件及Timer1控件的Timer事件編寫如下事件過程代碼:Dim NumStr As StringDim i As IntegerPrivate Sub Command1_Click(Index As Integer) = amp??丶Q屬性屬性值備注Shape1BackStyle1Opaque將Shape1放在窗體正中BorderColor紅色Shape3CircleHeight500Width500Timer1Interval100二、根據(jù)題意,編寫如下事件過程代碼:Dim dx As Integer, dy As IntegerPrivate Sub Form_Load() dy = 100 dx = 100 = FalseEnd SubPrivate Sub qidong_Click() = TrueEnd SubPrivate Sub Timer1_Timer() = + dx = + dy If 0 Or ( ) Then dx = dx End If If 0 Or ( ) Then dy = dy End IfEnd SubPrivate Sub tingzhi_Click() = FalseEnd Sub??丶Q屬性屬性值備注Form1Caption調(diào)色板MinButtonFalseMaxButtonFalseFrame1Caption三原色配比與預覽Hscroll1Min0是數(shù)組,由三個水平滾動條組成。 (nSecond Mod 60) amp??丶Q屬性屬性值備注Form1Caption畫板窗體中各控件的位置按樣例畫好MinButtonFalseMaxButtonFalseFrame1caption選項Option1(0)Caption細ValuetrueOption1(1)Caption粗Command1Caption顏色Command2Caption清除Label1Caption 繪圖區(qū)二、根據(jù)題意,編寫如下事件過程代碼:Dim startx As Single, starty As Single ‘在窗體層定義Private Sub Command1_Click() = End SubPrivate Sub Command2_Click()End SubPrivate