前几天,忍痛割爱买了一台电脑,打算潜心钻研计算机语言,本人的第一个计划是学习vb,
目标能够运用vb编一些简单适用的程序,为了更好的督促自己学习,特发贴如下:
一、学习计划
1、各控件的属性和方法;
2、语法以及算法练习;如:数据排序的各种方法
3、标准模块,类模块和ACTIVE控件的学习;
4、了解oracle;
5、实例开发;
二、学习方式
1、以vb基础教程为主,泡vb论坛为副,自学讨论相结合;
2、每天将自己所学的东西再次发贴;
各位如是初学者请再次写下你的学习进程,以督促自己学习!
[此贴子已经被作者于2005-3-9 16:38:42编辑过]
'简单的代码 Private Sub chkbold_Click() If chkbold.Value = 1 Then txtshow.FontBold = True Else txtshow.FontBold = False End If
End Sub
Private Sub chkitalic_Click() If chkitalic.Value = 1 Then txtshow.FontItalic = True Else txtshow.FontItalic = False End If End Sub
Private Sub chkunderline_Click() If chkunderline.Value = 1 Then txtshow.FontUnderline = True Else txtshow.FontUnderline = False End If End Sub
Private Sub cmdexit_Click() End End Sub
Private Sub Form_Load() optarial.Caption = "Arial" optmodern.Caption = "modern" opttimes.Caption = "Times new Roman" optarial.Value = False opttimes.Value = False optmodern.Value = False chkbold.Value = 0 chkitalic.Value = 0 chkunderline.Value = 0 txtshow.Text = "" txtshow.FontSize = 35 cmdexit.Caption = "退出" chkbold.Caption = "粗体" chkitalic.Caption = "斜体" chkunderline.Caption = "下划线" frmsex.Caption = "性别" frmclass.Caption = "班级" optboy.Caption = "男" optgirl.Caption = "女" optclass1.Caption = "一年级" optclass2.Caption = "二年级" optclass3.Caption = "三年级" optclass4.Caption = "四年级" optboy.Value = False optgirl.Value = False optclass1.Value = False optclass2.Value = False optclass3.Value = False optclass4.Value = False
End Sub
Private Sub optarial_Click() txtshow.FontName = "arial" End Sub
Private Sub optmodern_Click() txtshow.FontName = "modern" End Sub
Private Sub opttimes_Click() txtshow.FontName = "times new roman"
End Sub
'判断100-300之间的素数?并且一行5个数输出 Private Sub Form_Click() For prime = 100 To 300
Sum = 0 For i = 2 To prime - 1 If prime Mod i <> 0 Then Sum = Sum + 1 End If If Sum = prime - 2 Then n = n + 1 '判断有几个素数 If n >= 2 And n Mod 5 = 1 Then '判断如果是第6、11、。。。那么换行! Print Print prime, Else Print prime, End If End If