求VB代码怎写?
求VB代码怎么写,
'check1、check2、check3为checkbox控件数组'check1、check2、check3的style属性设置为1 Private Sub Form_Load() Dim i As Integer Check1(0).Caption = "除7余0" .
VB求代码怎么写
简单Private Sub Command1_Click() Text2.Text = Left(Text.Text, 5)End SubPrivate Sub Command2_Click() Text3.Text = Len(Text.Text)End Sub
VB代码怎么写
开始按钮 text1="" text1.SetFocus 检查口令按钮 if text1=“你设置的口令” then label1.caption="口令正确,继续执行!" else label1.caption="口令不对,请重新输入!" text1="" text1.setfocus endif 结束按钮 end
求写vb编程代码
Dim SUM As Long, m As Integer, n As IntegerSUM = 0For m = 1 To 100 For n = 2 To m - 1 If m Mod n = 0 Then Goto NextNum Next n SUM = SUM + mNextNum:Next mPrint SUM
VB代码怎么写
Private Sub Form_Load() '用Label1假定是你的灯, 初始是黑色背景,灯灭 Me.Label1.BackColor = vbBlackEnd Sub Private Sub Label1_Click() '鼠标点击“灯”,如果背景为黑色,,灯灭 If Me.Label1.BackColor = vbBlack Then '使背景变为红色,灯亮 Me.Label1.BackColor = vbRed Else '如果背景不为黑色:设背景为黑色,灯灭 Me.Label1.BackColor = vbBlack End IfEnd Sub
求写VB代码
dim s as long,a as long,b as long,c as long,i as integera=2b=1for i=1 to 20c=as=s+a/ba=a+bb=cdebug.print snext i
vb代码怎么写
首先在Combo1的List属性中加入"a","b","c" Combo1.click事件中加入代码: ID = Combo1.List(Combo1.ListIndex()) Select Case ID Case "a" Text1.Text = "111" Case "b" Text1.Text = "222" Case "c" Text1.Text = "333" Case Else End Select
求VB代码
dim Result() dim n as integern=0for i=100 to 500 if mid(i,1,1)+mid(i,2,1)+mid(i,3,1)=5 then result(n)=in=n+1 end ifnext i result()就是你要的结果.
怎么看VB代码、又怎么编写代码
把代码贴出来一部分,大家看看不就知道了.
vb代码怎么写
我只说核心代码思想1.text1里面要求输入数字,然后增加一个按钮.2.对text1设定只能输入数字以及最多输入三个数字3.输入数字完成后点击按钮,首先用截取函数分别截取text1中各个数字,然后用if…then 判断语句来比较数字大小和类型,对于符合要求的即显示.例如截取后三个数字分别是X Y Z ,if y=x,z=y,then '即msgbox"豹子" if y=x+1,z=y+1,then msgbox"顺子" 以此类推.因为我对你以上所讲的理解就是这样.所以,代码大概也就是这样了.