vb简要编程
⑴ vb编程主要内容
那要看你的2各系统的具体情况,但windows api和数据库有关知识应该学习下!
⑵ vb简单编程
不退出全屏游戏。。。
恩,是有点复杂
要用到API和图像库的
⑶ vb编程超简单
PrivateSubCommand1_Click()
Text2.Text=""
Text2.Text=Text2.Text+Text1.Text
Fori=0To2
IfOption1(i).Value=TrueThen
Text2.Text=Text2.Text+Space(3)+"职称:"+Option1(i).Caption+Space(3)
Else
Option1(i).Enabled=False
EndIf
Nexti
Text2.Text=Text2.Text+"爱好:"
Fori=0To2
IfCheck1(i).Value=1Then
Text2.Text=Text2.Text+Check1(i).Caption+Space(1)
Else
Check1(i).Enabled=False
EndIf
Nexti
Text2.Text=Text2.Text+Space(2)+"籍贯:"+List1.List(List1.ListIndex)+Space(3)
Text2.Text=Text2.Text+"部门:"+Combo1.Text
EndSub
PrivateSubCommand2_Click()
End
EndSub
PrivateSubForm_Load()
Option1(0).Caption="初级"
Option1(1).Caption="中级"
Option1(2).Caption="高级"
Check1(0).Caption="音乐"
Check1(1).Caption="体育"
Check1(2).Caption="绘画"
List1.AddItem"北京市"
List1.AddItem"江苏省"
List1.AddItem"江西省"
List1.AddItem"山东省"
List1.AddItem"山西省"
List1.AddItem"浙江省"
List1.AddItem"辽宁省"
List1.AddItem"天津市"
List1.AddItem"湖南省"
List1.AddItem"河北省"
List1.AddItem"上海市"
List1.AddItem"广东省"
Combo1.AddItem"电子系"
Combo1.AddItem"数学系"
Combo1.AddItem"计算机系"
Combo1.AddItem"物理系"
Combo1.AddItem"化学系"
Combo1.AddItem"天文系"
Combo1.AddItem"地质系"
Combo1.AddItem"医学系"
Text1.Text=""
Text2.Text=""
EndSub
PrivateSubFrame1_Click()
Fori=0To2
IfOption1(Index).Value=FalseThenOption1(Index).Enabled=False
Nexti
EndSub
⑷ VB 编程 简单
文本框的任何事件不需要任何代码,除非你想让它能在长或宽输入内容改变时,面积及周长自动改变,而不需要单击计算揿钮。
假设你的周长显示在Textbox3,面积显示在Textbox4中
Private Sub 计算_Click()
dim a1&,a2&
a1=val(textbox1.text)
a2=val(textbox2.text)
textbox3.text=str((a1+a2)*2)
textbox4.text=str(a1*a2)
End Sub
⑸ vb编程(很简单的)
作业还是尽可能自己完成呀!
既然“很简单的”,自己写呀?何必求别人写?还望眼欲穿,在这里苦苦地等呢?
下不为例哈!
Dim a
Private Sub Command1_Click()
a = 0
Lop:
If a < 100 Then
a = a + 1
If Int(a / 7) * 7 = a Then
Print a
End If
GoTo Lop
Else:
End If
End Sub
⑹ VB编程,超简单的。求编写代码
第一题:
Private Sub Form_Click()
Dim x As Double, Y As Double
x = InputBox("请输入当前顾客购买鸡蛋的重量(以公斤为单位)")
If x < 3 Then
Y = 7.6 * x
Else
Y = 7.6 * x * 0.8
End If
Print Format(Y, "0.00")
End Sub
第二题:
Private Sub Form_Click()
Dim x As Double, Y As Double
x = InputBox("请输入顾客所乘的公里数")
If x / Fix(x) = 1 Then
x = x
Else
x = Fix(x) + 1
End If
If x > 15 Then
Y = 7 + 13 * 1.5 + (x - 15) * 2.1
ElseIf x > 2 Then
Y = 7 + (x - 2) * 1.5
Else
Y = 7
End If
Print Y
End Sub
⑺ 简单的VB编程
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
End Sub
Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 And Text1.Text <> "" And IsNumeric(Text1.Text) Then
Dim vSum%
for i=1 to val(text1.text)
vSum = vSum + i
next
Text2.Text = i
End If
End Sub
⑻ VB简单编程
要使用两个if语句
Private Sub Form_Click()
Dim i As Integer, n As Integer, S As String
i = 1: n = 2
Do While i <= 100
If i Mod n = 0 Then
S = S & i & Space(5)
If i Mod 5 = 0 Then
Print S
S = ""
End If
End If
i = i + 1
Loop
End Sub
⑼ 简单VB编程
就5分???