Microsoft Visual Basic 6.0
Transcript of Microsoft Visual Basic 6.0
uuuGefMicrosoft Visual Basic 6.0
rmwdumtaMumif;t&m
tcef; ( 1 )
1/ Introduction pum;csD; 1
2/ Visual Basic 6.0 pwifzGifhjcif; 1
3/ Creating an Application y½dk*&rfwpfckudkpwiftajcwnfjcif; 2
4/ Create the interface tjyeftvSefqufoG,fcsufrsm;udk
BudKwifpOf;pm;jcif; 3
5/ Set Properties *kPfowådrsm;udkjyifqifjcif; 6
6/ Write Code y½dk*&rfa&;jcif; 9
7/ Factorial ½Smonfh y½dk*&rfa&;jcif; 18
8/ Prime Number udk½Smjcif; 23
tcef; ( 2 )
9/ Menu wnfaqmufjcif; 25
10/ Pulldown Menu wpfckjzpfaom Test Buttons udka½G;ygu
jzpfvmrnfh Program udk a&;om;jcif; 31
11/ Word Wrap and Autosize (Pulldown Menu) twGuf
Program a&;om;jcif; 33
12/ List Box (Pulldown Menu) twGuf Program a&;om;jcif; 34
13/ Check Box (Pulldown Menu) twGuf Program a&;om;jcif; 39
u
trSwfpOf pmrsufESm
uuuGefMicrosoft Visual Basic 6.0c
trSwfpOf pmrsufESm
14/ Number System (Pulldown Menu) twGuf
Program a&;om;jcif; 42
15/ Multiple Column List Box (Pulldown Menu) twGuf
Program a&;om;jcif; 44
16/ Scroll Bars (Pulldown Menu) twGuf Program a&;om;jcif; 46
17/ Menu Bar aemufwpfckxyfrHjyKvkyfjcif; 48
tcef; ( 3 )
18/ Graphic rsm;udk Windows yHkpHtwdkif;½SmazGjcif; 58
19/ Timer jzifhtcsdefudkzefwD;jcif; 62
20/ tcsdefESifhywfoufaom Function rsm;udk
Form zefwD;íprf;oyfjcif; 65
tcef; ( 4 )
21/ ODBC ü Access File tm;toHk;jyKEdkifap&ef aqmif½Gufjcif; 70
22/ Visual Basic 6.0 wGif ODBC Data Sources qJGwifjcif; 77
23/ Data Form Wizard wnfaqmufjcif; 78
24/ rdrdenf;jzifh Access File toHk;jyKaomy½dk*&rfa&;om;jcif; 85
taMumif;t&m
uuuGefMicrosoft Visual Basic 6.0*
tcef; ( 5 )
25/ String ESifhqdkifaomudpö&yfrsm; 91
26/ String Function rsm;udktoHk;jyKí udef;*Pef;rsm;wGufcsufjcif; 93
27/ String toHk;jyKí Fibonacci Sequence udef;pOfwef;udk½Smjcif; 95
28/ Astrisk rsm;zefwD;jcif; 97
29/ Magic Square y½dk*&rfa&;om;jcif; 98
30/ &m*Pef;½dkufxnfhygu 4if;udef;*Pef; 3 vHk;pvHk;aygif;jcif; 100
tcef; ( 6 )
31/ Mathematics ESifhqdkifaomudpö&yfrsm;
½dk;½dk;udef;pOfwef; 1, 2, 3, 4, ...? qwdk;udef; 1, 2, 4, 8, 16, ...?
xyfudef; 1, 4, 9, 16, 25, ... udef;pOfwef;wdkYudk
y½dk*&rfa&;om;jcif; 104
32/ APudef;pOfwef;udk y½dk*&rfa&;om;jcif; 105
33/ GPudef;pOfwef;udk y½dk*&rfa&;om;jcif; 107
34/ S = 1 + 2 + 3 + ... + N udef;pOfwef;wdkYudk aygif;jcif; 108
35/ S = 1 * 2 * 3 * ... * N udef;pOfwef;wdkYudk aygif;jcif; 109
36/ udef;pOfwef; S = 1 + 1/4 + 1/9 + ... + 1/N*N wdkYudk½SmazGjcif; 110
37/ udef;pOfwef; P = (2/3)(3/4)(4/5)...(N/N+1) wdkYudk½SmazGjcif; 111
trSwfpOf pmrsufESmtaMumif;t&m
uuuGefMicrosoft Visual Basic 6.0C
tcef; ( 7 )
38/ Access 2002 ½Sd Database File tm; Visual Basic 6.0 ESifh
Update jyKvkyfjcif; 113
39/ DataGrid jzifh Update jyKvkyfjcif; 119
40/ Access 2002 Database File wGif Field topfxyfxnfhí
Update vkyfjcif; 126
41/ Access 2002 Database File ½Sd Query File tm;ac:oHk;jcif; 130
tcef; ( 8 )
42/ Data Types rsm;\*kPfowådrsm; 135
43/ erlemy½dk*&rfrsm; 136
44/ Toolbox wGifyg0ifaom Icon rsm;ESifherlemy½dk*&rfrsm; 149
45/ Microsoft Windows Common Controls
wGifyg0ifaom Icon rsm; 205
46/ Microsoft Calendar Control (Form twGif;jyu©'defxnfhjcif;) 223
47/ Execute File udk y½dk*&rfjzifhvSrf;ac:toHk;jyKjcif; 224
48/ jr§m;rsm;udkywfjcmvnfvSnfhonfhy½dk*&rfudka&;jcif; 226
trSwfpOf pmrsufESmtaMumif;t&m
uuuGefMicrosoft Visual Basic 6.0i
trSwfpOf pmrsufESmtaMumif;t&m
tcef; ( 9 )
49/ Access 2002 ½Sd Database File xJrS
Table File wpfcktm;zGifhjcif; 229
50/ Access 2002 ½Sd Database File wpfckxJrS
Table File ESpfcktm; Updating jyKvkyfjcif; 235
51/ Access 2002 ½Sd Database File wpfckxJrS
Table File rsm;tm; Form wpfckjzifhzGifhjcif; 242
52/ Access 2002 ½Sd Database File trsm;pkxJrS
Table File trsm;pktm; Form wpfckjzifh zGifhjcif; 246
53/ Access 2002 ½Sd Database File twGif;rS
Table File rsm;tm; Form wpfckjzifh Append jyKvkyfjcif; 252
54/ Access 2002 ½Sd Database File twGif;rS
Table File twGif;½Sd Record tm;½Smjcif; 255
tcef; ( 10 )
55/ Microsoft Visual 6.0 jzifh,cifoHk; Access zdkifwnfaqmufjcif; 258
56/ ,cifoHk; Access zdkifudk Data Report wnfaqmufí
Report wnfaqmufjcif; 274
57/ ,cifoHk; Access zdkifudk Form wnfaqmufí"gwfyHkrsm;Munfhjcif; 295
uuuGefMicrosoft Visual Basic 6.0p
trSwfpOf pmrsufESmtaMumif;t&m
58/ Toolbox xJwGif Crystal Report Smart Icon xnfhjcif; 302
59/ Crystal Report wnfaqmufjcif; (,cif Access File) 304
60/ Crystal Report wnfaqmufjcif; (Access File 2000 txuf) 316
61/ Crystal Report jzifh Graphic File ½dkufxkwfjcif; 321
62/ Access zdkifudk Crystal Report wnfaqmufí
Print ½dkufxkwfjcif; 329
63/ Database File wpfcktwGif;½Sd
Table zdkifESpfckudktoHk;jyKíuHprf;rJEIdufjcif; 331
64/ ODBC jzifhzefwD;xm;aom Access zdkifudk
touf? vkyfouf? yifpif,lrnfhESpfwGufjcif; 358
65/ Visual Basic 6.0 jzifhzefwD;xm;aom
Access zdkifudk Printer jzifh½dkufxkwfjcif; 362
tcef; ( 11 )
66/ Visual Basic 6.0 jzifh Program wpfcktm;a&;NyD;
Execute File wnfaqmufjcif; 375
67/ Visual Basic 6.0 jzifh Program wpfcktm;a&;NyD;
Package jyKvkyfjcif; 381
68/ tjcm;uGefysLwmrsm;odkY jyefvnf Install jyKvkyfjcif; 393
69/ InputBox a&;xHk;jzifh Password jyKvkyfjcif; 396
70/ omrefa&;xHk;jzifh Password jyKvkyfjcif; 400
uuuGefMicrosoft Visual Basic 6.0q
trSwfpOf pmrsufESmtaMumif;t&m
tcef; ( 12 )
71/ Microsoft Internet Explore zdkifudkqJG,ltoHk;csjcif; 405
tcef; ( 13 )
72/ Application Package rsm;udky½dk*&rfjzifhzGifhjcif; 436
tcef; ( 14 )taxGaxG
73/ Multiple List Box rsm;zefwD;jcif; 439
74/ Exchange Sort udk Visual Basic jzifha&;om;jcif; 442
75/ Counting Sort udk Visual Basic jzifha&;om;jcif; 446
76/ Insertion Sort udk Visual Basic jzifha&;om;jcif; 450
77/ Selection Sort with Exchange udk
Visual Basic jzifha&;om;jcif; 454
1uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
tcef;(1)tcef;(1)tcef;(1)tcef;(1)tcef;(1)
Introduction pum;csD;pum;csD;pum;csD;pum;csD;pum;csD;
Microsoft Visual Basic 6.0 onf Programming rsm;a&;om;&mwGif toHk;jyKaom
Computer Language wpfckjzpfygonf/ ,cifu GWBASIC, BASIC, BASICA,QBASIC wdkYrSwpfqifh ,cktcgwGif Visual Basic 4.0, Visual Basic 5.0, VisualBasic 6.0 (Windows Mode) wGiftoHk;jyKEdkifaom Programming Language rsm;jzifh
a&;om;cJhMuygonf/ Visual rSm tjrifESifhoufqdkifaom[kt"dyÜg,f&NyD; BASIC rSm
Beginners All Purpose Symbolic Instruction Code [kt"dyÜg,f&ygonf/
Visual Basic 6.0 pwifzGifhjcif;pwifzGifhjcif;pwifzGifhjcif;pwifzGifhjcif;pwifzGifhjcif;
Windows 95 ESifh txufuGefysLwmpufwpfvHk;zGifhvdkufaomtcg Task Bar ay:wGif
Start udk Mouse jzifh Left Click ESdyf&rnf/ xdkYaemuf Program tm;a½G;cs,fyg/ Sub-Menu wpfckxyfrHay:vmrnf/ xdk Sub-Menu xJrS Microsoft Visual Basic 6.0tm;a½G;ygu Visual Basic 6.0 tm;pwiftoHk;jyK&eftqifoifhjzpfaernf/ Desktopnmzuftay:axmifhwGif Microsoft Office Short Cut Bar ½Sdaeygu 4if; Bar wef;xJ
wGif Microsoft Visual Basic 6.0 Smart Icon jyyguvnf; Left Click ESdyfjcif;jzifhvnf;
aumif;? uGefysLwm Desktop ay:wGif Microsoft Visual Basic 6.0 Short Cut Icon½Sdaeyguvnf; 4if; Short Cut Icon udk Double Click ESdyfjcif;jzifhvnf;aumif; ac:,l
toHk;jyKEdkifayonf/
aemufwpfenf;rSm Start ® ® ® ® ® Run udk Mouse Left Click vkyfvdkufygu yHk(1)ygtwdkif;
Run Dialog Box ay:vmrnf/
yHk(1)
2uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Open nmzuf½Sd List Box xJwGif Cursor 0ifaevdrfhrnf/ xdktcg Browse udka½G;yg/
VB6.EXE File ½Sd&mtqifhqifhodkY0ifNyD; OK udkESdyfygu Visual Basic 6.0 yGifhvmrnf/
yHk(2)/
Creating an Application y½dk*&rfwpfckudkpwiftajcwnfjcif;y½dk*&rfwpfckudkpwiftajcwnfjcif;y½dk*&rfwpfckudkpwiftajcwnfjcif;y½dk*&rfwpfckudkpwiftajcwnfjcif;y½dk*&rfwpfckudkpwiftajcwnfjcif;
yxrOD;pGm Visual Basic Programming jzifh zm&if;[dkufrS pifwD*&dwfodkYajymif;vJ
aomy½dk*&rfykpämukda&;om;&mwGif zm&if;[dkufrS pifwD*&dwfodkYajymif;vJaom Formulaudkod½Sd&rnf/ Oyrm - C = 5/9 * (F-32)
y½dk*&rfwpfckudka&;om;&mwGif tqifh(3)qifh½Sdonf/ 4if;wdkYrSm
1. Create the interface2. Set Properties3. Write Code
yHk(2)
3uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Create the interface tjyeftvSefqufoG,fcsufrsm;udkBudKwifpOf;pm;jcif;tjyeftvSefqufoG,fcsufrsm;udkBudKwifpOf;pm;jcif;tjyeftvSefqufoG,fcsufrsm;udkBudKwifpOf;pm;jcif;tjyeftvSefqufoG,fcsufrsm;udkBudKwifpOf;pm;jcif;tjyeftvSefqufoG,fcsufrsm;udkBudKwifpOf;pm;jcif;
yxrOD;pGm Project topfwpfckudkzefwD;&rnf/ xdkYaMumifh Menu Bar wGif½Sdaom
File udka½G;yg/ Pulldown Menu (or) Dropdown Menu wpfckay:vmrnf/ 4if;xJrS
New Project udka½G;&rnf/ yHk(3)/
xdktcg New Project Dialog Box wpfckay:vmNyD; yHkrSeftm;jzifh Standard EXESmart Icon a½G;cs,fjcif;cHae&ygu OK udka½G;cs,f&ygrnf/ ykH(4)/
yHk(3)
4uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
zm&if;[dkufrS pifwD*&dwfodkYajymif;vJrnfh y½dk*&rfa&;om;&ef Form1 qdkonfh FormyHkpHwpfckay:vmrnf/ yHk(5)/
yHk(4)
yHk(5)
5uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
4if; Form yHkpHwGif Text, Memory Variable rsm;zefwD;&eftwGuf Visual BasicwGiftqifoifhyg½Sdaeaom Toolbox udkac:,l&rnfjzpfygonf/ Toolbox udkrawGUygu
Menu Bar ½Sd View rSwqifha½G;yg/ yHk(6)/ xdktcg Toolbox ay:vmayrnf/ yHk(7)/
Icon udktoHk;jyKí Fahrenheit Degree, Centigrade Degree rsm;udk
Form xJwGifa&;om;&rnf/ yHk(8)/
yHk(6)
yHk(7)
yHk(8)
6uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
þuJhodkY Fahrenheit Degree, Centigrade rsm;udk zefwD;&mwGif Form1 xJodkY LabelIcon udka½G;í Drag and Drop vkyfyg&ef/ xdktcg Form1 xJwGif yHk(9)ygyHkpHtwdkif;
jzpfaernf/
Set Properties *kPfowÅdrsm;udkjyifqifjcif;*kPfowÅdrsm;udkjyifqifjcif;*kPfowÅdrsm;udkjyifqifjcif;*kPfowÅdrsm;udkjyifqifjcif;*kPfowÅdrsm;udkjyifqifjcif;
Label [kazmfjyonfh Text Frame udkjrifawGU&rnfjzpfNyD; 4if; Text Frame ay:rSMouse Right Click udkESdyfygu Short Cut Menu wpfckay:vmrnf/ yHk(10)/
yHk(9)
yHk(10)
7uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
4if; Short Cut Menu \atmufqHk;jzpfaom Properties udka½G;yg/ xdktcg La-bel1 ESifh oufqdkifaom Properties udk yHk(11)ygtwdkif;jrifawGU&rnf/
yHk(11)yg Properties - Label1 xJ½Sd Label1 Label wGifyg0ifaomtcsufrsm;udk
atmufygtwdkif;jyifqif&rnf -
AutoSize - TrueBackStyle - 0 - TransparantCaption - Fahrenheit Degree = = = >Font - Font Size - 12, Font Style - Bold[kjyifqifjznfhpGufNyD; Properties \ Close Button udka½G;&rnfjzpfonf/
xdkenf;wl Centigrade Degree = = = > udkvnf; txufygtwdkif;zefwD;&rnf/
xdkYaemuf Keyboard rS ocsFmqdkif&mudef;*Pef;rsm;½dkufxnfh&ef Text Box Icon jzifh
Fahrenheit Degree = = = > \nmzufwGifxyfrHzefwD;&ef/ xdkYaemuf Right ClickxyfrHESdyfyg&ef/ xdktcg Short Cut Menu wpfckxyfrHay:vmrnf/ yHk(12)/
yHk(11)
8uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
4if;rS Short Cut Menu \atmufqHk;jzpfaom Properties udka½G;cs,f&rnf/ xdktcg
Properties - Text1 Text1 TextBox ay:vmrnf/ yHk(13)/
Text1 TextBox Properties wGifatmufygwdkYudkjyifqif&ef-
Font - Font Size - 12, Font Style - BoldText - Empty[kjyifqifjznfhpGufNyD; Properties \ Close Button udk Left Click vkyfyg/ xdktcg
Text1 TextBox Properties ydwfoGm;vdrfhrnf/ xdkenf;wl Text2 udkvnf; Text1 enf;wl
yHk(12)
yHk(13)
9uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
zefwD;xm;&rnf/ yHk(14)/ Text1 rSm zm&if;[dkuf'D*&DtwGufjzpfí Text2 rSm pifwD*&dwf
'D*&DtwGufjzpfygonf/
Write Code y½dk*&rfa&;jcif;y½dk*&rfa&;jcif;y½dk*&rfa&;jcif;y½dk*&rfa&;jcif;y½dk*&rfa&;jcif;
Fahrenheit Degree ½dkufoGif;&efjzpfaom Text Box ü*Pef;wpfck½dkufNyD; <En-ter> udkESdyfyg/ Centigrade Degree udkoufqdkif&m Text Box üazmfjyrnfjzpfonf/
Centigrade Degree ½dkufoGif;&efjzpfaom Text Box ü*Pef;wpfck½dkufNyD; <Enter>udkESdyfygu Fahrenheit Degree udkoufqdkif&m Text Box ütjyeftvSefazmfjyrnf
jzpfonf/ þuJhodkYjyKvkyfí&Edkifap&ef Text1, Text2 TextBox wdkYwGif View Code(or) Program rsm;a&;om;&rnfjzpfonf/ Program a&;om;&mü Text1 Box wGif
Double Click ESdyf&rnf/ xdktcg Program a&;om;&eftqifoifhtajctaeay;vmrnf/
yHk(15)/
yHk(14)
yHk(15)
10uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Text1 Text Box udk Double Click ESdyfí Private Sub Text1_Change() ESifh
End Sub ay:vmygu Procedure List Box udk Change tpm; KeyPress [kajymif;
&rnf/ xdkYaemuf Private Sub Text1_KeyPress(KeyAscii As Integer) ESifh EndSub tMum;wGif atmufyg Program udka&;om;&efjzpfonf/ yHk(16)/
xdkenf;wl Text2 Text Box udk Double Click ESdyfí Private Sub Text2_ChangeESifh End Sub ay:vmygu Procedure List Box udk Change tpm; KeyPress [k
ajymif;&rnf/ xdkYaemuf Private Sub Test2_KeyPress(KeyAscii As Integer) ESifh
End Sub tMum;wGif atmufyg Program udka&;om;&efjzpfonf/ yHk(17)/
4if;zdkifudk odrf;vdkygu Menu Bar ½Sd File udka½G;NyD; Pulldown Menu wGifyg0ifaom
Save Project udka½G;&efjzpfonf/ yHk(18)? xdktcg Save File as Dialog Box ay:vm
rnf/ File Name List Box wGif extest001 [ka&;NyD; Save udk Mouse Left Clickvkyf&rnf/ yHk(19)/
yHk(16)
yHk(17)
11uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(18)
yHk(19)
xdktcg Save Project As Dialog Box ay:vmNyD; File Name List Box wGif
extest1 [ka&;NyD; Mouse Left Click vkyf&rnf/ yHk(20)/ yxrodrf;aomzdkifrSm FormFile, Extension rSm .frm jzpfNyD; 'kwd,trnfjzifhodrf;aomzdkifrSm Visual Basic ProjectFile, Extension rSm .Vbp jzpfygonf/
12uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdktcg Project - Project Dialog Box wGif Project1(extest001.vbp) ESifh Form1(extest001.frm) [líyHk(21)ygtwdkif;jzpfay:vmayrnf/
udk Click vkyfygu extest001 yHkpHay:vmrnfjzpfNyD; 4if; Form
udkydwfvdkufygu Close Button udka½G;&rnf/ yHk(22)/ udk Click vkyfygu
Program a&;om;xm;onfrsm;udkawGU½Sd&rnf/ yHk(23)/
yHk(20)
yHk(21)
13uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(22)
yHk(23)
txufyg Project File jzpfaom extest001 udk Run vdkygu Menu Bar ½Sd Runudka½G;yg/ xdkYaemuf Start udka½G;yg/ yHk(24)? (odkYr[kwf) Short Cut Key (or) ShortHand Key taejzifh Function Key jzpfaom F5 udkESdyfívnf;&Edkifayonf/ (odkYr[kwf)
Menu Bar atmuf½Sd Standard Toolbar rS Icon udk Left Click ESdyfjcif;jzifh
vnf;&Edkifayonf/ xdktcg yHk(25)ygtwdkif; Text Box xJwGif Cursor tqifoifha&muf
½Sdaernf/
yHk(24)
14uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(25)
zm&if;[dkuf'D*&DudkxnfhNyD; <Enter> ESdyfygu pifwD*&dwf'D*&DtajcwGufay;rnf/
pifwD*&dwf'D*&DudkxnfhNyD; <Enter> ESdyfyguvnf; zm&if;[dkuf'D*&DudkwGufay;rnf/ rdrd
BuKdufESpfouf&m Text Box udk*Pef;½dkufxnfhNyD; <Enter> ESdyfEdkifonfhtcGifhta&;½Sdonf/
4if; Form tm;ydwfvdkufygu Form1 \nmzuftay:axmifhwGif½Sdaom Close But-ton udka½G;&rnf/
Visual Basic 6.0 xJrS xGufvdkygu Menu Bar ½Sd File udka½G;NyD; PulldownMenu \atmufqHk;jzpfaom Exit udka½G;&ygrnf/ xdktcg Microsoft Visual BasicDialog Box wpfckay:vmrnf/ Yes udka½G;ygu aemufqHk; Current Project, FormFile wdkYudkodrf;oGm;NyD; Microsoft Visual Basic rSxGufoGm;ayrnf/ No udka½G;ygu
rodrf;bJxGufoGm;ayrnf/ Cancel udka½G;ygu Microsoft Visual Basic 6.0 rSrxGuf
bJ,ciftwdkif;tvkyfvkyfEdkifrnfjzpfygonf/ yHk(26)/
yHk(26)
15uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
½SdNyD;om; extest001 File udkzGifhvdkygu Menu Bar ½Sd File udka½G;yg/ xdktcg
Pulldown Menu ay:vmrnf/ 4if;rS udka½G;yg/ xdktcg OpenProject Dialog Box ay:vmNyD; 4if;rS extest001.vbp udka½G;í Open udk ClickESdyf&efjzpfonf/ yHk(27)/
odkYr[kwf extest001 File udkzGifhvdkygu Menu Bar ½Sd File udka½G;yg/ Exit tay:½Sd
Recent File xJwGif extest001.vbp udka½G;yguvnf; yGifhvmrnfjzpfonf/ yHk(28)/
yHk(27)
16uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(28)
þuJhodkY zdkifzGifhvdkufaomtcg wcgw&H Project File rawGU½Sdygu Menu Bar ½Sd
View udka½G;yg/ 4if;rS Pulldown Menu wpfckjzpfaom Project Explorer udka½G;yg/
odkYr[kwf Short Cut Key jzpfonfh Ctrl+R udkESdyfyg/ yHk(29)/
17uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdktcg yHk(30)wGifazmfjyxm;onfhtwdkif; extest001 Dialog Box ay:vmayrnf/
, wdkYudk toHk;jyKí Project File udkjyefvnfjyKjyifodrf;Edkif
ayonf/
yHk(29)
yHk(30)
18uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Factorial ½Smonfh y½dk*&rfa&;jcif;½Smonfh y½dk*&rfa&;jcif;½Smonfh y½dk*&rfa&;jcif;½Smonfh y½dk*&rfa&;jcif;½Smonfh y½dk*&rfa&;jcif;
atmufygyHk(31)ygtwdkif; Visual Basic wGifzefwD;xm;&rnf/
Title Bar wGif ½kyfyHkESifhwuG Factorial pmom;xnfhoGif;&mwGif Properties ü Form1Form udka½G;yg/ xdkYaemufatmufygwdkYudkjyifqif&ef/ yHk(32)/
yHk(31)
yHk(32)
19uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Caption - FactorialIcon - C:\Program Files\Microsoft Visual Studio\Common\
Graphics\Icon\Misc xJrSoifhawmf&m½kyfyHkudka½G;xnfhjcif;jzpf
onf/
Run ESifh Exit onf Command Button rsm;jzpfMuNyD; 4if;wdkY\oufqdkif&m Prop-erties rsm;udkvnf; atmufygtwdkif;pDrHxm;&rnf? Run Command Button wGif -
Caption - &RunFont - MS Sans Serif, Font Style ® ® ® ® ® Bold, Font Size ® ® ® ® ® 10Exit Command Button wGif -
Caption - E&xitFont - MS Sans Serif, Font Style ® ® ® ® ® Bold, Font Size ® ® ® ® ® 10
Exit Command Button wGifatmufyg Program udka&;om;&ef-
Private Sub Command2_Click()Unload MeEnd
End Sub
Run Command Button wGifatmufyg Program udka&;om;&ef-
Private Sub Command1_Click()' Write a program to find the factorial of a given integer:
N! = 1*2*3*4*5*...*NClsa = Text1kount = 1: k = 1Do While k < a + 1
kount = kount * kk = k +1
loopprint "Requirement Answer = = = > ", kountText2 = kount
End Sub
20uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Factorial Program udka&;om;&mwGif Do ... Loop a&;xHk;udk odoifhonf/ Do ...Loop a&;xHk;rSm atmufygtwdkif;jzpfonf/
Syntax;Do [{While/Until} condition]
[Statements][Exit Do][Statements]
Loop(or)
Do[Statements][Exit Do][Statements]
Loop [{While/Until] condition]
Syntax;Cls ' Clear form background
xyfcg xyfcgtvkyfvkyf&rnfhudpörsm;wGif txufyg Do ... Loop a&;xHk;udktoHk;jyK
onf/ xdktcg Text1 Text Box xJwGif Cursor 0ifaernfjzpfNyD; 4if;wGif *Pef;wpfck
ck½dkufxnfh&rnf/ Oyrm - 4 [k½dkufNyD; Run Command Button udk Click vkyfygu
Private Sub Command1_Click() ESifh End Sub Mum;½Sd Command rsm;udkwpfaMumif;
csif;tvkyfvkyfoGm;rnf/ Cls a&;xHk;rSm Form ay:wGiftjcm;udpörsm;a&;xm;ygu ½Sif;vif;
ypf&efjzpfygonf/ a = Text1 rSm a xJwGif 4 a&muf½Sdvmrnf/ kount = 1 rSm kount xJ
wGif 1 a&muf½Sdvmrnf/ k = 1 rSm k xJwGif 1 udkxnfhxm;rnf/ Do While k<a+1 rSm
,cktcsdefwGif k \wefzdk;rSm 1 jzpfaernf/ a \wefzdk;rSm 4 jzpfaeNyD; 1 jzifhaygif;ygu 5
jzpfrnf/ 1 onf 5 xufi,faeojzifh qufvkyf&efjzpfonf/ xdkYaMumifh k wefzdk;onf 5
xufi,faeoíqufvkyfrnfudkajymjcif;jzpfonf/ k = kount * k rSm kount \wefzdk;rSm
1? k \wefzdk;rSm 1? 4if;ESpfckajr§mufygu 1 om&rnf/ Left Hand Side jzpfaom kountxJwGif 1 a&muf½SdoGm;rnf/ atmufwpfaMumif;qif;vmygu k \wefzdk;rSm 1? 1 jzifh
aygif;aomaMumifh 2 &rnf/ 4if;wefzdk;udk Left Hand Side jzpfaom k xJwGif 2 a&muf½Sd
oGm;rnf/ atmufwpfaMumif;jzpfaom Loop odkYqufrqif;bJ Do While k<a+1 odkYjyef
wufNyD; Condition udkpdppfrnf/ k \wefzdk;rSm ,cktcg 2 jzpfae rnf/ 2 onf 5 xuf
i,faeojzifh atmufwpfaMumif;jzpfaom kount = kount * k odkY qif;vmrnf/ kount
21uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
\wefzdk;onf 1 jzpfNyD; k wefzdk;rSm 2 jzpfaomaMumifh 2 ESifh 1 ajr§mufygu 2 &rnf/
4if; wefzd k; kount xJa&mufoGm;rnf/ atmufwpfaMumif;qif;ygu k = k +1jzpfoGm;ayrnf/ xHkpHtwdkif; Do While k<a+1 odkYjyefwufNyD; Condition udkpdppfayrnf/
k \wefz d k ;r Sm ,cktcg 3 jzp faernf/ 3 onf 5 xufi,faeojzi f h
atmufwpfaMumif;jzpfaom kount = kount * k odkYqif;vmrnf/ kount \wefzdk;onf
2 jzpfNyD; k \wefzdk;rSm 3 jzpfvmaom aMumifh 2 ESifh 3 ajr§mufygu 6 &rnf/ 4if;wefzdk;tm;
kount xJa&mufoGm;rnf/ atmuf wpfaMumif;quf qif;ygu k = k + 1 udkawGUrnf/
k \wefzdk;rSm 3 jzpfí 3 ESifh 1 udk aygif;ygu 4 &rnf/ k \wefzdk;rSm 4 jzpfoGm;ayrnf/
xHk;pHtwdkif; Do While k<a+1 odkYjyefwufNyD; Condition udkpdppfrnf/ k \wefzdk;rSm
,cktcg 4 jzpfaernf/ 4 onf 5 xufi,faeojzifh atmufwpfaMumif;jzpfaMumif;
kount = kount * k odkYqif;vmrnf/ kount \wefzdk;onf 6 jzpfNyD; k \wefzdk;rSm 4
jzpfaomaMumifh 6 ESifh 4 ajr§mufygu 24 &rnf/ 4if;wefzdk; kount xJa&mufoGm;rnf/
atmufwpfaMumif;qufqif;ygu k = k + 1 udkawGUrnf/ k \wefzdk;rSm 4 jzpfí 4 ESifh
1 udkaygif;ygu 5 &rnf/ k \wefzdk;rSm 5 jzpfoGm;ayrnf/ xHk;pHtwdkif; Do Whilek<a+1 odkYjyefwufNyD; Condition udkpdppfrnf/ k \wefzdk;rSm ,cktcg 5 jzpfaernf/ 5
onf 5 xufi,faeojzifh Condition rSm;oGm; ayrnf/ xdktcg Do While ... Loop\ atmufwpfaMumif;jzpfaom Print "Requirement Answer = = = > ", kountodkYqif;vmayrnf/ Form \b,fbufaxmifhwGif "Requirement Answer = = = >pmom;ay:vmNyD; 24 [kazmf jyrnf/ Text2 xJwGifvnf; tajzjzpfaom 24udkazmfjyaernfjzpfonf/
ykpämykpämykpämykpämykpäm-
2 jzifhpm;u 1 <uif;rnf/ 3 jzifhpm;ygu 2 <uif;rnf/ 5 jzifhpm;ygu 4 <uif;rnf/ 72 jzifhpm;u 1 <uif;rnf/ 3 jzifhpm;ygu 2 <uif;rnf/ 5 jzifhpm;ygu 4 <uif;rnf/ 72 jzifhpm;u 1 <uif;rnf/ 3 jzifhpm;ygu 2 <uif;rnf/ 5 jzifhpm;ygu 4 <uif;rnf/ 72 jzifhpm;u 1 <uif;rnf/ 3 jzifhpm;ygu 2 <uif;rnf/ 5 jzifhpm;ygu 4 <uif;rnf/ 72 jzifhpm;u 1 <uif;rnf/ 3 jzifhpm;ygu 2 <uif;rnf/ 5 jzifhpm;ygu 4 <uif;rnf/ 7
jzifhpm;ygu 6 <uif;rnf/ 4if;udef;wefzdk;udk½Sm&ef/jzifhpm;ygu 6 <uif;rnf/ 4if;udef;wefzdk;udk½Sm&ef/jzifhpm;ygu 6 <uif;rnf/ 4if;udef;wefzdk;udk½Sm&ef/jzifhpm;ygu 6 <uif;rnf/ 4if;udef;wefzdk;udk½Sm&ef/jzifhpm;ygu 6 <uif;rnf/ 4if;udef;wefzdk;udk½Sm&ef/
atmufazmfjyyg yHk(33)ygtwdkif; Visual Basic wGifzefwD;xm;yg&ef/
yHk(33)
22uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Exit Command Button wGifatmufyg Program udka&;om;&ef-
Private Sub Command2_Click()Unload MeEnd
End SubRun Command Button wGifatmufyg Program udka&;om;&ef-
Private Sub Command1_Click()a = 1: Check = TrueDo ' While Check = True
If a Mod 2 = 1 And a Mod 3 = 2 And a Mod 5 = 4And a Mod 7 = 6 ThenExit Do ' Exit Inner Loop
Elsea = a + 1
End IfLoop Until Check = False 'Exit Outer Loop ImmediatelyPrint "Requirement Answer = > ", aText1 = a
End Subtxufyg Program udk Run ygu tajzonf 209 &rnf/ 4if; Program udka&;&m
wGif Mod (Modulus) Operator a&;xHk;udk odoifhonf/
Syntax;result = number1 Mod number2A = 7 Mod 4, A ®®®®® 3A = 7 Mod 3, A ®®®®® 1
Mod onf Operator jzpfonf/
23uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Prime Number udk½Smjcif;udk½Smjcif;udk½Smjcif;udk½Smjcif;udk½Smjcif;
atmufygyHk(34)ygtwdkif; Visual Basic wGifzefwD;xm;&rnf -
Exit Command Button wGifatmufyg Program udka&;om;&ef-
Private Sub Command2_Click()Unload MeEnd
End SubRun Command Button wGifatmufyg Program udka&;om;&ef-
Private Sub Command1_Click()'To determine whether the given number is Prime NumberClsmp = Text1mc = 2Do While Not (mp Mod mc = 0 And mc <= mp)
mc = mc + 1LoopPrint: PrintPrint "MP ", mpPrint "MC ", mcIf Text1 = mc Then
PrintPrint mp, " is a Prime Number."
ElsePrintPrint mp, " does not Prime Number."
End IfEnd Sub
yHk(34)
24uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
tu,fírdrdpdwfBuKduf*Pef;udk½dkufoGif;NyD; 2 ESifh rdrd½dkufoGif;onfh *Pef;Mum; PrimeNumber ta&twGufudk½Smvdkygu yHk(35)ygtwdkif; zefwD;wnfaqmuf&ef -
Exit Command Button wGifatmufyg Program udka&;om;&ef-
Private Sub Command2_Click()Unload MeEnd
End SubRun Command Button wGifatmufyg Program udka&;om;&ef-
Private Sub Command1_Click()Clsd = 1pp = 2zz = Val(Text1)Do While pp < zz
mc = 2Do While Not (pp Mod mc = 0 And mc <= pp)
mc = mc + 1LoopIf mc = pp Then
d = d + 1Print mc;
End Ifpp = pp + 1
LoopText2 = d - 1
End Sub- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(35)
25uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
tcef;(2)tcef;(2)tcef;(2)tcef;(2)tcef;(2)
Menu wnfaqmufjcif;wnfaqmufjcif;wnfaqmufjcif;wnfaqmufjcif;wnfaqmufjcif;
Menu wnfaqmuf&mwGif Menu Bar rS Tools Menu udka½G;yg/ xdkYaemuf
Pulldown Menu xJrS Menu Editor ... udka½G;yg/ yHk(36)/ xdktcg Menu EditorDialog Box wpfckay:vmrnf/ yHk(37)/
Caption nmzuf½Sd Box wGif &Options [ka&;&ef/ Name nmzuf½Sd Box wGif
Options [ktrnfowfrSwf&ef/ xdktcg atmufzuf½Sd List Box wGif yHk(38)ygtwdkif;
jzpfay:vmrnf/
yHk(36)
yHk(37)
26uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
txufygyHk(38)wGif OK udk Mouse Left Click vkyfygu yHk(39)ygtwdkif;jzpfay:vm
rnf/ 4if;onf Menu Bar jzpfonf/
yHk(38)
yHk(39)
27uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdkYaemuf Pulldown Menu rsm;udkqufvufzefwD;&rnf/ Menu Bar rS ToolsMenu udkjyefa½G;yg/ xdkYaemuf Pulldown Menu xJrS Menu Editor ... udka½G;yg/
xdktcg Menu Editor Dialog Box jyefvnfay:vmrnf/ Command Button wpfckjzpf
aom udka½G;yg/ xdkYaemuf Caption List Box ü &Test Buttons udkjznfhpGuf
yg/ Name List Box ü TestButtons udkjznfhpGufNyD; udka½G;yg/ TestButtons udkuyfí
a&;&rnf/ Test ESifh Buttons udkcGgíra&;&yg/ yHk(40) wGifazmfjyxm;onfhtwdkif;jzpfvm
ygu OK udk Click vkyfyg/
xdktcg yHk(41)wGifazmfjyxm;ouJhodkY Test Buttons onf Pulldown Menu (or)Dropdown Menu wpfckjzpfvmrnf/
yHk(40)
28uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
txufygenf;twdkif; Caption List Box wGif &Word Warp and Autosize,&Check Box, &Number System, &List Box wdkYESifh Name List Box wGif
WordWrapandAutosize, CheckBox, NumberSystem, ListBox wdkYudkjznfhpGufNyD;
OK udk Left Click vkyfygu yHk(42)wGifjrif&onfhtwdkif; Pulldown Menu (or)Dropdown Menu rsm;toD;oD;jzpfvmrnf/
yHk(41)
yHk(42)
29uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Pulldown Menu wpfckjzpfaom List Box udk Mouse Left Click ESdyfygu aemuf
xyf Sub-Menu wpfckay:xGufapvdkygu Menu Editor ... udkjyefac:í
udka½G;yg/ xdkYaemuf udka½G;yg/ Caption List Box wGif N&umber, T&ext wdkYESifh
Number List Box wGif Number, Text wdkYudkjznfhpGufNyD; OK udk Mouse Left Clickvkyfygu yHk(43)wGif jrif&onfhtwdkif; Pulldown Menu (or) Dropdown Menu rsm;
toD;oD;jzpfvmrnf/
tqdkyg Pulldown Menu wpfckjzpfaom List Box onf Word Wrap andAutosize ESifh Check Box Mum;wGif ae&mjyefvnfajymif;a½TUvdkygu Menu Bar ½Sd
Tools udka½G;yg/ Dropdown Menu wpfckjzpfaom Menu Editor ... udkjyefvnfa½G;yg/
...&Check Box udka½G;í Dropdown Arrow jzifhatmufqHk;udk a&mufatmifa½TU&ef/
xdkenf;wl ...&Number System udkvnf; atmufqHk;odkYa&mufatmifa½TUNyD; OK udk
Click vkyfjcif;jzifh &½SdEdkifayonf/ yHk(44)? xdktcg yHk(45)ygtwdkif; Menu ajymif;vJoGm;ay
rnf/
yHk(43)
30uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Form1 Menu xJrSxGuf&ef Command Button jzifh Exit udkzefwD;í xHk;pHtwdkif;
y½dk*&rfa&;om;&rnf/ yHk(46)/
Private Sub Command1_Click() Unload Me EndEnd Sub
yHk(44)
yHk(45)
31uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Pulldown Menu wpfckjzpfaom wpfckjzpfaom wpfckjzpfaom wpfckjzpfaom wpfckjzpfaom Test Buttons udka½G;ygujzpfvmrnfh udka½G;ygujzpfvmrnfh udka½G;ygujzpfvmrnfh udka½G;ygujzpfvmrnfh udka½G;ygujzpfvmrnfh Program udkudkudkudkudk
a&;om;jcif;a&;om;jcif;a&;om;jcif;a&;om;jcif;a&;om;jcif;
Pulldown Menu wpfckjzpfaom Test Buttons udka½G;ygu 4if;ESifhvdkuavsmnDaxG
jzpfap&ef Form wpfck Insert jyKvkyfí vdktyfaomy½dk*&rfrsm;a&;om;&rnf/ Formwpfckudk Insert jyKvkyfvdkygu Menu Bar ½Sd Project udka½G;yg/ xdkYaemuf PulldownMenu jzpfaom Add Form udk a½G;&efjzpfonf/ yHk(47)/
yHk(46)
yHk(47)
32uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Form2 jzpfay:vmygu yHk(48)ygtwdkif;wnfaqmuf&efjzpfonf/
Command Button wpfckjzpfaom Change Signal wGif atmufygy½dk*&rfudka&;om;
&rnf-
Private Sub Command1_Click()ChangeSignal
End Sub
Command Button aemufwpfckjzpfaom Close wGif atmufygy½dk*&rfudka&;om;
&rnf-
Private Sub Command2_Click()Form2.HideForm1.Show
End Sub
Command1 wGifa&;om;xm;aomy½dk*&rfrSm wdkuf½dkuf Run aomy½dk*&rfjzpfojzifh
4if;y½dk*&rfudk qufvufa&;om;&ef vdktyfygonf/ yHk(49)/
Pulldown Menu wpfckjzpfaom Test Button udk Click vkyfyg/ 4if;wGif Form2udk vSrf;íac:aom y½dk*&rfudka&;om;&rnf/
Private Sub TestButtons_Click() Form2.ShowEnd Sub
yHk(48)
33uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Form2 \ General wGifatmufygy½dk*&rfudk xyfrHa&;om;&rnf -
Word Wrap and Autosize (Pulldown Menu) twGuf twGuf twGuf twGuf twGuf Program a&;om;jcif;a&;om;jcif;a&;om;jcif;a&;om;jcif;a&;om;jcif;
Pulldown Menu wpfckjzpfaom Word Wrap and Autosize Button udka½G;ygu
4if;ESifhvdkufavsmnDaxGjzpfap&ef aemufxyf Form wpfckzefwD;í vdktyfaomy½dk*&rf
rsm;a&;om;&rnf/ yHk(50)/
Form3 udkatmufygtwdkif;wnfaqmuf&rnf? yHk(51)/
yHk(49)
yHk(50)
yHk(51)
34uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(51)yg Form wGif , ESifh wdkYudkoHk;xm;
ygonf/ Check1 wGif Auto Size ESifh Check2 wGif Word Wrap wdkYudkowfrSwfxm;yg
onf/ 4if;wdkYudk atmufygtwdkif; y½dk*&rfrsm;a&;om;&rnf/
Private Sub Check1_Click() If Check1.Value = 1 Then Label1.AutoSize = True Else Label1.AutoSize = False Label1.Height = 300 Label1.Width = 2000 End IfEnd SubPrivate Sub Check2_Click() If Check2.Value = 1 Then Label1.WordWrap = True Label1.AutoSize = True Else Label1.WordWrap = False Label1.Height = 300 Label1.Width = 2000 End IfEnd SubPrivate Sub Command1_Click() Form3.Hide Form1.ShowEnd Sub
List Box (Pulldown Menu) twGuf twGuf twGuf twGuf twGuf Program a&;om;jcif;a&;om;jcif;a&;om;jcif;a&;om;jcif;a&;om;jcif;
List Box udka½G;vdkufygu Sub-Menu wpfckxyfrHay:vmrnf/ 4if;wdkYrSm Num-ber, Text wdkYjzpfMuonf/ Number udka½G;ygu Number ESifhywfoufaom Form wpfck
ay:&efESifh vdktyfaomy½dk*&rfrsm;a&;om;&rnf/ yHk(52)/
35uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(53)
tqdkyg Form yHkpHwGif tpDtpOfrsm;udk Run Edkif&eftwGuf atmufygtwdkif;jyifqif
&rnf/
txufygyHk(53)udkzefwD;&mwGif , , ESifh
wdkYudkoHk;xm;ygonf/ txufyg Form yHkpHtm; Run í&Edkifap&ef atmufyg
y½dk*&rfrsm;udk a&;om;&rnf-
Add Command Button wGifatmufyg Program udka&;om;&ef-
Private Sub Command1_Click()List1.AddItem Text1.TextText1.Text = ""
yHk(52)
36uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Text1.SetFocusLabel3.Caption=List1.ListCount
End SubRemove Command Button wGifatmufyg Program udka&;om;&ef-
Private Sub Command2_Click()Dim Ind As IntegerInd = List1.ListIndexIf Ind >= 0 Then
List1.RemoveItem IndLabel3.Caption = List1.ListCount
ElseBeep
End IfCommand2.Enabled = (List1.ListIndex <> -1)
End SubClear Command Button wGifatmufyg Program udka&;om;&ef-
Private Sub Command3_Click()List1.ClearCommand2.Enabled = FalseLabel3.Caption = List1.ListCount
End SubClose Command Button wGifatmufyg Program udka&;om;&ef-
Private Sub Command4_Click()Unload Me
End SubList Box (Single Click) twGuf
Private Sub List1_Click()Command2.Enabled = (List1.ListIndex <> -1)
End SubList Box (Double Click) twGuf
Private Sub List1_DblClick()Command2.Value = True
End Sub
37uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Text1, Add Command Button wdkYtwGuf
Private Sub Text1_Change()Command1.Enabled = (Len(Text1.Text)>0)
End SubText udka½G;ygu Text ESifhywfoufaom Form wpfckay:&ef Form wpfckudkzefwD;
ívdktyfaomy½dk*&rfrsm;a&;om;&rnf/ yHk(54)/
txufygyHk(54)udkzefwD;&mwGif , , ESifh
wdkYudkoHk;xm;ygonf/ txufyg Form yHkpHwGif tpDtpOfrsm;udk Run Edkif&eftwGuf atmufygtwdkif; y½dk*&rfrsm;udk a&;om;&rnf/ yHk(55)/
yHk(54)
yHk(55)
38uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Add Command Button wGifatmufyg Program udka&;om;&ef-
Private Sub Command1_Click()List1.AddItem Text1.TextText1.Text = ""Text1.SetFocusLabel3.Caption=List1.ListCount
End SubRemove Command Button wGifatmufyg Program udka&;om;&ef-
Private Sub Command2_Click()Dim Ind As IntegerInd = List1.ListIndexIf Ind >= 0 Then
List1.RemoveItem IndLabel3.Caption = List1.ListCount
ElseBeep
End IfCommand2.Enabled = (List1.ListIndex <> -1)
End SubClear Command Button wGifatmufyg Program udka&;om;&ef-
Private Sub Command3_Click()List1.ClearCommand2.Enabled = FalseLabel3.Caption = List1.ListCount
End SubClose Command Button wGifatmufyg Program udka&;om;&ef-
Private Sub Command4_Click()Unload Me
End SubList Box (Single Click) twGuf
Private Sub List1_Click()Command2.Enabled = (List1.ListIndex <> -1)
End Sub
39uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
List Box (Double Click) twGuf
Private Sub List1_DblClick()Command2.Value = True
End SubText1, Add Command Button wdkYtwGuf
Private Sub Text1_Change()Command1.Enabled = (Len(Text1.Text)>0)
End Sub
Check Box (Pulldown Menu) twGuf twGuf twGuf twGuf twGuf Program a&;om;jcif;a&;om;jcif;a&;om;jcif;a&;om;jcif;a&;om;jcif;
Pulldown Menu wpfckjzpfaom Check Box udka½G;ygu 4if;ESifhvdkufavsmnDaxGjzpf
ap&ef aemufxyf Form wpfckzefwD;í vdktyfaomy½dk*&rf rsm;a&;om;&rnf/ yHk(56)/
tqdkyg Form yHkpHwGif tpDtpOfrsm;udk Run Edkif&ef twGuf atmufygtwdkif; jyifqif&
rnf/ yHk(57)/ , , ESifh wdkYudk
oHk;xm;ygonf/
yHk(56)
40uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(57)
txufyg yHk(57)tm; Run í &Edkifap&ef atmufygy½dk*&rfrsm;udka&;om;&rnf/
Check1 wGifatmufyg Program udka&;om;&ef-
Private Sub Check1_Click() Dim a1 As Font Set a1 = Text1.Font If Check1.Value = 1 Then a1.Bold = True Else a1.Bold = False End IfEnd SubCheck2 wGifatmufyg Program udka&;om;&ef-
Private Sub Check2_Click() Dim a1 As Font Set a1 = Text1.Font If Check2.Value = 1 Then a1.Italic = True
41uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Else a1.Italic = False End IfEnd SubCheck3 wGifatmufyg Program udka&;om;&ef-
Private Sub Check3_Click() Dim a1 As Font Set a1 = Text1.Font If Check3.Value = 1 Then a1.Underline = True Else a1.Underline = False End IfEnd SubCheck4 wGifatmufyg Program udka&;om;&ef-
Private Sub Check4_Click() Dim a1 As Font Set a1 = Text1.Font If Check4.Value = 1 Then a1.Strikethrough = True Else a1.Strikethrough = False End IfEnd SubClose Command Button wGifatmufyg Program udka&;om;&ef-
Private Sub Command1_Click() Unload MeEnd Sub
42uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Number System (Pulldown Menu) twGuf twGuf twGuf twGuf twGuf Program a&;om;jcif;a&;om;jcif;a&;om;jcif;a&;om;jcif;a&;om;jcif;
Pulldown Menu wpfckjzpfaom Number udka½G;ygu 4if;ESifhvdkufavsmnDaxGjzpf
ap&ef aemufxyf Form wpfckzefwD;í vdktyfaomy½dk*&rfrsm;a&;om;&rnf/ yHk(58)/
tqdkyg Form yHkpHwGif tpDtpOfrsm;udk Run Edkif&eftwGuf atmufygtwdkif;jyifqif
&rnf/ yHk(59)/
txufyg , , ESifh wdkYudk
oHk;xm;ygonf/ 4if; Form yHkpHwGif Run í&Edkifap&ef vdktyfaomy½dk*&rfrsm;udk a&;om;
&rnf/
yHk(58)
yHk(59)
43uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
General, Declarations wGifatmufyg Program udka&;om;&ef-
Dim a As IntegerClose Command Button wGifatmufyg Program udka&;om;&ef-
Private Sub Command1_Click() Unload MeEnd SubOption1 wGifatmufyg Program udka&;om;&ef-
Private Sub Option1_Click() Label2.Caption = Format(a)End SubOption2 wGifatmufyg Program udka&;om;&ef-
Private Sub Option2_Click() Label3.Caption = Oct(a)End SubOption3 wGifatmufyg Program udka&;om;&ef-
Private Sub Option3_Click() Label4.Caption = Hex(a)End SubText1 wGifatmufyg Program udka&;om;&ef-
Private Sub Text1_Change() a = Val(Text1.Text)End Sub
Options Menu wGif xyfrHí Multiple Column List Box, Scroll Bars, Con-trol Array wdkYudkzefwD;&ef/ yHk(60)/
yHk(60)
44uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Multiple Column List Box (Pulldown Menu) twGuf twGuf twGuf twGuf twGuf Program a&;om;jcif;a&;om;jcif;a&;om;jcif;a&;om;jcif;a&;om;jcif;
Pulldown Menu wpfckjzpfaom Multiple Column List Box udka½G;ygu 4if;ESifh
vdkufavsmnDaxGjzpfap&ef aemufxyf Form wpfckzefwD;í vdktyfaomy½dk*&rfrsm;a&;om;
&rnf/ yHk(61)/
tqdkyg Form yHkpHwGif tpDtpOfrsm;udk Run Edkif&eftwGuf atmufygwdkif; jyifqif
&rnf/yHk(62)/
tqdkygyHk(62)udk zefwD;&mwGif ESifh wdkYudkoHk;xm;
ygonf/
List1 List Box \ Properties wGif atmufygwdkYudkjyifqifxm;½Sd&rnf -
Columns - 2MultiSelect - 2 - Extended
yHk(61)
yHk(62)
45uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(62)yg Form yHkpHtm; Run í&Edkifap&ef atmufygy½dk*&rfrsm;udka&;om;&rnf/
Transfer Command Button twGuf
Private Sub Command1_Click()For n = 0 To (List1.ListCount - 1)
If List1.Selected(n) = True Then ' If selected then add to the bottomlist.
List2.AddItem List1.List(n)End If
NextCommand2.Enabled = True'An item is now in the bottom list, so enable the clear button.
End SubClear Command Button twGuf
Private Sub Command2_Click() List2.Clear Command2.Enabled = FalseEnd SubClose Command Button twGuf
Private Sub Command3_Click() Unload MeEnd SubForm Load twGuf
Private Sub Form_Load() 'Note that the Sorted property of list is True, so adding 'items in alphabetical order is not actually necessary. List1.AddItem "Yangon" List1.AddItem "Myeik" List1.AddItem "Bagan" List1.AddItem "Kalaw" List1.AddItem "Meiktila" List1.AddItem "North Okkalapa" List1.AddItem "Mingaladom" List1.AddItem "South Okkalapa" List1.AddItem "North Dagon"
46uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
List1.AddItem "South Dagon" List1.Selected(1) = TrueEnd SubList1 List Box Double Click twGuf
Private Sub List1_DblClick() Command1.Value = True 'A user clicked the Transfer button.End Sub
Scroll Bars (Pulldown Menu) twGuf twGuf twGuf twGuf twGuf Program a&;om;jcif;a&;om;jcif;a&;om;jcif;a&;om;jcif;a&;om;jcif;
Pulldown Menu wpfckjzpfaom Scroll Bars udka½G;ygu 4if;ESifhvdkufavsmnDaxG
jzpfap&ef Form wpfckzefwD;í vdktyfaomy½dk*&rfrsm;a&;om;&rnf/ yHk(63)/
tqdkyg Form yHkpHwGif tpDtpOfrsm;udk Run Edkif&eftwGuf yHk(64)ygtwdkif;jyifqif
&rnf/ , , ESifh wdkYudkoHk;xm;
ygonf/
yHk(63)
yHk(64)
47uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Function wpfckjzpfaom wpfckjzpfaom wpfckjzpfaom wpfckjzpfaom wpfckjzpfaom DoColor twGuftwGuftwGuftwGuftwGuf
yHk(65)wGifazmfjyxm;ygonf/
Close Command Button twGuf
Private Sub Command1_Click()Unload Me
End SubRed Horizontal Scroll Bar twGuf
Private Sub HScroll1_Change()HScroll1_Scroll 'Call the event procedure directly.
End SubPrivate Sub HScroll1_Scroll() DoColorEnd SubGreen Horizontal Scroll Bar twGuf
Private Sub HScroll2_Change() HScroll2_Scroll 'Call the event procedure directly.End SubPrivate Sub HScroll2_Scroll() DoColorEnd Sub
yHk(65)
48uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Blue Horizontal Scroll Bar twGuf
Private Sub HScroll3_Change() HScroll3_Scroll 'Call the event procedure directly.End SubPrivate Sub HScroll3_Scroll() DoColorEnd Sub
Menu Bar aemufwpfckxyfrHjyKvkyfjcif;aemufwpfckxyfrHjyKvkyfjcif;aemufwpfckxyfrHjyKvkyfjcif;aemufwpfckxyfrHjyKvkyfjcif;aemufwpfckxyfrHjyKvkyfjcif;
yHk(66)ygyHkwGif Menu wpfckom½SdNyD; Menu rSxGufcGgvdkygu Command ButtonwpfckudktoHk;jyKí xdk Command Button udk Click jyKvkyfjcif;jzifh xGufcGgEdkifayonf/
þuJhodkY Menu rSxGufcGgvdkonfh aemufxyf Menu Bar wpfckwnfaqmufvdkygu Toolsudka½G;yg/ xdkYaemuf Pulldown Menu wpfckjzpfaom Menu Editor ... udka½G;yg/
xdktcg yHk(67)ygtwdkif; Menu Editor ay:vmrnf/ 4if; ...&Scroll Bars wGif
Active jzpfatmifxm;í Next Command Button udka½G;yg/ xdkYaemuf Caption wGif
E&xit, Name wGif Exit [kjznfhpGufí Left Arrow Button tm;a½G;ygu ...E&xitonf E&xit jzpfoGm;ayrnf/ a½SUqHk;rSOD;aqmifonfh ... aysmufoGm;ayrnf/ xdkYaemuf
Exit \atmufwGif½Sdaom Pulldown Menu rsm;tm; qufvufzefwD;&efjzpfonf/ yHk(67)?
yHk(68)/
yHk(66)
49uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(67)
yHk(68)
50uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdktcg yHk(69)ygtwdkif; Menu rsm;ajymif;vJoGm;ayrnf/ Exit Command But-ton tm;zsufypf&rnf/
txufygyHk(69)yg Pulldown Menu wpfckjzpfaom Quit tm; Double Click ESdyf
íatmufygy½dk*&rftm;a&;om;&rnf -
Pulldown Menu wpfckjzpfaom wpfckjzpfaom wpfckjzpfaom wpfckjzpfaom wpfckjzpfaom Quit twGuftwGuftwGuftwGuftwGuf
Private Sub Quit_Click()Unload MeEnd
End Sub- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
txufyg y½dk*&rfrsm;udka&;&eftwGuf atmufyga&;xHk;rsm;udk od½Sd&efvdktyfygonf/
Syntax;Val(<String>)String wpfcktm; wGufícsufí&aom wefzdk;wpfcktjzpf ajymif;vJay;onf/
Oyrm -
MyValue = Val("2457") ' Returns 2457MyValue = Val(" 2 45 7") ' Returns 2457MyValue = Val("24 and 57") ' Returns 24
Syntax;If <Condition> Then <Statements>[Else <Statements>]End If
yHk(69)
51uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
(Or)If <Condition> Then
[<Statements>]ElseIf <Conditon-n> Then
[<Statements>]] ...[Else
<Statements>]]End If
Oyrm -
Number = 53 'Initialize VariableIf Number < 10 Then
Digits = 1ElseIf Number < 100 Then
'Condition evaluates to True so the next statement is executed.Digits = 2
ElseDigits = 3
End IfSyntax;
<Object>.AddItem item, index<Object>.Clear<Object>.RemoveItem index
Oyrm -
Private Sub Form_Click()Dim Entry, I, Msg 'Declare variables.Msg = "Choose OK to add 100 items to your list box."MsgBox Msg 'Display message.For I = 1 To 100 'Count from 1 to 100.
Entry = "Entry " & I 'Create entry.List1.AddItem Entry 'Add the entry.
Next IMsg = "Choose OK to remove every other entry."MsgBox Msg 'Display message.
52uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
For I = 1 To 50 'Determine how toList1.RemoveItem I 'Remove every other
Next I 'Item.Msg = "Choose OK to remove all items from the list box."MsgBox Msg 'Display message.List1.Clear 'Clear list box.
End SubSyntax;
<Object>.Bold [=boolean]<Object>.Italic [=boolean]<Object>.Underline [=boolean]<Object>.Strikethrough [=boolean]
Oyrm -
Private Sub Form_Click()Font.Bold = Not Font.Bold 'Toggle bold.Font.StrikeThrough = Not Font.StrikeThrough 'Toggle StrikethroughFont.Italic = Not Font.Italic 'Toggle italicFont.Underline = Not Font.Underline 'Toggle underlineFont.Size = 16 'Set size propertyIf Font.Bold then
Print "Font weight is " & Font.Weight & " (bold)."Else
Print "Font weight is " & Font.Weight & " (not bold)."End If
End IfSyntax;
Oct(<Number>)Oyrm -
MyOct = Oct(4) 'Returns 4MyOct = Oct(8) 'Returns 10MyOct = Oct(459) 'Returns 713Syntax;
Hex(<Number>)Oyrm -
MyHex = Hex(5) 'Returns 5
53uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
MyHex = Oct(8) 'Returns AMyHex = Oct(459) 'Returns 1CBSyntax;
Format(expression[,format[,firstdayofweek [,firstweekofyear]]])Oyrm -
MyTime = #17:04:23#MyDate = #January 27, 1993#'Returns current system time in the system-defined long time format.MyStr = Format(Time, "Long Time")MyStr = Format(MyTime, "h:m:s") 'Returns "17:4:23"MyStr = Format(MyTime, "hh:mm:ss AMPM")'Returns "05:04:23 PM"MyStr = Format(MyDate, "dddd, mmm d yyyy")'Returns "Wednesday, Jan 27 1993"'If format is not supplied, a string is returned.MyStr = Format(23) 'Returns "23".'User-defined formats.MyStr = Format(5459.4, "##,##0.00") 'Returns "4,459.40".MyStr = Format(334.9,"###0.00") 'Returns "334.90".MyStr = Format(5, "0.00%") 'Returns "500.00%".MyStr = Format("HELLO", "<") 'Returns "hello".MyStr = Format("This is it", ">") 'Returns "THIS IS IT".Syntax;
<Object>.BackColor [=color]<Object>.ForeColor [=color]
Oyrm -
Private Sub Form_Load()Timer1.Interval = 500
End SubPrivate Sub Timer1_Timer()
BackColor = QBColor(Rnd * 15)ForeColor = QBColor(Rnd * 10)Picture1.BackColor = QBColor(Rnd * 15)Picture1.ForeColor = QBColor(Rnd * 10)
End Sub
54uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Syntax;RGB(red, green, blue)Red, Green, Blue wefzdk;rsm;onf 0 ESifh 0255 Mum;½SdMuonf/
Oyrm -
Red = RGB(255, 0, 0) 'Return the value for Red.I = 75 'Initialize offset.RGBValue = RGB(I, 64 + I, 128 + I)'Same as RGB(75, 139, 203).MyObject.Color = RGB(255, 0, 0)'Set the Color property of MyObject to Red.Color Red Value Green Value Blue ValueBlack 0 0 0Blue 0 0 255Green 0 255 0Cyan 0 255 255Red 255 0 0Magenta 255 0 255Yellow 255 255 0White 255 255 255
Syntax;<Object>.ListCount<Object>.ListIndex [=index]<Object>Selected(index) [=boolean]
Oyrm(1) -
Dim Player(0 To 2)Dim Salary(0 To 2)Private Sub Form_Load()
Dim I 'Declare Variable.AutoSize = TruePlayer(0) = "Miggey McMoo" 'Enter data into arrays.Player(1) = "Alf Hinshaw"Player(2) = "Woofer Dean"Salary(0) = "$234,500"Salary(1) = "$158,900"
55uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Salary(2) = "$1,030,500"For I = 0 To 2 'Add names to list.
Combo1.AddItem Player(I)Next ICombo1.ListIndex = 0 'Display first item in list.
End Sub
Private Sub Combo1_Click()'Display corresponding salary for name.Label1.Caption = Salary(Combo1.ListIndex)
End Sub
Oyrm(2) -
Private Sub Form_Load()Dim I 'Declare Variable.'Fill the list box with screen font names.For I = 0 To Screen.FontCount - 1
List1.AddItem Screen.Fonts(I)Next I
End Sub
Private Sub Command1_Click()Dim I 'Declare Variable.'Clear all items from the list.List2.Clear'If an item is selected, add it to List2.For I = 0 To List1.ListCount - 1
If List1.Selected(I) ThenList2.AddItem List1.List(I)
End IfNext I
End Sub
56uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Syntax;Load <Object>Unload <Object>
Oyrm -
Private Sub Form_Click()Dim Answer.Msg 'Declare VariableUnload Form1Msg = "Form1 has been unloaded. Choose Yes to load and "Msg = Msg & "display the form. Choose No to load the form "Msg = Msg & "and leave it invisible."Answer = MsgBox(Msg, 4) 'Get user response.If Answer = 6 Then 'Evaluate answer.
Show 'If Yes, show form.Else
Load Form1 'If No, just load it.Msg = "Form1is now loaded. Choose OK to display it."MsgBox Msg 'Display message.Show 'Show form.
End IfEnd Sub
Syntax;<Object>.Hide<Object>.Show
Oyrm -
Private Sub Form_Click()Dim Answer.Msg 'Declare VariableHideMsg = "Choose OK to make the form reappear."MsgBox Msg 'Display message.Show 'Show form again.
End Sub
57uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Syntax;<Object>.Enabled [=boolean]<Object>.Visible [=boolean]<Object>.SetFocus
Oyrm -
Private Sub Form_Click()Text1.Text = "" 'Clear the text box.Command1.Caption = "Save" 'Put caption on button.
End Sub
Private Sub Text1_Change()If Text1.Text = "" Then 'See if text box is empty.
Command1.Enabled = False 'Disable button.Else
Command1.Enabled = True 'Enable button.End If
End Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
58uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
tcef;(3)tcef;(3)tcef;(3)tcef;(3)tcef;(3)
Graphic rsm;udk rsm;udk rsm;udk rsm;udk rsm;udk Windows yHkpHtwdkif;½SmazGjcif;yHkpHtwdkif;½SmazGjcif;yHkpHtwdkif;½SmazGjcif;yHkpHtwdkif;½SmazGjcif;yHkpHtwdkif;½SmazGjcif;
atmufyg yHk(70)ygtwdkif; Visual Basic 6.0 wGifzefwD;&ef/
yHk(70)yg Form wGif(1)udk File List Box jzifhzefwD;xm;NyD;(2) tm;
Drive List Box jzifhzefwD;xm;ygonf/(3)udk Label jzifhzef
wD;xm;NyD;(4)tm; Dir List Box jzifhzefwD;xm;onf/(5)udk Command
Button jzifhzefwD;xm;í(6)udk Image jzifhzefwD;xm;ygonf/
File1 File List Box \ Properties wGifatmufygtwdkif;jyifqif&ef-
Pattern = *.bmp;*.wmf;*.pic;*.jpg;*.ico;*.gifLabel1 Label \ Properties wGif atmufygtwdkif;jyifqif&ef-
Border Style = Fixed SingleImage1 Image \ Properties wGif atmufygtwdkif;jyifqif&ef-
Border Style = Fixed SingleStretch = TrueCommand1 Command Button \ Properties wGif atmufygtwdkif;jyifqif&ef-
Caption = E&xit
yHk(70)
(1)
(2)
(3)
(4)
(5)
(6)
59uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
wpfzufygtwdkif; Properties rsm;udk jyifqifjznfhpGufNyD;ygu oufqdkif&mtydkif;vdkuf
atmufygtwdkif; y½dk*&rfrsm;a&;om;&efjzpfygonf/
Command Button jzpfaomjzpfaomjzpfaomjzpfaomjzpfaom Exit twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click() Unload Me EndEnd SubDirectory List Box twGuftwGuftwGuftwGuftwGuf
Private Sub Dir1_Change() File1.Path = Dir1.Path 'Update FilesEnd SubDrive List Box twGuftwGuftwGuftwGuftwGuf
Private Sub Drive1_Change() Dir1.Path = Drive1.Drive 'Update Directory PathEnd SubFile List Box twGuf (twGuf (twGuf (twGuf (twGuf (Single Click)))))Private Sub File1_Click() Label1 = File1End SubFile List Box twGuf (twGuf (twGuf (twGuf (twGuf (Double Click)))))Private Sub File1_DblClick() If Right(File1.Path, 1) <> "\" Then Label1.Caption = File1.Path & "\" & File1.FileName Else Label1.Caption = File1.Path & File1.FileName End If Form1.Image1.Picture = LoadPicture(Label1.Caption)End SubForm twGuftwGuftwGuftwGuftwGuf
Private Sub Form_Load() Drive1.Drive = App.Path Dir1.Path = App.PathEnd Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
60uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
wpfzufygy½dk*&rfrsm;udka&;&eftwGuf atmufyga&;xHk;rsm;udk od½Sd&efvdktyfygonf-
Syntax;<Object>.Drive [=drive]
Oyrm -
Private Sub Drive1_Change()Dir1.Path = Drive1.Drive 'When drive changes, set directory path.
End Sub
Private Sub Dir1_Change()File1.Path = Dir1.Path 'When directory changes, set file path.
End SubSyntax;
<Object>.FileName [=pathname]Oyrm
Private Sub Dir1_Change()File1.Path = Dir1.Path 'Set File1 path.
End SubPrivate Sub File1_PathChange()
Dir1.Path = File1.Path 'Set Dir1 path.End SubPrivate Sub File1_DblClick()
'Display the selected filename when double-clicked.Label1.Caption = "Your selection: " + UCase(File1.FileName)
End SubSyntax;
<Object>.Path [=pathname]Oyrm
Private Sub Drive1_Change()Dir1.Path = Drive1.Drive 'Set directory path.
End SubPrivate Sub Dir1_Change()
File1.Path = Dir1.PathEnd Sub
61uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Syntax;LoadPicture([stringexpression])
Oyrm
Private Sub Form_Click()Dim Msg 'Declare Variables.On Error Resume Next 'Set up error handling.Height = 3990: Width = 4890 'Set Height and Width.Picture = LoadPicture("PAPER.BMP")If Err Then
Msg = "Couldn't find the .BMP file."MsgBox Msg 'Display error message.Exit Sub
End IfMsg = "Choose OK to clear the bitmap from the form."MsgBox MsgPicture = LoadPicture() 'Clear form.
End SubSyntax;
<Object>.Picture [=picture]Oyrm
Private Sub Form_Load()'Load the icons.Picture1.Picture = LoadPicture("icons\computer\trash02a.ico")Picture2.Picture = LoadPicture("icons\computer\trash02b.ico")
End Sub- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
62uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Timer jzifhtcsdefudkzefwD;jcif;jzifhtcsdefudkzefwD;jcif;jzifhtcsdefudkzefwD;jcif;jzifhtcsdefudkzefwD;jcif;jzifhtcsdefudkzefwD;jcif;
atmufazmfjyygyHk(71)ygtwdkif; Visual Basic 6.0 wGifzefwD;&rnf-
yHk(71)yg Form wGif (1)udk jzifhzefwD;xm;NyD;(2)tm; jzifh zefwD;
xm;ygonf/ txufygtwdkif;jyifqifNyD;ygu oufqdkif&mtydkif;vdkuf y½dk*&rfrsm;a&;om;
&efjzpfygonf/
Form qJGwif&mwGiftvkyfvkyf&eftwGufqJGwif&mwGiftvkyfvkyf&eftwGufqJGwif&mwGiftvkyfvkyf&eftwGufqJGwif&mwGiftvkyfvkyf&eftwGufqJGwif&mwGiftvkyfvkyf&eftwGuf
Private Sub Form_Load() Timer1.Interval = 1000 'Set Time IntervalEnd SubLabel1 wGiftcsdefjy&eftwGufwGiftcsdefjy&eftwGufwGiftcsdefjy&eftwGufwGiftcsdefjy&eftwGufwGiftcsdefjy&eftwGuf
Private Sub Timer1_Timer() Label1.Caption = Time 'Update Time DisplayEnd SubSyntax;
<Object>.Interval [=milliseconds]Oyrm
Private Sub Form_Load()Timer1.Interval = 900 'Set interval.HScroll1.Min = 100 'Set minimum.HScroll1.Max = 900 'Set maximum.
End Sub
yHk(71)
(1)
(2)
63uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Private Sub HScroll_Change()'Set interval according to scroll bar value.Timer1.Interval = 1000 - HScroll.Value
End SubPrivate Sub Timer1_Timer()
'Switch BackColor between red and blue.If Picture1.BackColor = RGB(255, 0, 0) Then
Picture1.BackColor = RGB(0, 0, 255)Else
Picture1.BackColor = RGB(255, 0, 0)End If
End Sub
Time FunctionSyntax;
TimeOyrm
Mytime = Time 'Return Current System TimeDate FunctionSyntax;
DateOyrm
MyDate = #February 12, 1985# 'Assign a dateDate = MyDate 'Change System Date.
Syntax;Now ' Returns the current date and time according.
Oyrm
Today = Now 'Assign current system date and timeDay FunctionSyntax;
Day(date)Oyrm
MyDate = #February 12, 1969# 'Assign a dateMyDay = Day(MyDate) 'MyDay contains ®®®®® 12
64uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Hour FunctionSyntax;
Hour(time)Oyrm
Mytime = #4:35:17 PM# 'Assign a timeMyHour = Hour(Mytime) 'MyHour contains 16
Minute FunctionSyntax;
Minute(time)Oyrm
Mtime = #4:35:17 PM# 'Assign a timeMyMinute = Minute(Mytime) 'MyMinute contains 85
Month FunctionSyntax;
Month(date)Oyrm
Mydate = #February 12, 1969# 'Assign a dateMyMonth = Month(Mydate) 'MyMonth contains 2
Second FunctionSyntax;
Second(time)Oyrm
Mytime = Time 'Returns current system timeMySecond = Second(Mytime) 'MySecond contains 17
Weekday FunctionSyntax;
Weekday(date,[firstday of week])Oyrm
MyDate = #February 12, 1969# 'Assign a date.MyWeekDay = Weekday(MyDate) 'MyWeekDay contains 4 because
'MyDate represents a Wednesday.Year FunctionSyntax;
Year(date)
65uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Oyrm
MyDate = #February 12, 1969# 'Assign a date.MyYear = Year(MyDate) 'MyYear contains 1969.
tcsdefESifhywfoufaom tcsdefESifhywfoufaom tcsdefESifhywfoufaom tcsdefESifhywfoufaom tcsdefESifhywfoufaom Function rsm;udk rsm;udk rsm;udk rsm;udk rsm;udk Form zefwD;íprf;oyfjcif;zefwD;íprf;oyfjcif;zefwD;íprf;oyfjcif;zefwD;íprf;oyfjcif;zefwD;íprf;oyfjcif;
atmufygyHk(72)ygtwdkif; Visual Basic 6.0 wGifzefwD;&ef/
Run Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click() Cls MyDate = Date 'Assign Current System Date MyDay = Day(MyDate) 'Assign Current System Day MyTime = Time 'Assign Current System Time MyHour = Hour(MyTime) 'Assign Current System Hour MyMinute = Minute(MyTime) 'Assign Current System Minute MySecond = Second(MyTime) 'Assign Current System Second MyMonth = Month(MyDate) 'Assign Current System Month MyWeekDay = Weekday(MyDate) 'Assign Current System Day of Week MyYear = Year(MyDate) 'Assign Current System Year Today = Now 'Assign Current System Now Print "To Date ", MyDate Print "To Day ", MyDay Print "My Time ", MyTime
yHk(72)
66uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Print "My Hour ", MyHour Print "My Minute ", MyMinute Print "My Second ", MySecond Print "My Month ", MyMonth Print "My Week Day ", MyWeekDay Print "My Year ", MyYear Print "Now ", TodayEnd Sub
txufyg Program udk Run ygu yHk(73)ygtwdkif;azmfjyrnfjzpfonf/
Random FunctionInitializes the random-number generator.
Syntax;Randomize [number]The number argument can be any valid numeric expression.
Oyrm
Randomize 'Initialize random-number generator.MyValue = Int(6 * Rnd) + 1) 'Generate random value between 1 and 6
Syntax;Rnd [(number)]Returns a random number. The number argument can be any valid nu-
meric expression.
Move MethodSyntax;
<Object>.Move left, top, width, height
yHk(73)
67uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
<Object>.Left [=value]<Object>.Top [=value]atmufyg yHk(74)wGiftm; Move Sample Title Bar jzifhzefwD;xm;&ef -
txufygyHk(74)wGif Image, Timer, Command Button wdkYyg0ifMu
onf/ Timer Properties wGif Interval tm; 100 [kxm;yg/ Command Button wGif
vdktyfaomy½dk*&rfrsm;udka&;om;&rnf/
Exit Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click() Unload Me EndEnd SubTimer1_Timer twGuftwGuftwGuftwGuftwGuf
Private Sub Timer1_Timer() a = Image1.Left b = Image1.Top Image1.Move a + 50, b + 33End Sub
atmufyg yHk(75)tm; Move Method Example Title Bar jzifh zefwD;xm;&ef-
yHk(74)
68uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
txufygyHk(75)wGif Image, Command Button wdkYyg0ifMuonf/ Form1
Form Properties wGif Windows State tm; 2 - Maximized [kxm;yg/ CommandButton wGif vdktyfaomy½dk*&rfrsm;udka&;om;&rnf/
Run Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click()For j = 1 To 10
Image1.Left = 0Image1.Top = 0i = Image1.Leftk = Image1.TopFor i = 0 To 11500
Image1.Move i, kNextImage1.Left = 11500Image1.Top = 0i = Image1.Leftk = Image1.TopFor k = 0 To 7700
Image1.Move i, kNext
yHk(75)
69uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Image1.Left = 11500Image1.Top = 7700i = Image1.Leftk = Image1.TopFor i = 11500 To 0 Step -1
Image1.Move i, kNextImage1.Left = 0Image1.Top = 7700i = Image1.Leftk = Image1.TopFor k = 7700 To 0 Step -1
Image1.Move i, kNextPrintPrintPrint " ", jBeep
NextEnd SubExit Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click()Unload MeEnd
End Sub- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
70uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
tcef;(4)tcef;(4)tcef;(4)tcef;(4)tcef;(4)
ODBC ü ü ü ü ü Access File tm;toHk;jyKEdkifap&ef aqmif½Gufjcif;tm;toHk;jyKEdkifap&ef aqmif½Gufjcif;tm;toHk;jyKEdkifap&ef aqmif½Gufjcif;tm;toHk;jyKEdkifap&ef aqmif½Gufjcif;tm;toHk;jyKEdkifap&ef aqmif½Gufjcif;
yxrtqifhtaejzifh Access 2002 jzifh Database File ESifh Table File tm;wnf
aqmufyg/ xdkYaemuf Windows Desktop Status Bar wGif½Sdaom Start Menu tm;
a½G;yg/ xdkYaemuf Setting udkxyfrHa½G;yg/ xdktcg aemufxyf Sub-Menu wpfckay:vm
rnf/ 4if;rS Control Panel udka½G;yg/ yHk(76)/
xdktcg Control Panel Dialog Box ay:vmrnf/ yHk(77)/
yHk(76)
71uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(77)
Control Panel Dialog Box ½Sd Icon rsm;xJrS ODBC Data Sources [32bit] udk
Double Click ESdyfyg/ yHk(78)ygtwdkif; ODBC Data Source Administrator DialogBox ay:vmrnf/
72uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
txufyg Dialog Box wGif User DSN, System DSN, File DSN, Drivers,Tracing, Conection Pooling, About [lí Tab Command 7 ckyg½Sdygonf/ 4if;
Tab Command rsm;xJrS System DSN udka½G;yg/ yHk(79)ygtwdkif;jzpfay:vmrnf/
yHk(78)
73uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
txufygyHkwGif Add Command Button udka½G;&rnf/ xdktcg Create New DataSource Dialog Box ay:vmrnf/ yHk(80)/
txufyg Dialog Box wGif Driver do Microsoft Access [*.mdb] udka½G;NyD;
Finish udka½G;cs,f&rnf/ ODBC Microsoft Access Setup Dialog Box ay:vmygu
Data Source Name acgif;pOfnmzuf½Sd List Box wGif rdrdBuKdufESpfouf&mtrnfwpfck
udkjznfhpGufyg/ Oyrm Test1 [kjznfhpGufyg/ yHk(81)/
yHk(79)
yHk(80)
74uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(81)
xdkYaemuf Database acgif;pOfatmuf½Sd Select... Command Button udka½G;cs,f
&rnf/ xdktcg rdrdtvdk½Sdonfh Access 2002 Database File tm;a½G;cs,fEdkifap&ef
Select Database Dialog Box ay:vmayrnf/ yHk(82)/
txufygyHk(82)rS rdrdpdwfBuKduf Database File tm; yHk(83)ygtwdkif;a½G;cs,f&rnf/
yHk(82)
75uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdkYaemuf OK Command Button udka½G;cs,f&rnf/ xdktcg ODBC MicrosoftAccess Setup Dialog Box odkYjyefvnfa&muf½SdoGm;rnf/ yHk(84)/
txufyg Dialog Box wGif Database: acgif;pOfnmzufwGif rdrda½G;cs,fcJhaom
vrf;aMumif;ESifh zdkiftm;jyvdrfhrnf/ Oyrm - c:\My Documents\Test1.mdb/ xdkYaemuf
Command Button wpfckjzpfaom OK udka½G;cs,f&rnf/
yHk(83)
yHk(84)
76uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdktcg yHk(85)yg ODBC Data Source Administrator Dialog Box odkYjyefvnf
a&muf½SdoGm;NyD; System Data Sources: acgif;pOfatmufwGif Name ®®®®® Test1, Driver
®®®®® Microsoft Access Driver(*.mdb) azmfjyaeayrnf/ xdkYaemuf Command But-ton wpfckjzpfaom OK udka½G;cs,f&rnf/ xdktcg rlvae&mjzpfaom Control Panelae&modkYjyefvnfa&muf½SdoGm;NyD; Access 2002 Database File tm; Visual Basic6.0 wGif toHk;jyKí&Edkifrnf/ yHk(86)/ Microsoft Access 2002 jzifhwnfaqmufxm;
aom C:\My Documents\Test1.mdb onf ODBC Data Sources (32bit) jzpfoGm;
ayrnf/
yHk(85)
77uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(86)
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -Visual Basic 6.0 wGif wGif wGif wGif wGif ODBC Data Sources qJGwifjcif;qJGwifjcif;qJGwifjcif;qJGwifjcif;qJGwifjcif;
Visual Basic 6.0 udkzGifhyg/ Project1-Form1 (Form) ½Sd Form1 wGif atmufyg
yHk(87)ygtwdkif;wnfaqmufxm;&rnf/
xdkYaemuftcsuftvufzdkifzGifh&ef Command1, y½dk*&rfrSxGuf&ef Command2 wdkY
twGufyHk(88)ygtwdkif; Program rsm;a&;om;&rnf/
yHk(87)
78uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Data Form Wizard wnfaqmufjcif;wnfaqmufjcif;wnfaqmufjcif;wnfaqmufjcif;wnfaqmufjcif;
Menu Bar ½Sd Add-Ins rS Data Form Wizard udka½G;yg/ yHk(89)/
xdktcg Data Form Wizard - Introduction Dialog Box ay:vmrnf/ yHk(90)/
yHk(88)
yHk(89)
yHk(90)
79uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(90)yg Dialog Box wGif From what profile do you want to load yoursetting? acgif;pOfatmuf List Box udk (None) xm;NyD; Next udka½G;yg/
xdktcg txufygyHk(91)ygtwdkif; Data Form Wizard - Database Type DialogBox ay:vmNyD; 4if;xJ½Sd List Box xJwGif Access udka½G;xm;vdrfhrnf/ rdrdrS Remote(ODBC) tm;a½G;NyD; Next udka½G;cs,f&rnf/
xdktcg yHk(92)ygtwdkif; Data Form Wizard - Connect Information DialogBox ay:vmNyD; ODBC Connect Data acgif;pOfatmuf½Sd DSN: nmzuf½Sd List Boxudka½G;cs,fygu yHk(93)ygtwdkif; Dropdown List Box ay:vmygu Test1 udka½G;cs,fNyD;
Next udka½G;cs,f&rnf/ yHk(94)/
yHk(91)
yHk(92)
80uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(93)
yHk(94)
xdktcg Data Form Wizard - Form Dialog Box ay:vmrnf/ What namedo you want for the form? acgif;pOfatmuf List Box wGif rdrdBuKdufESpfouf&mtrnfudk
jznfhpGuf&ef/ Oyrm - Form2 [kjznfhpGufí Next udka½G;&rnf/ yHk(95)/
81uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(95)wGif Next udka½G;cs,fygu Dara Form Wizard - Record Source DialogBox ay:vmrnf/
txufygyHkwGif Record Source: List Box Dropdown Arrow tm;a½G;cs,fNyD;
Test1 udkxm;&ef/ xdktcg Available Fields: acgif;pOfatmufwGif Test1 DatabaseFile wGif wnfaqmufxm;aom Field rsm;a&muf½Sdvmvdrfhrnf/ 4if;rS rdrdESpfoufonfh
Field rsm;udka½G;cs,f&rnf/ yHk(97)/
yHk(95)
yHk(96)
82uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(97)
yHk(98)
txufygyHk(97)wGif rdrdtvdk½Sdonfh Field rsm;udkwpfckcsif;tvdkuf RightArrow Command Button jzifhvnf;aumif;? Field tm;vHk;udk Right Arrow ESpfckyg Command Button jzifhvnf;aumif;a½G;cs,fEdkifygonf/ Column to Sort By:acgif;pOfatmuf List Box wGif rdrdtaejzifh i,fpOfBuD;vdkufpDpOfvdkaom Field rsm;udk
a½G;cs,fvdku a½G;cs,fEdkifygonf/ xdkYaemuf Next udka½G;cs,fyg/ yHk(98)/
83uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
wpfzufygyHk(98)yg Data Form Wizard - Record Source Dialog Box wGif
Next udkxyfrHa½G;cs,fyg/ Data Form Wizard - Control Selection Dialog Boxay:vmrnf/ yHk(99)/
txufygyHk(99)udk ajymif;vJrIrjyKvkyfbJ Next udkxyfrHa½G;cs,fyg/ xdktcg DataForm Wizard - Finished! Dialog Box ay:vmayrnf/ yHk(100)/
txufygyHk(100)wGif Finish Command Button udka½G;cs,f&rnf/ yHk(101)/
yHk(99)
yHk(100)
84uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(101)wGif OK udka½G;cs,f&rnf/ xdktcg yHk(102)ygtwdkif;jzpfay:vmrnf/
Visual Basic 6.0 rS tvdktavsmufwnfaqmufay;vdkufaom Form2 jzpfay:vm
ayrnf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(101)
yHk(102)
85uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
rdrdenf;jzifh rdrdenf;jzifh rdrdenf;jzifh rdrdenf;jzifh rdrdenf;jzifh Access File toHk;jyKaomy½dk*&rfa&;om;jcif;toHk;jyKaomy½dk*&rfa&;om;jcif;toHk;jyKaomy½dk*&rfa&;om;jcif;toHk;jyKaomy½dk*&rfa&;om;jcif;toHk;jyKaomy½dk*&rfa&;om;jcif;
rdrdenf;? rdrd[efjzifh Access 2002 wGif Database File wnfaqmufxm;NyD; Vi-sual Basic 6.0 udktoHk;jyKí Programming a&;om;Edkifygonf/ atmufazmfjyygyHk(103)
tm; Toolbox ½Sd Icon rsm;udktoHk;jyKíwnfaqmufxm;&rnf/
yHk(103)yg Form wGif Command Button udktoHk;jyKí zdkifzGifh&ef? xGuf&efwdkYudk
zefwD;wnfaqmufxm;ygonf/ tqdkyg Form onf Form1 jzpfNyD; xGuf&ef Com-mand Button udkESdyfygu 4if;y½dk*&rfxJrSxGufoGm;NyD;? zdkifzGifh&ef Command Buttonudka½G;ygu Form2 jzifhpDpOfxm;aom Microsoft Access 2002 Database Fileay:vmayrnf/ xdkYaMumifh Form2 udkatmufygtwdkif;wnfaqmuf&ayrnf/ yHk(104)/
yHk(103)
yHk(104)
86uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
yHk(104)yg Identification Number;, Rank;, Name;, Department; [kteufa&mif
jzifha&;om;xm;aompmrsm;onf Label1, Label2, Label3, Label4 wdkYjzifhwnfaqmuf
xm;jcif;jzpfNyD; 4if;pmom;rsm;\nmzufwGif wnfaqmufxm;aom Box rsm;rSm TextBox rsm;jzifhwnfaqmufxm;ygonf/ Add, Update, Delete, Refresh, Close wdkYrSm
Command Button rsm;jzpfMuygonf/ 4if; Command Button 5 ck\nmzufwGif
½Sdonfh Data Position Box rSm jzifhwnfaqmufxm;ygonf/ CommandButton rsm;ESifh Adodc wdkYatmufzufwGif½SdaeaomZ,m;udk jzifhwnfaqmuf
xm;Muygonf/
Label1 Label \ Properties wGifatmufygtwdkif;jyifqif&ef-
Name - Label1Alignment - 0 - Left JustifyAutoSize - TrueCaption - Identification Number;Label2 Label \ Properties wGifatmufygtwdkif;jyifqif&ef-
Name - Label2Alignment - 0 - Left JustifyAutoSize - TrueCaption - Rank;Label3 Label \ Properties wGifatmufygtwdkif;jyifqif&ef-
Name - Label3Alignment - 0 - Left JustifyAutoSize - TrueCaption - Name;Label4 Label \ Properties wGifatmufygtwdkif;jyifqif&ef-
Name - Label4Alignment - 0 - Left JustifyAutoSize - TrueCaption - Department;Text1 Text \ Properties wGifatmufygtwdkif;jyifqif&ef-
Name - Text1Alignment - 0 - Left JustifyDataField - Identification NumberDataSource - Adodc1
87uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Text2 Text \ Properties wGifatmufygtwdkif;jyifqif&ef-
Name - Text2Alignment - 0 - Left JustifyDataField - RankDataSource - Adodc1Text3 Text \ Properties wGifatmufygtwdkif;jyifqif&ef-
Name - Text3Alignment - 0 - Left JustifyDataField - NameDataSource - Adodc1Text4 Text \ Properties wGifatmufygtwdkif;jyifqif&ef-
Name - Text4Alignment - 0 - Left JustifyDataField - DepartmentDataSource - Adodc1Command1 Command Button \ Properties wGifatmufygtwdkif;jyifqif&ef-
Name - Command1Caption - &AddCommand2 Command Button \ Properties wGifatmufygtwdkif;jyifqif&ef-
Name - Command2Caption - &UpdateCommand3 Command Button \ Properties wGifatmufygtwdkif;jyifqif&ef-
Name - Command3Caption - &DeleteCommand4 Command Button \ Properties wGifatmufygtwdkif;jyifqif&ef-
Name - Command4Caption - &RefreshCommand5 Command Button \ Properties wGifatmufygtwdkif;jyifqif&ef-
Name - Command5Caption - &Close
88uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Adodc1 Adodc \ Properties udk yHk(105)? yHk(106)wdkYjzifhazmfjytyfygonf/
ConnectionString - Provider=MSDASQL.1;DSN=TEST1;UID=;PWD=;
RecordSource - Select [Identification Number], Rank, Name, De-partment from Test1 Order By [IdentificationNumber]
yHk(105)
yHk(106)
89uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
yHk(107)
yHk(108)
DataGrid1 DataGrid \ Properties udk yHk(107)? yHk(108)wdkYjzifhazmfjytyfygonf/
txufyg Form2 udk Run í&Edkifap&eftwGuf vdktyfaomy½dk*&rfrsm;a&;om;&ayrnf/
Adodc1 Adodc wGif Record Position twGuf
Private Sub Adodc1_WillMove(ByVal adReason As ADODB.EventReasonEnum, adStatus As ADODB.EventStatusEnum, ByVal pRecordset AsADODB.Recordset)
Adodc1.Caption ="Record: " & CStr(Adodc1.Recordset. AbsolutePosition)
End Sub
90uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Add Command Button twGuf
Private Sub Command1_Click() Adodc1.Recordset.AddNewEnd SubUpdate Command Button twGuf
Private Sub Command2_Click() Adodc1.Recordset.UpdateEnd SubDelete Command Button twGuf
Private Sub Command3_Click() With Adodc1.Recordset .Delete .MoveNext If .EOF Then .MoveLast End WithEnd SubRefresh Command Button twGuf
Private Sub Command4_Click() Adodc1.RefreshEnd SubClose Command Button twGuf
Private Sub Command5_Click() Form2.Hide Form1.ShowEnd SubMouse Pointer Position twGuf
Private Sub Form_Unload(Cancel As Integer) Screen.MousePointer = vbDefaultEnd Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
91uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
tcef;(5)tcef;(5)tcef;(5)tcef;(5)tcef;(5)
String ESifhqdkifaomudpö&yfrsm;ESifhqdkifaomudpö&yfrsm;ESifhqdkifaomudpö&yfrsm;ESifhqdkifaomudpö&yfrsm;ESifhqdkifaomudpö&yfrsm;
Syntax;Len(strin/varname)
Oyrm -
MyString = "Hello World" 'Initialize Variable.MyLen = Len(MyString) 'Returns 11.
Syntax;Dim varname [([subscripts])][As [New] type[, varname
[([subscripts])][As [New] type]]...Oyrm -
'Any Value and My Value are declared as Variant by default withvalues set to Empty.
Dim AnyValue, MyValue
'Explicitly declare a variable of type integer.Dim Number As Integer
'Multiple declarations on a single line. Another Variable is of typeVariant because its type is omitted.
Dim AnotherVar, Choice As Boolean, BirthDate As Date
'DayArray is an array of Variants with 51 elements indexed, from 0thru 50, assuming Option Base is set to 0 (default) for thecurrent module
Dim DayArray(50)
'Matrix is a two-dimensional array of integers.Dim Matrix(3, 4) As Integer
'MyMatrix is a three-dimensional array of doubles with explicit bounds.Dim MyMatrix(1 To 5, 4 To 9, 3 To 5) As Double
92uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
'BirthDay is an array of dates with indexes from 1 to 10.Dim BirthDay(1 To 10) As Date
'MyArrau os a dynamic array of variants.Dim MyArray()
Syntax;Str(<number>)
Oyrm -
MyString = Str(459) 'Returns " 459".MyString = Str(-459.65) 'Returns "-459.65".MyString = Str(459.001) 'Returns " 459.001".
Syntax;Left(string, length)
Oyrm -
This example uses the Left Function to return a specified number ofcharacters form the left side of a string.
AnyString = "Hello World" 'Define String.MyStr = Left(AnyString, 1) 'Returns "H"MyStr = Left(AnyString, 7) 'Returns "Hello W"MyStr = Left(AnyString, 20) 'Returns "Hello World"
Syntax;Right(string, length)
Oyrm -
This example uses the Right Function to return a specified number ofcharacters form the right side of a string.
AnyString = "Hello World" 'Define String.MyStr = Right(AnyString, 1) 'Returns "d"MyStr = Right(AnyString, 6) 'Returns " World"MyStr = Right(AnyString, 20) 'Returns "Hello World"
93uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
String Function rsm;udktoHk;jyKí udef;*Pef;rsm;wGufcsufjcif;rsm;udktoHk;jyKí udef;*Pef;rsm;wGufcsufjcif;rsm;udktoHk;jyKí udef;*Pef;rsm;wGufcsufjcif;rsm;udktoHk;jyKí udef;*Pef;rsm;wGufcsufjcif;rsm;udktoHk;jyKí udef;*Pef;rsm;wGufcsufjcif;
atmufazmfjyyg Form yHkpHtm;zefwD;wnfaqmufyg/ yHk(109)/
txufyg Form yHkpHwGif Label, Text Box, Command Button wdkYjzifh zefwD;xm;
NyD; Command Button rsm;wGif atmufygy½dk*&rfrsm;a&;om;&efjzpfygonf/
Run Command Button twGuf
Private Sub Command1_Click()ClsDim a(50) As Variantw = Text1.Textb = 0z = Len(Text1.Text)Print z: PrintFor i = 1 To z
a(i) = Left(Right(Str(w), z - i + 1), 1)Print a(i) & "+";
NextFor i = 1 To z
b = b + Val(a(i))NextPrint "=", bc = Len(b)d = 0
yHk(109)
94uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Print c: PrintFor j = 1 To c
a(j) = Left(Right(Str(b), c - j + 1), 1)Print a(j) & "+";
NextFor i = 1 To c
d = d + Val(a(i))NextPrint "=", de = Len(d)f = 0Print e: PrintIf e >= 2 And d >= 10 Then
For j = i To ca(j) = Left(Right(Str(d), e - j + 1), 1)Print a(j) & "+";
NextFor i = 1 To e
f = f + Val(a(i))NextPrint "=", f
End IfEnd SubExit Command Button twGuf
Private Sub Command2_Click()Unload MeEnd
End Sub
95uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
tqdkyg y½dk*&rfudk Run ygu yHk(110)twdkif;jrifawGU&rnf/
Syntax;RSet strinvar = stringOyrm -
MyString = "0123456789" 'Initialize String.RSet MyString = "Right ->" 'MyString contains " Right ->".
String toHk;jyKí toHk;jyKí toHk;jyKí toHk;jyKí toHk;jyKí Fibonacci Sequence udef;pOfwef;udk½Smjcif;udef;pOfwef;udk½Smjcif;udef;pOfwef;udk½Smjcif;udef;pOfwef;udk½Smjcif;udef;pOfwef;udk½Smjcif;
atmufyg Form yHkpHtm; zefwD;wnfaqmufyg/ yHk(111)/ 4if;wGif Label, TextBox, Command Button wdkYjzifh zefwD;xm;NyD; Command Button rsm;wGif atmufyg
y½dk*&rfrsm;a&;om;&efjzpfygonf/
yHk(110)
yHk(111)
96uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Run Command Button twGuf
Private Sub Command1_Click()Dim n As Variantstr1 = "1234567"Clsn = Text1: secondlast = 0: Last = 1For k = 3 To n
term = secondlast + Last: secondlast = Last: Last = termRSet str1 = Str(term)Print k, str1
NextEnd SubExit Command Button twGuf
Private Sub Command2_Click()Unload MeEnd
End Subtqdkygy½dk*&rfudk Run ygu atmufygyHkpHtwdkif;jrifawGU&rnf/ yHk(112)/
yHk(112)
97uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Astrisk rsm;zefwD;jcif;rsm;zefwD;jcif;rsm;zefwD;jcif;rsm;zefwD;jcif;rsm;zefwD;jcif;
atmufyg Form yHkpHtm; zefwD;wnfaqmufyg/ yHk(113)/ 4if;wGif Command Buttonrsm;jzifhzefwD;xm;NyD; Command Button rsm;wGif vdktyfaomy½dk*&rfrsm;a&;om;&ef
jzpfygonf/
Run Command Button twGuf
Private Sub Command1_Click()Dim a$(22, 21)ClsFor i = 1 To 22
For j = 1 To 21a$(i, j) = "*"
Next jNext iFor i = 1 To 20
For j = 1 To 21 - ia$(i, j) = "*"
Next jNext iFor i = 1 To 22
For j = 1 To 21Print a$(i, j);
Next j: Print Next iEnd Sub
yHk(113)
98uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Exit Command Button twGuf
Private Sub Command2_Click() Unload Me EndEnd Sub
tqdkygy½dk*&rfudk Run ygu atmufygyHkpHtwdkif;jrifawGU&rnf/ yHk(114)/
Magic Square y½dk*&rfa&;om;jcif;y½dk*&rfa&;om;jcif;y½dk*&rfa&;om;jcif;y½dk*&rfa&;om;jcif;y½dk*&rfa&;om;jcif;
atmufyg Form yHkpHtm; zefwD;wnfaqmufyg/ yHk(115)/ 4if;wGif ,
, rsm;jzifhzefwD;xm;NyD; Command Button rsm;wGif vdktyf
aomy½dk*&rfrsm;a&;om;&ef jzpfygonf/
yHk(114)
yHk(115)
99uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Run Command Button twGuf
Private Sub Command1_Click()str1 = "12345"
10 ClsN = Val(Text1)If N >= 31 Or N Mod 2 = 0 Then
Print "Between 3 and 19 ": GoTo 10End IfDim A(31, 31)For i = 1 To N
For j = 1 To NA(i, j) = 0
Next jNext idat = 1: i = 1: j = N \ 2 + 1: A(i, j) = datFor Kount = 1 To N * N - 1
i = i - 1: j = j + 1If i < 1 And j > N Then i = i + 2: j = j - 1If i < 1 Then i = NIf j > N Then j = 1If A(i, j) <> 0 Then i = i + 2: j = j - 1dat = dat + 1: A(i, j) = dat
Next: PrintPrint " Magic Square "; NPrint " ~~~~~~~~~~~~ ": PrintFor i = 1 To N
For j = 1 To NRSet str1 = A(i, j): Print str1;
'Print using;" ";str1; 'A(i,j);Next j: Print
Next iEnd SubExit Command Button twGuf
Private Sub Command2_Click()Unload Me
100uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
EndEnd Sub
tqdkygy½dk*&rfudk Run ygu atmufygyHk(116)twdkif; azmfjyrnfjzpfonf/
&m*Pef;½dkufxnfhygu 4if;udef;*Pef; 3 vHk;pvHk;aygif;jcif;&m*Pef;½dkufxnfhygu 4if;udef;*Pef; 3 vHk;pvHk;aygif;jcif;&m*Pef;½dkufxnfhygu 4if;udef;*Pef; 3 vHk;pvHk;aygif;jcif;&m*Pef;½dkufxnfhygu 4if;udef;*Pef; 3 vHk;pvHk;aygif;jcif;&m*Pef;½dkufxnfhygu 4if;udef;*Pef; 3 vHk;pvHk;aygif;jcif;
atmufyg Form yHkpHtm; zefwD;wnfaqmufyg/ yHk(117)/ 4if;wGif ,
, rsm;jzifhzefwD;xm;NyD; Command Button rsm;wGif vdktyf
aomy½dk*&rfrsm;a&;om;&ef jzpfygonf/
Run Command Button twGuf
Private Sub Command1_Click()Clsn = Text1.TextA = n \ 100n = n - (A * 100)b = n \ 10
yHk(116)
yHk(117)
101uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
n = n - (b * 10)Print "("; A; "+"; b; "+"; n; ")"; "="; A + b + n
End SubExit Command Button twGuf
Private Sub Command2_Click()Unload MeEnd
End Subtqdkygy½dk*&rfudk Run ygu yHk(118)twdkif; azmfjyrnfjzpfonf/
aemufwpfenf;aemufwpfenf;aemufwpfenf;aemufwpfenf;aemufwpfenf;
atmufyg Form yHkpHtm; zefwD;wnfaqmufyg/ yHk(119)/ 4if;wGif ,
, rsm;jzifhzefwD;xm;NyD; Command Button rsm;wGif vdktyf
aomy½dk*&rfrsm;a&;om;&ef jzpfygonf/
Run Command Button twGuf
Private Sub Command1_Click() Cls n = Text1.Text sum1 = Val(Mid(Str(n),2,1))+Val(Mid(Str(n),3,1))+Val(Mid(Str(n),4,1))
print "3 Digits Sum of ";n;" is";sum1End Sub
yHk(118)
yHk(119)
102uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Exit Command Button twGuf
Private Sub Command2_Click()Unload MeEnd
End Subtqdkygy½dk*&rfudk Run ygu yHk(120)twdkif; azmfjyrnfjzpfonf/
Syntax;Mid(string, start, length)
Oyrm -
MyString = "Mid Function Demo" 'Create text string.FirstWord = Mid(MyString, 1, 3) 'Returns "Mid".LastWord = Mid(MyString, 14, 4) 'Returns "Demo".MidWord = Mid(MyString, 5) 'Returns "Function Demo".
aemufwpfenf;aemufwpfenf;aemufwpfenf;aemufwpfenf;aemufwpfenf;
atmufyg Form yHkpHtm; zefwD;wnfaqmufyg/ yHk(121)/ 4if;wGif ,
, rsm;jzifhzefwD;xm;NyD; Command Button rsm;wGif vdktyf
aomy½dk*&rfrsm;a&;om;&ef jzpfygonf/
Run Command Button twGuf
Private Sub Command1_Click()Clsn = Text1.Texts1 = Val(Mid(Trim(Str(n)), 1, 1))
yHk(120)
yHk(121)
103uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Print s1s2 = Val(Mid(Trim(Str(n)), 2, 1))Print s2s3 = Val(Mid(Trim(Str(n)), 3, 1))Print s3Print "3 Digits Sum of "; n; " is"; s1 + s2 + s3
End SubExit Command Button twGuf
Private Sub Command2_Click()Unload MeEnd
End Subtqdkygy½dk*&rfudk Run ygu yHk(122)twdkif; azmfjyrnfjzpfonf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(122)
104uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
tcef;(6)tcef;(6)tcef;(6)tcef;(6)tcef;(6)
Mathematics ESifhqdkifaomudpö&yfrsm;ESifhqdkifaomudpö&yfrsm;ESifhqdkifaomudpö&yfrsm;ESifhqdkifaomudpö&yfrsm;ESifhqdkifaomudpö&yfrsm;
½dk;½dk;udef;pOfwef; ½dk;½dk;udef;pOfwef; ½dk;½dk;udef;pOfwef; ½dk;½dk;udef;pOfwef; ½dk;½dk;udef;pOfwef; 1, 2, 3, 4, ...? qwdk;udef; ? qwdk;udef; ? qwdk;udef; ? qwdk;udef; ? qwdk;udef; 1, 2, 4, 8, 16, ...? xyfudef; ? xyfudef; ? xyfudef; ? xyfudef; ? xyfudef; 1, 4, 9, 16,25, ... udef;pOfwef;wdkYudk y½dk*&rfa&;om;jcif;udef;pOfwef;wdkYudk y½dk*&rfa&;om;jcif;udef;pOfwef;wdkYudk y½dk*&rfa&;om;jcif;udef;pOfwef;wdkYudk y½dk*&rfa&;om;jcif;udef;pOfwef;wdkYudk y½dk*&rfa&;om;jcif;
atmufyg Form yHkpHtm; zefwD;wnfaqmufyg/ yHk(123)/ 4if;wGif rsm;jzifhzefwD;xm;NyD; Command Button rsm;wGif vdktyfaomy½dk*&rfrsm;a&;om;&ef
jzpfygonf/
Run Command Button twGuf
Private Sub Command1_Click() 'To find No., AP, GP, Square
ClsPrint 1, 1, 1, 1For j = 2 To 22
Print j, 2 * j - 1, 2 ^ (j - 1), j ^ 2Next
End SubExit Command Button twGuf
Private Sub Command2_Click()Unload MeEnd
End Subtqdkygy½dk*&rfudk Run ygu yHk(124)twdkif; azmfjyrnfjzpfonf/
yHk(123)
105uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
APudef;pOfwef;udk y½dk*&rfa&;om;jcif;udef;pOfwef;udk y½dk*&rfa&;om;jcif;udef;pOfwef;udk y½dk*&rfa&;om;jcif;udef;pOfwef;udk y½dk*&rfa&;om;jcif;udef;pOfwef;udk y½dk*&rfa&;om;jcif;
atmufyg Form yHkpHtm; zefwD;wnfaqmufyg/ yHk(125)/ 4if;wGif ,
, rsm;jzifhzefwD;xm;NyD; Command Button rsm;wGif vdktyf
aomy½dk*&rfrsm;a&;om;&ef jzpfygonf/
Properties rsm;udkjyifqifjznfhpGufNyD;aemuf vdktyfaomy½dk*&rfrsm;udka&;om;&rnf/
yHk(124)
yHk(125)
106uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Run Command Button twGuf
Private Sub Command1_Click()'AP (Arithmetic Progression)Clsa = Val(Text1)d = Val(Text2)n = Val(Text3)Print " No? Terms Sum "k = 1: t = a: s = aPrint k, t, sFor k = 2 To n
t = t + d: s = s + t: Print k, t, sNext
End SubExit Command Button twGuf
Private Sub Command2_Click()Unload MeEnd
End Subtqdkygy½dk*&rfudk Run ygu yHk(126)twdkif; azmfjyrnfjzpfonf/
yHk(126)
107uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
GP udef;pOfwef;udk y½dk*&rfa&;om;jcif;udef;pOfwef;udk y½dk*&rfa&;om;jcif;udef;pOfwef;udk y½dk*&rfa&;om;jcif;udef;pOfwef;udk y½dk*&rfa&;om;jcif;udef;pOfwef;udk y½dk*&rfa&;om;jcif;
atmufyg Form yHkpHtm; zefwD;wnfaqmufyg/ yHk(127)/ 4if;wGif ,
, rsm;jzifhzefwD;xm;NyD; Command Button rsm;wGif vdktyf
aomy½dk*&rfrsm;a&;om;&ef jzpfygonf/
Run Command Button twGuf
Private Sub Command1_Click()'GP (Arithmetic Progression)Clsa = Val(Text1)d = Val(Text2)n = Val(Text3)Print " No? Terms G.P Sum "k = 1: t = a: s = aPrint k, t, sFor k = 2 To n
t = t * d: s = s + t: Print k, t, sNext
End SubExit Command Button twGuf
Private Sub Command2_Click()Unload MeEnd
End Sub
yHk(127)
108uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
tqdkygy½dk*&rfudk Run ygu yHk(128)twdkif; azmfjyrnfjzpfonf/
S = 1 + 2 + 3 + ... + N udef;pOfwef;wdkYudk aygif;jcif;udef;pOfwef;wdkYudk aygif;jcif;udef;pOfwef;wdkYudk aygif;jcif;udef;pOfwef;wdkYudk aygif;jcif;udef;pOfwef;wdkYudk aygif;jcif;
atmufyg Form yHkpHtm; zefwD;wnfaqmufyg/ yHk(129)/ 4if;wGif ,
, rsm;jzifhzefwD;xm;NyD; Properties toD;oD;udk jyifqifjznfhpGuf
NyD;aemuf Command Button rsm;wGif vdktyfaomy½dk*&rfrsm;a&;om;&ef jzpfygonf/
Run Command Button twGuf
Private Sub Command1_Click()'To find the sum of N terms of the series'S = 1 + 2 + 3 + ... + NClsn = Val(Text1)If n = 0 Then EndSum = 1For i = 2 To n
Sum = Sum + iNext
yHk(128)
yHk(129)
109uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Print "The sum of the series is "; Sum Print k, t, sEnd SubExit Command Button twGuf
Private Sub Command2_Click()Unload MeEnd
End Subtqdkygy½dk*&rfudk Run ygu yHk(130)twdkif; azmfjyrnfjzpfonf/
S = 1 * 2 * 3 * ... * N udef;pOfwef;wdkYudk aygif;jcif;udef;pOfwef;wdkYudk aygif;jcif;udef;pOfwef;wdkYudk aygif;jcif;udef;pOfwef;wdkYudk aygif;jcif;udef;pOfwef;wdkYudk aygif;jcif;
atmufyg Form yHkpHtm; zefwD;wnfaqmufyg/ yHk(131)/ 4if;wGif ,
, rsm;jzifhzefwD;xm;NyD; Properties toD;oD;udk jyifqifjznfhpGuf
NyD;aemuf Command Button rsm;wGif vdktyfaomy½dk*&rfrsm;a&;om;&ef jzpfygonf/
Run Command Button twGuf
Private Sub Command1_Click()'To find the Product of N terms of the series'S = 1 * 2 * 3 * ... * NClsn = Val(Text1)If n = 0 Or n > 17 Then Endpro = 1
yHk(130)
yHk(131)
110uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
For i = 2 To npro = pro * i
NextPrint "The Product of the series is "; pro
End SubExit Command Button twGuf
Private Sub Command2_Click()Unload MeEnd
End Subtqdkygy½dk*&rfudk Run ygu yHk(132)twdkif; azmfjyrnfjzpfonf/
udef;pOfwef;udef;pOfwef;udef;pOfwef;udef;pOfwef;udef;pOfwef; S = 1 + 1/4 + 1/9 + ... + 1/N*N wdkYudk½SmazGjcif;wdkYudk½SmazGjcif;wdkYudk½SmazGjcif;wdkYudk½SmazGjcif;wdkYudk½SmazGjcif;
atmufyg Form yHkpHtm; zefwD;wnfaqmufyg/ yHk(133)/ 4if;wGif ,
, rsm;jzifhzefwD;xm;NyD; Properties toD;oD;udk jyifqifjznfhpGuf
NyD;aemuf Command Button rsm;wGif vdktyfaomy½dk*&rfrsm;a&;om;&ef jzpfygonf/
Run Command Button twGuf
Private Sub Command1_Click()Clsn = Text1If n = 0 Then Endsum1 = 0
yHk(132)
yHk(133)
111uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
For i = 1 To nsum1 = sum1 + 1 / i ^ 2
NextPrint "The Sum of the series is "; sum1
End SubExit Command Button twGuf
Private Sub Command2_Click()Unload MeEnd
End Subtqdkygy½dk*&rfudk Run ygu yHk(134)twdkif; azmfjyrnfjzpfonf/
udef;pOfwef;udef;pOfwef;udef;pOfwef;udef;pOfwef;udef;pOfwef; P = (2/3)(3/4)(4/5)...(N/N+1) wdkYudk½SmazGjcif;wdkYudk½SmazGjcif;wdkYudk½SmazGjcif;wdkYudk½SmazGjcif;wdkYudk½SmazGjcif;
atmufyg Form yHkpHtm; zefwD;wnfaqmufyg/ yHk(135)/ 4if;wGif ,
, rsm;jzifhzefwD;xm;NyD; Properties toD;oD;udk jyifqifjznfhpGuf
NyD;aemuf Command Button rsm;wGif vdktyfaomy½dk*&rfrsm;a&;om;&ef jzpfygonf/
Run Command Button twGuf
Private Sub Command1_Click()Clsn = Text1If n = 0 Or n > 18 Then Endpro = 1
yHk(134)
yHk(135)
112uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
For i = 1 To n pro = pro * (i + 1) / (i + 2)
NextPrint "The Product of the series is "; pro
End SubExit Command Button twGuf
Private Sub Command2_Click()Unload MeEnd
End Subtqdkygy½dk*&rfudk Run ygu yHk(136)twdkif; azmfjyrnfjzpfonf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(136)
113uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
tcef;(7)tcef;(7)tcef;(7)tcef;(7)tcef;(7)
Access 2002 ½Sd ½Sd ½Sd ½Sd ½Sd Database File tm; tm; tm; tm; tm; Visual Basic 6.0 ESifh ESifh ESifh ESifh ESifh Update jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;
atmufyg Form yHkpHtm; zefwD;wnfaqmufxm;&rnf/ yHk(137)/ 4if;wGif
rsm;jzifhzefwD;xm;NyD; Command Button rsm;wGif vdktyfaomy½dk*&rfrsm;
a&;om;&ef jzpfygonf/
Command1 Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click() Form1.Hide Form2.ShowEnd SubCommand2 Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click() Unload Me EndEnd Sub
xdkYaemuf Form2 yHkpHtm;zefwD;wnfaqmufxm;&rnf/ yHk(138)/ 4if;wGif ,
, , rsm;jzifhzefwD;xm;NyD; Command Button
rsm;wGif vdktyfaomy½dk*&rfrsm; a&;om;&ef jzpfygonf/
yHk(137)
114uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
yHk(138)
rSm jzifhwnfaqmufxm;ygonf/ Adodc
\ Properties wGif yHk(139)? yHk(140)ygtwdkif;jyifqifxm;&rnf/
(Name) - WadoCaption - EmptyConnectionString - PROVIDER = MSDASQL; dsn = Test2; uid=;
pwd=;RecordSource - Select [Roll Number], Name, Myanmar, English,
Maths, Total from Test2
115uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Connection String \ nmzuf Box wGif Cursor csygu Ellipsis trSwftom;yg
Command Button udk Mouse Left Click jzifha½G;cs,fygu yHk(141)ygtwdkif;
Property Pages Dialog Box ay:vmrnf/ General Tab Command Button udka½G;
cs,fyg/ Use Connection String [ka&;om;xm;onfh Option Button udka½G;cs,fyg/
xdkYaemuf4if;acgif;pOfatmuf List Box ü PROVIDER=MSDASQL;dsn=Test2;uid=;pwd=;udkjznfhpGufí OK udka½G;cs,f&ayrnf/
yHk(139)
yHk(140)
116uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
yHk(141)
RecordSource \ nmzuf Box wGif Cursor csygu Ellipsis trSwftom;yg
Command Button udk Mouse Left Click jzifha½G;cs,fygu yHk(142)ygtwdkif;
Property Pages Dialog Box ay:vmrnf/ Command Text (SQL) List Box wGif
Cursor xnfhyg/ xdkYaemuf Select [Roll Number], Name,Myanmar,English,Maths,Total from Test2udkjznfhpGufí OK udka½G;cs,f&ayrnf/
yHk(142)
117uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Text1 Text Box \ Properties wGifatmufygtwdkif;jyifqifjznfhpGuf&ef-
DataSource - WadoDataField - Roll NumberText - Empty
Text2 Text Box \ Properties wGifatmufygtwdkif;jyifqifjznfhpGuf&ef-
DataSource - WadoDataField - NameText - Empty
Text3 Text Box \ Properties wGifatmufygtwdkif;jyifqifjznfhpGuf&ef-
DataSource - WadoDataField - MyanmarText - Empty
Text4 Text Box \ Properties wGifatmufygtwdkif;jyifqifjznfhpGuf&ef-
DataSource - WadoDataField - EnglishText - Empty
Text5 Text Box \ Properties wGifatmufygtwdkif;jyifqifjznfhpGuf&ef-
DataSource - WadoDataField - MathsText - Empty
Text6 Text Box \ Properties wGifatmufygtwdkif;jyifqifjznfhpGuf&ef-
DataSource - WadoDataField - TotalText - Empty
Form2 \ Command Button rsm;twGuf y½dk*&rfrsm;tm;atmufygtwdkif;a&;om;
&rnf/
(3)bmomaygif;jcif; (3)bmomaygif;jcif; (3)bmomaygif;jcif; (3)bmomaygif;jcif; (3)bmomaygif;jcif; Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click() Wado.Recordset.MoveFirst Do While Wado.Recordset.EOF = False Wado.Recordset("Total") = Wado.Recordset("Myanmar") +
Wado.Recordset("English") +Wado.Recordset("Maths")
Wado.Recordset.Update
118uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Wado.Recordset.MoveNext Loop Wado.Recordset.MoveFirstEnd Subrlvae&modkYjyefoGm;jcif; rlvae&modkYjyefoGm;jcif; rlvae&modkYjyefoGm;jcif; rlvae&modkYjyefoGm;jcif; rlvae&modkYjyefoGm;jcif; Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click() Form2.Hide Form1.ShowEnd SubRecord Position jyo&eftwGufjyo&eftwGufjyo&eftwGufjyo&eftwGufjyo&eftwGuf
Private Sub Wado_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus AsADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
Wado.Caption = "Record: " & CStr(Wado.Recordset.AbsolutePosition)End Sub
tqdkygy½dk*&rfudk Run ygu yHk(143)twdkif; azmfjyrnfjzpfonf/
yHk(143)
119uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
DataGrid jzifh jzifh jzifh jzifh jzifh Update jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;
atmufyg Form yHkpHtm; zefwD;wnfaqmufxm;&rnf/ yHk(144)/ 4if;wGif
rsm;jzifhzefwD;xm;NyD; Command Button rsm;wGif vdktyfaomy½dk*&rfrsm;
a&;om;&ef jzpfygonf/
zdkifzGifjcif; zdkifzGifjcif; zdkifzGifjcif; zdkifzGifjcif; zdkifzGifjcif; Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click() Form1.Hide Form2.ShowEnd SubxGufjcif; xGufjcif; xGufjcif; xGufjcif; xGufjcif; Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click() Unload Me EndEnd Sub
xdkYaemuf Form2 yHkpHtm;zefwD;wnfaqmufxm;&rnf/ þuJhodkYwnfaqmuf&mwGif
Adodc, DataGrid rsm; Toolbox xJwGif½Sd&efvdktyfayonf/ Toolbox xJ½Sd IconvGwfaeaomrsufESmjyiftm; Mouse Pointer jzifhaxmufí Right Click udka½G;cs,fyg/
xdktcg yHk(145)ygtwdkif; Short Cut Menu wpfckay:vmayrnf/
yHk(144)
120uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
yHk(145)yg Short Cut Menu rS Components... udka½G;cs,f&rnf/ xdktcg
yHk(146)ygtwdkif; Components Dialog Box ay:vmrnf/
Controls Tab Command acgif;pOfatmuf Vertical Scroll Bar rS DropdownArrow udktoHk;jyKNyD; Adodc ESifh DataGrid wdkY½Sdonfhae&mrsm;udk Check jyKvkyf&rnf/
yHk(147)/
yHk(145)
yHk(146)
121uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
xdkYaemuf Apply Command Button udka½G;cs,fyg/ OK ae&m Command ButtonwGif Close ay:vmygu4if;udka½G;cs,f&rnf/ xdktcg Toolbox xJü Adodc ESifh
DataGrid wdkY Icon rsm;a&muf½Sdvmrnf/ yHk(148)/
yHk(147)
yHk(148)
122uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
xdkYaemuf Form2 yHkpHtm;zefwD;wnfaqmufxm;&rnf/ yHk(149)/ 4if;wGif ,
, , rsm;jzifhzefwD;xm;NyD; Properties rsm;udkjyifqifjznfhpGuf
í Command Button rsm;wGif vdktyfaomy½dk*&rfrsm;a&;om;&ef jzpfygonf/
DataGrid \ Properties wGif atmufygwdkYudkjyifqifjznfhpGuf&ef/ yHk(150)/
AllowAddnew - TrueAllowArrows - TrueAllowDelete - TrueAllowUpdate - TrueDataSource - Wado
yHk(149)
123uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
yHk(150)
xdkYaemuf DataGrid ay:odkY Mouse Left Click jzifha½G;cs,fNyD; Mouse RightClick udkESdyfyg/ yHk(151)yg Short Cut Menu ay:vmygu Retrieve Fields udkxyfrH
a½G;cs,f&rnf/
124uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
xdktcg yHk(152)yg Retrieve fields Dialog Box ay:vmygu Yes udkxyfrHa½G;cs,fyg/
yHk(153)ygtwdkif; DataGrid xJwGif oufqdkif&m Fields udkawGU½Sd&ayrnf/
yHk(151)
yHk(152)
125uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
yHk(153)
(3)bmomaygif;jcif; (3)bmomaygif;jcif; (3)bmomaygif;jcif; (3)bmomaygif;jcif; (3)bmomaygif;jcif; Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click()Wado.Recordset.MoveFirstDo While Wado.Recordset.EOF = False
Wado.Recordset("Total") = Wado.Recordset("Myanmar") +Wado.Recordset("English") +Wado.Recordset("Maths")
Wado.Recordset.UpdateWado.Recordset.MoveNext
LoopWado.Recordset.MoveFirst
End Sub
rlvae&modkYjyefoGm;jcif; rlvae&modkYjyefoGm;jcif; rlvae&modkYjyefoGm;jcif; rlvae&modkYjyefoGm;jcif; rlvae&modkYjyefoGm;jcif; Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click() Form2.Hide Form1.ShowEnd Sub
126uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Record Position jyo&eftwGufjyo&eftwGufjyo&eftwGufjyo&eftwGufjyo&eftwGuf
Private Sub Wado_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus AsADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
Wado.Caption = "Record: " & CStr(Wado.Recordset.AbsolutePosition)End Sub
tqdkygy½dk*&rfudk Run ygu yHk(154)twdkif; azmfjyrnfjzpfonf/
Access 2002 Database File wGif wGif wGif wGif wGif Field topfxyfxnfhí topfxyfxnfhí topfxyfxnfhí topfxyfxnfhí topfxyfxnfhí Update vkyfjcif;vkyfjcif;vkyfjcif;vkyfjcif;vkyfjcif;
Access 2002 Database File jzpfaom Test2.mdb wGif Result, Amount ofFail [lí Field topf(2)ckxyfrHxnfhyg/ xdkYaemuf Visual Basic 6.0 jzifhy½dk*&rfa&;om;rnfqdku yxrOD;pGmyHk(155)ygtwdkif; Form1 udkwnfaqmuf&rnf/
yHk(154)
127uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
yHk(155)
txufyg yHk(155)wGif rsm;jzifhzefwD;xm;NyD; Command Buttonrsm;wGif vdktyfaomy½dk*&rfrsm; a&;om;&ef jzpfygonf/
zdkifzGifjcif; zdkifzGifjcif; zdkifzGifjcif; zdkifzGifjcif; zdkifzGifjcif; Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click() Form1.Hide Form2.ShowEnd Sub
xGufjcif; xGufjcif; xGufjcif; xGufjcif; xGufjcif; Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click() Unload Me EndEnd Sub
xdkYaemuf Form2 yHkpHtm; yHk(156)ygtwdkif; zefwD;wnfaqmufxm;&rnf/
128uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
(3)bmomaygif;jcif; (3)bmomaygif;jcif; (3)bmomaygif;jcif; (3)bmomaygif;jcif; (3)bmomaygif;jcif; Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click()Wado.Recordset.MoveFirstb = 1 'Record CounterDo While Wado.Recordset.EOF = False
Wado.Recordset("Total") = Wado.Recordset("Myanmar") +Wado.Recordset("English") + Wado.Recordset("Maths")
If Wado.Recordset("Myanmar") < 40 Or Wado.Recordset("English")< 40 Or Wado.Recordset("Maths") < 40 Then
Wado.Recordset("Result") = "Fail"Else
Wado.Recordset("Result") = "Pass"End IfIf Wado.Recordset("Myanmar") < 40 And Wado.Recordset("English")
< 40 And Wado.Recordset("Maths") < 40 ThenWado.Recordset("Amount of Fail") = "3"
ElseIf Wado.Recordset("Myanmar") < 40 AndWado.Recordset("English") < 40 AndWado.Recordset("Maths") >= 40 Then
Wado.Recordset("Amount of Fail") = "2"
yHk(156)
129uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
ElseIf Wado.Recordset("Myanmar") < 40 AndWado.Recordset("English") >= 40 AndWado.Recordset("Maths") < 40 Then
Wado.Recordset("Amount of Fail") = "2"ElseIf Wado.Recordset("Myanmar") >= 40 And
Wado.Recordset("English") < 40 AndWado.Recordset("Maths") < 40 Then
Wado.Recordset("Amount of Fail") = "2"ElseIf Wado.Recordset("Myanmar") < 40 And
Wado.Recordset("English") >= 40 AndWado.Recordset("Maths") >= 40 Then
Wado.Recordset("Amount of Fail") = "1"ElseIf Wado.Recordset("Myanmar") >= 40 And
Wado.Recordset("English") < 40 AndWado.Recordset("Maths") >= 40 Then
Wado.Recordset("Amount of Fail") = "1"ElseIf Wado.Recordset("Myanmar") >= 40 And
Wado.Recordset("English") >= 40 AndWado.Recordset("Maths") < 40 Then
Wado.Recordset("Amount of Fail") = "1"Else
Wado.Recordset("Amount of Fail") = NullEnd IfWado.Recordset.UpdateWado.Recordset.MoveNextb = b + 1
LoopWado.Recordset.MoveFirstText1.Text = b - 1
End Subrlvae&mjyefoGm;jcif; rlvae&mjyefoGm;jcif; rlvae&mjyefoGm;jcif; rlvae&mjyefoGm;jcif; rlvae&mjyefoGm;jcif; Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click()Form2.HideForm1.Show
End Sub
130uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
tqdkygy½dk*&rfudk Run ygu yHk(157)twdkif; azmfjyrnfjzpfonf/
Access 2002 Database File ½Sd ½Sd ½Sd ½Sd ½Sd Query File tm;ac:oHk;jcif;tm;ac:oHk;jcif;tm;ac:oHk;jcif;tm;ac:oHk;jcif;tm;ac:oHk;jcif;
Access 2002 Database File jzpfaom Test2.mdb wGif Position [lí Fieldtopf(1)ckxyfrHxnfhyg/ Result Field udk Descending, Amount of Fail Field udk
Ascending, Total Field udk Descending jzifhpDxm;aom ptest2 trnf½Sd QueryFile wpfckwnfaqmufxm;yg/ xdkYaemuf Visual Basic 6.0 jzifhy½dk*&rfa&;om;rnfqdku
yxrOD;pGmyHk(158)ygtwdkif; Form1 udkwnfaqmuf&rnf/
yHk(157)
yHk(158)
131uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
yHk(158)wGif rsm;jzifhzefwD;xm;NyD; Command Button rsm;wGif
vdktyfaomy½dk*&rfrsm; a&;om;&ef jzpfygonf/
zdkifzGifjcif; zdkifzGifjcif; zdkifzGifjcif; zdkifzGifjcif; zdkifzGifjcif; Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click() Form1.Hide Form2.ShowEnd Sub
xGufjcif; xGufjcif; xGufjcif; xGufjcif; xGufjcif; Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click() Unload Me EndEnd Sub
xdkYaemuf Form2 yHkpHtm; yHk(159)ygtwdkif; zefwD;wnfaqmufxm;&rnf/
yHk(159)
132uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Adodc \ Properties wGifatmufygwdkYudkjyifqifjznfhpGuf&ef-
(Name) - WadoCaption - EmptyConnectionString - PROVIDER = MSDASQL; dsn = Test2; uid=;
pwd=;RecordSource - Select [Roll Number], Name, Myanmar, English,
Maths, Total, Result, [Amount of Fail], Positionfrom ptest2
(3)bmomaygif;jcif; (3)bmomaygif;jcif; (3)bmomaygif;jcif; (3)bmomaygif;jcif; (3)bmomaygif;jcif; Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click()Wado.Recordset.MoveFirstp = Wado.Recordset("Total") 'Initialize Totalq = Wado.Recordset("Result") 'Initialize Resultr = Wado.Recordset("Amount of fail") 'Initialize Amount of Faila = 1 'Duplicate Totalb = 1 'Record CounterDo While Wado.Recordset.EOF = False
Wado.Recordset("Total") = Wado.Recordset("Myanmar") +Wado.Recordset("English") + Wado.Recordset("Maths")
If Wado.Recordset("Myanmar") < 40 Or Wado.Recordset("English")< 40 Or Wado.Recordset("Maths") < 40 Then
Wado.Recordset("Result") = "Fail"Else
Wado.Recordset("Result") = "Pass"End IfIf Wado.Recordset("Myanmar") < 40 And Wado.Recordset("English")
< 40 And Wado.Recordset("Maths") < 40 ThenWado.Recordset("Amount of Fail") = "3"
ElseIf Wado.Recordset("Myanmar") < 40 AndWado.Recordset("English") < 40 AndWado.Recordset("Maths") >= 40 Then
Wado.Recordset("Amount of Fail") = "2"ElseIf Wado.Recordset("Myanmar") < 40 And
133uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Wado.Recordset("English") >= 40 AndWado.Recordset("Maths") < 40 Then
Wado.Recordset("Amount of Fail") = "2"ElseIf Wado.Recordset("Myanmar") >= 40 And
Wado.Recordset("English") < 40 AndWado.Recordset("Maths") < 40 Then
Wado.Recordset("Amount of Fail") = "2"ElseIf Wado.Recordset("Myanmar") < 40 And
Wado.Recordset("English") >= 40 AndWado.Recordset("Maths") >= 40 Then
Wado.Recordset("Amount of Fail") = "1"ElseIf Wado.Recordset("Myanmar") >= 40 And
Wado.Recordset("English") < 40 AndWado.Recordset("Maths") >= 40 Then
Wado.Recordset("Amount of Fail") = "1"ElseIf Wado.Recordset("Myanmar") >= 40 And
Wado.Recordset("English") >= 40 AndWado.Recordset("Maths") < 40 Then
Wado.Recordset("Amount of Fail") = "1"Else
Wado.Recordset("Amount of Fail") = NullEnd IfIf (p = Wado.Recordset("Total") And Wado.Recordset("Result") =
"Pass") Or (p = Wado.Recordset("Total") And q =Wado.Recordset("Result") And r =Wado.Recordset("Amount of Fail")) Then
Wado.Recordset("Position") = aElseIf (p = Wado.Recordset("Total") And Wado.Recordset("Result")
= "Fail") Thena = a + 1Wado.Recordset("Position") = ba = b
Elsea = a + 1Wado.Recordset("Position") = b
134uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
a = bEnd Ifp = Wado.Recordset("Total") 'Initialize Totalq = Wado.Recordset("Result") 'Initialize Resultr = Wado.Recordset("Amount of fail") 'Initialize Amount of FailWado.Recordset.UpdateWado.Recordset.MoveNextb = b + 1
LoopWado.Recordset.MoveFirstText1.Text = b - 1
End Subrlvae&mjyefoGm;jcif; jcif; rlvae&mjyefoGm;jcif; jcif; rlvae&mjyefoGm;jcif; jcif; rlvae&mjyefoGm;jcif; jcif; rlvae&mjyefoGm;jcif; jcif; Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click()Form2.HideForm1.Show
End Subtqdkygy½dk*&rfudk Run ygu yHk(160)twdkif; azmfjyrnfjzpfonf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(160)
135uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
tcef;(8)tcef;(8)tcef;(8)tcef;(8)tcef;(8)
Data Types rsm;\*kPfowådrsm;rsm;\*kPfowådrsm;rsm;\*kPfowådrsm;rsm;\*kPfowådrsm;rsm;\*kPfowådrsm;
Data TypeByteBooleanIntegerLong(long integer)Single(single precisionfloating-pointDouble(double-precisionfloating-point
Currency(scaled integer)Decimal
DateObjectString(variable-length)String(fixed-length)Variant(with numbers)Variant(with characters)User-defined(using type)
Storage Size1 byte2 bytes2 bytes4 bytes
4 bytes
8 bytes
8 bytes
14 bytes
8 bytes4 bytes10 bytes+ string lengthLength of string
16 bytes
22 bytes+string lengthNumberrequired byelements
Range0 to 255True or False-32,768 to 32767-2,147,483,648 to 2,147,483,647
-3.402823E38 to -1.401298E-45 for negativevalues; 1.401298E-45 to 3.402823E38 forpositive values-1.79769313486232E308 to-4.94065645841247E-324 for negativevalues; 4.94065645841247E-324 to1.79769313486232E308 for positive values-922,337,203,685,477.5808 to922,337,203,685,477.5808+/-79,228,162,514,264,337,593,543,950,335with no decimal point;+/-79,228,162,514,264,337,593,543,950,335with 28 places to the right of the decimal point;smallest nonzero number is+/-0.00000000000000000000000000001January 1, 100 December 31, 9999Any Object reference0 to approximately 2 billion
1 to approximately 65,400
Any numeric value up to the range of a Double
Same range as for variable-length String
The range of each element is the same as therange of its data type
136uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
erlemy½dk*&rfrsm;erlemy½dk*&rfrsm;erlemy½dk*&rfrsm;erlemy½dk*&rfrsm;erlemy½dk*&rfrsm;
yHk(161)yg Form wGif , , wdkYjzifhwnfaqmuf
xm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command Button toD;oD;wGif
vdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
Text1 TextBox \ \ \ \ \ Properties rSm -rSm -rSm -rSm -rSm -
Alignment - 2 - CenterFont - MS Sans Serif, Regular, 24Text - EmptyImage1 Image \ \ \ \ \ Properties rSm -rSm -rSm -rSm -rSm -
Picture - Phone.wmfStretch - TrueDisplay Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click() Text1.Text = DateEnd SubExit Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click() Unload Me EndEnd Sub
yHk(161)
137uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Form Click twGuftwGuftwGuftwGuftwGuf
Private Sub Form_Click() Text1.Font.Bold = TrueEnd SubImage1 Click twGuftwGuftwGuftwGuftwGuf
Private Sub Image1_Click() Image1.Move Image1.Left + 50, Image1.Top - 550 MsgBox "Hello"End Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(162)yg Form wGif , , ,
wdkYjzifhwnfaqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command ButtontoD;oD;wGif vdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
Picture1 PictureBox \ \ \ \ \ Properties rSm -rSm -rSm -rSm -rSm -
(Name) - Picture1AutoSize - FalsePicture - "C:\WINDOWS\SETUP.BMP"Text1 TextBox \ \ \ \ \ Properties rSm -rSm -rSm -rSm -rSm -
Font - MS Sans Serif, Regular, 14Text - Empty
yHk(162)
138uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Command1 Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click() Command1.Caption = Text1.TextEnd SubExit Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click() Unload Me EndEnd SubPrivate Sub Form_Load() Picture1.Picture = LoadPicture("c:\windows\setup.bmp") Label1.Caption = Date Label2.Caption = TimeEnd SubPrivate Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii > 47 And KeyAscii <= 58 Then KeyAscii = 8 End IfEnd Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(163)
139uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
yHk(163)yg Form wGif , , wdkYjzifhwnf
aqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command Button toD;oD;
wGif vdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
Text1 TextBox \ \ \ \ \ Properties rSm -rSm -rSm -rSm -rSm -
Alignment - Left JustifyFont - MS Sans Serif, Regular, 12Text - EmptyAdd Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() List1.AddItem Text1.TextEnd SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click() Unload Me EndEnd Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(164)
140uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
yHk(164)yg Form wGif , , wdkYjzifhwnf
aqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command Button toD;oD;
wGif vdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
>> Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click()Dim i As IntegerFor i = 0 To List2.ListCount - 1
If List2.Selected(i) ThenList1.AddItem List2.List(i)
End IfNext iFor i = List2.ListCount - 1 To 0 Step -1
If List2.Selected(i) ThenList2.RemoveItem (i)
End IfNext i
End Sub<< Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click()Dim i As IntegerFor i = 0 To List1.ListCount - 1
If List1.Selected(i) ThenList2.AddItem List1.List(i)
End IfNext iFor i = List1.ListCount - 1 To 0 Step -1
If List1.Selected(i) ThenList1.RemoveItem (i)
End IfNext i
End Sub
141uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Add Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command3_Click()List1.AddItem Text1.Text
End SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command4_Click()Unload MeEnd
End Sub- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
Looping StructureDo ... LoopFor ... NextFor Each ... Next
Do While ... LoopDo While <Condition>
[Statements][Exit Do][Statements]
Loop
Do Until ... LoopDo Until <Condition>
[Statements][Exit Do][Statements]
Loop
Do ... Loop While <Condition>Do
[Statements]Loop While <Condition>
142uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Syntax;If <Condition> Then [Statements]
[Else elsestatements]or
If <Condition> Then[Statements][Elseif <Condition-n> Then[elsestatements] ...[Else
[elsestatements]]End If
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(165)yg Form wGif wdkYjzifhwnfaqmufxm;NyD; Properties rsm;udk
jyifqifjznfhpGufNyD;aemuf Command Button toD;oD; wGif vdktyfaom y½dk*&rfrsm;udk
a&;om;&ayrnf/
General, Declaration wGifwGifwGifwGifwGif
Private Sub Demoloop()n = 1Do While n <= 10
MsgBox n
yHk(165)
143uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
n = n + 1Loop
End SubPrivate Sub Demoloop1() Dim i As Integer i = 10 Do Until i < 1 MsgBox i i = i - 1 If i = 6 Then Exit Do End If LoopEnd SubCommand1 Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() DemoloopEnd SubCommand2 Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click() Demoloop1End Sub
For ... NextFor Counter = Start To End [Step Increment]
[Statements]Next
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
144uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
yHk(165)yg Form wGif jzifhwnfaqmufxm;NyD; Properties rsm;udk
jyifqifjznfhpGufNyD;aemuf Command Button wGif vdktyfaomy½dk*&rfrsm;udk a&;om;&ay
rnf/
Command1 Command Button wGifwGifwGifwGifwGif
Private Sub Command1_Click() Unload Me EndEnd SubForm Click wGifwGifwGifwGifwGif
Private Sub Form_Click() Print Screen.FontCount Dim i As Integer For i = 0 To Screen.FontCount Print Screen.Fonts(i) NextEnd Sub
yHk(166)
145uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Select CaseSelect Case <testexpression>
[Case <expressionlist1>[Statementblock-1]]
[Case <expressionlist2>[Statementblock-2]]...
[Case Else[Statementblock-n]]
End Select
InputBoxInputBox(Prompt[,Title][,default][,xpos][,ypos][,helpfile,context])
MessageBoxMessageBox(Prompt[,buttons][,Title][,helpfile,context])
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(167)yg Form wGif , , wdkYjzifh
wnfaqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command ButtontoD;oD;wGif vdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
= Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() num1 = Val(Text1.Text) num2 = Val(Text2.Text) Select Case Combo1.Text
yHk(167)
146uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Case "+" Text3.Text = num1 + num2 Case "-" Text3.Text = num1 - num2 Case "*" Text3.Text = num1 * num2 Case "/" Text3.Text = num1 / num2 End SelectEnd SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click() Unload Me EndEnd SubForm Load twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Form_Load() Combo1.AddItem "+" 'Adding the symbol + Combo1.AddItem "-" 'Adding the symbol - Combo1.AddItem "*" 'Adding the symbol * Combo1.AddItem "/" 'Adding the symbol /End Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(168)yg Form wGif , , wdk Y jzif h
wnfaqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command ButtontoD;oD;wGif vdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
yHk(168)
147uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Run Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() Shape1.Shape = Val(Text1.Text)End SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click() Unload Me EndEnd Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(169)yg Form wGif , , wdkYjzifh wnfaqmuf
xm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command Button toD;oD;wGif
vdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
Run Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() Line1.X1 = Val(Text1.Text) Line1.Y1 = Val(Text2.Text) Line1.X2 = Val(Text3.Text) Line1.Y2 = Val(Text4.Text)End Sub
yHk(169)
148uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click() Unload Me EndEnd Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(170)yg Form wGif , , wdkYjzifh wnfaqmuf
xm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command Button toD;oD;wGif
vdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
Interval Zero Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() Timer1.Interval = 0End Sub
Interval Hundred Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click() Timer1.Interval = 100End Sub
Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command3_Click() Unload Me EndEnd Sub
yHk(170)
149uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Timer1 Timer twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Timer1_Timer()Dim i As IntegerLabel1.Caption = Right(Trim(Label1.Caption), Len(Trim(Label1
.Caption)) - 1) + Trim(Left(Label1.Caption, 1))End Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -Toolbox wGifyg0ifaom wGifyg0ifaom wGifyg0ifaom wGifyg0ifaom wGifyg0ifaom Icon rsm;ESifherlemy½dk*&rfrsm;rsm;ESifherlemy½dk*&rfrsm;rsm;ESifherlemy½dk*&rfrsm;rsm;ESifherlemy½dk*&rfrsm;rsm;ESifherlemy½dk*&rfrsm;
Pointer PictureBox Label
TextBox Frame Command
Button
CheckBox OptionButton ComboBox
ListBox HScrollBar VScrollBar
Timer DriveListBox DirListBox
FileListBox Shape Line
Image DataControl OLE
150uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
yHk(171)yg Form wGif FileListBox, DriveListBox, DirListBox,
Image, wdkYjzifh wnfaqmufxm;NyD; Properties rsm;udkjyifqif
jznfhpGufNyD;aemuf Command Button toD;oD;wGif vdktyfaom y½dk*&rfrsm;udka&;om;
&ayrnf/
Image1 Image Properties twGuf -
(Name) - Image1Stretch - TrueFile FileListBox Properties twGuf -
(Name) - File1Pattern - *.bmp;*.jpg;*.gif;*.pic;*.tif;*.icoShow Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() Image1.Picture = LoadPicture(Dir1.Path & "\" & File1.FileName)End SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click() Unload Me EndEnd Sub
yHk(171)
151uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Directory Change &eftwGuf -&eftwGuf -&eftwGuf -&eftwGuf -&eftwGuf -
Private Sub Dir1_Change() File1.Path = Dir1.PathEnd SubDrive Change &eftwGuf -&eftwGuf -&eftwGuf -&eftwGuf -&eftwGuf -
Private Sub Drive1_Change() Dir1.Path = Drive1.DriveEnd Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(172)yg Form wGif Frame , Shape, HScrollBar,
VScrollBar, CheckBox, OptionButton, wdk Y jzif h
wnfaqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command ButtontoD;oD;wGif vdktyfaom y½dk*&rfrsm;udka&;om; &ayrnf/
Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() Unload Me EndEnd Sub
yHk(172)
152uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Horizontal Scroll Bar twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub HScroll1_Change() Shape1.Width = HScroll1.ValueEnd SubVertical Scroll Bar twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub VScroll1_Change() Shape1.Height = VScroll1.ValueEnd SubOption1 Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Option1_Click() If Option1.Value Then Shape1.Shape = 0 End IfEnd SubOption2 Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Option2_Click() If Option2.Value Then Shape1.Shape = 2 End IfEnd SubOption3 Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Option3_Click() If Option3.Value Then Shape1.Shape = 4 End IfEnd Sub
Shape1 - Fill Style0 Solid 4 Upward Diagonal1 Transparent 5 Downward Diagonal2 Horizontal Line 6 Cross3 Vertical Line 7 Diagonal Cross
153uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Shape1 - Shape0 Rectangle 3 Circle1 Square 4 Rounded Rectangle2 Oval 5 Rounded Square
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(173)yg Form wGif TextBox, Timer, wdkYjzifh wnf
aqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command Button toD;oD;
wGif vdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
Text1, Text2 TextBox Properties twGuf -
Alignment - 2 - CenterFont - MS Sans Serif, 14, BoldText - EmptyTimer1 Timer Properties twGuf -
(Name) - Timer1Interval - 1000Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() Unload Me EndEnd SubForm Load twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Form_Load() Text1.Text = Time$ Text2.Text = Date$End Sub
yHk(173)
154uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Timer1 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Timer1_Timer() Text1.Text = Time$End Sub
rivate Sub Command1_Click() Unload Me EndEnd Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(174)yg Form wGif TextBox, wdkYjzifh wnfaqmufxm;NyD;
Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command Button toD;oD;wGif vdktyfaom
y½dk*&rfrsm;udka&;om;&ayrnf/
Text1, Text2, Text3, Text4 TextBox Properties twGuf -
Alignment - 2 - CenterFont - MS Sans Serif, 14, BoldText - EmptyCommand1 Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() Dim MyDate As Date MyDate = Format(Text1.Text, "D-MMMM-YY") Text2.Text = Format(MyDate, "dddd") Text3.Text = Text2.TextEnd Sub
yHk(174)
155uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Command2 Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click() Text4.Text = Format(Text3.Text, ">")End SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command3_Click() Unload Me EndEnd Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(175)yg Form wGif Label, TextBox, wdkYjzifh wnf
aqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command Button toD;oD;
wGif vdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
Text1, Text2 TextBox Properties twGuf -
Alignment - 2 - CenterFont - MS Sans Serif, 12, BoldText - EmptyCommand1 Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click()Unload MeEnd
End Sub
yHk(175)
156uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Text1 wGif wGif wGif wGif wGif Data xnfhonfESifh xnfhonfESifh xnfhonfESifh xnfhonfESifh xnfhonfESifh Text2 wGiftajzay:&eftwGuf -wGiftajzay:&eftwGuf -wGiftajzay:&eftwGuf -wGiftajzay:&eftwGuf -wGiftajzay:&eftwGuf -
Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer) Text2.Text = (Text1.Text * 9 / 5) + 32End SubText2 wGif wGif wGif wGif wGif Data xnfhonfESifh xnfhonfESifh xnfhonfESifh xnfhonfESifh xnfhonfESifh Text1 wGiftajzay:&eftwGuf -wGiftajzay:&eftwGuf -wGiftajzay:&eftwGuf -wGiftajzay:&eftwGuf -wGiftajzay:&eftwGuf -
Private Sub Text2_KeyUp(KeyCode As Integer, Shift As Integer) Text1.Text = (Text2.Text - 32) * 5 / 9End Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(176)yg Form wGif Label, TextBox, wdkYjzifh wnf
aqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Select Command ButtonwGif vdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
Label1 Label Properties twGuf -
(Name) - Label1AutoSize - TrueBackStyle - TransparentCaption - EmptyText1 TextBox Properties twGuf -
Alignment - 2 - CenterFont - MS Sans Serif, 12, BoldText - EmptyCommand1 Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() Dim n As Integer n = Val(Text1.Text) If n <= 2 Then Select Case Text1.Text Case 0
yHk(176)
157uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Label1.Caption = "Good Day" Case 1 Label1.Caption = "Good Morning" Case 2 Label1.Caption = "How are you?" End Select Else Label1.Caption = "Invalid Option" End IfEnd Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(177)yg Form wGif TextBox, ComboBox, wdkY
jzifh wnfaqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command ButtontoD;oD;wGif vdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
Text1 TextBox Properties twGuf -
Alignment - 2 - CenterFont - MS Sans Serif, 8, BoldText - EmptyAdd Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() Combo1.AddItem Text1.Text Text1.Text = Empty Command2.Enabled = TrueEnd Sub
yHk(177)
158uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Delete Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click() n = Combo1.ListIndex If n <> -1 Then Combo1.RemoveItem n End IfEnd SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command3_Click() Unload Me EndEnd Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(178)yg Form wGif OptionButton, wdkYjzifhwnfaqmuf
xm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Option Button, Command ButtontoD;oD;wGif vdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
Option Button1 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Option1_Click() Form1.BackColor = QBColor(2)End Sub
yHk(178)
159uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Option Button2 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Option2_Click() Form1.BackColor = QBColor(5)End SubOption Button3 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Option3_Click() Form1.BackColor = QBColor(0)End SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() Unload Me EndEnd Sub
Syntax;QBColor(<Color>)
MyForm.BackColor = QBColor(ColorCode)
Number Color Number Color Number Color
0 Black 6 Yellow 12 Light Red
1 Blue 7 White 13 Light Magenta
2 Green 8 Grey 14 Light Yellow
3 Cyan 9 Light Blue 15 Bright White
4 Red 10 Light Green
5 Magenta 11 Light Cyan
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
160uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
yHk(179)yg Form wGif OptionButton, wdkYjzifhwnfaqmuf
xm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Option Button, Command ButtontoD;oD;wGif vdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
Option Button1 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Option1_Click() Form1.BackColor = QBColor(0)End SubOption Button2 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Option2_Click() Form1.BackColor = QBColor(1)End SubOption Button3 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Option3_Click() Form1.BackColor = QBColor(2)End SubOption Button4 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Option4_Click() Form1.BackColor = QBColor(3)End SubOption Button5 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Option5_Click() Form1.BackColor = QBColor(4)End Sub
yHk(179)
161uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Option Button6 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Option6_Click() Form1.BackColor = QBColor(5)End SubOption Button7 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Option7_Click() Form1.BackColor = QBColor(6)End SubOption Button8 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Option8_Click() Form1.BackColor = QBColor(7)End SubOption Button9 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Option9_Click() Form1.BackColor = QBColor(8)End SubOption Button10 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Option10_Click() Form1.BackColor = QBColor(9)End SubOption Button11 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Option11_Click() Form1.BackColor = QBColor(10)End SubOption Button12 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Option12_Click() Form1.BackColor = QBColor(11)End SubOption Button13 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Option13_Click() Form1.BackColor = QBColor(12)End Sub
162uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Option Button14 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Option14_Click() Form1.BackColor = QBColor(13)End SubOption Button15 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Option15_Click() Form1.BackColor = QBColor(14)End SubOption Button16 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Option16_Click() Form1.BackColor = QBColor(15)End SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() Unload Me EndEnd Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(180)yg Form wGif CheckBox, wdkYjzifhwnfaqmufxm;NyD;
Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command Button toD;oD;wGif vdktyfaom
y½dk*&rfrsm;udka&;om;&ayrnf/
yHk(180)
163uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Run Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() If Check1.Value = 1 And Check2.Value = 1 And Check3.Value = 1 Then MsgBox "Eligible for the Housing Loan", , "Housing Loan" Else MsgBox "Not Eligible for the Housing Loan" End IfEnd SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click() Unload Me EndEnd Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(181)yg Form wGif wdkYjzifhwnfaqmufxm;NyD; Properties rsm;
udkjyifqifjznfhpGufNyD;aemuf Command Button toD;oD;wGif vdktyfaomy½dk*&rfrsm;udk
a&;om;&ayrnf/
Run Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() Dim ret_date As Date ret_date = InputBox("Enter the Date of Joining", "Date of Joining") If ret_date > Date Then MsgBox "Invalid Date! Re-enter" Else MsgBox "Date is Valid"
yHk(181)
164uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
End IfEnd SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click() Unload Me EndEnd Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(182)yg Form wGif Fans, Music System wdkYudk Menu Editor... jzifhvnf;aumif;
TextBox, wdkYjzifhvnf;aumif;wnfaqmufxm;NyD; Properties
rsm;udk jyifqifjznfhpGufNyD;aemuf Command Button toD;oD;wGif vdktyfaomy½dk*&rfrsm;
udk a&;om;&ayrnf/
General, Declaration wGif -wGif -wGif -wGif -wGif -
Dim LastItem As IntegerMenu Editor Dialog Box wGif -wGif -wGif -wGif -wGif -
Caption - &FansName - FansCaption - &Music SystemName - mnMusic
mnMusic \ Properties udk yHk(183)ygtwdkif; Index tm; 0 (Zero) xm;ay;&rnf/
xdkrSom y½dk*&rf Run í&ayrnf/
yHk(182)
165uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Run Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() lastitem = lastitem + 1 If lastitem > 10 Then MsgBox "Limit Exceeded" Else Load mnMusic(lastitem) mnMusic(lastitem).Caption = Text1.Text End IfEnd SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click() Unload Me EndEnd Sub
tqdkyg y½dk*&rfudk Run ygu yHk(184)ygtwdkif;jrifawGU&ayrnf/
yHk(183)
166uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
yHk(184)
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(185)yg Form wGif File, Add, Delete, Exit wdkYudk Menu Editor... jzifhvnf;
aumif;? TextBox, wdkYjzifhvnf;aumif;wnfaqmufxm;NyD;
Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command Button toD;oD;wGifvdktyfaom
y½dk*&rfrsm;udk a&;om;&ayrnf/
Menu Editor Dialog Box wGif -wGif -wGif -wGif -wGif -
Caption Name&File mnFile&Add mnAdd&Delete mnDeleteE&xit mnExit
mnSep
yHk(185)
167uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
mnSep udk Caption a&;&efrvdkyg/ Name wGifom mnSep [kowfrSwfí 4if;
Properties \ Index wGif 0 (Zero) ay;&ayrnf/
General, Declaration wGif -wGif -wGif -wGif -wGif -
Dim LastItem As IntegerForm Load wGif -wGif -wGif -wGif -wGif -
Private Sub Form_Load() LastItem = 0 mnDelete.Enabled = FalseEnd SubAdd Menu twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub mnAdd_Click(Index As Integer) LastItem = LastItem + 1 Load mnSep(LastItem) mnSep(LastItem).Caption = "ITEM" + Str(LastItem) mnDelete.Enabled = TrueEnd SubDelete Menu twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub mnDelete_Click() Unload mnSep(LastItem) LastItem = LastItem - 1 If LastItem = 0 Then mnDelete.Enabled = False End IfEnd SubExit Menu twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub mnExit_Click() Unload Me EndEnd SubmnSep Click twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub mnSep_Click(Index As Integer) MsgBox "The selected item is " + Str(Index)End Sub
tqdkyg y½dk*&rfudk Run ygu yHk(186)ygtwdkif;jrifawGU&ayrnf/
168uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Add Menu udka½G;ygu ITEM rsm;wdk;vmNyD; Delete Menu a½G;ygu ITEM rsm;
ysufoGm;onfudkawGU½Sd&ayrnf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(187)yg Form wGif OptionButton, ,
wdkYjzifhvnf;aumif;wnfaqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf
Command Button toD;oD;wGifvdktyfaom y½dk*&rfrsm;udk a&;om;&ayrnf/
CommonDialog Control udk Toolbox twGif;odkYqJGwif&mwGif Toolbox EIwfcrf;om;
vGwfaeaomae&mwpfckudk Mouse Pointer ñTefí Right Click ESdyfyg/ yHk(188)ygtwdkif;
Short Cut Menu wpfckay:vmrnf/
yHk(186)
yHk(187)
169uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
yHk(188)wGif Components... udkxyfrHa½G;cs,fyg/ xdktcg Components DialogBox ay:vmrnf/ yHk(189)/ 4if;rS Microsoft Common Dialog Control 6.0 udka½G;cs,f
NyD; Apply Command Button udka½G;cs,fyg/ xdkYaemuf Close Command Button udk
xyfrHa½G;cs,f&rnf/
xdktcg Toolbox wGif yHk(190)ygtwdkif; CommonDialog Control a&muf½Sdvm
ayrnf/
yHk(188)
yHk(189)
170uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Option1 Option Properties wGif Index udk 0 (Zero) [kowfrSwf&rnf/
Run Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() If Option1(0).Value Then CommonDialog1.ShowOpen ElseIf Option1(1).Value Then CommonDialog1.ShowSave ElseIf Option1(2).Value Then CommonDialog1.ShowColor End IfEnd SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click() Unload Me EndEnd SubForm xJwGif aemufxyf xJwGif aemufxyf xJwGif aemufxyf xJwGif aemufxyf xJwGif aemufxyf Option Button jzpfay:vm&eftwGuf -jzpfay:vm&eftwGuf -jzpfay:vm&eftwGuf -jzpfay:vm&eftwGuf -jzpfay:vm&eftwGuf -
Private Sub Form_Paint() Static F As Integer If F <> True Then For i = 1 To 2 Load Option1(i) Option1(i).Top = Option1(i - 1).Top + 350 Option1(i).Visible = True Next i
yHk(190)
171uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Option1(0).Caption = "Open" Option1(1).Caption = "Save" Option1(2).Caption = "Color" Command1.Caption = "Show Dlg" F = True End IfEnd Sub
txufyg y½dk*&rfudk Run ygu atmufygtwdkif;jrifawGU&rnf/ yHk(191)/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(191)
yHk(192)
172uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
yHk(192)yg Form wGif File, Points, Line, Clear, Exit wdkYudk Menu Editor... jzifh
vnf;aumif;? vIyf½Sm;&rnfhtcsdefumvudk Timer wdkYjzifhvnf;aumif; wnfaqmuf
xm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Pulldown Menu toD;oD;wGifvdktyf
aom y½dk*&rfrsm;udk a&;om;&ayrnf/
Timer1 Timer Properties wGif -
Interval - 100Caption Name&File mnFile...&Points mnPoints...&Lines mnLines...&Clear mnClear...- mnSep...E&xit mnExit
General, Declaration wGif -wGif -wGif -wGif -wGif -
Dim PointsForm Load twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Form_Load() Points = 0End SubClear Pulldown Menu twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub mnClear_Click() Points = 0 Form1.ClsEnd SubExit Pulldown Menu twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub mnExit_Click() Unload Me EndEnd Sub
173uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Lines Pulldown Menu twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub mnLines_Click()Dim CounterFor Counter = 1 To 100 Step 1
Line -(Rnd * Form1.ScaleWidth, Rnd * Form1.ScaleHeight),RGB(0, 0, 0)
NextEnd SubPoints Pulldown Menu twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub mnPoints_Click()Points = 1
End SubvIyf½Sm;&rnfhtcsdefumvtwGuf -vIyf½Sm;&rnfhtcsdefumvtwGuf -vIyf½Sm;&rnfhtcsdefumvtwGuf -vIyf½Sm;&rnfhtcsdefumvtwGuf -vIyf½Sm;&rnfhtcsdefumvtwGuf -
Private Sub Timer1_Timer()Dim R, G, BDim X, YDim CounterIf Points = 1 Then
For Counter = 1 To 100 Step 1R = Rnd * 255G = Rnd * 255B = Rnd * 255X = Rnd * Form1.ScaleWidthY = Rnd * Form1.ScaleHeightForm1.PSet (X, Y), RGB(R, G, B)
NextEnd If
End Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
174uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
yHk(192)yg Form wGif Command Button wpfckwnf;jzifhomwnfaqmufxm;NyD;
vdktyfaom y½dk*&rfrsm;udk a&;om;&ayrnf/
Form udk udk udk udk udk Click vkyfygujzpfay:vm&eftwGuf -vkyfygujzpfay:vm&eftwGuf -vkyfygujzpfay:vm&eftwGuf -vkyfygujzpfay:vm&eftwGuf -vkyfygujzpfay:vm&eftwGuf -
Private Sub Form_Click()Dim iScaleHeight = 8For i = 0 To 5
DrawStyle = iLine (0, i + 1)-(ScaleWidth, i + 1)
NextEnd SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() Unload Me EndEnd Sub
tqdkygy½dk*&rfudk Run NyD; Form xJudk Mouse Left Click vkyfygu yHk(194)ygtwdkif;
jrifawGU&rnf/
yHk(193)
175uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(195)yg Form wGif Command Button wpfckwnf;jzifhomwnfaqmufxm;NyD;
vdktyfaom y½dk*&rfrsm;udk a&;om;&ayrnf/
Form udk udk udk udk udk Click vkyfygujzpfay:vm&eftwGuf -vkyfygujzpfay:vm&eftwGuf -vkyfygujzpfay:vm&eftwGuf -vkyfygujzpfay:vm&eftwGuf -vkyfygujzpfay:vm&eftwGuf -
Private Sub Form_Click()Dim CX, CY, RadiusScaleMode = 3CX = ScaleWidth / 2CY = ScaleHeight / 2If CX > CY Then Limit = CY Else Limit = CX
yHk(194)
yHk(195)
176uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
For Radius = 0 To LimitCircle (CX, CY), Radius, RGB(Rnd * 255, Rnd * 255, Rnd * 255)
NextEnd SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() Unload Me EndEnd Sub
tqdkygy½dk*&rfudk Run NyD; Form xJudk Mouse Left Click vkyfygu yHk(196)ygtwdkif;
jrifawGU&rnf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(196)
177uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
yHk(197)yg TextBox, wdkYjzifhvnf;aumif;wnfaqmufxm;NyD;
Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command Button toD;oD;wGifvdktyfaom
y½dk*&rfrsm;udk a&;om;&ayrnf/
Text1 TextBox Properties wGif -wGif -wGif -wGif -wGif -
(Name) - Text1Alignment - Left JustifyMultiLine - TrueForm Click jyKvkyf&eftwGuf -jyKvkyf&eftwGuf -jyKvkyf&eftwGuf -jyKvkyf&eftwGuf -jyKvkyf&eftwGuf -
Private Sub Form_Click()filenum = FreeFileOpen "C:\Setupxlg.txt" For Input As filenumText1.Text = Input(LOF(filenum), filenum)Close filenum
End SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click()Unload MeEnd
End Sub
yHk(197)
178uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
tqdkygy½dk*&rfudk Run NyD; Form xJudk Mouse Left Click vkyfygu yHk(198)ygtwdkif;
jrifawGU&rnf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(199)yg Form yHkpHwGif Label, TextBox, Frame, Combo
yHk(198)
yHk(199)
179uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Box, CheckBox, wdkYjzifhvnf;aumif;wnfaqmufxm;NyD;
Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command Button toD;oD;wGifvdktyfaom
y½dk*&rfrsm;udk a&;om;&ayrnf/
Combo1 Combo Properties wGif -
Text - FontsList - Arial, Tahoma, Times, Times New RomanCombo2 Combo Properties wGif -
Text - StyleList - Regular, Bold, Italic, Bold ItalicCombo3 Combo Properties wGif -
Text - SizeList - 8, 10, 12, 14, 16, 18, 20General, Declaration wGif -wGif -wGif -wGif -wGif -
'h represents actual height of the form'f represents actual height of the frameDim f, h As Integer 'the variable f and h are declared globallyCheckl twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Check1_Click() 'Executes when check box Underline is checked If (Check1.Value = 1) Then Label2.FontUnderline = True Else Label2.FontUnderline = False End IfEnd SubCheck2 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Check2_Click() 'Executes when check box Strike Through is checked If (Check2.Value = 1) Then Label2.FontStrikethru = True Else Label2.FontStrikethru = False End IfEnd Sub
180uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Combol1 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Combo1_LostFocus() 'Executes after you selected font name Label2.FontName = Combo1.TextEnd SubCombol2 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Combo2_Change() 'Executes after you selected font style If Combo2.Text = "Italic " Or Combo2.Text = "BoldItalic " Then Label2.FontItalic = True Label2.FontBold = False Else Label2.FontItalic = False Label2.FontBold = True End IfEnd SubCombol3 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Combo3_Change() 'Executes after you selected font size Label2.FontSize = Val(Combo3.Text)End SubFont Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() 'Executes when font button is clicked Form1.Height = h 'Initial form height after you click on font button Frame1.Visible = TrueEnd SubPreview Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click() 'Executes after you selected Ok button Text1.FontName = Label2.FontName Text1.FontSize = Label2.FontSize If Label2.FontItalic = True Then Text1.FontBold = False
181uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Text1.FontItalic = True Else Text1.FontBold = True Text1.FontItalic = False End If If (Check1.Value = 1) Then Text1.FontUnderline = True Else Text1.FontUnderline = False End If If (Check2.Value = 1) Then Text1.FontStrikethru = True Else Text1.FontStrikethru = False End IfEnd SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command3_Click() Unload Me EndEnd SubForm Load twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Form_Load() h = Form1.Height f = Frame1.Height Frame1.Visible = False Form1.Height = h - f 'Initial form height before you click on font buttonEnd SubText1 Change twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Text1_Change() Label2.Caption = Text1.TextEnd Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
182uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
yHk(200)
yHk(200)yg Form yHkpHwGif Label, TextBox, wdkYjzifh
wnfaqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command ButtontoD;oD;wGifvdktyfaom y½dk*&rfrsm;udk a&;om;&ayrnf/
Calculate - Command Button1 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() Text4.Text = Val(Text1.Text) - Val(Text2.Text) + Val(Text3.Text)End SubExit - Command Button2 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click() Unload Me EndEnd Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
183uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
yHk(201)
yHk(201)yg Form yHkpHwGif DirListBox, FileListBox, DriveList
Box, Label, Image, wdkYjzifhwnfaqmufxm;NyD; Properties
rsm;udkjyifqifjznfhpGufNyD;aemuf Command Button toD;oD;wGifvdktyfaom y½dk*&rfrsm;
udka&;om;&ayrnf/
File1 FileListBox - Properties wGif -wGif -wGif -wGif -wGif -
(Name) - File1Pattern - *.bmp;*.pic;*.jpg;*.gif;*.wmf;*.tifLabel1 Label - Properties wGif -wGif -wGif -wGif -wGif -
(Name) - Label1AutoSize - FalseCaption - EmptyBorderStyle - 1 - Fixed SingleWordWrap - TrueImage1 Image - Properties wGif -wGif -wGif -wGif -wGif -
(Name) - Image1Stretch - True
184uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Access 2002
Directory Change twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Dir1_Change() File1.FileName = Dir1.PathEnd SubFile a½G;&eftwGuf -a½G;&eftwGuf -a½G;&eftwGuf -a½G;&eftwGuf -a½G;&eftwGuf -
Private Sub File1_Click() Image1.Picture = LoadPicture(Dir1.Path & "\" & File1.FileName) Label1.Caption = Dir1.Path & "\" & File1.FileNameEnd SubExit - Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click() Unload Me EndEnd Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
185uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(202)yg Form yHkpHwGif TextBox, ListBox, Command Button
wdkYjzifhwnfaqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command ButtontoD;oD;wGifvdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
General, Declaration wGif -wGif -wGif -wGif -wGif -
Dim i As IntegerAdd Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub command1_Click() List1.AddItem (Text1.Text)End SubDelete Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click() List1.RemoveItem (i)End SubClear Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command3_Click() List1.ClearEnd SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command4_Click() Unload Me EndEnd Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(202)
186uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
c:\windows\system\mschrt20.ocx
yHk(202)yg Form yHkpHwGif , Command Button wdkYjzifhwnfaqmuf
xm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command Button toD;oD;wGif
vdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
Run Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() With Form1.MSChart1 .chartType = VtChChartType3dArea .ColumnCount = 10 .RowCount = 10 For Column = 1 To 10 For Row = 1 To 10
yHk(203)
187uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
.Column = Column .Row = Row Next Row Next Column End WithEnd SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command4_Click() Unload Me EndEnd Sub
txufygy½dk*&rfudk Run ygu yHk(204)ygtwdkif;jrifawGU&ayrnf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(203)
yHk(204)
188uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
SS Tab
c:\windows\system\tabctl32.ocx
yHk(205)
189uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(206)yg Form yHkpHwGif , , Label, TextBox,
CheckBox, Command Button wdkYjzifh wnfaqmufxm;NyD; Properties rsm;
udkjyifqifjznfhpGufNyD;aemuf Command Button toD;oD;wGifvdktyfaom y½dk*&rfrsm;udk
a&;om;&ayrnf/
Check1 twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Check1_Click() If Check1.Value = vbChecked Then MSChart1.ShowLegend = True Else MSChart1.ShowLegend = False End IfEnd SubRefresh Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() MSChart1.Row = 1 MSChart1.Column = 1
yHk(206)
190uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
MSChart1.Data = Text1.Text MSChart1.Row = 2 MSChart1.Column = 1 MSChart1.Data = Text2.Text MSChart1.Row = 3 MSChart1.Column = 1 MSChart1.Data = Text3.Text MSChart1.Row = 1 MSChart1.Column = 2 MSChart1.Data = Text4.Text MSChart1.Row = 2 MSChart1.Column = 2 MSChart1.Data = Text5.Text MSChart1.Row = 3 MSChart1.Column = 2 MSChart1.Data = Text6.Text MSChart1.Row = 1 MSChart1.Column = 3 MSChart1.Data = Text7.Text MSChart1.Row = 2 MSChart1.Column = 3 MSChart1.Data = Text8.Text MSChart1.Row = 3 MSChart1.Column = 3 MSChart1.Data = Text9.TextEnd SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click() Unload Me EndEnd Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
191uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
MSFlexGrid
c:\windows\system\msflxgrd.ocx
yHk(207)yg Form yHkpHwGif , Command Button wdk Y jzifh
wnfaqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command ButtontoD;oD;wGif vdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
MSFlexGrid1 MSFlexGrid Properties twGuf -twGuf -twGuf -twGuf -twGuf -
Cols - 13Rows - 13Add Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click()Form1.Caption = "Addition Program"Dim x, yFor x = 1 To 12 Step 1
MSFlexGrid1.Row = xFor y = 1 To 12 Step 1
MSFlexGrid1.Col = y
yHk(207)
192uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
MSFlexGrid1.Text = x + yNext
NextEnd SubSubtract Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click()Form1.Caption = "Subtraction Program"Dim x, yFor x = 1 To 12 Step 1
MSFlexGrid1.Row = xFor y = 1 To 12 Step 1
MSFlexGrid1.Col = yMSFlexGrid1.Text = x - y
NextNext
End SubDivision Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command3_Click()Form1.Caption = "Division Program"Dim x, yFor x = 1 To 12 Step 1
MSFlexGrid1.Row = xFor y = 1 To 12 Step 1
MSFlexGrid1.Col = yMSFlexGrid1.Text = x / y
NextNext
End SubMultiplication Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command4_Click()Form1.Caption = "Multiplication Program"Dim x, yFor x = 1 To 12 Step 1
MSFlexGrid1.Row = xFor y = 1 To 12 Step 1
193uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
MSFlexGrid1.Col = yMSFlexGrid1.Text = x * y
NextNext
End SubGrid Line Width Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command5_Click()If MSFlexGrid1.GridLineWidth < 4 Then
MSFlexGrid1.GridLineWidth = MSFlexGrid1.GridLineWidth + 1Else
MSFlexGrid1.GridLineWidth = 1End If
End SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command6_Click()Unload MeEnd
End SubForm Load twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Form_Load()Dim a As IntegerMSFlexGrid1.Row = 0For a = 1 To 12
MSFlexGrid1.Col = aMSFlexGrid1.Text = Str(a)
NextMSFlexGrid1.Col = 0For a = 1 To 12
MSFlexGrid1.Row = aMSFlexGrid1.Text = Str(a)
NextEnd Sub
194uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(207)yg Form yHkpH Program udk Run yguatmufygtwdkif;jrifawGU&rnf/ yHk(208)/
Add Command Button udka½G;cs,fygu yHk(209)ygtwdkif;jrifawGU&rnf/
yHk(208)
yHk(209)
195uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Subtract Command Button udka½G;cs,fygu yHk(210)ygtwdkif;jrifawGU&rnf/
Division Command Button udka½G;cs,fygu yHk(211)ygtwdkif;jrifawGU&rnf/
yHk(210)
yHk(211)
196uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Multiplication Command Button udka½G;cs,fygu yHk(212)ygtwdkif;jrifawGU&rnf/
Grid Line Width Command Button udka½G;cs,fyguyHk(213)ygtwdkif;jrifawGU&
rnf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(212)
yHk(213)
197uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(214)yg Form yHkpHwGif , Label, Command Button
wdkYjzifh wnfaqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command But-ton toD;oD;wGif vdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() Unload Me EndEnd SubForm Load twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Form_Load() MSFlexGrid1.Cols = 6 MSFlexGrid1.Rows = 7End SubGrid Line Change &eftwGuf -&eftwGuf -&eftwGuf -&eftwGuf -&eftwGuf -
Private Sub MSFlexGrid1_RowColChange() Msg = "Active Cell: " & Chr(64 + MSFlexGrid1.Col) Msg = Msg & MSFlexGrid1.Row Label1.Caption = MsgEnd Sub
tqdkyg y½dk*&rfudk Run NyD; rdrdtvdk½Sd&m Row (or) Column wdkYudka½G;cs,fygu
Grid Line Cell tuGuf½Sd Cell Reference udk yHk(215)ygtwdkif;azmfjyvdrfhrnf/
yHk(214)
198uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
RichTextBox
c:\windows\system\richtx32.ocx
yHk(216)yg Form yHkpHwGif , Command Button wdkYjzifhwnf
aqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command Button toD;oD;
wGifvdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
yHk(215)
yHk(216)
199uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
RichTextBox1 - RichTextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - RichTextBox1Font - MS Sans Serif, Bold, 12ScrollBars - 3 - rtfBothRichTextBox2 - RichTextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - RichTextBox2Font - MS Sans Serif, Regular, 8ScrollBars - 3 - rtfBothAdd Text Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click()RichTextBox2.Text = RichTextBox2.Text & RichTextBox1.SelText
End SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click()Unload MeEnd
End SubForm Load twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Form_Load()RichTextBox1.FileName = "c:\tm.rtf"
End Subtxufyg y½dk*&rfudk Run ygu yHk(217)ygtwdkif;awGUjrif&rnf/
yHk(217)
200uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(217)yg b,fbufwGif½Sdaeaompmom;tm; Selected Text vkyfNyD;? yHk(218)? AddText Command Button udka½G;cs,fygu yHk(219)ygtwdkif;jzpfay:vmrnf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(218)
yHk(219)
201uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
CommonDialog
c:\windows\system\comdlg32.ocx
yHk(220)yg Form yHkpHwGif , , Command
Button wdkYjzifhwnfaqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Com-mand Button toD;oD;wGifvdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
Open File Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click()CommonDialog1.DialogTitle = "Open File"CommonDialog1.Filter = "Text File|*.txt|Rich Text File|*.rtf"CommonDialog1.ShowOpenIf CommonDialog1.FilterIndex = 1 Then
RichTextBox1.LoadFile CommonDialog1.FileName, rtfTextElse
RichTextBox1.LoadFile CommonDialog1.FileName, rtfRTFEnd IfMe.Caption = CommonDialog1.FileName
End Sub
yHk(220)
202uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Save File Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click()CommonDialog1.Filter = "Text File|*.txt|Rich Text File|*.rtf"CommonDialog1.ShowSaveIf CommonDialog1.FilterIndex = 1 Then
RichTextBox1.SaveFile CommonDialog1.FileName, rtfTextElse
RichTextBox1.SaveFile CommonDialog1.FileName, rtfRTFEnd If
End SubFonts Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command3_Click()CommonDialog1.Flags = cdlCFEffects + cdlCFBothCommonDialog1.ShowFontWith RichTextBox1
.SelBold = CommonDialog1.FontBold
.SelFontName = CommonDialog1.Name
.SelFontSize = CommonDialog1.FontSize
.SelItalic = CommonDialog1.FontItalic
.SelStrikeThru = CommonDialog1.FontStrikethru
.SelUnderline = CommonDialog1.FontUnderline
.SelColor = CommonDialog1.ColorEnd With
End SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command4_Click() Unload Me EndEnd SubForm tus,ftusOf;jyKvkyf&eftwGuf -tus,ftusOf;jyKvkyf&eftwGuf -tus,ftusOf;jyKvkyf&eftwGuf -tus,ftusOf;jyKvkyf&eftwGuf -tus,ftusOf;jyKvkyf&eftwGuf -
Private Sub Form_Resize()If Me.WindowState = vbMinimized Then Exit SubRichTextBox1.Height = Me.Height - 1260RichTextBox1.Width = Me.Width - 285
203uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Command1.Top = Me.Height - 915Command2.Top = Me.Height - 915Command3.Top = Me.Height - 915Command4.Top = Me.Height - 915
End SubForm Load twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Form_Load() Form1.Caption = "Sample 36"End Sub
tqdkyg y½dk*&rfudk Run yguyHk(221)ygtwdkif;jrifawGU&rnf/
Open File Command Button udka½G;cs,fygu yHk(222)ygtwdkif;jrifawGU&rnf/
yHk(221)
204uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
txufyg Dialog Box wGif Files of type: nmzuf½Sd List Box ü DropdownArrow jzpfaom udka½G;cs,fygu Text File ESifh Rich Text Format File trsKd;tpm;
(2)ckxJrS BuKduf&mzdkiftrsKd;tpm;udk a½G;cs,fí Open Command Button udka½G;cs,fygu
a½G;cs,fjcif;cH&aom *.txt (or) *.rtf File rsm;yGifhvmayrnf/ yHk(223)/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(222)
yHk(223)
205uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Microsoft Windows Common Controls wGifyg0ifaom wGifyg0ifaom wGifyg0ifaom wGifyg0ifaom wGifyg0ifaom Icon rsm;rsm;rsm;rsm;rsm;
c:\windows\system\mscomctl.ocxTabStrip Toolbar StatusBar
ProgressBar TreeView ListView
ImageList Slider ImageCombo
yHk(224)yg Form yHkpHwGif TextBox, Toolbar, Command Button
wdkYjzifh wnfaqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command But-ton toD;oD;wGif vdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
Text1 - Text Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - Text1Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleFont - MS Sans Serif, Regular, 10MultiLine - TrueScrollBar - 3 - BothToolbar1 - Toolbar Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - Toolbar1Alignment - 0 - vbAlignNoneBorderStyle - 1 - ccFixedSingle
yHk(224)
206uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Form yHkpHtwGif;½Sd Toolbar udka½G;cs,fí Right Click ESdyfyg/ xdkYaemuf Propertiesudka½G;cs,fygu yHk(225)ygtwdkif; Property Pages Dialog Box ay:vmrnf/
Property Pages Dialog Box xJ½Sd General, Buttons, Picture Tab CommandButton (3)ckxJrS Buttons Tab Command Button udka½G;cs,fyg/ xdk Yaemuf
4if;xJwGifyg0ifaomtcsuftvufrsm;tm; atmufygtwdkif;jyifqifjznfhpGuf&ef -
Index Caption Key Tag1 Cut Button1 12 Copy Button2 23 Paste Button3 3
Toolbar xJ½Sd xJ½Sd xJ½Sd xJ½Sd xJ½Sd Button rsm;twGuf -rsm;twGuf -rsm;twGuf -rsm;twGuf -rsm;twGuf -
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)Select Case Button.Key
Case "Button2":Clipboard.ClearClipboard.SetText Text1.SelText
yHk(225)
207uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Case "Button1":Clipboard.ClearClipboard.SetText Text1.SelTextText1.Text = " "
Case "Button3":Text1.SelText = Clipboard.GetText()
End SelectEnd SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() Unload Me EndEnd Sub
tqdkyg y½dk*&rfudk Run NyD; Text Box xJwGif pmrsm;½dkufESdyfírdrdtvdk½Sd&mpmrsm;udk
Selected Text (or) Drag jyKvkyfum ul;jcif;? jzwfjcif;? uyfjcif;wdkYudkaqmif½GufEdkifygonf/
y½dk*&rfxJrS xGufvdkygu Exit Command Button udka½G;cs,f&efjzpfygonf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(226)yg Form yHkpHwGif Toolbar, StatusBar, Command ButtonwdkYjzifh wnfaqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command But-ton toD;oD;wGif vdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
yHk(226)
208uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Toolbar1 - Toolbar Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - Toolbar1Align - 1 - vbAlignTop
Index Caption Key Tag1 Subject One Sub1 12 Subject Two Sub2 23 Subject Three Sub3 34 Subject Four Sub4 4
StatusBar1 - StatusBar Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - StatusBar1Align - 2 - vbAlignBottomAdd Button Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click()Static i As IntegerDim c As Stringi = i + 1c = InputBox("Enter Button Title")Toolbar1.Buttons.Add i, , c
End SubPrivate Sub Command1_GotFocus()
StatusBar1.Panels(1).Text = "Click to Add a Button of the Toolbar"End SubDelete Button Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click()Dim i As Integeri = InputBox("Enter Button No. to Delete")Toolbar1.Buttons.Remove i
End SubPrivate Sub Command2_GotFocus()
StatusBar1.Panels(1).Text = "Click to Delete a Button from the Toolbar"End SubAdd Panel Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command3_Click()Static i As IntegerDim c As String
209uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
i = i + 1If StatusBar1.Panels.Count = 16 Then
MsgBox "You can add only 16 Panels in a Status Bar"Exit Sub
End Ifc = InputBox("Enter Panel Title")StatusBar1.Panels.Add i, , cStatusBar1.Panels(i).AutoSize = sbrSpring
End SubPrivate Sub Command3_GotFocus()
StatusBar1.Panels(1).Text = "Click to Add a Panel to the Status Bar"End SubDelete Panel Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command4_Click()Dim i As Integeri = InputBox("Enter Panel No. to Delete")StatusBar1.Panels.Remove i
End SubPrivate Sub Command4_GotFocus()
StatusBar1.Panels(1).Text="Click to Delete a Panel from the Status Bar"End SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command5_Click()Unload MeEnd
End SubStatus Bar Panel Click twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub StatusBar1_PanelClick(ByVal Panel As MSComctlLib.Panel) MsgBox "You have Clicked" & Panel.TextEnd SubTool Bar Button Click twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button) MsgBox "You have Clicked" & Button.CaptionEnd Sub
210uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
txufyg y½dk*&rfudk Run NyD; Add Button udka½G;cs,fygu Enter Button Title\acgif;pOfatmuf List Box wGif rdrdtvdk½Sd&mpmom;udk½dkufESdyfNyD; OK udka½G;cs,fyg/
yHk(227)? yHk(228)/
Delete Button udka½G;cs,fygu Enter Button No. to Delete \acgif;pOfatmuf
List Box wGif rdrdz,f½Sm;vdkonfhtrSwfpOfudk½dkufESdyfNyD; OK udka½G;cs,fyg/ yHk(229)? yHk(230)/
yHk(227)
yHk(228)
211uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Add Panel udka½G;cs,fygu Enter Panel Title \acgif;pOfatmuf List Box wGif
rdrdtvdk½Sd&mpmom;udk½dkufESdyfNyD; OK udka½G;cs,fyg/ yHk(231)? yHk(232)/
yHk(229)
yHk(230)
212uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
DeletePanel udka½G;cs,fygu Enter Button No. to Delete \acgif;pOfatmuf
List Box wGif rdrdz,f½Sm;vdkonfhtrSwfpOfudk½dkufESdyfNyD; OK udka½G;cs,fyg/ yHk(233)? yHk(234)/
yHk(231)
yHk(232)
213uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(233)
yHk(234)
214uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(235)yg Form yHkpHwGif ProgressBar, Command Button wdkYjzifh wnf
aqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command Button toD;oD;
wGifvdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
ProgressBar1 - ProgressBar Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - ProgressBar1Align - 0 - vbAlignNoneBorderStyle - 1 - ccFixedSingleMax - 30000Min - 1Run Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click()Dim n1 As IntegerFor n1 = 1 To 30000
Form1.Caption = "Processing Step " & Trim$(CStr(n1)) & " of 30000"ProgressBar1 = n1
Next n1End SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click()Unload MeEnd
End Sub- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(235)
215uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(235)yg Form yHkpHwGif Slider, TextBox, Command Button wdkY
jzifh wnfaqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command But-ton toD;oD;wGifvdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
Form Load twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Form_Load()Text1.Width = 6000 'Set a minimum width for the TextBoxSlider1.Left = Text1.Left 'Align the Slider to the TextBox'Match the width of the Slider to the TextBoxSlider1.Max = Text1.Width'Place the Slider a little below the TextBoxSlider1.Top = Text1.Top + Text1.Height + 50'Set tickfrequency to a fraction of the Max valueSlider1.TickFrequency = Slider1.Max * 0.1'SetLargeChange and SmallChange value to a fraction of MaxSlider1.LargeChange = Slider1.Max * 0.1Slider1.SmallChange = Slider1.Max * 0.01
End SubSlider1 Change twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Slider1_Change()'If the slider is under 1/3 the size of the textbox, no change.'Else, match the width of the textbox to the Slider's valueIf Slider1.Value > Slider1.Max / 3 Then
Text1.Width = Slider1.ValueEnd If
End Sub
yHk(236)
216uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click()Unload MeEnd
End Subtqdkyg y½dk*&rfudk Run yguyHk(237)ygtwdkif;jrifawGU&rnfjzpfNyD; Slider \twdk;^
tavsmhajymif;Munfhygu Text Box tus,f̂ tusOf;jzpfoGm;onfudk jrifawGU&ayrnf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(238)yg Form yHkpHwGif ImageList, PictureBox, Command
Button wdkY jzifh wnfaqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Com-mand Button toD;oD;wGifvdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
yHk(237)
yHk(238)
217uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Picture1 - PictureBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - Picture1Align - NoneAutoSize - TrueBorderStyle - 1 - Fixed Single
Form yHkpHtwGif;½Sd ImageList udka½G;cs,fí Right Click ESdyfyg/ xdkYaemuf
Properties udka½G;cs,fygu yHk(239)ygtwdkif; Property Pages Dialog Box ay:vmrnf/
Property Pages Dialog Box xJ½Sd General, Images, Color Tab CommandButton (3)ckxJrS Images Tab Command Button udka½G;cs,fyg/ xdkYaemuf 4if;xJwGif
yg0ifaom Insert Picture... Command Button udka½G;cs,fyg/ xdktcg rdrdtvdk½Sdonfh
*.bmp File (odkYr[kwf) *.ico File ½Sdonfh vrf;aMumif;rsm;udk½SmazGa½G;cs,fí zdkifrsm;tm;
qJGwif&rnf/ yHk(240)/
yHk(239)
218uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(240)wGif Open udka½G;cs,fygu yHk(239)wGifazmfjyxm;onfhtwdkif; Club.bmpFile a&mufoGm;vdrfhrnf/ txufyg y½dk*&rfudk Run ygu rdrdtvdk½Sdonfh Image qJGwifvdk
ygu &½Sdrnfjzpfygonf/ yHk(241)/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(240)
yHk(241)
219uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(242)yg Form yHkpHwGif TabStrip, TextBox, Command Button
wdkYjzifh wnfaqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command But-ton ESifh Tab toD;oD;twGufvdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
Form yHkpHtwGif;½Sd TabStrip udka½G;cs,fí Right Click ESdyfyg/ xdkYaemuf Proper-ties udka½G;cs,fygu yHk(243)ygtwdkif; Property Pages Dialog Box ay:vmrnf/
yHk(242)
yHk(243)
220uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Property Pages Dialog Box xJ½Sd General, Tabs, Font, Picture CommandButton (4)ckxJrS Tabs Tab Command Button udka½G;cs,fyg/ xdkYaemuf 4if;xJwGif
yg0ifaomtcsuftvufrsm;udk atmufygtwdkif;jznfhpGuf&ef -
Index Caption Tag1 Department One2 Items Two3 Branches Three
Tab Command Button rsm; rsm; rsm; rsm; rsm; Click vkyf&eftwGuf -vkyf&eftwGuf -vkyf&eftwGuf -vkyf&eftwGuf -vkyf&eftwGuf -
Private Sub TabStrip1_Click()If TabStrip1.SelectedItem.Tag = "One" Then
Text1.Text = "Sales Department"Text2.Text = "Purchase Department"Text3.Text = "Admin Department"
ElseIf TabStrip1.SelectedItem.Tag = "Two" ThenText1.Text = "Keyboard"Text2.Text = "Monitor"Text3.Text = "Hard Disk"
ElseIf TabStrip1.SelectedItem.Tag = "Three" ThenText1.Text = "London"Text2.Text = "New York"Text3.Text = "Singapore"
End IfEnd SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() Unload Me EndEnd Sub
tqdkyg y½dk*&rfudk Run yguyHk(244)ygtwdkif;jrifawGU&rnf/
221uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(244)wGif Tab Command Button wpfckjzpfaom Department udka½G;cs,fygu
yHk(245)ygtwdkif; Department ESifhqdkifaomXmersm;udk azmfjyrnfjzpfonf/
yHk(245)wGif Tab Command Button wpfckjzpfaom Items udka½G;cs,fygu
yHk(246)ygtwdkif; Item ESifhqdkifaomudpö&yfrsm;udk azmfjyrnfjzpfonf/
yHk(244)
yHk(245)
222uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(246)wGif Tab Command Button wpfckjzpfaom Branches udka½G;cs,fygu
yHk(247)ygtwdkif; Branches ESifhqdkifaomudpö&yfrsm;udk azmfjyrnfjzpfonf/
þy½dk*&rfxJrS xGufvdkygu Command Button wpfckjzpfaom Exit udka½G;cs,f&efjzpf
ygonf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(246)
yHk(247)
223uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Microsoft Calendar Control (((((Form twGif;jyu©'defxnfhjcif;)twGif;jyu©'defxnfhjcif;)twGif;jyu©'defxnfhjcif;)twGif;jyu©'defxnfhjcif;)twGif;jyu©'defxnfhjcif;)
c:\windows\system\mscal.ocx
yHk(248)yg Form yHkpHwGif Calendar, Command Button wdkYjzifh wnfaqmuf
xm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command Button twGufvdktyf
aom y½dk*&rfrsm;udka&;om;&ayrnf/
Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() Unload Me EndEnd Sub
tqdkyg y½dk*&rfudk Run ygu ,aeYwGif½Sdaernfh &uf? v? ckESpf jyu©'defudkazmfjyrnf
jzpfonf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(248)
224uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Execute File udk y½dk*&rfjzifhvSrf;ac:toHk;jyKjcif;udk y½dk*&rfjzifhvSrf;ac:toHk;jyKjcif;udk y½dk*&rfjzifhvSrf;ac:toHk;jyKjcif;udk y½dk*&rfjzifhvSrf;ac:toHk;jyKjcif;udk y½dk*&rfjzifhvSrf;ac:toHk;jyKjcif;
yHk(249)yg Form yHkpHwGif OLE, Command Button wdkYjzifh wnfaqmuf
xm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command Button toD;oD;twGuf
vdktyfaom y½dk*&rfrsm;udka&;om;&ayrnf/
Call Indirect Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click() OLE1.CreateLink "c:\pm65\pm65.exe"End SubCall Direct Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click() Call Shell("c:\pm65\pm65.exe c:\vb6\vb601.p65", 1)End SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command3_Click() Unload Me EndEnd Sub
tqdkyg y½dk*&rfudk Run ygu yHk(250)ygtwdkif;jrifawGU&rnf/
yHk(249)
225uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
txufygyHk(250)wGif Call Indirect Command Button Sub udka½G;cs,fygu
yHk(251)ygtwdkif;azmfjyrnf/
yHk(251)wGif OLE Box xJodkYa&mufaeaom Page Maker 6.5 Icon tm; DoubleClick ESdyfjcif;jzifh Page Maker 6.5 Application Package Run vmayrnf/
Call Direct Command Button udka½G;cs,fjcif;jzifh Page Maker 6.5 ApplicationPackage Run vmrnfhtjyif c:\vb6\vb601.p65 zdkifygwdkuf½dkufyGifhvmNyD;tvdk½Sd&mjyKvkyf
Edkifayrnf/
4if;y½dk*&rfrSxGufvdkygu Exit Command Button tm;a½G;cs,f&efjzpfonf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(250)
yHk(251)
226uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
jr§m;rsm;udkywfjcmvnfvSnfhonfhy½dk*&rfudka&;jcif;jr§m;rsm;udkywfjcmvnfvSnfhonfhy½dk*&rfudka&;jcif;jr§m;rsm;udkywfjcmvnfvSnfhonfhy½dk*&rfudka&;jcif;jr§m;rsm;udkywfjcmvnfvSnfhonfhy½dk*&rfudka&;jcif;jr§m;rsm;udkywfjcmvnfvSnfhonfhy½dk*&rfudka&;jcif;
yHk(248)yg Form yHkpHwGif Image, Command Button wdkYjzifh wnfaqmuf
xm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemuf Command Button rsm;twGufvdktyf
aom y½dk*&rfrsm;udka&;om;&ayrnf/
Form1 - Form Properties wGif -wGif -wGif -wGif -wGif -
WindowState - 2 - MaximizedGeneral wGif -wGif -wGif -wGif -wGif -
Private Sub rotate() For t = 0 To 100 NextEnd SubRun Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click()For k = 1 To 10
'Call Shell("c:\windows\mplayer.exe c:\MyDocu~1\Romance.wav",1)Image1.Left = 0Image1.Top = 0Image1.Visible = TrueImage2.Visible = FalseImage3.Visible = FalseImage4.Visible = False
yHk(252)
227uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
i = Image1.Leftj = Image1.Top
For i = 0 To 11500 Step 1rotateImage1.Move Image1.Left + 1, Image1.Top
Next iImage1.Left = 0Image1.Top = 0''''''''''''''Image2.Left = 11500Image2.Top = 0Image1.Visible = FalseImage2.Visible = TrueImage3.Visible = FalseImage4.Visible = FalseFor j = 0 To 8300 Step 1
rotateImage2.Move Image2.Left, Image2.Top + 1
Next jImage2.Left = 11500Image2.Top = 0''''''''''''''Image3.Left = 11500Image3.Top = 8300Image1.Visible = FalseImage2.Visible = FalseImage3.Visible = TrueImage4.Visible = FalseFor j = 11500 To 0 Step -1
rotateImage3.Move Image3.Left - 1, Image3.Top
Next jImage3.Left = 11500Image3.Top = 8300''''''''''''''
228uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Image4.Left = 0Image4.Top = 8300Image1.Visible = FalseImage2.Visible = FalseImage3.Visible = FalseImage4.Visible = TrueFor j = 8300 To 0 Step -1
rotateImage4.Move Image4.Left, Image4.Top - 1
Next jImage4.Left = 0Image4.Top = 8300Print: Print: Print " ", k: Beep
Next kImage1.Left = 0Image1.Top = 0Image1.Visible = TrueImage2.Visible = FalseImage3.Visible = FalseImage4.Visible = False
End SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click()Unload MeEnd
End Sub
tqdkyg y½dk*&rfudk Run ygu jr§m;wpfpif;onf vufsm;&pf(10)Budrfywfaeonfudk
jrifawGU&vdrfhrnf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
229uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
tcef;(9)tcef;(9)tcef;(9)tcef;(9)tcef;(9)
Access 2002 ½Sd ½Sd ½Sd ½Sd ½Sd Database File xJrS xJrS xJrS xJrS xJrS Table File wpfcktm;zGifhjcif;wpfcktm;zGifhjcif;wpfcktm;zGifhjcif;wpfcktm;zGifhjcif;wpfcktm;zGifhjcif;
atmufyg Form yHkpH(2)cktm; zefwD;wnfaqmufxm;&rnf/ yHk(253)? yHk(254)/
yHk(253)
yHk(254)
230uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(253)yg Form yHkpHwGif rsm;jzifhzefwD;xm;NyD; Command Buttonrsm;wGif vdktyfaomy½dk*&rfrsm;a&;om;&ef jzpfygonf/
Open File Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click() Form1.Hide Form2.ShowEnd SubExit Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click() Unload Me EndEnd Sub
xdkYaemuf Form2 yHkpHtm;zefwD;wnfaqmufxm;&rnf/ yHk(254)/ 4if;wGif ,
, , , rsm;jzifhzefwD;xm;NyD; oufqdkif
&m Properties rsm;wGifjyifqifjznfhpGufNyD;aemuf Command Button rsm;wGif vdktyfaom
y½dk*&rfrsm;a&;om;&ef jzpfygonf/
Label1, 2, 3, 4, 5, 6, 7, 8 wGifyg0ifMuaom wGifyg0ifMuaom wGifyg0ifMuaom wGifyg0ifMuaom wGifyg0ifMuaom Properties rsm;twGuf -rsm;twGuf -rsm;twGuf -rsm;twGuf -rsm;twGuf -
Alignment - 0 - Left JustifyAutoSize - TrueBackStyle - 0 - TransparentBorderStyle - 0 - NoneFont - MS Sans Serif, Bold, 8Text1 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - Text1Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleDataField - Roll NumberDataFormat - GeneralDataSource - Adodc1Font - MS Sans Serif, Bold, 8Text2 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - Text2Alignment - 0 - Left Justify
231uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
BorderStyle - 1 - Fixed SingleDataField - NameDataFormat - GeneralDataSource - Adodc1Font - MS Sans Serif, Bold, 8Text3 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - Text3Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleDataField - MyanmarDataFormat - GeneralDataSource - Adodc1Font - MS Sans Serif, Bold, 8Text4 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - Text4Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleDataField - EnglishDataFormat - GeneralDataSource - Adodc1Font - MS Sans Serif, Bold, 8Text5 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - Text5Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleDataField - MathsDataFormat - GeneralDataSource - Adodc1Font - MS Sans Serif, Bold, 8Text6 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - Text6Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleDataField - Total
232uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
DataFormat - GeneralDataSource - Adodc1Font - MS Sans Serif, Bold, 8Text7 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - Text7Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleDataField - ResultDataFormat - GeneralDataSource - Adodc1Font - MS Sans Serif, Bold, 8Text8 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - Text8Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleDataField - Amount of FailDataFormat - GeneralDataSource - Adodc1Font - MS Sans Serif, Bold, 8Adodc1 - Adodc Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - Adodc1Align - 0 - vbAlignNoneBOFAction - 0 - adDoMoveFirstConnectingString - provider=msdasql;dsn=exam01;uid=;pwd=;EOFAction - 0 - adDoMoveLastFont - MS Sans Serif, Bold, 8RecordSource - select [Roll Number], Name, Myanmar, English,
Maths,Total,Result,[Amount of Fail] fromexam01 order by [Roll Number]
DataGrid1 - DataGrid Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - DataGrid1Align - 0 - vbAlignNoneAllowAddNew - TrueAllowArrows - True
233uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
AllowDelete - TrueAllowUpdate - TrueDataSource - Adodc1Font - MS Sans Serif, Bold, 8Form rSxGufoGm;aomtcg rSxGufoGm;aomtcg rSxGufoGm;aomtcg rSxGufoGm;aomtcg rSxGufoGm;aomtcg Mouse Pointer yHkrSefjyefjzpf&eftwGuf -yHkrSefjyefjzpf&eftwGuf -yHkrSefjyefjzpf&eftwGuf -yHkrSefjyefjzpf&eftwGuf -yHkrSefjyefjzpf&eftwGuf -
Private Sub Form_Unload(Cancel As Integer)Screen.MousePointer = vbDefault
End SubRecord Position od&eftwGuf -od&eftwGuf -od&eftwGuf -od&eftwGuf -od&eftwGuf -
Private Sub Adodc1_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus AsADODB.EventStatusEnum, ByVal pRecordset AsADODB.Recordset)
Adodc1.Caption = "Record: " & CStr(Adodc1.Recordset.AbsolutePosition)
End SubAdd Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click()Adodc1.Recordset.AddNew
End SubUpdate Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click()Adodc1.Recordset.UpdateBatch adAffectAll
End SubDelete Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command3_Click()With Adodc1.Recordset
.Delete
.MoveNextIf .EOF Then .MoveLast
End WithEnd Sub
234uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Refresh Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command4_Click()Adodc1.Refresh
End SubClose Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command5_Click()Form2.HideForm1.Show
End Subtqdkyg y½dk*&rfudk Run ygu yHk(255)ygtwdkif;jrifawGU&rnfjzpfonf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(255)
235uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Access 2002 ½Sd ½Sd ½Sd ½Sd ½Sd Database File wpfckxJrS wpfckxJrS wpfckxJrS wpfckxJrS wpfckxJrS Table File ESpfcktm; ESpfcktm; ESpfcktm; ESpfcktm; ESpfcktm; Updating jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;
atmufyg Form yHkpH(3)cktm; zefwD;wnfaqmufxm;&rnf/ yHk(256)? yHk(257)? yHk(258)/
yHk(256)
yHk(257)
236uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(256)yg Form yHkpHwGif rsm;jzifhzefwD;xm;NyD; Command But-ton rsm;wGif vdktyfaomy½dk*&rfrsm;a&;om;&ef jzpfygonf/
(9)wef;(u)zdkif (9)wef;(u)zdkif (9)wef;(u)zdkif (9)wef;(u)zdkif (9)wef;(u)zdkif Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click() Form1.Hide Form2.ShowEnd Sub(9)wef;(c)zdkif (9)wef;(c)zdkif (9)wef;(c)zdkif (9)wef;(c)zdkif (9)wef;(c)zdkif Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click() Form1.Hide Form3.ShowEnd SubExit Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click() Unload Me
yHk(258)
237uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
EndEnd Sub
xdkYaemuf Form2, Form3 yHkpHtm;zefwD;wnfaqmufxm;&rnf/ yHk(257)? yHk(258)/
4if;wGif , , , , rsm;jzifh
zefwD;xm;NyD; oufqdkif&m Properties rsm;wGifjyifqifjznfhpGufNyD;aemuf CommandButton rsm;wGif vdktyfaomy½dk*&rfrsm;a&;om;&ef jzpfygonf/
Label1, 2, 3, 4, 5, 6, 7, 8 wGifyg0ifMuaom wGifyg0ifMuaom wGifyg0ifMuaom wGifyg0ifMuaom wGifyg0ifMuaom Properties rsm;twGuf -rsm;twGuf -rsm;twGuf -rsm;twGuf -rsm;twGuf -
Alignment - 0 - Left JustifyAutoSize - TrueBackStyle - 0 - TransparentBorderStyle - 0 - NoneFont - MS Sans Serif, Bold, 8Text1 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - Text1Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleDataField - Roll NumberDataFormat - GeneralDataSource - Adodc1Font - MS Sans Serif, Bold, 8Text2 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - Text2Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleDataField - NameDataFormat - GeneralDataSource - Adodc1Font - MS Sans Serif, Bold, 8Text3 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - Text3Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleDataField - MyanmarDataFormat - General
238uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
DataSource - Adodc1Font - MS Sans Serif, Bold, 8Text4 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - Text4Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleDataField - EnglishDataFormat - GeneralDataSource - Adodc1Font - MS Sans Serif, Bold, 8Text5 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - Text5Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleDataField - MathsDataFormat - GeneralDataSource - Adodc1Font - MS Sans Serif, Bold, 8Text6 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - Text6Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleDataField - TotalDataFormat - GeneralDataSource - Adodc1Font - MS Sans Serif, Bold, 8Text7 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - Text7Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleDataField - ResultDataFormat - GeneralDataSource - Adodc1Font - MS Sans Serif, Bold, 8
239uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Text8 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - Text8Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleDataField - Amount of FailDataFormat - GeneralDataSource - Adodc1Font - MS Sans Serif, Bold, 8Adodc1 - Adodc Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - Adodc1Align - 0 - vbAlignNoneBOFAction - 0 - adDoMoveFirstConnectingString - provider=msdasql;dsn=exam01;uid=;pwd=;EOFAction - 0 - adDoMoveLastFont - MS Sans Serif, Bold, 8RecordSource - select [Roll Number], Name, Myanmar, English,
Maths,Total,Result,[Amount of Fail] fromexam01 order by [Roll Number][Form2 twGuftwGuftwGuftwGuftwGuf]
RecordSource - select [Roll Number], Name, Myanmar, English,Maths,Total,Result,[Amount of Fail] fromexam02 order by [Roll Number][Form3 twGuftwGuftwGuftwGuftwGuf]
DataGrid1 - DataGrid Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - DataGrid1Align - 0 - vbAlignNoneAllowAddNew - TrueAllowArrows - TrueAllowDelete - TrueAllowUpdate - TrueDataSource - Adodc1Font - MS Sans Serif, Bold, 8Form rSxGufoGm;aomtcg rSxGufoGm;aomtcg rSxGufoGm;aomtcg rSxGufoGm;aomtcg rSxGufoGm;aomtcg Mouse Pointer yHkrSefjyefjzpf&eftwGuf -yHkrSefjyefjzpf&eftwGuf -yHkrSefjyefjzpf&eftwGuf -yHkrSefjyefjzpf&eftwGuf -yHkrSefjyefjzpf&eftwGuf -
Private Sub Form_Unload(Cancel As Integer)Screen.MousePointer = vbDefault
End Sub
240uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Record Position od&eftwGuf -od&eftwGuf -od&eftwGuf -od&eftwGuf -od&eftwGuf -
Private Sub Adodc1_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus AsADODB.EventStatusEnum, ByVal pRecordset AsADODB.Recordset)
Adodc1.Caption = "Record: " & CStr(Adodc1.Recordset.AbsolutePosition)
End Sub(3)bmomaygif;jcif; (3)bmomaygif;jcif; (3)bmomaygif;jcif; (3)bmomaygif;jcif; (3)bmomaygif;jcif; Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click()Adodc1.Recordset.MoveFirstDo While Adodc1.Recordset.EOF = False
Adodc1.Recordset("Total") = Adodc1.Recordset("Myanmar") +Adodc1.Recordset("English") + Adodc1.Recordset("Maths")
If Adodc1.Recordset("Myanmar") < 40 Or Adodc1.Recordset("English") < 40 Or Adodc1.Recordset("Maths") < 40 ThenAdodc1.Recordset("Result") = "Fail"
ElseAdodc1.Recordset("Result") = "Pass"
End IfIf Adodc1.Recordset("Myanmar") < 40 And Adodc1.Recordset
("English") < 40 And Adodc1.Recordset("Maths") < 40 ThenAdodc1.Recordset("Amount of Fail") = "3"
ElseIf Adodc1.Recordset("Myanmar") < 40 And Adodc1.Recordset("English") < 40 And Adodc1.Recordset("Maths") >= 40 ThenAdodc1.Recordset("Amount of Fail") = "2"
ElseIf Adodc1.Recordset("Myanmar") < 40 And Adodc1.Recordset("English") >= 40 And Adodc1.Recordset("Maths") < 40 ThenAdodc1.Recordset("Amount of Fail") = "2"
ElseIf Adodc1.Recordset("Myanmar") >= 40 And Adodc1.Recordset("English") < 40 And Adodc1.Recordset("Maths") < 40 ThenAdodc1.Recordset("Amount of Fail") = "2"
ElseIf Adodc1.Recordset("Myanmar") < 40 And Adodc1.Recordset("English") >= 40 And Adodc1.Recordset("Maths") >= 40Then
241uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Adodc1.Recordset("Amount of Fail") = "1"ElseIf Adodc1.Recordset("Myanmar") >= 40 And Adodc1.Recordset
("English") < 40 And Adodc1.Recordset("Maths") >= 40 ThenAdodc1.Recordset("Amount of Fail") = "1"
ElseIf Adodc1.Recordset("Myanmar") >= 40 And Adodc1.Recordset("English") >= 40 And Adodc1.Recordset("Maths") < 40 ThenAdodc1.Recordset("Amount of Fail") = "1"
ElseAdodc1.Recordset("Amount of Fail") = Null
End IfAdodc1.Recordset.UpdateAdodc1.Recordset.MoveNext
LoopAdodc1.Recordset.MoveFirst
End Subrlvae&modkYjyefoGm;jcif;rlvae&modkYjyefoGm;jcif;rlvae&modkYjyefoGm;jcif;rlvae&modkYjyefoGm;jcif;rlvae&modkYjyefoGm;jcif; Command Button twGuf - twGuf - twGuf - twGuf - twGuf - [Form2 twGuftwGuftwGuftwGuftwGuf]Private Sub Command2_Click()
Form2.HideForm1.Show
End Subrlvae&modkYjyefoGm;jcif;rlvae&modkYjyefoGm;jcif;rlvae&modkYjyefoGm;jcif;rlvae&modkYjyefoGm;jcif;rlvae&modkYjyefoGm;jcif; Command Button twGuf - twGuf - twGuf - twGuf - twGuf - [Form3 twGuftwGuftwGuftwGuftwGuf]Private Sub Command2_Click()
Form3.HideForm1.Show
End Sub - - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
242uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Access 2002 ½Sd ½Sd ½Sd ½Sd ½Sd Database File wpfckxJrS wpfckxJrS wpfckxJrS wpfckxJrS wpfckxJrS Table File rsm;tm; rsm;tm; rsm;tm; rsm;tm; rsm;tm; Form wpfckjzifhzGifhjcif;wpfckjzifhzGifhjcif;wpfckjzifhzGifhjcif;wpfckjzifhzGifhjcif;wpfckjzifhzGifhjcif;
atmufyg Form yHkpHtm; zefwD;wnfaqmufxm;&rnf/ yHk(259)/
yHk(259)yg Form yHkpHwGif , , rsm;jzifh
zefwD;xm;NyD; oufqdkif&m Properties rsm;wGifjyifqifjznfhpGufNyD;aemuf CommandButton rsm;wGif vdktyfaomy½dk*&rfrsm;a&;om;&ef jzpfygonf/
a1 - Adodc Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - a1Align - 0 - vbAlignNoneBOFAction - 0 - adDoMoveFirstConnectingString - provider=msdasql;dsn=exam01;uid=;pwd=;EOFAction - 0 - adDoMoveLastFont - MS Sans Serif, Bold, 8RecordSource - select [Roll Number], Name, Myanmar, English,
Maths,Total,Result,[Amount of Fail] fromexam01 order by [Roll Number]
yHk(259)
243uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
a2 - Adodc Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - a2Align - 0 - vbAlignNoneBOFAction - 0 - adDoMoveFirstConnectingString - provider=msdasql;dsn=exam01;uid=;pwd=;EOFAction - 0 - adDoMoveLastFont - MS Sans Serif, Bold, 8RecordSource - select [Roll Number], Name, Myanmar, English,
Maths,Total,Result,[Amount of Fail] fromexam02 order by [Roll Number]
a3 - Adodc Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - a3Align - 0 - vbAlignNoneBOFAction - 0 - adDoMoveFirstConnectingString - provider=msdasql;dsn=exam01;uid=;pwd=;EOFAction - 0 - adDoMoveLastFont - MS Sans Serif, Bold, 8RecordSource - select [Roll Number], Name, Myanmar, English,
Maths,Total,Result,[Amount of Fail] fromexam03 order by [Roll Number]
DataGrid1 - DataGrid Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - DataGrid1Align - 0 - vbAlignNoneAllowAddNew - TrueAllowArrows - TrueAllowDelete - TrueAllowUpdate - TrueFont - MS Sans Serif, Bold, 8A1 - Adodc \\\\\ Record Position twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub a1_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
a1.Caption = "Record: " & CStr(a1.Recordset.AbsolutePosition)End Sub
244uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
A2 - Adodc \\\\\ Record Position twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub a2_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
a2.Caption = "Record: " & CStr(a2.Recordset.AbsolutePosition)End SubA3 - Adodc \\\\\ Record Position twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub a3_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
a3.Caption = "Record: " & CStr(a3.Recordset.AbsolutePosition)End SubFile One Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click()Set DataGrid1.DataSource = a1a1.Left = 2880a1.Top = 4440a2.Left = 2640a2.Top = 5760a3.Left = 5160a3.Top = 5760Form1.Height = 5985Form1.Caption = "Standard 9th, Section (A)"
End SubFile Two Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click()Set DataGrid1.DataSource = a2a1.Left = 120a1.Top = 5760a2.Left = 2880a2.Top = 4440a3.Left = 5160a3.Top = 5760Form1.Height = 5985
245uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Form1.Caption = "Standard 9th, Section (B)"End SubFile Three Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command3_Click()Set DataGrid1.DataSource = a3a1.Left = 120a1.Top = 5760a2.Left = 2640a2.Top = 5760a3.Left = 2880a3.Top = 4440Form1.Height = 5985Form1.Caption = "Standard 9th, Section (C)"
End SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command4_Click()Unload MeEnd
End SubForm Load twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Form_Load()Form1.Height = 6975
End Sub- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
246uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Access 2002 ½Sd ½Sd ½Sd ½Sd ½Sd Database File trsm;pkxJrS trsm;pkxJrS trsm;pkxJrS trsm;pkxJrS trsm;pkxJrS Table File trsm;pktm; trsm;pktm; trsm;pktm; trsm;pktm; trsm;pktm; Form wpfckjzifhwpfckjzifhwpfckjzifhwpfckjzifhwpfckjzifh
zGifhjcif;zGifhjcif;zGifhjcif;zGifhjcif;zGifhjcif;
atmufyg Form yHkpHtm; zefwD;wnfaqmufxm;&rnf/ yHk(260)/
yHk(260)yg Form yHkpHwGif , , rsm;jzifh
zefwD;xm;NyD; oufqdkif&m Properties rsm;wGifjyifqifjznfhpGufNyD;aemuf CommandButton rsm;wGif vdktyfaomy½dk*&rfrsm;a&;om;&ef jzpfygonf/
a1 - Adodc Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - a1Align - 0 - vbAlignNoneBOFAction - 0 - adDoMoveFirstConnectingString - provider=msdasql;dsn=Test1;uid=;pwd=;EOFAction - 0 - adDoMoveLastFont - MS Sans Serif, Bold, 8
yHk(260)
247uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
RecordSource - select [Identification Number],Rank,Name,Department from Test1 order by [IdentificationNumber]
a2 - Adodc Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - a2Align - 0 - vbAlignNoneBOFAction - 0 - adDoMoveFirstConnectingString - provider=msdasql;dsn=exam02;uid=;pwd=;EOFAction - 0 - adDoMoveLastFont - MS Sans Serif, Bold, 8RecordSource - select [Roll Number], Name, Myanmar, English,
Maths,Total,Result,[Amount of Fail] fromexam02 order by [Roll Number]
a3 - Adodc Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - a3Align - 0 - vbAlignNoneBOFAction - 0 - adDoMoveFirstConnectingString - provider=msdasql;dsn=exam01;uid=;pwd=;EOFAction - 0 - adDoMoveLastFont - MS Sans Serif, Bold, 8RecordSource - select [Roll Number], Name, Myanmar, English,
Maths,Total,Result,[Amount of Fail] fromexam03 order by [Roll Number]
DataGrid1 - DataGrid Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - DataGrid1Align - 0 - vbAlignNoneAllowAddNew - TrueAllowArrows - TrueAllowDelete - TrueAllowUpdate - TrueFont - MS Sans Serif, Bold, 8
248uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
A1 - Adodc \\\\\ Record Position twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub a1_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
a1.Caption = "Record: " & CStr(a1.Recordset.AbsolutePosition)End SubA2 - Adodc \\\\\ Record Position twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub a2_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
a2.Caption = "Record: " & CStr(a2.Recordset.AbsolutePosition)End SubA3 - Adodc \\\\\ Record Position twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub a3_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
a3.Caption = "Record: " & CStr(a3.Recordset.AbsolutePosition)End SubFile One Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click()Set DataGrid1.DataSource = a1a1.Left = 2880a1.Top = 4440a2.Left = 2640a2.Top = 5760a3.Left = 5160a3.Top = 5760Form1.Height = 5985Form1.Caption = "Economic File (Table File) from Test1.mdb"
End SubFile Two Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click()Set DataGrid1.DataSource = a2a1.Left = 120
249uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
a1.Top = 5760a2.Left = 2880a2.Top = 4440a3.Left = 5160a3.Top = 5760Form1.Height = 5985Form1.Caption = "Standard 9th, Section (B) (Table File) from
exam02.mdb"End SubFile Three Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command3_Click()Set DataGrid1.DataSource = a3a1.Left = 120a1.Top = 5760a2.Left = 2640a2.Top = 5760a3.Left = 2880a3.Top = 4440Form1.Height = 5985Form1.Caption = "Standard 9th, Section (C) (Table File) from
exam01.mdb"End SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command4_Click()Unload MeEnd
End SubForm Load twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Form_Load()Form1.Height = 6975
End Sub
tqdkyg y½dk*&rfudk Run ygu yHk(261)? (262)? (263)ygtwdkif;jrifawGU&rnf/
250uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(261)
yHk(262)
251uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(263)
252uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Access 2002 ½Sd ½Sd ½Sd ½Sd ½Sd Database File twGif;rS twGif;rS twGif;rS twGif;rS twGif;rS Table File rsm;tm; rsm;tm; rsm;tm; rsm;tm; rsm;tm; Form wpfckjzifhwpfckjzifhwpfckjzifhwpfckjzifhwpfckjzifh
Append jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;
atmufyg Form yHkpHtm; zefwD;wnfaqmufxm;&rnf/ yHk(264)/
yHk(264)yg Form yHkpHwGif , , rsm;jzifh
zefwD;xm;NyD; oufqdkif&m Properties rsm;wGifjyifqifjznfhpGufNyD;aemuf CommandButton rsm;wGif vdktyfaomy½dk*&rfrsm;a&;om;&ef jzpfygonf/
a1 - Adodc Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - a1Align - 0 - vbAlignNoneBOFAction - 0 - adDoMoveFirstConnectingString - provider=msdasql;dsn=exam01;uid=;pwd=;EOFAction - 0 - adDoMoveLastFont - MS Sans Serif, Bold, 8RecordSource - select [Identification Number],Rank,Name,
Department from Test1 order by [IdentificationNumber]
yHk(264)
253uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
a2 - Adodc Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - a2Align - 0 - vbAlignNoneBOFAction - 0 - adDoMoveFirstConnectingString - provider=msdasql;dsn=exam02;uid=;pwd=;EOFAction - 0 - adDoMoveLastFont - MS Sans Serif, Bold, 8RecordSource - select [Roll Number], Name, Myanmar, English,
Maths,Total,Result,[Amount of Fail] from Test1order by [Roll Number]
DataGrid1 - DataGrid Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - DataGrid1Align - 0 - vbAlignNoneAllowAddNew - FalseAllowArrows - FalseAllowDelete - FalseAllowUpdate - FalseFont - MS Sans Serif, Bold, 8DataSource - a1DataGrid2 - DataGrid Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - DataGrid2Align - 0 - vbAlignNoneAllowAddNew - TrueAllowArrows - TrueAllowDelete - TrueAllowUpdate - TrueFont - MS Sans Serif, Bold, 8DataSource - a2A1 - Adodc \\\\\ Record Position twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub a1_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
a1.Caption = "Record: " & CStr(a1.Recordset.AbsolutePosition)End Sub
254uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
A2 - Adodc \\\\\ Record Position twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub a2_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
a2.Caption = "Record: " & CStr(a2.Recordset.AbsolutePosition)End SubTo Append Table File Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click()Set DataGrid1.DataSource = a1a1.Recordset.MoveFirstDo While a1.Recordset.EOF = False
a2.Recordset.AddNewz01 = a1.Recordset("Identification Number")z02 = a1.Recordset("Rank")z03 = a1.Recordset("Name")z04 = a1.Recordset("Department")a2.Recordset("Identification Number") = z01a2.Recordset("Rank") = z02a2.Recordset("Name") = z03a2.Recordset("Department") = z04a1.Recordset.MoveNexta2.Recordset.Update
Loopa1.Recordset.MoveFirsta1.Refresha2.Recordset.MoveFirsta2.RefreshForm1.Caption = "To add Test1 Table File from Exam02 Database File"
End SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click()Unload MeEnd
End Sub- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
255uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Access 2002 ½Sd ½Sd ½Sd ½Sd ½Sd Database File twGif;rS twGif;rS twGif;rS twGif;rS twGif;rS Table File twGif;½Sd twGif;½Sd twGif;½Sd twGif;½Sd twGif;½Sd Record tm;½Smjcif;tm;½Smjcif;tm;½Smjcif;tm;½Smjcif;tm;½Smjcif;
atmufyg Form yHkpHtm; zefwD;wnfaqmufxm;&rnf/ yHk(265)/
yHk(265)yg Form yHkpHwGif , , , ,
rsm;jzifh zefwD;xm;NyD; oufqdkif&m Properties rsm;wGifjyifqifjznfhpGufNyD;
aemuf Command Button rsm;wGif vdktyfaomy½dk*&rfrsm;a&;om;&ef jzpfygonf/
a1 - Adodc Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - a1Align - 0 - vbAlignNoneBOFAction - 0 - adDoMoveFirstConnectingString - provider=msdasql;dsn=exam02;uid=;pwd=;EOFAction - 0 - adDoMoveLastFont - MS Sans Serif, Bold, 8RecordSource - select [Identification Number], Rank, Name,
Department from Test1 order by [IdentificationNumber]
yHk(265)
256uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
DataGrid1 - DataGrid Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - DataGrid1Align - 0 - vbAlignNoneAllowAddNew - TrueAllowArrows - TrueAllowDelete - TrueAllowUpdate - TrueFont - MS Sans Serif, Bold, 8DataSource - a1A1 - Adodc \\\\\ Record Position twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub a1_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
a1.Caption = "Record: " & CStr(a1.Recordset.AbsolutePosition)End SubTo Find Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click()Set DataGrid1.DataSource = a1z1 = Text1a1.Recordset.MoveFirstDo While a1.Recordset.EOF = False
If a1.Recordset("Identification Number") = z1 ThenClsPrintPrint a1.Recordset("Identification Number"), a1.Recordset
("Rank"),a1.Recordset("Name"), a1.Recordset("Department")
Exit DoElse
ClsPrintPrint "Not Fount"
End Ifa1.Recordset.MoveNext
Loop
257uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
End SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click()Unload MeEnd
End Subtxufyg Program udk Run yguatmufygtwdkif;jrifawGU&rnf/ yHk(266)/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(266)
258uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
tcef;(10)tcef;(10)tcef;(10)tcef;(10)tcef;(10)
Microsoft Visual 6.0 jzifh,cifoHk; jzifh,cifoHk; jzifh,cifoHk; jzifh,cifoHk; jzifh,cifoHk; Access zdkifwnfaqmufjcif;zdkifwnfaqmufjcif;zdkifwnfaqmufjcif;zdkifwnfaqmufjcif;zdkifwnfaqmufjcif;
yxrOD;pGm Microsoft Visual 6.0 udkzGifhyg/ xdkYaemuf yHk(267)yg Form1 wGif
Command Button udkoHk;í atmufygtwdkif;zefwD;&rnf/ Command Button rsm;wGif
oufqdkif&m y½dk*&rfrsm;a&;om;&rnf/
Open Database Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click() Form1.Hide frmForm2.ShowEnd SubExit Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click() Unload Me EndEnd Sub
Menu Bar ½Sd Add-Ins udka½G;yg/ tay:qHk; Pulldown Menu wpfckjzpfonfh
Visual Data Manager udka½G;yg/ yHk(268)/
xdktcg VisData Window Dialog Box wpfckay:vmrnf/ yHk(269)/
yHk(267)
yHk(268)
259uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
4if; Window xJrS Menu Bar wpfckjzpfonfh File udka½G;cs,f&efjzpfonf/ New...udkxyfrHa½G;ygu Visual Basic 6.0 rSwnfaqmufEd kifonfh atmufygzd kifrsm;
ay:vmayrnf/ yHk(270)/
yHk(269)
yHk(270)
260uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(270)yg yHkrS Microsoft Access 4udka½G;cs,f&rnf/ xdktcg Version 2.0MDB... ESifh Version 7.0 MDB... wdkYay:vmayrnf/ yHk(271)/
4if;r S Version 7.0 udka½G;cs,f&rnf/ xd ktcgzd ki fopfwnfaqmuf&ef
zdkiftrnftopf awmif;onfh Dialog Box ay:vmrnf/ yHk(272)/
yHk(272)wGif zdkiftrnfay;NyD; Save udka½G;cs,fyg/ Oyrm/ Test01/ xdktcg Da-tabase Window ay:vmrnf/ yHk(273)/
yHk(271)
yHk(272)
yHk(273)
261uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(273)yg Database Windows Dialog Box wGifyg0ifaom Propertiesudka½G;NyD; Right Click ESdyfyg/ xdktcg Short Cut Menu wpfckyHk(274)ygtwdkif;ay:vm
rnf/
Short Cut Menu rS New Table udka½G;cs,f&rnf/ xdktcg Table StructureDialog Box ay:vmrnf/ yHk(275)/
yHk(274)
yHk(275)
262uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Table Name: List Box wGif Table File Name udkrdrdpdwfBuKdufjznfhpGufyg/
Oyrm/ Test01 [k owfrSwfNyD; Add Field Command Button udka½G;cs,f&rnf/ xdktcg
Add Field Dialog Box ay:vmrnf/ 4if;wGif Field Name, Field Type, FieldSize wdkYudk pdwfBuKdufjznfhpGufNyD;aemuf OK udk Click jyKvkyfyg/ yHk(276)/
xdkaemuf Add Field Dialog Box xyfrHay:vmNyD; rdrdBuKdwifpDrHxm;aom FieldName, Field Type, Field Size rsm;udkowfrSwfNyD; OK udka½G;cs,f&rnf/ Field tm;vHk;
owfrSwfNyD;ygu Close Command Button udka½G;cs,fyg/ yHk(277)/
yHk(277)
yHk(276)
263uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdktcg yHk(278)ygtwdkif;jrifawGU&rnf/
Field Type wGifatmufyg vkyfydkifcGifhtcsufrsm;yg0ifonf -
(1) Boolean (2) Byte (3) Integer(4) Long (5) Currency (6) Single(7) Double (8) Date/Time (9) Text
(10) Binary (11) Memo
Field rsm;ay:wGifrlwnfNyD; Index jyKvkyfvdkygu Add Index udka½G;cs,fyg/
Add Index to Test01 Dialog Box ay:vmygu Name List Box wGif
trnfowfrSwfyg/ Index Fields tm;rdrdowfrSwfvdkonfh Field Name udk AvailableFields wGif Double Click jyKvkyfjcif;jzifhwnfaqmufEdkifayonf/ xdkYaemuf OKudkowfrSwf&rnf/ yHk(279)
yHk(278)
264uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(279) wGif OK udkowfrSwfvdkufygu Table Structure Dialog Box ay:
vmrnf/ yHk(280)/
yHk(279)
yHk(280)
265uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(280)wGif Close Command Button udka½G;cs,fygu rdrdwnfaqmufxm;aom
Table File qHk;½IH;oGm;Edkifonf/ xdkYaMumifh Build the Table Command Buttonudka½G;cs,f &rnf/ xdktcg yHk(281)yg twdkif; Database Windows Dialog Boxwpfckjyefvnfay:vm ayrnf/
xdkYaemuf Utility Menu rS Data Form Designer... udka½G;yg/ yHk(282)/
yHk(282)
yHk(281)
266uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdktcg yHk(283)ygtwdkif; Data Form Designer Dialog Box ay:vmrnf/
Form Name [w/o Extension]: List Box wGifrdrdowfrSwfvdkonfh trnfudk
jznfhpGufyg/ Oyrm - Form2 [kjznfhpGufNyD; RecordSource: List Box wGif DropdownList Arrow udk Mouse jzifh Click jyKvkyfyg/ xdktcg Pulldown Menu xJrS rdrdzefwD;xm;
onfh Table File tm;a½G;cs,fygu yHk(284)ygtwdkif;jzpfay:vmrnf/
yHk(284)
yHk(283)
267uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(284)wGif Available Fields: xJrS rdrdtvdk½Sdonfh Field rsm;tm; IncludedFields: List Box xJodkY > or >> jzifhydkYyg/ Oyrm - Fields tm;vHk;udka½G;cs,fyg/ yHk(285)
twdkif; jrifawGU&rnf/
xdkYaemuf Build the Form Command Button tm;a½G;cs,fyg/ qufvufí
Close Command Button udka½G;cs,f&rnf/ xdktcg Data Entry jyKvkyf&ef Formwpfck&½Sdvmayrnf/ yHk(286)/
yHk(286)yg Form yHkpHtm; yHk(287)ygtwdkif;odrf;qnf;&rnf/
yHk(286)
yHk(285)
268uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Form2 wGifyg0ifaom Toolbox Icon rsm;rSm udkavhvmygu Label,
Text Box, Command Button, Data wdkYyg0ifNyD; 4if;wdkY\ Properties
rsm;udk jyifqifjznfhpGufNyD;aemuf Command Button rsm;wGif vdktyfaomy½dk*&rfrsm;
a&;om;&rnfjzpfonf/
lblLabels(0) - Label Properties rSm
(Name) - lblLabelsAlignment - 0 - Left JustifyAutoSize - FalseBackStyle - OpaqueCaption - LabourID:DataFormat - GeneralFont - MS Sans Serif, Regular, 8Index - 0WordWrap - FalselblLabels(1) - Label Properties rSm
(Name) - lblLabelsAlignment - 0 - Left JustifyAutoSize - FalseBackStyle - Opaque
yHk(287)
269uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Caption - Name:DataFormat - GeneralFont - MS Sans Serif, Regular, 8Index - 1WordWrap - FalselblLabels(2) - Label Properties rSm
(Name) - lblLabelsAlignment - 0 - Left JustifyAutoSize - FalseBackStyle - OpaqueCaption - Date of Birth:DataFormat - GeneralFont - MS Sans Serif, Regular, 8Index - 2WordWrap - FalselblLabels(3) - Label Properties rSm
(Name) - lblLabelsAlignment - 0 - Left JustifyAutoSize - FalseBackStyle - OpaqueCaption - Salary:DataFormat - GeneralFont - MS Sans Serif, Regular, 8Index - 3WordWrap - FalsetxtFields(0) - Text Properties rSm
(Name) - txtFieldsAlignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleDataField - LabourIDDataFormat - GeneralDataSource - Data1
270uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Font - MS Sans Serif, Regular, 8Index - 0MultiLine - FalsetxtFields(1) - Text Properties rSm
(Name) - txtFieldsAlignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleDataField - NameDataFormat - GeneralDataSource - Data1Font - MS Sans Serif, Regular, 8Index - 1MultiLine - FalsetxtFields(2) - Text Properties rSm
(Name) - txtFieldsAlignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleDataField - Date of BirthDataFormat - GeneralDataSource - Data1Font - MS Sans Serif, Regular, 8Index - 2MultiLine - FalsetxtFields(3) - Text Properties rSm
(Name) - txtFieldsAlignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleDataField - SalaryDataFormat - GeneralDataSource - Data1Font - MS Sans Serif, Regular, 8Index - 3
271uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
MultiLine - FalseData1 - Data Properties rSm
(Name) - Data1Align - 2 - Align BottomBOFAction - 0 - Move FirstDatabaseName-C:\Program Files\Microsoft Visual Studio\VB98\Test01.mdbEOFAction - 0 - Move LastReadOnly - FalseRecordsetType - 1 - DynasetRecordSource - Test01cmdAdd - Command Button Properties rSm
(Name) - cmdAddCaption - &AddFont - MS Sans Serif, Regular, 8cmdDelete - Command Button Properties rSm
(Name) - cmdDeleteCaption - &DeleteFont - MS Sans Serif, Regular, 8cmdRefresh - Command Button Properties rSm
(Name) - cmdRefreshCaption - &RefreshFont - MS Sans Serif, Regular, 8cmdUpdate - Command Button Properties rSm
(Name) - cmdUpdateCaption - &UpdateFont - MS Sans Serif, Regular, 8cmdClose - Command Button Properties rSm
(Name) - cmdCloseCaption - &CloseFont - MS Sans Serif, Regular, 8
272uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Add Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub cmdAdd_Click()Data1.Recordset.AddNew
End SubDelete Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub cmdDelete_Click()'this may produce an error if you delete the last'record or the only record in the recordsetData1.Recordset.DeleteData1.Recordset.MoveNext
End SubRefresh Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub cmdRefresh_Click()'this is really only needed for multi user appsData1.Refresh
End SubUpdate Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub cmdUpdate_Click()Data1.UpdateRecordData1.Recordset.Bookmark = Data1.Recordset.LastModified
End SubClose Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub cmdClose_Click()frmForm2.HideForm1.Show
End SubError twGuftwGuftwGuftwGuftwGuf
Private Sub Data1_Error(DataErr As Integer, Response As Integer)'This is where you would put error handling code'If you want to ignore errors, comment out the next line'If you want to trap them, add code here to handle themMsgBox "Data error event hit err:" & Error$(DataErr)
273uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Response = 0 'throw away the errorEnd SubRecord Position twGuftwGuftwGuftwGuftwGuf
Private Sub Data1_Reposition()Screen.MousePointer = vbDefaultOn Error Resume Next'This will display the current record position'for dynasets and snapshotsData1.Caption = "Record: " & (Data1.Recordset.AbsolutePosition + 1)'for the table object you must set the index property when'the recordset gets created and use the following line'Data1.Caption = "Record: " & (Data1.Recordset.RecordCount *
(Data1.Recordset.PercentPosition * 0.01)) + 1End SubData1 Validate twGuftwGuftwGuftwGuftwGuf
Private Sub Data1_Validate(Action As Integer, Save As Integer)'This is where you put validation code'This event gets called when the following actions occurSelect Case Action
Case vbDataActionMoveFirstCase vbDataActionMovePreviousCase vbDataActionMoveNextCase vbDataActionMoveLastCase vbDataActionAddNewCase vbDataActionUpdateCase vbDataActionDeleteCase vbDataActionFindCase vbDataActionBookmarkCase vbDataActionClose
End SelectScreen.MousePointer = vbHourglass
End Sub- - - - - - - - - - 0 - 0 - 0 - - - - - - - - - -
274uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
,cifoHk; ,cifoHk; ,cifoHk; ,cifoHk; ,cifoHk; Access zdkifudk zdkifudk zdkifudk zdkifudk zdkifudk Data Report wnfaqmufí wnfaqmufí wnfaqmufí wnfaqmufí wnfaqmufí Report wnfaqmufjcif;wnfaqmufjcif;wnfaqmufjcif;wnfaqmufjcif;wnfaqmufjcif;
yxrOD;pGm Microsoft Visual 6.0 udkzGifhyg/ xdkYaemuf yHk(288)yg Form1 wGif
Command Button udkoHk;í atmufygtwdkif;zefwD;&rnf/
xdkYaemuf Menu Bar ½Sd Project udka½G;yg/ xdkYaemuf Pulldown Menu xJrS
Add Data Report udkxyfrHa½G;cs,f&rnf/ yHk(289)/
yHk(288)
yHk(289)
275uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(290)ygtwdkif; Project1 - DataReport1 [DataReport] Form ay:
vmayrnf/
txufyg Report Form yHkpHtm;zefwD;vdkufonfESifh Project Explore wGif
vnf; yHk(291)ygtwdkif; DataReport1(DataReport1) topfwpfckwdk;vmayrnf/
txufyg Report Form yHkpHtm;trnfajymif;vJ&ayrnf/ Properties - DataReport1 wGif Name ü RDataReport1 [kajymif;vJowfrSwfyg/ yHk(292)/
yHk(290)
yHk(291)
276uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Project Explore wGif vnf; yHk(293)ygtwdkif; RDataReport1(DataReport1)[ktrnfajymif;oGm;ayrnf/
tqdkyg RDataReport1(RDataReport1) File udkodrf;vdkygu Menu Bar ½Sd
File udka½G;cs,fyg/ xdkYaemuf Save Project udkxyfrHa½G;cs,fygu Save File As Dia-log Box ay:vmrnf/ Save Command Button udka½G;cs,f&rnf/ yHk(293)/
yHk(292)
yHk(292)
277uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xyfrHí Menu Bar jzpfaom Project rS More ActiveX Designers... udk
a½G;cs,f&rnf/ xdktcg Data Environment qdkonfh Sub-Menu wpfckxyfrHay:vmrnf/
4if;udkxyfrHa½G;cs,fyg/ yHk(294)/
yHk(293)
yHk(294)
278uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdktcg yH k(295)wGifazmfjyxm;aom Project1 - DataEnvironment1[DataEnvironment] Dialog Box ay:vmayrnf/ 4if;udktrnfajymif;&ef Proper-ties udka½G;í Properties - DataEnvironment wGif Name RDataEnvironment1[kajymif;vJowfrSwf&rnf/ yHk(296)
Project Explore wGif vnf; yHk(297)ygtwdkif; RDataReport1(DataReport1)[ktrnfajymif;oGm;ayrnf/
yHk(295)
yHk(296)
279uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdkaemuf Project1 - RDataEnvironment [DataEnvironment] wGif Con-nection1 udka½G;í Right Click udkESdyfyg/ Short Cut Menu ay:vmygu yHk(298)wGif
azmfjyxm;onfhtwdkif; Properties... udk xyfrHa½G;cs,fyg/
yHk(297)
yHk(298)
280uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdktcg Data Link Properties Dialog Box ay:vmrnf/ 4if;rS ProviderTab Command Button udka½G;í Microsoft Jet 3.51 OLE DB Provider udka½G;cs,f
yg/ yHk(299)/
xdkYaemuf Connection Tab Command Button udka½G;cs,fyg/ yHk(300)ygtwdkif;
1. Select or enter a database name: List Box wGif Database File Name awmif;
ygu rdrdudk,fwdkif Database File Name ½dkufxnfhjcif;jzifhvnf;aumif;? udkxyfrH
a½G;cs,fjcif;jzifhvnf;aumif; tvdk½Sdaom Database File Name udka½G;cs,fyg/ yHk(301)/
yHk(299)
281uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Test Connection udka½G;cs,fygu rdrda½G;cs,fcJhaom Database File ESifh Pathvrf;aMumif;rSefuefygu yHk(302)ygtwdkif;azmfjyrnfjzpfonf/
yHk(300)
yHk(301)
yHk(302)
282uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdkenf;wl Data Link Properties Dialog Box \ Tab Command Buttonrsm;jzpfMuaom Advanced yHk(303) ESifh All yHk(304)wdkYwGifrnfonfhtcsufrQajymif;vJ&ef
rvdkbJ OK udka½G;cs,f&efjzpfygonf/
yHk(303)
yHk(304)
283uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdkaemuf Project1 - RDataEnvironment [DataEnvironment] wGif Con-nection1 udka½G;í Right Click udkESdyfyg/ Short Cut Menu ay:vmygu yHk(305)wGif
azmfjyxm;onfhtwdkif; Add Command udk xyfrHa½G;cs,fyg/
xdktcg yHk(306)ygtwdkif; jzpfay:vmrnf/
yHk(305)
yHk(306)
284uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
tqdkyg RDataEnvironment1(RDataEnvironment1) File udkodrf;vdkygu
Menu Bar ½Sd File udka½G;cs,fyg/ xdkYaemuf Save Project udkxyfrHa½G;cs,fygu SaveFile As Dialog Box ay:vmrnf/ Save Command Button udka½G;cs,f&rnf/ yHk(307)/
Project Explore jzpfonfh Project - Project1 Dialog Box wGifvnf;
RDataEnvironment1(RDataEnvironment1)tpm; RDataEnvironment1(RDataEnvironment1.Dsr) tjzpfajymif;vJoGm;rnf/ yHk(308)/
yHk(307)
yHk(308)
285uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Project1 - RDataEnvironment [DataEnvironment] wGif Connection1udka½G;í Right Click udkESdyfyg/ Short Cut Menu ay:vmygu yHk(309)wGifazmfjyxm;
onfhtwdkif; Properties udk xyfrHa½G;cs,fyg/
xdktcg Command1 Properties Dialog Box wpfckay:vmrnf/ 4if;wGif
General, Parameters, Relation, Grouping, Aggregates, Advanced qdkonfh TabCommand Button (6)ckay:vmrnf/ 4if; Tab Command rsm;xJrS General TabCommand udka½G;yg/ yHk(310)/
yHk(309)
286uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Source of Data acgif;pOfatmufwGif½Sdaom Database Object: List BoxDropdown Arrow udka½G;í Table udkajymif;yg/ Object Name: List Box wGif
Dropdown Arrow tultnDjzifh rdrdzefwD;xm;cJhaom Test01 udka½G;cs,f&rnf/ yHk(311)/
usef Tab Command Button rsm;tm;jyKjyifp&mrvdkawmhonfhtwGuf Apply-> OK udka½G;cs,fyg/ xdktcg Project1 - DataEnvironment1 [DataEnvironment]Dialog Box ½Sd \ udka½G;ygu yHk(312)wGif azmfjyxm;ouJhodkY FieldName rsm;azmfjyaeayrnf/
yHk(310)
yHk(311)
287uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdkYaemuf Project1 - RDataReport1 [DataReport] udkjyefvnfqJGwif&rnf/
yHk(313)/
Page Header (Section2) Activate jzpfaeaomtcg Right Click udkESdyfyg/
Short Cut Sub-Menu wpfckay:vmrnf/ 4if;rS Insert Control udka½G;NyD; Label udkxyfrH
a½G;cs,f&rnf/ yHk(314)/
yHk(312)
yHk(313)
288uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdktcg yHk(315)ygtwdkif;jzpfay:vmrnf/
yHk(314)
yHk(315)
289uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdkenf;twdkif; Label (4)ckzefwD;NyD; Labour ID, Name, Date of Birth, Sal-ary ponfjzifhtrnfowfrSwfyg/ yHk(316)? yHk(317)/
Datail (Section1) Activate jzpfaeaomtcg Right Click udkESdyfyg/ ShortCut Sub-Menu wpfckay:vmrnf/ 4if;rS Insert Control udka½G;NyD; TextBox udkxyfrH
a½G;cs,f&rnf/ yHk(318)/
yHk(316)
yHk(317)
290uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdktcg yHk(319)ygtwdkif;jzpfay:vmrnf/
yHk(318)
291uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdkenf;twdkif; TextBox (4)ckzefwD;&rnf/ yHk(320)/
Project1 - RDataReport1 [DataReport] Activate jzpfaeaomtcg Smart
Icon jzpfaom \tultnDjzifh yHk(321)wGifazmfjyxm;onfhtwdkif; Properties -
RDataReport1 ü DataSource wGif List Dropdown Arrow jzifh RData Environ-ment1 udka½G;cs,f&rnf/ DataMember wGif List Dropdown Arrow jzifh Com-mand1 udkxyfrHa½G;cs,f&rnf/
yHk(319)
yHk(320)
292uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Detail (Section1) Activate ap&efjyKvkyfí yxrOD;qHk;jrifawGUae&onfh Text
Box udka½G;yg/ Smart Icon jzpfaom \tultnDjzifh yHk(322)wGifazmfjyxm;onfh
twdkif; Properties - Text1 ü DataMember \ List Dropdown Arrow jzifh Com-mand1 udkvnf;aumif;? DataField \ List Dropdown Arrow jzifh LabourIDudkvnf;aumif;a½G;cs,f&rnf/ xdkenf;wlusef Text Box toD;oD;udkvnf; DataMember,DataField wdkYudkqDavsmfatmifjyKvkyf&rnf/ yHk(323)/
yHk(321)
293uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(322)
yHk(323)
294uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
txufyg yHk(324)udkjyefoGm;NyD; oufqdkif&m Command Button rsm;wGif
atmufazmfjyyg yHk(325)yg twdkif; Coding rsm;udka&;&rnf/
rSwfcsuf/rSwfcsuf/rSwfcsuf/rSwfcsuf/rSwfcsuf/ ///// DataReport toHk;jyKygu DataEnvironment udkoHk;udkoHk;&rnf
jzpfonf/ DataEnvironment wGif Database File rwlnDygu Connection1, Con-nection2, ... [lí cJGjcm;toHk;jyK EdkifNyD; Database File wlnDNyD; Table File (rwlnDvQif)
rsm;jym;aeygu Command1, Command2, ... zefwD;ítoHk;jyKEdkifygonf/
- - - - - - - - - - 0 - 0 - 0 - - - - - - - - - -
yHk(324)
yHk(325)
295uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
,cifoHk; ,cifoHk; ,cifoHk; ,cifoHk; ,cifoHk; Access zdkifudk zdkifudk zdkifudk zdkifudk zdkifudk Form wnfaqmufí"gwfyHkrsm;Munfhjcif;wnfaqmufí"gwfyHkrsm;Munfhjcif;wnfaqmufí"gwfyHkrsm;Munfhjcif;wnfaqmufí"gwfyHkrsm;Munfhjcif;wnfaqmufí"gwfyHkrsm;Munfhjcif;
yxrOD;pGm Microsoft Visual 6.0 udkzGifhyg/ xdkYaemuf yHk(326)yg Form1 wGif
Command Button rsm;udkoHk;í atmufygtwdkif;zefwD;NyD; vdktyfaomy½dk*&rfrsm;a&;om;
&rnf/
Data Entry Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click()frmForm2.Show
End SubExit Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click()Unload MeEnd
End Sub
xdkYaemuf yHk(327)yg frmForm2 wGifvdktyfaom Label, TextBox, OLE, Data,Command Button rsm;udkoHk;í atmufygtwdkif;zefwD;&rnf/ vdktyfaom Proper-ties rsm;udkvnf;jyifqif&rnf/
yHk(326)
296uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
OLE Data
lblLabels(0) - lblLabels Properties twGuftwGuftwGuftwGuftwGuf
(Name) - lblLabelsAlignment - 0 - Left JustifyAutoSize - FalseBackStyle - 1 - OpaqueCaption - LabourID:Font - MS Sans Serif, Regular, 8Index - 0WordWrap - FalselblLabels(1) - lblLabels Properties twGuftwGuftwGuftwGuftwGuf
(Name) - lblLabelsAlignment - 0 - Left JustifyAutoSize - FalseBackStyle - 1 - OpaqueCaption - Name:Font - MS Sans Serif, Regular, 8Index - 1WordWrap - False
yHk(327)
297uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
lblLabels(2) - lblLabels Properties twGuftwGuftwGuftwGuftwGuf
(Name) - lblLabelsAlignment - 0 - Left JustifyAutoSize - FalseBackStyle - 1 - OpaqueCaption - Date of Birth:Font - MS Sans Serif, Regular, 8Index - 2WordWrap - FalselblLabels(3) - lblLabels Properties twGuftwGuftwGuftwGuftwGuf
(Name) - lblLabelsAlignment - 0 - Left JustifyAutoSize - FalseBackStyle - 1 - OpaqueCaption - Salary:Font - MS Sans Serif, Regular, 8Index - 1WordWrap - FalselblLabels(4) - lblLabels Properties twGuftwGuftwGuftwGuftwGuf
(Name) - lblLabelsAlignment - 0 - Left JustifyAutoSize - FalseBackStyle - 1 - OpaqueCaption - Photos:Font - MS Sans Serif, Regular, 8Index - 1WordWrap - FalsetxtFields(0) - txtFields Properties twGuftwGuftwGuftwGuftwGuf
(Name) - txtFieldsAlignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleDataField - LabourIDDataFormat - GeneralDataSource - Data1
298uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Font - MS Sans Serif, Regular, 8Index - 0MultiLine - FalsetxtFields(1) - txtFields Properties twGuftwGuftwGuftwGuftwGuf
(Name) - txtFieldsAlignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleDataField - NameDataFormat - GeneralDataSource - Data1Font - MS Sans Serif, Regular, 8Index - 1MultiLine - FalsetxtFields(2) - txtFields Properties twGuftwGuftwGuftwGuftwGuf
(Name) - txtFieldsAlignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleDataField - Date of BirthDataFormat - GeneralDataSource - Data1Font - MS Sans Serif, Regular, 8Index - 2MultiLine - FalsetxtFields(3) - txtFields Properties twGuftwGuftwGuftwGuftwGuf
(Name) - txtFieldsAlignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleDataField - SalaryDataFormat - GeneralFont - MS Sans Serif, Regular, 8Index - 3MultiLine - False
299uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
oleFields(0) - oleFields Properties twGuftwGuftwGuftwGuftwGuf
(Name) - oleFieldsAutoActivate - 2 - DoubleClickBackStyle - 1 - OpaqueBorderStyle - 1 - Fixed SingleDataField - PhotosDataSource - Data1Font - MS Sans Serif, Regular, 8Index - 0OLEDropAllowed - FalseOLETypeAllowed - 2 - EitherSizeMode - StretchcmdAdd - Command Button Properties rSm
(Name) - cmdAddCaption - &AddFont - MS Sans Serif, Regular, 8cmdDelete - Command Button Properties rSm
(Name) - cmdDeleteCaption - &DeleteFont - MS Sans Serif, Regular, 8cmdRefresh - Command Button Properties rSm
(Name) - cmdRefreshCaption - &RefreshFont - MS Sans Serif, Regular, 8cmdUpdate - Command Button Properties rSm
(Name) - cmdUpdateCaption - &UpdateFont - MS Sans Serif, Regular, 8cmdClose - Command Button Properties rSm
(Name) - cmdCloseCaption - &CloseFont - MS Sans Serif, Regular, 8
300uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Data1 - Data Properties rSm
(Name) - Data1Align - 0 - NoneBOFAction - 0 - Move FirstConnect - AccessDatabaseName-C:\Program Files\Microsoft Visual Studio\VB98\Test01.mdbEOFAction - 0 - Move LastFont - MS Sans Serif, Regular, 8ReadOnly - FalseRecordsetType - 1 - DynasetRecordSource - Test01Add Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub cmdAdd_Click()Data1.Recordset.AddNew
End SubDelete Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub cmdDelete_Click()'this may produce an error if you delete the last'record or the only record in the recordsetData1.Recordset.DeleteData1.Recordset.MoveNext
End SubRefresh Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub cmdRefresh_Click()'this is really only needed for multi user appsData1.Refresh
End SubUpdate Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub cmdUpdate_Click()Data1.UpdateRecordData1.Recordset.Bookmark = Data1.Recordset.LastModified
End Sub
301uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Close Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub cmdClose_Click()frmForm2.HideForm1.Show
End SubError twGuftwGuftwGuftwGuftwGuf
Private Sub Data1_Error(DataErr As Integer, Response As Integer)'This is where you would put error handling code'If you want to ignore errors, comment out the next line'If you want to trap them, add code here to handle themMsgBox "Data error event hit err:" & Error$(DataErr)Response = 0 'throw away the error
End SubRecord Position twGuftwGuftwGuftwGuftwGuf
Private Sub Data1_Reposition()Screen.MousePointer = vbDefaultOn Error Resume Next'This will display the current record position'for dynasets and snapshotsData1.Caption = "Record: " & (Data1.Recordset.AbsolutePosition + 1)'for the table object you must set the index property when'the recordset gets created and use the following line'Data1.Caption = "Record: " & (Data1.Recordset.RecordCount *
(Data1.Recordset.PercentPosition * 0.01)) + 1End SubData1 Validate twGuftwGuftwGuftwGuftwGuf
Private Sub Data1_Validate(Action As Integer, Save As Integer)'This is where you put validation code'This event gets called when the following actions occurSelect Case Action
Case vbDataActionMoveFirstCase vbDataActionMovePrevious
302uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Case vbDataActionMoveNextCase vbDataActionMoveLastCase vbDataActionAddNewCase vbDataActionUpdateCase vbDataActionDeleteCase vbDataActionFindCase vbDataActionBookmarkCase vbDataActionClose
End Select'Screen.MousePointer = vbHourglass
End SubOLEField Double Click twGuftwGuftwGuftwGuftwGuf
Private Sub oleFields_DblClick(Index As Integer)'this is the way to get data into an empty ole control'and have it saved back to the tableoleFields(Index).InsertObjDlg
End Sub- - - - - - - - - - 0 - 0 - 0 - - - - - - - - - -
Toolbox xJwGif xJwGif xJwGif xJwGif xJwGif Crystal Report Smart Icon xnfhjcif;xnfhjcif;xnfhjcif;xnfhjcif;xnfhjcif;
Toolbox wGif Right Click ESdyfyg/ xdktcg Short Cut Menu ay:vmygu
Components... udkxyfrHa½G;cs,f&rnf/ yHk(328)/
yHk(328)
303uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Components Dialog Box ay:vmygu Crystal Report Control 4.6 udka½G;
NyD; Check vkyf&rnf/ xdkYaemuf Apply, OK udkxyfrHa½G;cs,f&rnf/ yHk(329)/
Crystal Report Control 4.6 udka½G;Edkifjcif;onf C:\WINDOWS\SYSTEM\CRYSTL32.OCX zdkif½Sdjcif;aMumifhjzpfonf/ xdktcg Toolbox ü Crystal ReportIcon a&muf½Sdvmrnf/ yHk(330)/
- - - - - - - - - - 0 - 0 - 0 - - - - - - - - - -
yHk(329)
yHk(330)
304uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Crystal Report wnfaqmufjcif; ( ,cif wnfaqmufjcif; ( ,cif wnfaqmufjcif; ( ,cif wnfaqmufjcif; ( ,cif wnfaqmufjcif; ( ,cif Access File )))))yxrOD;pGm Visual Basic 6.0 udkzGifhyg/ xdkYaemuf Menu Bar rS Add-Ins udk
a½G;í Pulldown Menu wpfckjzpfaom Report Designer... udka½G;cs,f&rnf/ yHk(331)
yHk(332)ygtwdkif;jzpfay:vmygu Cancel Command Button udka½G;cs,fyg/
yHk(331)
yHk(332)
305uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Crystal Reports Registration Express Dialog Box aysmufoGm;vdrfhrnf/
xdktcg Report wnfaqmuf&eftqifoifhjzpfaeayvdrfhrnf/
Crystal Reports Pro Dialog Box wGif New... udk yHk(333)a½G;ygu yHk(334)yg
twdkif; Create New Report Dialog Box jzpfay:vmrnf/
Create New Report Dialog Box xJrS Standard udkxyfrHa½G;cs,fygu yHk(335)
ygtwdkif;jzpfay:vmayrnf/
yHk(333)
yHk(334)
306uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Create Report Expert Dialog Box wGif Data File Command Button udk
xyfrHa½G;cs,f&rnf/ yHk(336)
Choose Database File Dialog Box xyfrHay:vmNyD; rdrdtoHk;jyKvdkonfh Da-tabase File udkxyfrHa½G;cs,f&ef List Files of Type:List Box udk Access Files (or)User Default [kajymif;yg/ rdrdtvdk½Sdonfh Drives:, Directories: wdkYtm; ajymif;vJí
tvdk½Sdonfh Microsoft Database File udka½G;cs,fNyD; Add Command Button udk
a½G;cs,f&rnf/ yHk(337)
yHk(335)
yHk(336)
307uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Choose Database File Dialog Box \trSm;jcpf Close Button udka½G;jcif;jzifh
aomfvnf;aumif;? Done Command Button udka½G;jcif;jzifhaomfvnf;aumif; xyfrH
aqmif½Guf&rnf/ xdktcg Choose Database File Dialog Box aysmufoGm;rnf/ yHk(338)
yHk(337)
308uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Create Report Expert Dialog Box wGif Step 1: Tables, 2: Fields, 3:Sort, 4: Total, 5: Select, 6: Style [lí Tab Command (6)ck 0ifyg0ifNyD; 2: Fieldstm;xyfrHa½G;cs,fyg/ yHk(339)/
Database Fields: acgif;pOfatmuf½Sd Database Fields: rsm;xJrS rdrdtvdk½Sdaom
Field rsm;tm; Report Fields: acgif;pOfatmufodkYydkY&rnf/ Field wpfckcsif;a½G;vdkygu
Command Button jzifha½G;cs,fNyD; Field tm;vHk;a½G;vdkygu
Command Button jzifha½G;cs,f&rnf/ yHk(340)/
yHk(338)
yHk(339)
309uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdkYaemuf Next>> Command Button udka½G;cs,fyg/ yHk(341)/
xdktcg Tab Command wpfckjzpfaom 3: Sort odkYa&muf½SdoGm;rnf/ txufyg
yHk(341)wGif rdrdtkyfpkzJGUvdkonfh Field tm; tkyfpkzJGUEdkifonf/ tkyfpkzJGU&ef rvdktyfygu
Preview Report udkxyfrHa½G;yg/ yHk(342)/
yHk(340)
yHk(341)
310uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
txufygyHkwGifazmfjyxm;aom Design tm;a½G;cs,fygu yHk(343)twdkif; jyKjyif
rGrf;rHEdkif&ef tajctaeay;vdrfhrnf/
yHk(342)
311uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdkYaemuf Menu Bar ½Sd Insert udka½G;cs,fyg/ Pulldown Menu wpfckjzpfaom
Text Field udka½G;cs,fyg/ yHk(344)/
yHk(343)
312uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdktcg Edit Text Field Dialog Box ay:vmNyD; acgif;pOftm;rdrdpdwfBuKduf
zefwD;í&ayonf/ yHk(345)/ xdkYaemuf Accept Command Button udka½G;cs,fyg/
acgif;pOftm; Alignment csdef&efrdrd½dkufESdyfxm;onfh acgif;pOf Text Box tm;
a½G;NyD; Right Click udka½G;yg/ Short Cut Menu ay:vmrnf/ xdkYaemuf ChangeFormat... udka½G;cs,f&rnf/ yHk(346)/
yHk(344)
yHk(345)
313uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdktcg Format String Dialog Box ay:vmrnf/ yHk(347) 4if;rS AlignmentwGif Centered udk a½G;NyD; OK udkxyfrHa½G;cs,fygu acgif;pOfpmom; tv,fñd§oGm;ayrnf/
yHk(348)
yHk(346)
yHk(347)
314uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
txufyg Report File tm;odrf;vdkygu Menu Bar ½Sd File udka½G;cs,fyg/
xdkYaemuf Pulldown Menu xJrS Save udka½G;cs,fyg/ yHk(349)
yHk(348)
yHk(349)
315uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdktcg File Save As Dialog Box ay:vmrnf/ rdrdpdwfBuKdufodrf;vdkonfh
zdkiftrnfudkay;NyD; OK udk Click vkyf&rnf/ yHk(350)/
Crystal Reports Title Bar onfvnf; [Untitled Report #1] r[kwfawmhbJ
[c:\program files\microsoft visual studio\vb98\std09.rpt] [líajymif;vJoGm;ay
rnf/ yHk(351)/
- - - - - - - - - - 0 - 0 - 0 - - - - - - - - - -
yHk(350)
yHk(351)
316uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Crystal Report wnfaqmufjcif; ( wnfaqmufjcif; ( wnfaqmufjcif; ( wnfaqmufjcif; ( wnfaqmufjcif; ( Access File 2000 txuf )txuf )txuf )txuf )txuf )
yxrOD;pGm Visual Basic 6.0 udkzGifhyg/ xdkYaemuf Menu Bar rS Add-Ins udk
a½G;í Pulldown Menu wpfckjzpfaom Report Designer... udka½G;cs,f&rnf/ CreateReport Expert Dialog Box a&mufonftxdtqifhqifhjyKvkyfNyD; SQL/ODBC Com-mand Button udka½G;cs,f&rnf/ yHk(352)
xdktcg Log On Server Dialog Box topfwpfckay:vmrnf/ yHk(353)
yHk(353)yg Dialog Box rS ODBC:exam01 udka½G;cs,fyg/ xdkYaemuf OK udk
Click vkyfyg/ xdktcg Choose SQL Table Dialog Box ay:vmrnf/ yHk(354)/
yHk(352)
yHk(353)
317uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Choose SQL Table Dialog Box xJrS SQL Tables: acgif;pOfatmuf½Sd ListBox wGif rdrdpdwfBuKduf Table File udkda½G;cs,f&rnf/ Oyrm - exam01 udka½G;cs,fyg/
Add Command Button udkxyfrHa½G;cs,fyg/ Close Button udka½G;cs,fygu yHk(355)
ygtwdkif;jzpfvmrnf/
yHk(355)wGif Next >> Command Button udkxyfrHa½G;cs,f&rnf/ yHk(356)yg
twdkif;azmfjyrnf/
yHk(354)
yHk(355)
318uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
txufygyHk(356)wGif Database Fields: ü Field rsm;pdwfBuKduf(odkYr[kwf)
tm;vHk;udk a½G;cs,fEdkifayonf/ Oyrm - Fields rsm;tm;vHk;a½G;cs,f&ef All ->> Com-mand Button udka½G;cs,f&rnf/ yHk(357)
xdkYaemuf Next udkxyfrHa½G;cs,fyg/ yHk(358)ygtwdkif;azmfjyrnf/
yHk(356)
yHk(357)
319uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
txufygyHk(358)wGif Group Fields aqmif½Gufvdkygu vkyfydkifcGifhay;xm;NyD;
raqmif½Gufvdkygu Preview Report Command Button udka½G;cs,f&rnf/ xdktcg
yHk(359)twdkif; jzpfay:vmrnf/
yHk(358)
yHk(359)
320uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Design Tab Command Button udka½G;cs,fygu yHk(360)ygtwdkif;jzpfay:vm
rnf/
txufygyHk(360)wGifazmfjyxm;aom Crystal Report File tm;odrf;vdkygu
Menu Bar wGif½Sdonfh File udka½G;cs,fyg/ Pulldown Menu wpfckjzpfaom Save udk
a½G;cs,fyg/ xdktcg File Save As Dialog Box ay:vmrnf/ rdrdpdwfBuKdufvrf;aMumif;
wGif Report File Name udkjznfhpGufNyD; OK Command Button udka½G;cs,f&rnf/
yHk(361)/
yHk(360)
321uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
- - - - - - - - - - 0 - 0 - 0 - - - - - - - - - -
Crystal Report jzifh jzifh jzifh jzifh jzifh Graphic File ½dkufxkwfjcif;½dkufxkwfjcif;½dkufxkwfjcif;½dkufxkwfjcif;½dkufxkwfjcif;
yxrOD;pGm Visual Basic 6.0 wGif "gwfyHkrsm;yg0ifaom Access File udk
wnfaqmufxm;&rnf/ "gwfyHkrsm;udk Windows BitMap File Format jzifhom DataEntry jyKvkyf&rnf/ Access 2000 xufapmaom ,cif Access File rsm;twGufrl
Crystal Report \vkyfydkifcGifhjzpfaom Create Report Expert Dialog Box ay:vm
atmifzefwD;í Data File Command Button udka½G;&rnf/ Access 2000 ESifh txuf
Access File rsm;twGufrl Crystal Report \vkyfydkifcGifhjzpfaom Create Report Ex-pert Dialog Box ay:vmatmifzefwD;í SQL/ODBC File Command Button udk
a½G;&rnf/
yHk(361)
yHk(362)
322uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdktcg Log On Server Dialog Box ay:vmrnf/ Server Type: acgif;pOfatmufwGif rdrda½G;cs,frnfh Database File tm;½SmazG&rnf/ Oyrm - ODBC - Photo01udka½G;cs,fyg/ xdkYaemuf OK udk Click vkyf&rnf/ yHk(363)/
Choose SQL Table Dialog Box ay:vmygu rdrdwnfaqmufxm;aom
Database File xJwGifyg0ifonfh Table File udka½G;cs,fNyD; Add Command Buttonudk xyfrHa½G;cs,f&rnf/ yHk(364)/
Create Report Expert Dialog Box ay:vmNyD; Table File jzpfonfh Photo01File ay:vmrnf/ yHk(365)/
yHk(363)
yHk(364)
323uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(365)wGif Next >> Command Button udkxyfrHa½G;cs,f&rnf/ yHk(366)yg
twdkif;azmfjyrnf/
txufygyHk(366)wGif Database Fields: ü Field rsm;pdwfBuKduf(odkYr[kwf)
tm;vHk;udk a½G;cs,fEdkifayonf/ Oyrm - Fields rsm;tm;vHk;a½G;cs,f&ef All ->> Com-mand Button udka½G;cs,f&rnf/ yHk(367)
yHk(365)
yHk(366)
324uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdkYaemuf Next udkxyfrHa½G;cs,fyg/ yHk(368)ygtwdkif;azmfjyrnf/
txufygyHk(368)wGif Group Fields aqmif½Gufvdkygu vkyfydkifcGifhay;xm;NyD;
raqmif½Gufvdkygu Preview Report Command Button udka½G;cs,f&rnf/ xdktcg
yHk(369)twdkif; jzpfay:vmrnf/
yHk(367)
yHk(368)
325uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Design Tab Command Button udka½G;cs,fygu yHk(370)ygtwdkif;jzpfay:vm
rnf/
yHk(369)
326uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Design View wGif Band (5)ckyg½Sdrnfjzpfonf/ Title, Page header, De-tails, Page footer, Summary wdkYjzpfMuonf/ Title onf acgif;pOfBuD;twGufjzpfNyD;?
Page header onf pm½Gufwdkif;wGifyg½Sdrnfh tkyfpkacgif;pOfrsm;? &ufpJG? pmrsufESmeHygwfrsm;
jzpfEdkifonf/ Details onf Record rsm;azmfjy&eftwGuf Template rsm;jzpfayonf/
Page footer onfpm½GuftoD;oD;\atmufqHk;wGifyg0if&rnfh &ufpJG? pmrsufESm eHygwfrsm;
jzpfEdkifygonf/ Details ESifh Page footer udk "gwfyHkrsm;xnfhoGif;&efoifhwifhrQwpGmjcm;
&rnf/ xdkYaemuf Menu Bar ½Sd Insert udka½G;yg/ Pulldown Menu jzpfaom Data-base Field udkxyfrHa½G;cs,f&rnf/ yHk(371)
yHk(370)
327uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdktcg Insert Database Field Dialog Box rS Field wpfckjzpfaom photosudka½G;NyD; Insert Command Button udka½G;cs,f&rnf/ yHk(372)
yHk(371)
yHk(372)
328uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdktcg yHk(373)ygtwdkif; "gwfyHk½Sd&rnfhtuGufudkcsdefqí tpm;xdk;twnfjyKNyD;
aomtcg Insert -> Text Field jzifh vdktyfrnfhpmom;rsm;a&;om;yg/ yHk(374)/
tqdkyg Crystal Report File tm; File -> Save udka½G;NyD; Report File Nameay;&efjzpfonf/
- - - - - - - - - - 0 - 0 - 0 - - - - - - - - - -
yHk(373)
yHk(374)
329uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Access zdkifudk zdkifudk zdkifudk zdkifudk zdkifudk Crystal Report wnfaqmufí wnfaqmufí wnfaqmufí wnfaqmufí wnfaqmufí Print ½dkufxkwfjcif;½dkufxkwfjcif;½dkufxkwfjcif;½dkufxkwfjcif;½dkufxkwfjcif;
yHk(375)yg Form1 wGif Command Button rsm;udkoHk;í atmufygtwdkif; zefwD;
wnfaqmufxm;&rnf/ /
Crystal Report
Private Sub Command1_Click()CrystalReport1.PrintReport
End Sub
Private Sub Command2_Click()Unload MeEnd
End Sub
Microsoft Visual Basic 6.0 wGif Menu Bar wpfckjzpfaom Add-in udka½G;cs,f
yg/ xdkYaemuf Pulldown Menu xJrS Report Designer... jzifh *.rpt File wpfzdkifudk
wnfaqmufxm;&rnf/ Oyrm - c:\program files\microsoft visual studio\vb98\exam01.rpt udkwnfaqmufxm;&rnf/ yHk(376)/
yHk(375)
330uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Crystal Report \ \ \ \ \ Properties wGifwGifwGifwGifwGif
(Name) - CrystallReport1BoundReportFooter - FalseCopiesToPrinter - 1Destination - 0 - crptToWindowDetailCopies - 1DiscardSaveData - FalseLeft - 4200MarginBottom - 0MarginLeft - 0MarginRight - 0MarginTop - 0PrinterCollation - 2 - crptDefaultPrinterCopies - 1PrinterStopPage - 0PrintFileType - 0 - crptRecord
yHk(376)
331uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
PrintFileUserRptDateFmt - FalsePrintFileUserRptNumberFmt - FalseReportFileName - C:\Program Files\Microsoft Visual
Studio\VB98\exam01.rptReportSource - 0 - crptReportTop - 960WindowBorderStyle - 2 - crptSizableWindowControlBox - TrueWindowControls - TrueWindowHeight - 300WindowLeft - 100WindowMaxButton - TrueWindowMinButton - TrueWindowState - 0 - crptNormalWindowTop - 100WindowWidth - 490
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -Database File wpfcktwGif;½Sd wpfcktwGif;½Sd wpfcktwGif;½Sd wpfcktwGif;½Sd wpfcktwGif;½Sd Table zdkifESpfckudktoHk;jyKíuHprf;rJEIdufjcif;zdkifESpfckudktoHk;jyKíuHprf;rJEIdufjcif;zdkifESpfckudktoHk;jyKíuHprf;rJEIdufjcif;zdkifESpfckudktoHk;jyKíuHprf;rJEIdufjcif;zdkifESpfckudktoHk;jyKíuHprf;rJEIdufjcif;
yxrOD;pGm Microsoft Visual Basic 6.0 \vkyfydkifcGifhwGifyg0ifaom Menu BarrS Add-ins udka½G;cs,f&rnf/ xdkYaemuf Pulldown Menu jzpfaom Visual DataManager... udka½G;cs,fyg/ yHk(377)/
xdktcg VisData Dialog Box ay:vmvdrfhrnf/ 4if;rS Menu Bar jzpfaom Fileudka½G;cs,fyg/ xdkYaemuf New udkxyfrHa½G;cs,f&rnf/ yHk(378)/
yHk(377)
332uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(378)ygtwdkif; New... udka½G;cs,fygu xyfrHí Sub-Menu wpfckay:vmrnf/
4if;rS rdrdzefwD;wnfaqmufrnfh Microsoft Access udka½G;cs,fyg/ xdktcg xyfrHí
Sub-Menu wpfckay:vmayrnf/ 4if; Sub-Menu rS Version 7.0 MDB... udka½G;cs,f
&rnf/ yHk(379)/ yHk(380)ygtwdkif;ay:vmrnf/
yHk(378)
yHk(379)
333uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(380)wGif Select Microsoft Access Database to Create Dialog Boxay:vmygu rdrdwnfaqmuftrnfay;vdkonfh Database File trnfudkjznfhpGufí SaveCommand Button udka½G;cs,f&ayrnf/ Oyrm - Lucky [kjznfhpGufNyD; Save Com-mand Button udka½G;yg/ VisData Dialog Box wGif VisData:C:\Program\LuckyDraw\Lucky.mdb [k Title Bar üay:vmayrnf/ xdkYaemuf Database WindowDialog Box wpfckxyfrHay:vmrnf/ yHk(381)/
yHk(380)
yHk(381)
334uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Database Windows Dialog Box wGif Properties udka½G;cs,fyg/ xdkYaemuf
Right Click ESdyfygu Sub-Menu wpfckay:vmrnf/ xdk Sub-Menu xJrS New Tableudka½G;cs,fyg/ yHk(382)/
xdktcg Table Structure Dialog Box ay:vmrnf/ Table Name acgif;pOfab; List Box ü rdrdpdwfBuKduf Table File trnfudkjznfhpGufí Add Field Com-mand Button udka½G;cs,f&rnf/ yHk(383)/
yHk(382)
yHk(383)
335uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Add Field Dialog Box ay:vmvdrfhrnf/ xdktcg rdrdtvdk½Sdonfh Field Name,Field Type, Field Size wdkYudkowfrSwf&rnf/ yHk(384)? yHk(385)/
Field Name wpfckcsif;oGif;NyD;ygu OK Command Button udka½G;cs,f&rnf/
Field Name xyfrHroGif;vdkawmhygu Close Command Button udka½G;cs,fyg/ xdktcg
yHk(386)ygtwdkif;jzpfay:vmrnf/
yHk(384)
yHk(385)
336uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Index Field owfrSwfvdkygu Add Index Command Button udka½G;cs,f&rnf/
xdktcg Add Index to Luck01 Dialog Box ay:vmygu Name List Box, In-dexed Fields List Box wdkYtm; rdrdpdwfBuKdufowfrSwfNyD; OK Command Button udk
a½G;cs,fyg/ xyfrHí Close Command Button udk a½G;cs,f&rnf? yHk(387)/
yHk(386)
yHk(387)
337uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdktcg rlv Table Structure Dialog Box odkYjyefvnfa&muf½SdoGm;rnf/ yHk(388)/
txufyg Table Structure udkodrf;vdkygu Build the Table CommandButton udka½G;cs,f&rnf/ rlv Database Window Dialog Box odkYjyefvnfa&muf½Sd
oGm;ayrnf/ Close Command Button udka½G;cs,fygu tqdkyg Luck01 Table Fileudkodrf;rnfr[kwfyg/ yHk(389)/
yHk(388)
338uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
C:\Program Files\LuckDraw\Lucky.mdb udkwnfaqmufNyD; Luck01 TableFile ukdwnfaqmufcJhNyD;jzpfonf/ ,cktcg 4if; Database File xJwGifyif Luck02Table File udkxyfrHwnfaqmuf&rnf/ Luck01 ESifh Luck02 Table File rsm;rSm waoG
rwdrf;wlnDMuojzifh Luck02 Table File tm; Luck01 Table File uJhodkYyif tptqHk;
jyefwnfaqmufyguvnf;&onf/ jzwfvrf;enf;jzifhwnfaqmufvdkygu yHk(389)wGif
jrifawGUae&aom Database Window Dialog Box rS Luck01 udka½G;yg/ xdkYaemuf
Right Click ESdyfyg/ xdktcg Short Cut Menu wpfckay:vmrnf/ yHk(390)/
yHk(389)
yHk(390)
339uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Short Cut Menu xJrS Copy Structure... udkxyfrHa½G;cs,fyg/ xdktcg yHk(391)yg
Copy Structure Dialog Box ay:vmrnf/
4if; Dialog Box rS Target Connect String: acgif;pOfatmuf Text Box üLucky [kjznfhpGufNyD; Table: acgif;pOfatmuf Text Box ü Luck01 udka½G;cs,f&rnf
jzpfNyD; Copy Data Check Box udk Check jyK vkyf&efjzpfonf/ xdkYaemuf OK Com-mand Button udka½G;cs,fyg/ yHk(392)/
xdktcg VisData Dialog Box ay:vmrnf/ Enter New Table Name acgif;pOf
atmuf Text Box ü rdrdwnfaqmufvdkonfh Table Name udkjznfhpGuf&rnf/ Oyrm -
Luck02 [kjznfhpGufNyD; OK Command Button udka½G;cs,f&rnf/ yHk(394)/
yHk(391)
yHk(392)
340uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdktcg Copy Structure Dialog ay:vmrnf/ rdrdul;vdkonfh StructureatmifjrifpGmul;NyD;aMumif; Message Box ay:vmayrnf/ OK Command Buttonudka½G;yg/ yHk(394)/
xdktcg Lucky.mdb Database File xJwGif Luck01 Table File ESifhtvm;
o@mefwlaom Luck02 Table File jzpfvmrnf/ yHk(395)/
yHk(393)
yHk(394)
yHk(395)
341uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
uHprf;rJazgufrnfh y½dk*&rfa&;om;&eftwGufatmufyg Form yHkpHudkwnfaqmuf
&rnf/ yHk(396)/
yHk(396)yg Form yHkpHwGifyg0ifaom Toolbox Icon rsm;rSm udkavhvmygu
Label, Text Box, Command Button, Data, Frame wdkYyg0ifNyD;
4if;wdkY\ Properties rsm;udk jyifqifjznfhpGufNyD;aemuf Command Button rsm;wGif
vdktyfaomy½dk*&rfrsm; a&;om;&rnfjzpfonf/
Label1 - Label Properties rSm
(Name) - Label1Alignment - 0 - Left JustifyAutoSize - FalseBackStyle - OpaqueBorderStyle - 1 - Fixed SingleCaption - uHprf;rnfhta&&twGuf (qkrJta&twGuf)
Font - -Win---Kalaw, Bold, 18WordWrap - False
yHk(396)
342uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Label2 - Label Properties rSm
(Name) - Label2Alignment - 0 - Left JustifyAutoSize - FalseBackStyle - OpaqueBorderStyle - 1 - Fixed SingleCaption - uHprf;rnfhta&&twGuf (uHprf;rnfhta&twGuf)
Font - -Win---Kalaw, Bold, 18WordWrap - FalseLabel3 - Label Properties rSm
(Name) - Label3Alignment - 0 - Left JustifyAutoSize - FalseBackStyle - OpaqueBorderStyle - 1 - Fixed SingleCaption - qkrJeHygwf (qkrJeHygwf)
Font - -Win---Kalaw, Bold, 18WordWrap - FalseLabel4 - Label Properties rSm
(Name) - Label4Alignment - 0 - Left JustifyAutoSize - FalseBackStyle - OpaqueBorderStyle - 1 - Fixed SingleCaption - uHxl;½SiftrSwf (uHxl;½SiftrSwf)
Font - -Win---Kalaw, Bold, 18WordWrap - FalseLabel5 - Label Properties rSm
(Name) - Label5Alignment - 0 - Left JustifyAutoSize - FalseBackStyle - Opaque
343uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
BorderStyle - 1 - Fixed SingleCaption - qkrJeHygwf tm; uHxl;½SiftrSwf rS &&½Sdygonf
(qkrJeHygwf tm; uHxl;½SiftrSwf rS &&½Sdygonf)
Font - -Win---Kalaw, Bold, 18WordWrap - FalseText1 - Text Properties rSm
(Name) - Text1Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleFont - -Win---Kalaw, Bold, 18Text - EmptyText2 - Text Properties rSm
(Name) - Text2Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleFont - -Win---Kalaw, Bold, 18Text - EmptyText3 - Text Properties rSm
(Name) - Text3Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleFont - -Win---Kalaw, Bold, 18Text - EmptyText4 - Text Properties rSm
(Name) - Text4Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleFont - -Win---Kalaw, Bold, 18Text - EmptyText5 - Text Properties rSm (qkrJeHygwf tm;)(qkrJeHygwf tm;)(qkrJeHygwf tm;)(qkrJeHygwf tm;)(qkrJeHygwf tm;)
(Name) - Text5Alignment - 0 - Left Justify
344uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
BorderStyle - 1 - Fixed SingleFont - -Win---Kalaw, Bold, 18Text - EmptyText6 - Text Properties rSm (uHxl;½SiftrSwf rS &½Sdygonf)(uHxl;½SiftrSwf rS &½Sdygonf)(uHxl;½SiftrSwf rS &½Sdygonf)(uHxl;½SiftrSwf rS &½Sdygonf)(uHxl;½SiftrSwf rS &½Sdygonf)
(Name) - Text6Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleFont - -Win---Kalaw, Bold, 18Text - EmptyText7 - Text Properties rSm (uHprf;&ef Command Button atmuf0Sufxm;onf)
(Name) - Text7Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleFont - -Win---Kalaw, Bold, 18Text - EmptyCommand1 - CommandButton Properties rSm
(Name) - Command1Caption - uHprf;&&ef (uHprf;&ef)
BorderStyle - 1 - Fixed SingleFont - -Win---Yadanapon, Bold, 22Command2 - CommandButton Properties rSm
(Name) - Command2Caption - y½dk*&&rfrSxGuf&&ef (y½dk*&rfrSxGuf&ef)
BorderStyle - 1 - Fixed SingleFont - -Win---Innwa, Bold, 20Command3 - CommandButton Properties rSm
(Name) - Command3Caption - uHprf;&&ef (uHprf;rJtrnfpm&if;Munfh&ef)
BorderStyle - 1 - Fixed SingleFont - -Win---Innwa, Bold, 20Data1 - Data Properties rSm(rjrifap&efwpfckckatmuf0Sufxm;&rnf/)
(Name) - Data1
345uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Align - NoneBOFAction - 0 - Move FirstCaption - Data1Connect - AccessDatabaseName - C:\Program Files\LuckyDraw\Lucky.mdbEOFAction - 0 - Move LastFont - MS Sans Serif, Regular, 8RecordsetType - 0 - TableFrame1 - Frame Properties rSm
(Name) - Frame1BorderStyle - 1 - Fixed SingleCaption - EmptyFont - MS Sans Serif, Regular, 8Frame2 - Frame Properties rSm
(Name) - Frame2BorderStyle - 1 - Fixed SingleCaption - EmptyFont - MS Sans Serif, Regular, 8Frame3 - Frame Properties rSm
(Name) - Frame3BorderStyle - 1 - Fixed SingleCaption - EmptyFont - MS Sans Serif, Regular, 8Frame4 - Frame Properties rSm
(Name) - Frame4BorderStyle - 1 - Fixed SingleCaption - EmptyFont - MS Sans Serif, Regular, 8
346uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
(General), (Declaration) twGuftwGuftwGuftwGuftwGuf
Dim MyDb As Database, MyData As RecordsetuHprf;&ef uHprf;&ef uHprf;&ef uHprf;&ef uHprf;&ef Command Button1 twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click()Dim MyDb As Database, MyData As RecordsetDim zaw As BooleanDim a, b As Integera = Val(Text1)b = Val(Text3)If Text1 <> Empty Then
Text5 = b + 1Text3 = b + 1Text5 = Text3If b + 1 >= a Then
Text3 = b + 1Text5 = b + 1Text6 = 0Command1.Visible = FalseForm2.Show
End IfText5.ForeColor = "255"
ElseForm3.Show
End IfText6.ForeColor = "0"''''''''zaw = TrueSet MyDb = Workspaces(0).OpenDatabase("c:\Program Files\
LuckyDraw\Lucky.mdb")Set MyData = MyDb.OpenRecordset("Luck01", dbOpenTable)MyData.MoveFirstc = Text2
347uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
sn = Text3en = 0d = Int(Rnd() * c) + 1Do While zaw = True
MyData.Index = "Luckno"MyData.Seek "=", dIf MyData.NoMatch Then
zaw = FalseElse
d = Int(Rnd() * c + 1)End If
LoopText6 = dText4 = dMyData.AddNewMyData("Luckno") = Text6MyData.UpdateText6.ForeColor = "65535"Text7 = 0Data1.Refresh
End Suby½dk*&rfrSxGuf&ef y½dk*&rfrSxGuf&ef y½dk*&rfrSxGuf&ef y½dk*&rfrSxGuf&ef y½dk*&rfrSxGuf&ef Command Button2 twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click()Unload MeEnd
End SubuHprf;rJtrnfpm&if;Munfh&ef uHprf;rJtrnfpm&if;Munfh&ef uHprf;rJtrnfpm&if;Munfh&ef uHprf;rJtrnfpm&if;Munfh&ef uHprf;rJtrnfpm&if;Munfh&ef Command Button3 twGuftwGuftwGuftwGuftwGuf
Private Sub Command3_Click()Dim MyDb As Database, MyData As Recordset, MyDatapp As RecordsetDim ss As IntegerSet MyDb = Workspaces(0).OpenDatabase("c:\Program Files\
LuckyDraw\Lucky.mdb")
348uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Set MyData = MyDb.OpenRecordset("Luck01", dbOpenTable)Set MyDatapp = MyDb.OpenRecordset("Luck02", dbOpenTable)If MyDatapp.RecordCount > 0 Then
MyDatapp.MoveFirstDo While MyDatapp.EOF = False
MyDatapp.DeleteMyDatapp.MoveNext
LoopEnd IfMyData.MoveFirstss = 0Do While MyData.EOF = False
yy = MyData("Luckno")If yy < 9999 And yy <> 0 Then
MyDatapp.AddNewMyDatapp("Luckno") = yyMyDatapp("srno") = ssMyDatapp.Update
End IfMyData.MoveNextss = ss + 1
LoopMyDatapp.MoveFirstForm5.Show
End SubData1 Reposition twGuftwGuftwGuftwGuftwGuf
Private Sub Data1_Reposition()Data1.Caption = "Record: " & (Data1.Recordset.AbsolutePosition + 1)
End Sub
349uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Form Load twGuftwGuftwGuftwGuftwGuf
Private Sub Form_Load()Set MyDb = Workspaces(0).OpenDatabase("C:\Program Files\
LuckyDraw\Lucky.mdb")Set MyData = MyDb.OpenRecordset("Luck01", dbOpenTable)MyData.AddNewMyData("Luckno") = 0MyData.UpdateData1.Refresh
End SubForm Unload twGuftwGuftwGuftwGuftwGuf
Private Sub Form_Unload(Cancel As Integer)Set MyDb = Workspaces(0).OpenDatabase("c:\Program Files\
LuckyDraw\Lucky.mdb")Set MyData = MyDb.OpenRecordset("Luck01", dbOpenTable)MyData.MoveFirstDo Until MyData.EOF
MyData.DeleteMyData.MoveNext
LoopData1.Refresh
End Sub
Lucky Draw Program BuD;udk Run í&Edkifap&ef yHk(397)wGifyg0ifaom FormFile rsm;udkwnfaqmuf&ayrnf/
yHk(397)
350uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
qufvufí Form2 udkwnfaqmuf&ayrnf/ yHk(398)/
yHk(398)yg Form yHkpHwGifyg0ifaom Toolbox Icon rsm;rSm udkavhvmygu
Label, Command Button, Frame wdkYyg0ifNyD; 4if;wdkY\ Properties rsm;udk
jyifqifjznfhpGufNyD;aemuf Command Button rsm;wGif vdktyfaomy½dk*&rfrsm; a&;om;
&rnfjzpfonf/
Label1 - Label Properties rSm
(Name) - Label1Alignment - 2 - CenterAutoSize - FalseBackStyle - OpaqueBorderStyle - 0 - NoneCaption - uHprf;rJukefaeygNyD (uHprf;rJukefaeygNyD)
Font - -Win---Taungyi, Bold, 26WordWrap - FalseFrame1 - Frame Properties rSm
(Name) - Frame1BorderStyle - 1 - Fixed SingleCaption - EmptyFont - MS Sans Serif, Regular, 8
yHk(398)
351uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Command1 - CommandButton Properties rSm
(Name) - Command1Caption - ydwf&&ef (ydwf&ef)
BorderStyle - 1 - Fixed SingleFont - -Win---Yadanapon, Bold, 28ydwf&ef ydwf&ef ydwf&ef ydwf&ef ydwf&ef Command Button1 twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click()Form2.HideUnload Form2
End Sub
qufvufí Form3 udkwnfaqmuf&ayrnf/ yHk(399)/
yHk(399)yg Form yHkpHwGifyg0ifaom Toolbox Icon rsm;rSm udkavhvmygu
Label, Command Button, Frame wdkYyg0ifNyD; 4if;wdkY\ Properties rsm;udk
jyifqifjznfhpGufNyD;aemuf Command Button rsm;wGif vdktyfaomy½dk*&rfrsm; a&;om;
&rnfjzpfonf/
Label1 - Label Properties rSm
(Name) - Label1Alignment - 2 - Center
yHk(399)
352uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
AutoSize - FalseBackStyle - OpaqueBorderStyle - 0 - NoneCaption - uHprf;rJta&&twGufxnfhyg (uHprf;rJta&twGufxnfh&ef)
Font - -Win---Taungyi, Bold, 24WordWrap - FalseFrame1 - Frame Properties rSm
(Name) - Frame1BorderStyle - 1 - Fixed SingleCaption - EmptyFont - MS Sans Serif, Regular, 8Command1 - CommandButton Properties rSm
(Name) - Command1Caption - ydwf&&ef (ydwf&ef)
BorderStyle - 1 - Fixed SingleFont - -Win---Yadanapon, Bold, 28ydwf&ef ydwf&ef ydwf&ef ydwf&ef ydwf&ef Command Button1 twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click()Form3.HideUnload Form3Form1.Show
End Sub
qufvufí Form4 udkwnfaqmuf&ayrnf/ yHk(400)/
yHk(400)
353uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(400)yg Form yHkpHwGifyg0ifaom Toolbox Icon rsm;rSm udkavhvmygu
Label, Command Button, Frame wdkYyg0ifNyD; 4if;wdkY\ Properties rsm;udk
jyifqifjznfhpGufNyD;aemuf Command Button rsm;wGif vdktyfaomy½dk*&rfrsm; a&;om;
&rnfjzpfonf/
Label1 - Label Properties rSm
(Name) - Label1Alignment - 2 - CenterAutoSize - FalseBackStyle - OpaqueBorderStyle - 0 - NoneCaption - qkrJwpfcktwGufwpfBudrfomESdyfyg
(qkrJwpfcktwGufwpfBudrfomESdyfyg)
Font - -Win---Kalaw, Bold, 22WordWrap - FalseFrame1 - Frame Properties rSm
(Name) - Frame1BorderStyle - 1 - Fixed SingleCaption - EmptyFont - MS Sans Serif, Regular, 8Command1 - CommandButton Properties rSm
(Name) - Command1Caption - ydwf&&ef (ydwf&ef)
BorderStyle - 1 - Fixed SingleFont - -Win---Yadanapon, Bold, 28ydwf&ef ydwf&ef ydwf&ef ydwf&ef ydwf&ef Command Button1 twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click()Form4.HideUnload Form4
End Sub
354uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
qufvufí Form5 udkwnfaqmuf&ayrnf/ yHk(401)/
yHk(401)yg Form yHkpHwGifyg0ifaom Toolbox Icon rsm;rSm udkavhvmygu
DBGrid, Data, Command ButtonwdkYyg0ifNyD; 4if;wdkY\ Properties rsm;udk
jyifqifjznfhpGufNyD;aemuf Command Button wGif vdktyfaomy½dk*&rfrsm; a&;om;&rnf
jzpfonf/
DBGrid1 - DBGrid Properties rSm
(Name) - DBGrid1Align - 0 - vbAlignNoneAllowAddNew - FalseAllowArrows - TrueAllowDelete - False
yHk(401)
355uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
AllowUpdate - TrueBorderStyle - 1 - Fixed SingleCaption - NoneDataMode - 0 - BoundDataSource - Data1Font - MS Sans Serif, Regular, 8Data1 - Data Properties rSm
(Name) - Data1Align - 0 - NoneBOFAction - 0 - Move FirstConnect - AccessDatabaseFile - C:\Program Files\LuckyDraw\Lucky.mdbEOFAction - 0 - Move LastFont - MS Sans Serif, Regular, 8RecordsetType - 1 - DynasetRecordsetSource - Luck02Command1 - CommandButton Properties rSm
(Name) - Command1Caption - ydwf&&ef (ydwf&ef)
BorderStyle - 1 - Fixed SingleFont - -Win---Yadanapon, Bold, 20ydwf&ef ydwf&ef ydwf&ef ydwf&ef ydwf&ef Command Button1 twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click()Unload Me
End SubData1 Reposition twGuftwGuftwGuftwGuftwGuf
Private Sub Data1_Reposition()Data1.Caption = " Record: " & (Data1.Recordset.AbsolutePosition + 1)
End Sub
tqdkyg y½dk*&rfudk Run ygu yHk(402)ygtwdkif;jrifawGU&rnf/
356uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Oyrm - qkrJta&twGuf 6 ckom½SdNyD;? uHrJprf;&rnfhta&twGufrSm 125 OD;½Sdygu
qkrJta&twGufnmzuf½Sd tqdkyg y½dk*&rfudk Run ygu yHk(402)ygtwdkif;jrifawGU&rnf/
qkrJta&twGuf 6 ck½Sdojzifh uHprf;&ef Command Button tm; 6 cgESdyfNyD;ygu
uHprf;rJukefaeygNyD[laom Message Box jyvmrnf/ yHk(403)/
tqdkyg Message Box tm; ydwf&ef Command Button udkESdyfygu MessageBox aysmufoGm;NyD;? uHprf;&ef Command Button ygaysmufoGm;vdrfhrnf/ yHk(404)/
yHk(402)
yHk(403)
357uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
uHprf;rJtrnfpm&if;Munfh&ef Command Button udkESdyfygu yHk(405)ygtwdkif;jrifawGU
&rnf/
txufyg Form yHkpHwGif ydwf&ef Command Button udka½G;cs,fygu rlvuHprf;rJEdIuf
onfh Form yHkpHodkYjyefvnfa&muf½SdoGm;NyD;? y½dk*&rfrSxGuf&ef Command ButtonudkESdyfygu tqdkyg Form yHkpHrSxGufoGm;vdrfhrnf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(404)
yHk(405)
358uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
ODBC jzifhzefwD;xm;aom jzifhzefwD;xm;aom jzifhzefwD;xm;aom jzifhzefwD;xm;aom jzifhzefwD;xm;aom Access zdkifudktouf? vkyfouf? yifpif,lrnfhESpfwGufjcif;zdkifudktouf? vkyfouf? yifpif,lrnfhESpfwGufjcif;zdkifudktouf? vkyfouf? yifpif,lrnfhESpfwGufjcif;zdkifudktouf? vkyfouf? yifpif,lrnfhESpfwGufjcif;zdkifudktouf? vkyfouf? yifpif,lrnfhESpfwGufjcif;
Access 2000 (or) Access 2002 wdkYjzifh Database File wpfckudkwnfaqmufxm;
&rnf/ 4if; Database File rS Table File wGifatmufygtwdkif;wnfaqmufxm;NyD;
Record rsm;xnfhxm;&rnf/
Field Name Data Type Field SizeIDNo Text 8Name Text 30Date of Birth DateEnrolment DateAge Number Double, Fixed, Decimal 2Services Year Number Double, Fixed, Decimal 2Retire Year DateOyrm - Retire [k Database File, Table File wdkYwGiftrnfay;xm;yg/ xdkYaemuf
4if;zdkifudk ODBC \vkyfydkifcGifhodkYajymif;vJNyD; Microsoft Visual Basic 6.0 jzifh
atmufazmfjyyg Form yHkpHudkwnfaqmufxm;&rnf/
yHk(406)yg Form yHkpHwGif , , rsm;jzifh
zefwD;xm;NyD; oufqdkif&m Properties rsm;wGifjyifqifjznfhpGufNyD;aemuf CommandButton rsm;wGif vdktyfaomy½dk*&rfrsm;a&;om;&ef jzpfygonf/
yHk(406)
359uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Adodc1 - Adodc Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - Adodc1Align - 0 - vbAlignNoneBOFAction - 0 - adDoMoveFirstConnectingString - provider=msdasql;dsn=retire;uid=;pwd=;EOFAction - 0 - adDoMoveLastFont - MS Sans Serif, Bold, 8RecordSource - select [IDNo], Name, [Date of Birth],
[Enrolment], Age, [Services Year], [Retire Year]from retire order by [IDNo]
DataGrid1 - DataGrid Properties twGuf -twGuf -twGuf -twGuf -twGuf -
(Name) - DataGrid1Align - 0 - vbAlignNoneAllowAddNew - FalseAllowArrows - TrueAllowDelete - FalseAllowUpdate - TrueFont - MS Sans Serif, Regular, 8DataSource - Adodc1Adodc1 - Adodc \\\\\ Record Position twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub a1_MoveComplete(ByVal adReason As ADODB.EventReasonEnum, ByVal pError As ADODB.Error, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)
Adodc1.Caption = "Record: " & CStr(Adodc1.Recordset.AbsolutePosition)End SubAge Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command1_Click()Adodc1.Recordset.MoveFirstDo While Adodc1.Recordset.EOF = False
x = (Date - Adodc1.Recordset("Date of Birth")) / 365.25Adodc1.Recordset("Age") = xAdodc1.Recordset.MoveNext
LoopAdodc1.Recordset.MoveFirst
End Sub
360uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Services Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command2_Click()Adodc1.Recordset.MoveFirstDo While Adodc1.Recordset.EOF = False
y = (Date - Adodc1.Recordset("Enrolment")) / 365.25Adodc1.Recordset("Services Year") = yAdodc1.Recordset.MoveNext
LoopAdodc1.Recordset.MoveFirst
End SubRetire Year Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command3_Click()Adodc1.Recordset.MoveFirstDo While Adodc1.Recordset.EOF = False
mdy = Adodc1.Recordset("Date of Birth")myear = Year(mdy) + 60mmth = Month(mdy)mday = Day(mdy)zzz = mday & "-" & mmth & "-" & myearAdodc1.Recordset("Retire Year") = zzzAdodc1.Recordset.MoveNext
LoopAdodc1.Recordset.MoveFirst
End SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -
Private Sub Command4_Click()Unload MeEnd
End Sub
tqdkygy½dk*&rfudk Run ygu yHk(406)ygtwdkif;jrifawGU&rnf/ Age Command Buttonudk ESdyfygu toufrsm;wGufcsufay;rnfjzpfNyD;? Services Year Command Button udk
ESdyfygu trIxrf;oufrsm;wGufcsufay;vdrfhrnf/ Retire Year Comamand Button udk
ESdyfygu yifpif,lrnfh &uf? v? ckESpfwdkYudkwGufcsufay;vdrfhrnf/ yHk(407)/
361uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(406)
yHk(407)
362uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Visual Basic 6.0 jzifhzefwD;xm;aom jzifhzefwD;xm;aom jzifhzefwD;xm;aom jzifhzefwD;xm;aom jzifhzefwD;xm;aom Access zdkifudk zdkifudk zdkifudk zdkifudk zdkifudk Printer jzifh½dkufxkwfjcif;jzifh½dkufxkwfjcif;jzifh½dkufxkwfjcif;jzifh½dkufxkwfjcif;jzifh½dkufxkwfjcif;
Visual Basic 6.0 jzifhyif Database File wpfckudkwnfaqmufxm;&rnf/ 4if;
Database File rS Table File wGifatmufygtwdkif;wnfaqmufxm;NyD; Record rsm;
xnfhxm;&rnf/
Field Name Data Type Field SizeIDNo Text 8Name Text 25Date of Birth DateEnrolment DateAge DoubleServices Year DoubleRetire Year DateOyrm - Retired [k Database File, Table File wdkYwGiftrnfay;xm;yg/ xdkYaemuf
Microsoft Visual Basic 6.0 jzifh atmufazmfjyyg Form yHkpHudkwnfaqmufxm;&rnf/
yHk(408)yg Form yHkpHwGif rsm;jzifh zefwD;xm;NyD; oufqdkif&m Prop-erties rsm;wGifjyifqifjznfhpGufNyD;aemuf Command Button rsm;wGif vdktyfaomy½dk*&rf
rsm;a&;om;&ef jzpfygonf/
Report Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click()Command3.Visible = TrueCommand4.Visible = True
End Sub
yHk(408)
363uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Exit Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click()Command3.Visible = FalseCommand4.Visible = FalseUnload MeEnd
End SubSoft Copy Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command3_Click()Form3.Show
End SubHard Copy Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command4_Click()Form2.Show
End SubForm Load twGuftwGuftwGuftwGuftwGuf
Private Sub Form_Load()Command3.Visible = FalseCommand4.Visible = False
End Sub
Soft Copy Command Button udka½G;cs,fygu Form2.Show [ky½dk*&rfa&;om;
xm;ojzifh Form2 udkyHk(409)ygtwdkif;zefwD;wnfaqmuf&rnf/
364uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(409)yg Form yHkpHwGifyg0ifaom Toolbox Icon rsm;rSm udkavhvmygu
DBGrid, Label, Text Box, Data, Command ButtonwdkYyg0ifNyD;
4if;wdkY\ Properties rsm;udk jyifqifjznfhpGufNyD;aemuf Command Button wGif
vdktyfaomy½dk*&rfrsm; a&;om;&rnf jzpfonf/
DBGrid1 - DBGrid Properties rSm
(Name) - DBGrid1Align - 0 - vbAlignNoneAllowAddNew - FalseAllowArrows - TrueAllowDelete - FalseAllowUpdate - TrueBorderStyle - 1 - Fixed SingleCaption - NoneDataMode - 0 - BoundDataSource - Data1Font - MS Sans Serif, Regular, 8Label1 - Label Properties rSm
(Name) - Label1Alignment - 0 - Left JustifyAutoSize - False
yHk(409)
365uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
BackStyle - 0 - TransparentBorderStyle - 1 - Fixed SingleCaption - All RecordsFont - MS Sans Serif, Bold, 8Text1 - Text Properties rSm
(Name) - Text1Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleFont - MS Sans Serif, Bold, 8Text - EmptyData1 - Data Properties rSm
(Name) - Data1Align - 0 - NoneBOFAction - 0 - Move FirstConnect - AccessDatabaseFile - C:\Program Files\Microsoft Visual Studio\VB98\
Retired.mdbEOFAction - 0 - Move LastFont - MS Sans Serif, Regular, 8RecordsetType - 1 - DynasetRecordsetSource - RetiredCommand1 - CommandButton Properties rSm
(Name) - Command1Caption - To Calculate AgeFont - MS Sans Serif, Regular, 8Command2 - CommandButton Properties rSm
(Name) - Command2Caption - To Calculate Services YearFont - MS Sans Serif, Regular, 8Command3 - CommandButton Properties rSm
(Name) - Command3Caption - To Calculate Retire YearFont - MS Sans Serif, Regular, 8
366uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Command4 - CommandButton Properties rSm
(Name) - Command4Caption - &Return to Main MenuFont - MS Sans Serif, Regular, 8To Calculate Age Command Button1 twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click()Set MyDb = Workspaces(0).OpenDatabase("Retired.mdb")Set MyData = MyDb.OpenRecordset("Retired", dbOpenTable)MyData.MoveFirstDo While MyData.EOF = False
MyData.Editx = (Date - MyData("Date of Birth")) / 365.25MyData("Age") = xMyData.UpdateMyData.MoveNext
LoopMyData.MoveFirst
End SubTo Calculate Services Year Command Button2 twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click()Set MyDb = Workspaces(0).OpenDatabase("Retired.mdb")Set MyData = MyDb.OpenRecordset("Retired", dbOpenTable)MyData.MoveFirstDo While MyData.EOF = False
MyData.Edity = (Date - MyData("Enrolment")) / 365.25MyData("Services Year") = yMyData.UpdateMyData.MoveNext
LoopMyData.MoveFirst
End Sub
367uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
To Calculate Retire Year Command Button3 twGuftwGuftwGuftwGuftwGuf
Private Sub Command3_Click()Set MyDb = Workspaces(0).OpenDatabase("Retired.mdb")Set MyData = MyDb.OpenRecordset("Retired", dbOpenTable)MyData.MoveFirstDo While MyData.EOF = False
MyData.Editmdy = MyData("Date of Birth")myear = Year(mdy) + 60mmth = Month(mdy)mday = Day(mdy)zzz = mday & "-" & mmth & "-" & myearMyData("Retire Year") = zzzMyData.UpdateMyData.MoveNext
LoopMyData.MoveFirst
End SubReturn to Main Menu Command Button4 twGuftwGuftwGuftwGuftwGuf
Private Sub Command4_Click()Unload Me
End SubData1 Reposition twGuftwGuftwGuftwGuftwGuf
Private Sub Data1_Reposition()Data1.Caption = " Record: " & (Data1.Recordset.AbsolutePosition + 1)
End SubForm Load twGuftwGuftwGuftwGuftwGuf
Private Sub Form_Load()Set MyDb = Workspaces(0).OpenDatabase("Retired.mdb")Set MyData = MyDb.OpenRecordset("Retired", dbOpenTable)MyData.MoveLastText1.Text = MyData.RecordCount
End Sub
368uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
tqdkygy½dk*&rfudk Run ygu yHk(410)ygtwdkif;jrifawGU&rnf/ To Calculate AgeCommand Button udkESdyfygutoufrsm;wGufcsufay;rnfjzpfNyD;? To Calculate Ser-vices Year Command Button udkESdyfygu trIxrf;oufrsm;wGufcsufay;vdrfhrnf/ ToCalculate Retire Year Comamand Button udkESdyfyguyifpif,lrnfh &uf? v? ckESpf
wdkYudkwGufcsufay;vdrfhrnf/
yHk(410)
369uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Hard Copy Command Button udka½G;cs,fygu Form3.Show [ky½dk*&rfa&;om;
xm;ojzifh Form3 udkyHk(411)ygtwdkif;zefwD;wnfaqmuf&rnf/
yHk(411)yg Form yHkpHwGifyg0ifaom Toolbox Icon rsm;rSmudkavhvmygu La-
bel, Crstal Report, Combo Box, Command ButtonwdkYyg0ifNyD; 4if;wdkY\
Properties rsm;udk jyifqifjznfhpGufNyD;aemuf Command Button wGif vdktyfaomy½dk*&rf
rsm;a&;om;&rnf jzpfonf/
Combo1 - ComboBox Properties rSm
(Name) - Combo1Font - MS Sans Serif, Regular, 8ItemData - (List)
0 ^ Enter jzifh½dkuf&ef
0List - [List]
Window ^ Enter jzifh½dkuf&ef
PrinterStyle - 0 - DropdownComboText - WindowLabel1 - Label Properties rSm
(Name) - Label1Alignment - 2 - Center
yHk(411)
370uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
AutoSize - FalseBackStyle - 0 - TransparentBorderStyle - 0 - NoneCaption - Using Crystal ReportFont - MS Sans Serif, Bold, 14Label2 - Label Properties rSm
(Name) - Label2Alignment - 0 - Left JustifyAutoSize - FalseBackStyle - 0 - TransparentBorderStyle - 0 - NoneCaption - Print DestinationFont - MS Sans Serif, Bold, 10Label3 - Label Properties rSm
(Name) - Label3Alignment - 0 - Left JustifyAutoSize - FalseBackStyle - 0 - TransparentBorderStyle - 0 - NoneCaption - Identification Number FromFont - MS Sans Serif, Bold, 10Label4 - Label Properties rSm
(Name) - Label4Alignment - 0 - Left JustifyAutoSize - FalseBackStyle - 0 - TransparentBorderStyle - 0 - NoneCaption - ToFont - MS Sans Serif, Bold, 10Report1 - Crystal Report Properties rSm
(Name) - Report1Destination - 0 - crptToWindow
371uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
PrintFileType - 0 - crptRecordRecordSource - 0 - crptReportWindowState - 0 - crptNormalText1 - Text Properties rSm
(Name) - Text1Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleFont - MS Sans Serif, Regular, 8Text - A-00001Text2 - Text Properties rSm
(Name) - Text2Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleFont - MS Sans Serif, Regular, 8Text - A-99999Combo Box a½G;cs,f&eftwGufa½G;cs,f&eftwGufa½G;cs,f&eftwGufa½G;cs,f&eftwGufa½G;cs,f&eftwGuf
Private Sub Combo1_Click()If Combo1.Text = "Printer" Then
Form4.ShowEnd If
End SubPrint Report Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click()If Combo1.Text = "Window" Then
rpt1 = 0Else
Combo1.Text = "Printer"rpt1 = 1Report1.CopiesToPrinter = num1
End Ifpt1 = "{Retired.IDNo} in '" + Trim(Text1.Text) + "' to '" +
Trim(Text2.Text) + "'"
372uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Report1.SelectionFormula = pt1Report1.Destination = rpt1a1 = LCase(App.Path)If Right(App.Path, 1) <> "\" Then a1 = a1 + "\" 'Handles the rootReport1.DataFiles(0) = a1 + "Retired.mdb"Report1.ReportFileName = a1 + "Retired.rpt"Report1.Action = 1
End Sub
tqdkygy½dk*&rfudk Run ygu yHk(412)ygtwdkif;jrifawGU&rnf/ Print Destinationnmzuf½Sd Combo Box Dropdown Arrow udka½G;cs,fygu Window ESifh Printer [l
íjrifawGU&NyD; rdrdtvdk½Sd&mudka½G;cs,fEdkifygonf/ Identification Number From \nm
zuf Text Box wGif Record Identification Number rdrdpvdkonfh eHygwfrSp&efjzpfNyD;
To \nmzuf Text Box ürdrdtqHk;owf½dkufESdyfvdkonfh Record Identification NumberudkjyifqifjznfhpGuf&efjzpfonf/ Print Report Command Button udkESdyfygu ComboBox udk Window a½G;cs,fcJhygu Printer jzifh½dkufESdyf&ef Print Preview udk jyrnfjzpfNyD;
Printer udka½G;cs,fcJhygu wdkuf½dkuf Printer jzifh ½dkufESdyfrnfjzpfygonf/
yHk(412)
373uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Combo Box wGif Printer udka½G;cs,fygu Form4.Show [ky½dk*&rfa&;om;xm;jzifh
Form4 udkyHk(413)ygtwdkif;zefwD;wnfaqmuf&rnf/
yHk(413)yg Form yHkpHwGifyg0ifaom Toolbox Icon rsm;rSmudkavhvmygu La-
bel, Text Box, Command ButtonwdkYyg0ifNyD; 4if;wdkY\ Properties rsm;udk
jyifqifjznfhpGufNyD;aemuf Command Button wGif vdktyfaomy½dk*&rfrsm;a&;om;&rnf
jzpfonf/
Label1 - Label Properties rSm
(Name) - Label1Alignment - 0 - Left JustifyBackStyle - 0 - TransparantBorderStyle - 0 - NoneCaption - Please enter the number of copiesFont - MS Sans Serif, Bold, 10Label2 - Label Properties rSm
(Name) - Label2Alignment - 0 - Left JustifyBackStyle - 0 - TransparantBorderStyle - 0 - NoneCaption - you wish to printFont - MS Sans Serif, Bold, 10
yHk(413)
374uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Text1 - TextBox Properties rSm
(Name) - Text1Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed SingleFont - MS Sans Serif, Bold, 10Text - 1Command1 - CommandButton Properties rSm
(Name) - Command1Caption - Accept Number of CopiesFont - MS Sans Serif, Bold, 10Command2 - CommandButton Properties rSm
(Name) - Command2Caption - Reset Number of CopiesFont - MS Sans Serif, Bold, 10Command1 twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click() num1 = Text1 Form4.HideEnd SubCommand2 twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click() Text1.Text = "1"End Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
375uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
tcef;(11)tcef;(11)tcef;(11)tcef;(11)tcef;(11)
Visual Basic 6.0 jzifh jzifh jzifh jzifh jzifh Program wpfcktm;a&;NyD; wpfcktm;a&;NyD; wpfcktm;a&;NyD; wpfcktm;a&;NyD; wpfcktm;a&;NyD; Execute File wnfaqmufjcif;wnfaqmufjcif;wnfaqmufjcif;wnfaqmufjcif;wnfaqmufjcif;
yxrtqifhtaejzifh Microsoft Visual Basic 6.0 jzifh Program wpfyk'fa&;om;yg/
Oyrm - vuf½SdESpf-v-&uf-em&D-rdepf-puúefYudkjyaom Program wpfyk'fudka&;om;xm;&
rnf/ zdkif\y½dk*&rftrnfudk extest017.vbp [ktrnfowfrSwfxm;NyD; Form File udk
extest017 .frm [ktrnfowfrSwfyg/ yHk(414)/
txufygzdkifudk Execute File vkyfrnfqdkygu Menu Bar ½Sd File udka½G;yg/ PullDown Menu usvmygu 4if;xJrS Make extest017.exe... udka½G;cs,f&rnf/ yHk(415)/
yHk(414)
376uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(415)
txufygzdkifudk Execute File vkyfrnfqdkygu Menu Bar ½Sd File udka½G;yg/ PullDown Menu usvmygu 4if;xJrS Make extest017.exe... udka½G;cs,f&rnf/ yHk(415)/
yHk(416)
377uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdktcg Make Project Dialog Box ay:vmrnf/ rdrdodrf;vdkonfhvrf;aMumif;?
rdrdodrf;vdkonfh zdkiftrnfudk jyKjyifjznfhpGufí Execute File udkwnfaqmufEdkifayonf/
yHk(417)? yHk(418)/
yHk(417)
yHk(418)
378uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdktcgrdrdtrnfay;vdkufonfhtwdkif; c:\Example001.exe jzpfoGm;ayrnf/ 4if;zdkifudk
Run vdkygu Computer Desktop wGif½Sdaeaom My Computer Short Cut Icon udk
Double Click (or) Active jzpfaeaomtcg Enter ESdyfyg/ yHk(419)/
xdktcg yHk(420)wGifazmfjyxm;onfhtwdkif; [C:] udk Double Click (or) Activejzpfaeaomtcg Enter ESdyfyg/
yHk(419)
yHk(420)
379uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(421)wGifjrifawGUae&aom Example001.exe zdkifudk Run vdkygu Double Click(or) Active jzpfaeaomtcg Enter ESdyfyg/
yHk(421)
yHk(422)
380uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(422)wGifjrifawGUae&aom Date and Time Testing Form tm; CommandButton wpfckjzpfaom Run udka½G;cs,fygu yHk(423)ygtwdkif; &ufpJG? tcsdefrsm;azmfjyrnf/
4if;y½dk*&rfrSxGufvdkygu Close Button udka½G;cs,f&rnf/
Execute File jyKvkyfí&onfhtwGuf Start ® Run ® c:\Example001 (or)c:\Example001.exe ® OK udka½G;cs,fjcif;jzifhvnf;aumif;? Start ® Run ®command ® OK udka½G;cs,fNyD; DOS Prompt rS C:\>Example001 (or)Example001.exe ® Enter uddkESdyfjcif;jzifhvnf;aumif; y½dk*&rfudk Run Edkifayonf/
Visual Basic 6.0 Language r½Sdaomtjcm;pufrsm;odkYul;,lNyD;vnf; Run Edkifayonf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(423)
381uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Visual Basic 6.0 jzifh jzifh jzifh jzifh jzifh Program wpfcktm;a&;NyD; wpfcktm;a&;NyD; wpfcktm;a&;NyD; wpfcktm;a&;NyD; wpfcktm;a&;NyD; Package jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;
yxrtqifhtaejzifh Microsoft Visual Basic 6.0 jzifh Program wpfyk'fa&;om;yg/
Oyrm - Database File wpfzdkifwnfaqmufNyD; Record tenf;i,foGif;xm;&rnf/ tqdkyg
Database File wGif½Sd Record tcsKdUudk wGufcsufay;onfh y½dk*&rfwpfyk'ftm; a&;om;xm;
&rnf/ zdkif\y½dk*&rftrnfudk extest111.vbp [ktrnfowfrSwfxm;NyD; Form File udk
extest111 .frm [ktrnfowfrSwfyg/ yHk(424)/
txufygzdkifudk Application Package vkyfrnfqdkygu Menu Bar ½Sd Add-Insudka½G;yg/ Pull Down Menu usvmygu 4if;xJrS Package and Deployment Wiz-ard... udka½G;cs,f&rnf/ yHk(425)/
yHk(424)
yHk(425)
382uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdktcg Package and Deployment Wizard Dialog Box ay:vmrnf/ yHk(426)?
Package rjyKvkyfciftqdkyg Project File udkodrf;vdkygu Yes udka½G;&efjzpfNyD;? rodrf;vdk
ygu No udka½G;cs,f&rnf/ yHk(426)/ Oyrm - No udka½G;yg/
Package and Deployment Wizard Dialog Box ay:vmrnf/ 4if; DialogBox wGif rdrd Package vkyfvdkonfh Visual Basic Project File \ wnfae&mudk
jyaernfjzpfNyD; Package Command Button udka½G;cs,f&rnf/ yHk(427)/
xdkaemuf Compile Command Button udka½G;cs,f& rnf/ xdktcgrSom ExecuteFile &½Sdayrnf/ yHk(428)/
yHk(426)
yHk(427)
383uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Compile vkyfNyD;oGm;ygu yHk(429)yg Dialog Box ay:vmygu Yes CommandButton udka½G;cs,fyg/
Package trsKd;tpm;a½G;cs,fonfh Dialog Box ay:vmrnf/ Package Type udk
Standard Setup Package ae&mwGifyifxm;í Next udka½G;cs,fyg/ yHk(430)/
Package udkrdrdxnfhvdkonfhvrf;aMumif;üxnfh&eftcGifhta&;&½Sdrnfh Dialog Boxay:vmrnf/ yHk(431)/
yHk(428)
yHk(429)
yHk(430)
384uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
tqdkyg Dialog Box wGifyif Folder udkajymif;í Next udka½G;cs,fyg/ yHk(432)/
DAO Driver rsm;udka½G;cs,f&eftajctaeayonfh Dialog Box ay:vmygu
zdkiftm;vHk;udka½G;cs,fNyD; Next udk Click ESdyf&rnf/ yHk(433)/
yHk(430)
yHk(431)
yHk(432)
385uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Folder vrf;aMumif;topfa½G;cs,fojzifh ayskmufaeonfh *.dll zdkifrsm;pm&if;
udkjyaevdrfhrnf/ rnfodkYyifjzpfap OK udk Click ESdyf&rnfjzpfonf/ yHk(434)/
Out-of-Date Dependency Information Dialog Box xyfrHay:vmrnf/ OKudkom Click ESdyf&rnfjzpfonf/ yHk(435)/
yHk(433)
yHk(434)
386uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
rdrdwnfaqmufrnfh Application Package wGif yg0ifonfh *.dll zdkifrsm;udk CheckBox jzifh Mark vkyfxm;onf/ ra½G;cs,fvdkygu Uncheck jyKvkyfEdkifonf/ tm;vHk;a½G;cs,f
xm;ojzifh Next Command Button udkoma½G;cs,fyg/ yHk(436)/
Cab File wnfaqmuf&eftcGifhta&;ay;onfh Dialog Box wpfckay:vmrnf/
tqdkyg Dialog Box wGif Single cab File wnfaqmufygu cab File wpfzdkifwnf;om
wnfaqmufNyD; Disk Space rsm;vdrfhrnf/ Multiple cabs Option Button udka½G;cs,f
ygu rdrdwnfaqmufvdkonfh cab size udk 1.44 MB, 2.88 MB, 1.2 Mb, 720KBponfjzifha½G;cs,fwnfaqmufEdkifayonf/ Oyrm - 1.44 MB udka½G;cs,fygu jzpfay:vm
yHk(435)
yHk(436)
387uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
aom cab File rsm;onf 1.44 MB xufrausmfapbJ cab File rsm;wpfzdkifxufru
jzpfvmayrnf/ tqdkyg Dialog Box wGif Multiple cabs Option Button udka½G;cs,fyg/
xdkYaemuf Cab size udk 1.44 MB wGifxm;NyD; Next Command Button udka½G;cs,f&efjzpf
onf/ yHk(437)/
Installation Title udkowfrSwf&ef Dialog Box xyfrHay:vmrnf/ Installationtitle tm;rdrdpdwfBuKdufowfrSwfyg/ Oyrm - Result of the Students [kjyifqifjznfhpGufí
Next udka½G;cs,f&rnf/ yHk(438)/
Package and Deployment Wizard - Start Menu Items Dialog Box ay:vm
rnf/ Next udka½G;cs,fyg/ yHk(439)/
yHk(437)
yHk(438)
388uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Package and Deployment Wizard - Install Locations Dialog Box ay:vm
rnf/ Next udka½G;cs,fyg/ yHk(440)/
Package and Deployment Wizard - Shared Files Dialog Box ay:vmrnf/
Shared Files rsm;udk Check jyKvkyfí Next udka½G;cs,fyg/ yHk(441)/
yHk(439)
yHk(440)
389uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Package and Deployment Wizard - Finished! Dialog Box ay:vmrnf/
Finish udka½G;cs,fyg/ yHk(442)/
Packaging Report Dialog Box xyfrHay:vmrnf/ Save Report CommandButton udka½G;cs,fyg/ yHk(443)/
yHk(441)
yHk(442)
390uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Save Report Dialog Box xyfrHay:vmrnf/ Save in: List Box wGif vrfaMumif;
ajymif;vdkygu ajymif;NyD; Text File udk odrf;Edkifayonf/ yHk(444)/
c:\My Documents\Package odkYvrf;aMumif;ajymif;yg/ xdkYaemuf Save CommandButton udka½G;cs,fyg/ yHk(445)/
yHk(443)ygtwdkif; Dialog Box xyfrHay:vmrnf/ a½G;cs,fyg/ yHk(446)/ CloseCommand Button udka½G;cs,fyg/
yHk(443)
yHk(444)
yHk(445)
391uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(446)
yHk(447)
yHk(447)ygtwdkif; Package and Deployment Wizard Dialog Box xyfrHay:vm
rnf/ Close Command Button udka½G;cs,fyg/ rlvy½dk*&rfodkYomjyefa&mufoGm;rnf/
Application Package tm; C:\My Documents\Package xJwGifvrf;aMumif;
ay;xm;ojzifh uGefysLwm Desktop ay:wGif½Sdaeonfh Short Cut Icon wpfckjzpfaom
My Computer rS Munfhygu yHk(448)ygtwdkif;jrifawGUEdkifygonf/
392uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
tjcm;uGefysLwmpufwpfvHk;odkY Install jyKvkyfvdkygu C:\My Documents\PackageFolder atmuf½Sdzdkiftm;vHk;udk ul;oGm;NyD; Setup.exe udk Double Click ESdyf&rnfjzpfonf/
Microsoft Visual Basic 6.0 rwyfqif&ao;aom uGefysLwmrsm;wGifvnf; InstallvkyfNyD;ygu Run í&Edkifayonf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(447)
393uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
tjcm;uGefysLwmrsm;odkY jyefvnf tjcm;uGefysLwmrsm;odkY jyefvnf tjcm;uGefysLwmrsm;odkY jyefvnf tjcm;uGefysLwmrsm;odkY jyefvnf tjcm;uGefysLwmrsm;odkY jyefvnf Install jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;
yHk(447)wGifawGUjrifae&aom zdkifrsm;udk Compact Disc (CD) jzifhaomfvnf;aumif;?
Diskette jzifhaomfvnf;aumif;ul;,lí tjcm;uGefysLwmpufwpfvHk;odkY Install jyKvkyfEdkif
ayonf/ tqdkygzdkifrsm;xJrS Setup.exe udk Double Click ESdyfyg/ yHk(448)ygtwdkif;jrif
awGU&rnf/ OK Command Button udka½G;cs,f&rnf/
aemufxyf Dialog Box wpfckxyfrHay:vmrnf/ yHk(449)/ uGefysLwmyHkygaom
Command Button tm;a½G;cs,fygu C:\Program Files\Project1 xJwGif Install jyKvkyfrnfjzpfNyD; tjcm;vrf;aMumif;ajymif;vJí Install vkyfvdkygu Change Directoryudka½G;írdrdESpfouf&mvrf;aMumif;ajymif; Install jyKvkyfEdkifayonf/ xdkYaMumifh uGefysLwm
yHkygaom Command Button tm;a½G;cs,fyg/
yHk(448)
394uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
aemufxyf Dialog Box wpfckxyfrHay:vmrnf/ yHk(449)/ uGefysLwmyHkygaom Com-mand Button tm;a½G;cs,fygu C:\Program Files\Project1 xJwGif Install jyK
vkyfrnfjzpfNyD; tjcm;vrf;aMumif;ajymif;vJí Install vkyfvdkygu Change Directoryudka½G;írdrdESpfouf&mvrf;aMumif;ajymif; Install jyKvkyfEdkifayonf/ xdkYaMumifh uGefysLwm
yHkygaom Command Button tm;a½G;cs,fyg/ yHk(450)yg Dialog Box wpfckxyfrHay:
vmrnf/
yHk(449)
395uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(450)
Continue Command Button udka½G;cs,f&rnf/ y½dk*&rfrsm;tm; Install vkyfNyD;ygu
yHk(451)ygtwdkif; atmifjrifpGmNyD;qHk;aMumif; Message Box ay:vmygu OK udk Clickvkyf&efjzpfygonf/
yHk(451)
396uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
y½dk*&rfrsm;onf uGefysLwmxJwGif C:\Program Files\Project1 vrf;aMumif;atmuf
odkYa&muf½SdoGm;onfudk My Computer Short Icon tqifhqifhudka½G;cs,fjcif;jzifh jrifawGU
Edkifayonf/ yHk(452)/
tqdkyg extest111.exe zdkifudk Run ygu y½dk*&rftouf0ifrnfjzpfonf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -InputBox a&;xHk;jzifh a&;xHk;jzifh a&;xHk;jzifh a&;xHk;jzifh a&;xHk;jzifh Password jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;
InputBox a&;xHk;jzifh Password jyKvkyf&eftwGuf yHk(453)wGifazmfjyxm;onfh Formzdkifwpfckudkwnfaqmufyg/
yHk(452)
yHk(453)
397uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(453)yg Form zdkifwGif Label, Timer, Command Button wdkYjzifhwnfaqmuf
xm;NyD; vdktyfaom Properties rsm;udkjyifqifí y½dk*&rfrsm;udka&;om;&ayrnf/
Label1 - Label Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Label1Alignment - 2 - CenterAutoSize - FalseBackColor - &H80000018&BackStyle - 1 - OpaqueBorderStyle - 1 - Fixed SingleForeColor - &H80000002&Command1 - Command Button Properties rSm
(Name) - Command1Caption - E&xitFont - MS Sans Serif, Regular, 8Timer1 - Timer Properties rSm
(Name) - Timer1Enabled - TrueIndex - EmptyInterval - 100Left - 3960Tag - EmptyTop - 1920Exit Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click()Unload MeEnd
End SubForm Load twGuftwGuftwGuftwGuftwGuf
Private Sub Form_Load()Dim Pw, Pworda = 1Pw = "Naing"
398uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Do While a <= 3Pword = InputBox("Type in your password", "Password")If Pword <> Pw Then
MsgBox "Sorry, incorrect password"Else
Exit SubEnd Ifa = a + 1
LoopEnd
End SubTimer1_Timer() twGuftwGuftwGuftwGuftwGuf
Private Sub Timer1_Timer()Dim i As IntegerLabel1.BackColor = &H80000018Label1.ForeColor = blueLabel1.Caption = Now
End Subtxufygy½dk*&rfudk Run ygu yHk(454)ygtwdkif;jzpfay:vmrnf/
InputBox a&;xHk;jzifha&;xm;ojzifh yxrOD;pGm Password awmif;onfh InputBox ay:vmrnf/ rdrdrS Password udkrSefuefpGm½dkufESdyfEdkifygu wpfBudrfwnf;y½dk*&rf
Run rnfjzpfonf/ Password (3)Budrf½dkufírSefuefrIr½Sdygu y½dk*&rfxJrSxGufoGm;vdrfh
rnf/ 3 BudrftwGif; Password wpfcgr[kwfwpfcgrSefuefrI½SdrSom y½dk*&rf Run rnfjzpf
onf/ yxrtBudrfwGif naing [k½dkufESdyfNyD; Enter odkYr[kwf OK Command Buttonudka½G;cs,fyguyHk(455)ygtwdkif; Message Box wpfckjzifhjyrnfjzpfonf/ Enter odkYr[kwf
OK Command Button udka½G;cs,fyg/
yHk(454)
399uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
xdktcg Input Box aemufwpfzefjyefay:vmygu Password trSefudk jznfhpGufí
Enter (odkYr[kwf) OK Command Button udka½G;cs,f&rnf/ yHk(456)/
xdktcg y½dk*&rf Run vmrnfudk yHk(457)ygtwdkif;jrifawGUEdkifayonf/ y½dk*&rfrS
xGufvdkygu Exit Command Button udka½G;cs,f&rnf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(455)
yHk(456)
yHk(457)
400uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
omrefa&;xHk;jzifh omrefa&;xHk;jzifh omrefa&;xHk;jzifh omrefa&;xHk;jzifh omrefa&;xHk;jzifh Password jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;
omrefa&;xHk;jzifh Password jyKvkyf&eftwGuf yHk(458)wGifazmfjyxm;onfh Formzdkifwpfckudkwnfaqmufyg/
yHk(458)yg Form zdkifwGif Label, Text Box, Command Button wdkYjzifhwnfaqmuf
xm;NyD; vdktyfaom Properties rsm;udkjyifqifí y½dk*&rfrsm;udka&;om;&ayrnf/
Label1 - Label Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Label1Alignment - 0 - Left JustifyAutoSize - TrueBackColor - &H8000000F&BackStyle - 0 - TransparentBorderStyle - 0 - NoneCaption - Enter Password = = = >ForeColor - &H80000012&Command1 - Command Button Properties rSm
(Name) - Command1Caption - &RunFont - MS Sans Serif, Regular, 8
yHk(458)
401uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Run Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click()Dim Pw, PwordPw = "Naing"Pword = Text1.TextIf Pword <> Pw Then
Label2.Caption = "Sorry, incorrect password"ElseForm1.HideForm2.ShowEnd If
End SubForm Load twGuftwGuftwGuftwGuftwGuf
Private Sub Form_Load()If Text1.PasswordChar = "" Then
Text1.PasswordChar = "*"Else
Text1.PasswordChar = ""End If
End SubPassword rSefuefrI½Sdyguaemufxyf Form zdkifwpfckay:vmap&eftwGuf xyfrH
í Form zdkifwpfckwnfaqmuf&rnf/ yHk(459)/
yHk(459)
402uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(459)yg Form zdkifwGif Text Box, Timer, Command Button wdkYjzifh
wnfaqmufxm;NyD; vdktyfaom Properties rsm;udkjyifqifí y½dk*&rfrsm;udka&;om;&ay
rnf/
Text1 - TextBox Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Text1Alignment - 2 - CenterAutoSize - TrueBorderStyle - 1 - Fixed SingleFont - MS Sans Serif, Regular, 14Text - EmptyText2 - TextBox Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Text2Alignment - 2 - CenterAutoSize - TrueBorderStyle - 1 - Fixed SingleFont - MS Sans Serif, Regular, 14Text - EmptyTimer1 - Timer Properties rSm
(Name) - Timer1Enabled - TrueIndex - EmptyInterval - 100Left - 960Tag - EmptyTop - 1800Command1 - Command Button Properties rSm
(Name) - Command1Caption - E&xitFont - MS Sans Serif, Regular, 8
403uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Exit Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click()Unload MeEnd
End SubForm Load twGuftwGuftwGuftwGuftwGuf
Private Sub Form_Load()Text1.Text = Time$Text2.Text = Date$
End SubTimer1_Timer() twGuftwGuftwGuftwGuftwGuf
Private Sub Timer1_Timer()Text1.Text = Time$
End Sub
yHk(458)yg Form zdkifudk Run ygu yHk(460)ygtwdkif;jzpfay:vmrnf/
Text Box wGif rdrdtaejzifh jzpfEdkifonfxifonfh pmom;udk½dkuf&rnf/ Oyrm -
Maung [k½dkufyg/ Text Box wGif Asterisk (*) rsm;omay:vmrnf/ Run Com-mand Button udka½G;onfjzpfap? Alt+R udka½G;onfjzpfap Password rSefuefrI½SdrSom
y½dk*&rf Run rnfjzpfonf/ Password rrSefuefygu yHk(461)ygtwdkif; jyovdrfhrnf/
yHk(460)
404uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Password udkrSefuefpGm½dkufrxnfhEdkifygu y½dk*&rfxJodkYvHk;00ifcGifhjyKrnf r[kwfbJ
Password rSefuefrI½SdrSom aemuf Form wpfckodkYqufvuftvkyfvkyfrnfjzpfygonf/
xdkYaMumifh y½dk*&rfxJwGifowfrSwfxm;aom Password jzpfaom Naing udk jznfhpGufNyD;
Enter odkYr[kwf OK Command Button udka½G;cs,fyg/ yHk(462)ygtwdkif;jzpfay:vmrnf/
y½dk*&rfxJrSxGufvdkygu Exit Command Button udka½G;cs,fyg/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(461)
yHk(462)
405uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
tcef;(12)tcef;(12)tcef;(12)tcef;(12)tcef;(12)
Microsoft Internet Explore zdkifudkqJG,ltoHk;csjcif;zdkifudkqJG,ltoHk;csjcif;zdkifudkqJG,ltoHk;csjcif;zdkifudkqJG,ltoHk;csjcif;zdkifudkqJG,ltoHk;csjcif;
yxrOD;pGm Microsoft Internet Explore wGif Run í&Edkifap&ef HTML (HyperText Mark-Up Language) jzifh y½dk*&rfrsm;udka&;om;&rnf/ Oyrm - c:\html_notesvrf;aMumif;xJwGif rdrdtvdk½Sdonfh HTML zdkifrsm;a&;om;xm;&rnf/
Index.htm zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<html><head><title> My Home Page (Index File) </Title></head><frameset rows="60,*"><frame name="banner" scrolling="no" noresize target ="contents"
src="header.htm"><frameset cols="185,*"><frame name="contents" target="main" src="content.htm"><frame name="main" src="main.htm" target="contents"></frameset></frameset></html>header.htm zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<html><head><title>Web Page Header</Title><base target="contents"></head><body><p align="center"><b><big><big><marquee align="middle" behavior="alternate" direction="right"> Welcometo My Home Page</marquee></big></big></b></p></body></html>content.htm zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<html><head><title> Content </Title><base target="main"></head>
406uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
<body><p><b><font color="#0000ff">HTML Lessons</font></b></p><p><b>1. <a href="Heading.htm"> Heading</a><br>2. <a href="HRuler2.htm"> Horizontal Ruler</a><br>3. <a href="Format.htm"> Text Format</a><br>4. <a href="Font Size.html"> Font Size</a><br>5. <a href="Font Color.html"> Font Color</a><br>6. <a href="Font Face.html"> Font Face</a><br>7. <a href="bgsound.htm"> BGSound </a><br>8. <a href="BGColorCode.htm"> BGColorCode</a><br>9. <a href="Font attrs.html"> Font Attr. </a><br>10. <a href="FontType.html"> Font Type</a><br>11. <a href="Format.htm"> Text Format</a><br>12. <a href="Paragraph.htm"> Paragraph </a><br>13. <a href="Form-Table1.htm"> Form Table </a><br>14. <a href="Images.htm"> Images </a><br>15. <a href="ImageTable.htm">Image Table </a><br>16. <a href="Table1.htm"> Table1 </a><br>17. <a href="Video.htm"> Video </a><br>18. <a href="VBScript.htm"> VBScript </a><br>19. <a href="Javascript.htm"> Javascript </a><br>20. <a href="HTML_Option.htm">HTML Option </a><br><br>21. <a href="Thanks.htm">Thank You </a></b></p>** <a href="Exercise001.htm"> Excercise001 </a><br>** <a href="Java_TextTyper.htm"> Java_TextTyper </a><br><b> Links to Other Site (Applet Effects) </b> <Br>* <a href="C:\My Documents\JavaScripts 99\javaapplets\imageeffects\
durius\water3.html"> Water </a><br>* <a href="C:\My Documents\JavaScripts 99\javaapplets\imageeffects\
durius\water3.html"> Water2 </a><br>* <a href="C:\My Documents\JavaScripts 99\javaapplets\imageeffects\
durius\water3.html"> Water3 </a><br>* <a href="C:\My Documents\JavaScripts 99\javaapplets\imageeffects\
durius\Bump.html">Bump </a><br>
407uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
* <a href="C:\My Documents\JavaScripts 99\javaapplets\imageeffects\durius\Bump2.html"> Bump2 </a><br>
* <a href="C:\My Documents\JavaScripts 99\javaapplets\imageeffects\durius\Bump3.html"> Bump3 </a><br>
* <a href="C:\My Documents\JavaScripts 99\javaapplets\imageeffects\durius\Lens.html"> Lens </a><br>
* <a href="C:\My Documents\JavaScripts 99\javaapplets\imageeffects\durius\Lens2.html"> Lens2 </a><br>
* <a href="C:\My Documents\JavaScripts 99\javaapplets\imageeffects\durius\Lens3.html"> Lens3 </a><br>
</body></html>main.htm zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<html><head><title>Main Area in Frame Page</Title><base target="contents"></head><body><p></p> <p></p> <p></p><p align="center"><font color ="0000ff"><b><big>A Practical Application
</b></big></p><p align="center"><big><b><font color ="ff0000">of</font></b></big>
</p><p align="center"><big><b><font color ="0000ff"> HTML Basic
Lessons</font></b></big></p><p></p></body></html>heading.htm zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<html><head><title>Heading Text Styles</Title></head><body><H1>Heading 1 </H1><H2>Heading 2 </H2><H3>Heading 3 </H3>
408uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
<H4>Heading 4 </H4><H5>Heading 5 </H5><H6>Heading 6 </H6><H7>Normal Size </H7></body></html>hruler2.htm zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<html><head><title>Horizontal Ruler</Title></head><body><hr color="blue"><hr color="red" width ="75%"><hr color=blue size=10 width=100><hr color=green size=25 width=200></body></html>format.htm zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<html><head><title>Text Formatting</Title></head><body><Center><!-- Remark --><B>Bold Text Bold Text Bold Text</b><br><U>Underlined Text Underlined Text Underlined Text</u><br><I>Italic Text Italic Text Italic Text</i><br></Center></body></html>font size.html zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<html><head><title>Font Size</Title></head><body><Font Size=1> Font Size =1 </font><br><Font Size=2> Font Size =2 </font><br><Font Size=3> Font Size =3 </font><br>
409uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
<Font Size=4> Font Size =4 </font><br><Font Size=5> Font Size =5 </font><br><Font Size=6> Font Size =6 </font><br><Font Size=7> Font Size =7 </font><br></body></html>font color.html zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<html><head><title>Font Color</Title></head><body><b><h1><Font Color=red> Font Color=red </font><br><Font Color=green> Font Color=green </font><br><Font Color=blue> Font Color=blue </font><br><Font Color=yellow> Font Color=yellow </font><br><Font Color=cyan> Font Color=cyan </font><br><Font Color=silver> Font Color=silver </font><br><Font Color=lime> Font Color=lime </font></b><p><b><font face="Arial" size="3" color="#0000FF">This is arial font.
</font><br></b></p></h1></body></html>font face.html zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<html><head><title>Font Face</Title></head><body><b><Font size=7><Font face=times>face=times</font><br><Font face=arial>face=arial</font><br><Font face=times new roman>face=times new roman</font><br><Font face=arial black>face=arial black</font><br><Font face="-win---kalaw"> pmvkH;=0if;uavm</font><br><Font face="-win---researcher"> pmvkH;=0if;uavm</font><br><Font face=Haettenschweiler>face=Haettenschweiler</font><br></Font>
410uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
</b></body></html>bgsound.htm zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<html><head><title>Background Sond is playing (Another Directory)</Title>
</head><body><bgsound src="c:\windows\wzz.mp3" loop="-1"><h1>Background Sound is playing ... </h1></body></html>BGColorCode.htm zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<html><head><title>Background Color Code</Title></head><body BGCOLOR="#00ff00"><h1>BGCOLOR is Green ... (Code)</h1></body></html>font attrs.html zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<html><head><title>Other Font Attributes</Title></head><body>This is normal text on body<br><strong>Strong Text</strong><br><strong><strong>Strong and strong Text</strong></strong><br><strike>Strike through on Text</strike><br><big>Big Text</big><br><big><big>Big and big Text</big></big><br><small>Small Text</small><br><small><small>Small and small Text</small></small><br><h3>Super Script and Subscript<br>H<sub>2</sub>O<br>X<sup>2</sup>+y-10</h3><br><tt>This is a Monotype Text Style. This is a Monotype Text Style, This is a
411uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Monotype Text Style, This is a Monotype Text Style. </tt></body></html>fontType.html zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<html><head><title>Font Type</Title></head><body><pre>1. Pre-formated2. Pre-formated
Pre-formated Pre-formated</pre><acronym>Acronym Acronym Acronym </acronym><br><address>Address Address Address </address><br><blockquote>BlockQuote BlockQuote BlockQuote </blockquote><br><cite>Cite Cite Cite </cite><br><del>Del Del Del </del><br><dfn>Defination Defination Defination </dfn><br><em>Em Em Em </em><br><ins>Insert Insert Insert </ins><br><textarea cols=50 rows=10 name="area1"> This is text area. This is textarea. This is text area. This is text area. This is text area. This is text area.This is text area. This is text area. This is text area. This is text area. This istext area. This is text area. This is text area. This is text area. This is textarea. This is text area. This is text area. This is text area. This is text area.This is text area. This is text area. This is text area.This is text area. This istext area. This is text area. This is text area. This is text area. This is textarea. This is text area. This is text area. This is text area. This is text area.This is text area. This is text area. This is text area. This is text area. This istext area. This is text area. This is text area. This is text area. This is textarea. This is text area. This is text area. This is text area.</textarea></body></html>format.htm zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<html><head><title>Text Formatting</Title></head>
412uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
<body><Center><!-- Remark --><B>Bold Text Bold Text Bold Text</b><br><U>Underlined Text Underlined Text Underlined Text</u><br><I>Italic Text Italic Text Italic Text</i><br></Center></body></html>Paragraph.htm zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<html><head><title>Sparating Paragraphs</Title></head><body><p>
Paragraph1 Paragraph1 Paragraph1 Paragraph1 Paragraph1 Paragraph1Paragraph1 Paragraph1 Paragraph1 Paragraph1 Paragraph1 Paragraph1 Para-graph1 Paragraph1 Paragraph1 Paragraph1 Paragraph1 Paragraph1 Para-graph1 Paragraph1 Paragraph1 Paragraph1 Paragraph1 Paragraph1 Para-graph1 Paragraph1 Paragraph1 Paragraph1 Paragraph1 Paragraph1</p><p align="center"> Paragraph1 Paragraph1 Paragraph1 Paragraph1 Para-graph1 Paragraph1Paragraph1 Paragraph1 Paragraph1 Paragraph1 Paragraph1 Paragraph1 Para-graph1 Paragraph1 Paragraph1 Paragraph1 Paragraph1 Paragraph1 Para-graph1 Paragraph1 Paragraph1 Paragraph1 Paragraph1 Paragraph1 Para-graph1 Paragraph1 Paragraph1 Paragraph1 Paragraph1 Paragraph1 Para-graph1 Paragraph1 Paragraph1 Paragraph1</p></body></html>
413uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Form_table1.htm zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<HTML><HEAD> <TITLE>JavaScript & Forms</TITLE> </HEAD><BODY><Center><SCRIPT LANGUAGE="JavaScript"><!-- begining of scriptfunction CalcTotals() {
var p1_Float = parseFloat(document.Form1.Price1.value); var p2_Float = parseFloat(document.Form1.Price2.value); var p3_Float = parseFloat(document.Form1.Price3.value); var q1_Float = parseFloat(document.Form1.Quantity1.value); var q2_Float = parseFloat(document.Form1.Quantity2.value); var q3_Float = parseFloat(document.Form1.Quantity3.value); var Total = 0;
document.Form1.SubTotal1.value = q1_Float*p1_Float; document.Form1.SubTotal2.value = q2_Float*p2_Float; document.Form1.SubTotal3.value = q3_Float*p3_Float; document.Form1.Total.value = (q1_Float*p1_Float)+(q2_Float*p2_Float)+
(q3_Float*p3_Float);}
<!-- end of script --></SCRIPT>
<FORM NAME="Form1">
<TABLE WIDTH="600">
<TR><TH VALIGN="TOP" ALIGN="CENTER">No.</TH><TH VALIGN="TOP" ALIGN="CENTER">Rank</TH><TH VALIGN="TOP" ALIGN="CENTER">Pay </TH><TH VALIGN="TOP" ALIGN="CENTER">Amount of Soldier</TH><TH VALIGN="TOP" ALIGN="CENTER">Total Pay</TH>
414uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
</TR>
<TR><TD VALIGN="TOP" ALIGN="CENTER">1.</TD><TD VALIGN="TOP" ALIGN="CENTER">Sgt</TD><TD ALIGN="CENTER">Ks 100.75<INPUT TYPE="HIDDEN"
NAME="Price1" VALUE="100.75"></TD><TD ALIGN="CENTER"><INPUT TYPE="TEXT"
NAME="Quantity1"></TD><TD ALIGN="RIGHT"><INPUT TYPE="TEXT" NAME="SubTotal1">
</TD></TR>
<TR><TD VALIGN="TOP" ALIGN="CENTER">2.</TD><TD VALIGN="TOP" ALIGN="CENTER">Cpl.</TD><TD ALIGN="CENTER">Ks 95.25<INPUT TYPE="HIDDEN" NAME="Price2" VALUE="95.25"> </TD><TD ALIGN="CENTER"><INPUT TYPE="TEXT"
NAME="Quantity2"></TD><TD ALIGN="RIGHT"><INPUT TYPE="TEXT" NAME="SubTotal2">
</TD></TR>
<TR><TD VALIGN="TOP" ALIGN="CENTER">3.</TD><TD VALIGN="TOP" ALIGN="CENTER">Rfm.</TD><TD ALIGN="CENTER">Ks 80.50<INPUT TYPE="HIDDEN" NAME="Price3" VALUE="80.50"></TD><TD ALIGN="CENTER"><INPUT TYPE="TEXT"
NAME="Quantity3"></TD><TD ALIGN="RIGHT"><INPUT TYPE="TEXT" NAME="SubTotal3">
</TD></TR>
415uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
<TR><TD VALIGN="TOP" ALIGN="CENTER" COLSPAN="5"><HR></TD>
</TR>
<TR><TD VALIGN="TOP" ALIGN="CENTER"></TD><TD VALIGN="TOP" ALIGN="CENTER"></TD><TD ALIGN="CENTER"></TD><TD ALIGN="RIGHT">Total Kyats</TD><TD ALIGN="RIGHT"><INPUT TYPE="TEXT" NAME="Total"></TD>
</TR>
<TR><TD VALIGN="TOP" ALIGN="CENTER"></TD><TD VALIGN="TOP" ALIGN="CENTER"></TD><TD ALIGN="CENTER"></TD><TD ALIGN="CENTER"></TD><TD ALIGN="RIGHT"><INPUT TYPE="BUTTON" NAME="Button1" VALUE="Recalculate"
ONCLICK="CalcTotals()"></TD></TR>
</TABLE></FORM></Center></BODY></HTML>Images.htm zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<html><head><title>Using Miage Tags</Title></head><body><center><img src="ace.gif" alt="ace.gif"><img src="./Images/111.jpg" width=200 height=200 border=10 hspace=10
vspace=10 Alt="This is 111.jpg" align="center">
416uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
<img src="./Images/222.jpg" Height=300 width=175 alt="222.gif"><br></center></body></html>ImageTable.htm zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<html><head><title> Table and Images </Title></head><body><Center><Table Border = "1" Width="70"><tr><td> <Img src="./Images/pict01.gif" width=120 height=100 alt="Picture1"></td><td> <Img src="./Images/pict02.gif" width=120 height=100 alt="Picture2"></td><td> <Img src="./Images/pict03.gif" width=120 height=100 alt="Picture3"></td></tr><tr><td> <Img src="./Images/pict04.gif" width=120 height=100 alt="Picture4"></td><td> <Img src="./Images/pict05.gif" width=120 height=100 alt="Picture5"></td><td> <Img src="./Images/pict06.gif" width=120 height=100 alt="Picture6"></td></tr><tr><td> <Img src="./Images/pict07.gif" width=120 height=100 alt="Picture7"></td><td> <Img src="./Images/pict08.gif" width=120 height=100 alt="Picture8"></td><td> <Img src="./Images/pict09.gif" width=120 height=100 alt="Picture9"></td></tr></table><br>
417uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
<b> <Font color=red size=6 face="NuptialScript"> Image Table </Font> </b></Center></body></html>Table1.htm zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<html><head><title> Table Cells </Title></head><body><Table Border = "20" Width="500" cellpadding="5" cellspacing="10"
bordercolor="purple" align="center" bgcolor="silver"><tr><td align="center">Cell1</td><td align="center">Cell2</td></tr><Table Border = "20" Width="300" cellpadding="3" cellspacing="10"
bordercolor="red" align="center" bgcolor="silver"><tr><td align="right">Cell3</td><td>Cell4</td></tr><Table Border = "20" Width="400" cellpadding="3" cellspacing="10"
bordercolor="blue" align="center" bgcolor="silver"><tr><td>Cell5</td><td>Cell6</td></tr><Table Border = "20" Width="300" cellpadding="3" cellspacing="10"
bordercolor="magenta" align="center" bgcolor="silver"><tr><td>Cell7</td><td>Cell8</td></tr></table></body>
418uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
</html>Video.htm zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<html><head><title>Video is playing (Another Directory)</Title></head><body><center><img dynsrc="c:\my documents\Music12.dat"><h1>Video is playing ... </h1></center></html>VBScript.htm zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<HTML><HEAD> <TITLE>VBScript & Form Example</TITLE> </HEAD><BODY BGCOLOR="#FFFFFF">
<SCRIPT LANGUAGE="VBScript"><!-- begining of script
Sub add_2_num()
a_str = document.Form1.Text1.valueb_str = document.Form1.Text2.valuea_int = cint(a_str)b_int = cint(b_str)c = 0
c = a_int+b_intMsgBox "The answer is: " & c
End Sub
<!-- end of script --></SCRIPT>
<FORM NAME="Form1">
<P>A=<INPUT TYPE="TEXT" NAME="Text1"><BR>
419uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
B = <INPUT TYPE = "TEXT" NAME = "Text2"><BR><INPUT TYPE = "BUTTON" NAME = "Button1" VALUE = "A+B="
ONCLICK = "add_2_num()"></p>
</FORM></BODY></HTML>Javascript.htm zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<HTML><HEAD> <TITLE>JavaScript & Forms</TITLE> </HEAD><BODY>
<SCRIPT LANGUAGE="JavaScript"><!-- begining of script
function add_2_num() {
var a_str = document.Form1.Text1.value;var b_str = document.Form1.Text2.value;var a_int = parseInt(a_str);var b_int = parseInt(b_str);var c = 0;
c = a_int + b_int;alert("The answer is: " +c);}
<!-- end of script --></SCRIPT>
<FORM NAME="Form1">
<P>A = <INPUT TYPE = "TEXT" NAME = "Text1"><BR>B = <INPUT TYPE = "TEXT" NAME = "Text2"><BR><INPUT TYPE = "BUTTON" NAME = "Button1" VALUE = "A+B="
ONCLICK="add_2_num()"></p>
420uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
</FORM></BODY></HTML>HTML_Option.htm zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<HTML><HEAD><TITLE>MyPage</TITLE></head><BODY BGCOLOR=FFFFFF TEXT=000000>
<CENTER><Font color=red><H1>HTML_Option</H1></Font><H2>This is Heading 2 Style</H2><br><SELECT NAME=Selection1>
<OPTION><a href="FontFace.html"> Font Face </a></OPTION><OPTION><a href="FontSize.html"> Font Size </a></OPTION><OPTION><a href="FontColor.html"> Font Color </a></OPTION>
</SELECT><br><br><TEXTAREA NAME=mytext ROWS=10 COLS=50>This word is in the text area.</TEXTAREA></CENTER></BODY></HTML>
421uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Thanks.htm zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<html><head><title>Thanks</Title></head><body bgcolor="#000000"><center><a href="main.htm"><Img Src="./Images/Home.gif" width="220"
height="197"></a><br><font color =red><h1>Thank your for Visit to My Home Page</h1></font></center></body></html>Exercise001.htm zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<HTML><HEAD> <TITLE>JavaScript & Forms (Fahrenheit to Centigrade)</TITLE></HEAD><BODY><center><SCRIPT LANGUAGE="JavaScript"><!-- begining of script
function CTs() {
var fah=parseFloat(document.Form1.P1.value);var cen = 0;
document.Form1.cen.value=5/9*(fah-32);}
<!-- end of script --></SCRIPT>
<FORM NAME="Form1">
<H1><font color="green">Fahrenheit Degree to Centigrade Degree</font></H1><br>
422uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
<H2><font color="blue">Enter Fahrenheit Degree  <INPUT TYPE="TEXT" NAME="P1"><br>
Equivalent Centigrade Degree <INPUT TYPE="TEXT"NAME="cen"><br><br>
<INPUT TYPE="BUTTON" NAME="Button1" VALUE="Run"ONCLICK="CTs()"></font></H2><br>
</FORM></center></BODY></HTML>Java_TextTyper.htm zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<HTML LANG="en"><HEAD><title>TextTyper v2.5</title><META http-equiv="Content-Type" content="text/html; harset=iso-8859-1">
<LINK REL="email"HREF="mailto:[email protected]">
<style type="text/css"><!--B { font-weight: bold }#ttl0 { position: absolute }.ttl1 { font: 8pt Verdana, Arial, Helvetica, serif }// --></style><script type="text/javascript" language="javascript"><!--/* */
var layers = document.layers, style = document.all, both = layers || style,idme=908601;
423uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
if (layers) { layerRef = 'document.layers'; styleRef = ''; } if (style){layerRef = 'document.all'; styleRef = '.style'; }
function writeOnText(obj, str) { if (layers) with (document[obj]) { document.open();
document.write(str); document.close(); } if (style) eval(obj+'.innerHTML= str');}
var dispStr = new Array("<b>Loading <font color=#00FF00>TextTyper</font>...</b> <br> <br> Sy s t e m V e r s i o n . . . . <font color=#00FF00>v2.5</font> <br> <br> L i f e S u p p o r t . . . .<font color=#00FF00>-ok</font> <br> <br> V i t a l S y s t e m s . . . . <font color=#00FF00>-ok</font> <br> <br>S a n i t y . . . . <font color=#FF0000> -Error </font>");
var overMe=0;
function txtTyper(str, idx, idObj, spObj, clr1, clr2, delay, plysnd) {var tmp0 = tmp1 = '', skip = 0;if (both && idx <= str.length) {if (str.charAt(idx) == '<') { while (str.charAt(idx) != '>') idx++; idx++;}if (str.charAt(idx) == '&' && str.charAt(idx+1) != ' ') { while
(str.charAt(idx) != ';') idx++; idx++; }tmp0 = str.slice(0,idx);tmp1 = str.charAt(idx++);
if (overMe==0 && plysnd==1) {if (navigator.plugins[0]) {if (navigator.plugins["LiveAudio"][0].type=="audio/basic" &&
navigator.javaEnabled()) {document.embeds[0].stop();setTimeout("document.embeds[0].play(false)",100); }
424uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
} else if (document.all) {ding.Stop();setTimeout("ding.Run()",100);
}overMe=1;} else overMe=0;
writeOnText(idObj, "<span class="+spObj+"><font color='"+clr1+"'>"+tmp0+"</font><font color='"+clr2+"'>"+tmp1+"</font></span>");setTimeout("txtTyper('"+str+"', "+idx+", '"+idObj+"','"+spObj+"', '"+clr1+"', '"+clr2+"', "+delay+" ,"+plysnd+")",delay);
}}
function init() {txtTyper(dispStr[0], 0, 'ttl0', 'ttl1', '#339933', '#99FF33', 50, 0);
}
// --></script>
</HEAD>
<BODY bgcolor="#000000" text="#339933" link="#33FF00"alink="#666666" vlink="#666666" onload="init()"><div id=ttl0 class=ttl1></div>
<!--<OBJECT id="ding" CLASSID="CLSID:05589FA1-C356-11CE-BF01-
00AA0055595A" WIDTH=0 HEIGHT=0><PARAM NAME="ShowDisplay" VALUE="0"><PARAM NAME="ShowControls" VALUE="0"><PARAM NAME="AutoStart" VALUE="0"><PARAM NAME="FileName" VALUE="type.au">
425uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
<embed src="type.au" width="37" height="0" controls="playbutton"hidden="true" autostart="false" alt="">
</OBJECT>--> </BODY>
</HTML>Water3.html zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<HTML><HEAD><META NAME="GENERATOR" CONTENT="Microsoft FrontPage 4.0"><TITLE>The Water-applet!</TITLE></HEAD><BODY BGCOLOR="#ffffff" LINK="#407890" VLINK="#50a088">
<BLOCKQUOTE><P align="center"><B><FONT SIZE="+1"><IMG SRC="Images/
HeadlineWater.jpg" WIDTH="79" HEIGHT="42" ALIGN="BOTTOM"BORDER="0" NATURALSIZEFLAG="3"></FONT><font color="#0000FF" SIZE="+1"><span style="background-color:#00FF00">Activateyour mouse on the center area.</span></font></B></P>
</BLOCKQUOTE>
<P><CENTER><B><FONT SIZE="+1"><APPLET WIDTH="190" HEIGHT="190" ALIGN="BOTTOM"
CODE="WaterApp.class" CODEBASE="./"><PARAM NAME="dim" VALUE="6"><PARAM NAME="dotsize" VALUE="6"><PARAM NAME="logoheight" VALUE="200"><PARAM NAME="image" VALUE="Images/fxlogo.gif"><PARAM NAME="mouse" VALUE="1"><PARAM NAME="noise" VALUE="0"><PARAM NAME="col1" VALUE="ffff34"><PARAM NAME="col2" VALUE="ff3434">
426uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
<PARAM NAME="col3" VALUE="ffffff"><PARAM NAME="col4" VALUE="3434ff"><PARAM NAME="col5" VALUE="34ffff"><PARAM NAME="url" VALUE="http://www.xoom.com/"><PARAM NAME="reg" VALUE="41774512">
</APPLET></FONT></B></CENTER></P>
<P><CENTER><A HREF="water.html" TARGET="_self">1</A>,<A HREF="water2.html" TARGET="_self">2</A>.</CENTER>
</BODY></HTML>Bump.html zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<HTML><HEAD><META NAME="GENERATOR" CONTENT="Adobe PageMill 3.0 Win"><TITLE>The Bump Applet!</TITLE></HEAD><BODY BGCOLOR="#ffffff" LINK="#6ba2bc" VLINK="#58a890"
ALINK="#50b090">
<P><B><FONT SIZE="-1"><A HREF="../applets.html"TARGET="_self">Back to the applet page</A></FONT></B></P>
<BLOCKQUOTE><P><B><FONT SIZE="+2"><IMG SRC="Images/HeadlineBump.jpg"
WIDTH="87" HEIGHT="42" ALIGN="BOTTOM" BORDER="0"NATURALSIZEFLAG="3"></FONT></B></P>
</BLOCKQUOTE>
<P><CENTER><APPLET WIDTH="256" HEIGHT="256" ALIGN="BOTTOM"
CODE="BumpApp.class" CODEBASE="./"> <PARAM NAME="image" VALUE="Images/rot.jpg"> <PARAM NAME="lightsizex" VALUE="120">
427uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
<PARAM NAME="lightsizey" VALUE="120"> <PARAM NAME="ambiencer" VALUE="120"> <PARAM NAME="ambienceg" VALUE="120"> <PARAM NAME="ambienceb" VALUE="120"> <PARAM NAME="bumpheight" VALUE="255"> <PARAM NAME="light" VALUE="255"> <PARAM NAME="reg" VALUE="60563282"></APPLET></CENTER></P>
<P><CENTER><A HREF="Bump2.html" TARGET="_self">2</A>,<A HREF="Bump3.html" TARGET="_self">3</A>.</CENTER>
</BODY></HTML>Bump2.html zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<HTML><HEAD><META NAME="GENERATOR" CONTENT="Adobe PageMill 3.0 Win"><TITLE>The Bump Applet!</TITLE></HEAD><BODY BGCOLOR="#ffffff" LINK="#6ba2bc" VLINK="#58a890"
ALINK="#50b090">
<P><B><FONT SIZE="-1"><A HREF="../applets.html"TARGET="_self">Back to the applet page</A></FONT></B></P>
<BLOCKQUOTE><P><B><FONT SIZE="+2"><IMG SRC="Images/HeadlineBump.jpg"
WIDTH="87" HEIGHT="42" ALIGN="BOTTOM" BORDER="0"NATURALSIZEFLAG="3"></FONT></B></P>
</BLOCKQUOTE>
<P><CENTER><APPLET WIDTH="230" HEIGHT="230" ALIGN="BOTTOM"
CODE="BumpApp.class" CODEBASE="./">
428uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
<PARAM NAME="image" VALUE="Images/inyourface.jpg"> <PARAM NAME="lightsizex" VALUE="85"> <PARAM NAME="lightsizey" VALUE="85"> <PARAM NAME="ambiencer" VALUE="80"> <PARAM NAME="ambienceg" VALUE="120"> <PARAM NAME="ambienceb" VALUE="140"> <PARAM NAME="bumpheight" VALUE="320"> <PARAM NAME="light" VALUE="720"> <PARAM NAME="reg" VALUE="60563282">
</APPLET></CENTER></P>
<P><CENTER><A HREF="Bump.html" TARGET="_self">1</A>,<A HREF="Bump3.html" TARGET="_self">3</A>.</CENTER>
</BODY></HTML>Bump3.html zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<HTML><HEAD><META NAME="GENERATOR" CONTENT="Adobe PageMill 3.0 Win"><TITLE>The Bump Applet!</TITLE></HEAD><BODY BGCOLOR="#ffffff" LINK="#6ba2bc" VLINK="#58a890"
ALINK="#50b090">
<P><B><FONT SIZE="-1"><A HREF="../applets.html"TARGET="_self">Back to the applet page</A></FONT></B></P>
<BLOCKQUOTE><P><B><FONT SIZE="+2"><IMG SRC="Images/HeadlineBump.jpg"
WIDTH="87" HEIGHT="42" ALIGN="BOTTOM" BORDER="0"NATURALSIZEFLAG="3"></FONT></B></P>
</BLOCKQUOTE>
429uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
<P><CENTER><APPLET WIDTH="300" HEIGHT="300" ALIGN="BOTTOM"
CODE="BumpApp.class" CODEBASE="./"> <PARAM NAME="image" VALUE="Images/bump.jpg"> <PARAM NAME="lightsizex" VALUE="175"> <PARAM NAME="lightsizey" VALUE="175"> <PARAM NAME="bumpheight" VALUE="370"> <PARAM NAME="light" VALUE="370"> <PARAM NAME="ambiencer" VALUE="140"> <PARAM NAME="ambienceg" VALUE="120"> <PARAM NAME="ambienceb" VALUE="100"> <PARAM NAME="reg" VALUE="60563282"></APPLET></CENTER></P>
<P><CENTER><A HREF="Bump.html" TARGET="_self">1</A>,<A HREF="Bump2.html" TARGET="_self">2</A>.</CENTER>
</BODY></HTML>Lens.html zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<HTML><HEAD><META NAME="GENERATOR" CONTENT="Adobe PageMill 3.0 Win"><TITLE>The Lens Applet!</TITLE></HEAD><BODY BGCOLOR="#ffffff" LINK="#6ba2bc" VLINK="#58a890"
ALINK="#50b090">
<P><B><FONT SIZE="-1"><A HREF="../applets.html"TARGET="_self">Back to the applet page</A></FONT></B></P>
<BLOCKQUOTE><P><B><FONT SIZE="+2"><IMG SRC="Images/HeadlineLens.jpg"
WIDTH="74" HEIGHT="42" ALIGN="BOTTOM" BORDER="0"NATURALSIZEFLAG="3"></FONT></B></P>
430uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
</BLOCKQUOTE>
<P><CENTER><APPLET WIDTH="300" HEIGHT="300" ALIGN="BOTTOM"
CODE="LensApp.class" CODEBASE="./"> <PARAM NAME="image" VALUE="Images/bump.jpg"> <PARAM NAME="depth" VALUE="3048"> <PARAM NAME="lenssizex" VALUE="400"> <PARAM NAME="lenssizey" VALUE="400"> <PARAM NAME="delay" VALUE="10"> <PARAM NAME="reg" VALUE="49605356"></APPLET></CENTER></P>
<P><CENTER><A HREF="Lens2.html" TARGET="_self">2</A>,<A HREF="Lens3.html" TARGET="_self">3</A>.</CENTER>
</BODY></HTML>Lens2.html zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<HTML><HEAD><META NAME="GENERATOR" CONTENT="Adobe PageMill 3.0 Win"><TITLE>The Lens Applet!</TITLE></HEAD><BODY BGCOLOR="#ffffff" LINK="#6ba2bc" VLINK="#58a890"
ALINK="#50b090">
<P><B><FONT SIZE="-1"><A HREF="../applets.html"TARGET="_self">Back to the applet page</A></FONT></B></P>
<BLOCKQUOTE><P><B><FONT SIZE="+2"><IMG SRC="Images/HeadlineLens.jpg"
WIDTH="74" HEIGHT="42" ALIGN="BOTTOM" BORDER="0"NATURALSIZEFLAG="3"></FONT></B></P>
</BLOCKQUOTE>
431uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
<P><CENTER><APPLET WIDTH="300" HEIGHT="300" ALIGN="BOTTOM"
CODE="LensApp.class" CODEBASE="./"> <PARAM NAME="image" VALUE="Images/bump.jpg"> <PARAM NAME="depth" VALUE="-5000"> <PARAM NAME="lenssizex" VALUE="400"> <PARAM NAME="lenssizey" VALUE="400"> <PARAM NAME="delay" VALUE="1030"> <PARAM NAME="url" VALUE="http://www.kuk.com/"> <PARAM NAME="reg" VALUE="49605356"></APPLET></CENTER></P>
<P><CENTER><A HREF="Lens.html" TARGET="_self">1</A>,<A HREF="Lens3.html" TARGET="_self">3</A>.</CENTER>
</BODY></HTML>Lens3.html zdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGufzdkiftwGuf
<HTML><HEAD><META NAME="GENERATOR" CONTENT="Adobe PageMill 3.0 Win"><TITLE>The Lens Applet!</TITLE></HEAD><BODY BGCOLOR="#ffffff" LINK="#6ba2bc" VLINK="#58a890"
ALINK="#50b090">
<P><B><FONT SIZE="-1"><A HREF="../applets.html"TARGET="_self">Back to the applet page</A></FONT></B></P>
<BLOCKQUOTE><P><B><FONT SIZE="+2"><IMG SRC="Images/HeadlineLens.jpg"
WIDTH="74" HEIGHT="42" ALIGN="BOTTOM" BORDER="0"NATURALSIZEFLAG="3"></FONT></B></P>
</BLOCKQUOTE>
432uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
<P><CENTER><APPLET WIDTH="230" HEIGHT="230" ALIGN="BOTTOM"
CODE="LensApp.class" CODEBASE="./"> <PARAM NAME="image" VALUE="Images/inyourface.jpg"> <PARAM NAME="depth" VALUE="6048"> <PARAM NAME="lenssizex" VALUE="150"> <PARAM NAME="lenssizey" VALUE="150"> <PARAM NAME="delay" VALUE="10"> <PARAM NAME="reg" VALUE="49605356"></APPLET></CENTER></P>
<P><CENTER><A HREF="Lens.html" TARGET="_self">1</A>,<A HREF="Lens2.html" TARGET="_self">2</A>.</CENTER>
</BODY></HTML>
txufyg HTML zdkifrsm;tm; y½dk*&rfjzifhqJGwif&eftwGuf Form zdkifwpfckudk
wnfaqmuf&rnf/
yHk(463)yg Form zdkifwGif Timer, Label, Progress Bar wdkYjzifh wnfaqmufxm;NyD;
vdktyfaom Properties rsm;udkjyifqifí y½dk*&rfrsm;udka&;om;&ayrnf/
Timer1 - Timer Properties rSm
(Name) - Timer1Enabled - True
yHk(463)
433uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Index - EmptyInterval - 5000Left - 3480Tag - EmptyTop - 0Label1 - Label Properties rSm
(Name) - Label1Alignment - 2 - CenterAutoSize - FalseBackStyle - 1 - OpaqueBorderStyle - 1 - Fixed SingleCaption - uGefysLwmXme (uGefysLwmXme)
Font - -Win---Taungyi, Bold, 36ProgressBar1 - ProgressBar Properties rSm
(Name) - ProgressBar1Align - 0 - vbAlignNoneMax - 1000Min - 0Font - MS Sans Serif, Regular, 8Timer1 Timer() twGuftwGuftwGuftwGuftwGuf
Private Sub Timer1_Timer()Private Sub Timer1_Timer()Dim n1 As IntegerFor n1 = 1 To 1000
Form1.Caption = "Processing Step " & Trim$(CStr(n1)) & " of 1000"ProgressBar1 = n1
Next n1Call Shell("C:\Program Files\Internet Explorer\IEXPLORE.EXE
c:\html_notes\index.htm", 1)End
End Sub
434uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
yHk(463)yg Form zdkifudk Run ygu yHk(464)ygtwdkif;jzpfay:vmrnf/
acwåcP(Oyrm - 5 puúefYcefYMumjrifhygu yHk(465)ygtwdkif;y½dk*&rf Run rnf
jzpfonf/ Time Interval tm; 5000 ay;xm;aomaMumifhjzpfonf/
Progress Bar wef;jynfhoGm;ygu yHk(466)ygtwdkif; Microsoft Internet Ex-plore ay:vmNyD; HTML jzifha&;om;xm;onfh y½dk*&rfrsm;udk toHk;csí&NyDjzpfonf/
tu,fí Microsoft Internet Explore rSxGufvdkygu Close Button udkESdyf&rnf/
yHk(464)
yHk(465)
435uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(466)
436uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
tcef;(13)tcef;(13)tcef;(13)tcef;(13)tcef;(13)
Application Package rsm;udky½dk*&rfjzifhzGifhjcif;rsm;udky½dk*&rfjzifhzGifhjcif;rsm;udky½dk*&rfjzifhzGifhjcif;rsm;udky½dk*&rfjzifhzGifhjcif;rsm;udky½dk*&rfjzifhzGifhjcif;
Microsoft Visual Basic 6.0 jzifh Application Package rsm;udkqJGwifvdkygu
atmufygtwdkif; Form wpfckudkwnfaqmuf&rnf/ yHk(467)/
Form1 - Form Properties(Name) - Form1BorderStyle - 2 - SizableCaption - Openning of the Application PackageFont - MS Sans Serif, Regular, 8WindowState - 0 - NormalCommand1 - Command Button Properties(Name) - Command1Caption - Open Microsoft &WordFont - MS Sans Serif, Regular, 8Command2 - Command Button Properties(Name) - Command2Caption - Open Microsoft &ExcelFont - MS Sans Serif, Regular, 8
yHk(467)
437uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Command3 - Command Button Properties(Name) - Command3Caption - Open Microsoft &AccessFont - MS Sans Serif, Regular, 8Command4 - Command Button Properties(Name) - Command4Caption - Open Adobe &Page Maker 6.5Font - MS Sans Serif, Regular, 8Command5 - Command Button Properties(Name) - Command5Caption - E&xitFont - MS Sans Serif, Regular, 8Command1 - Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click() Dim MyAppID
MyAppID = Shell("C:\Program Files\Microsoft Office\Office10\WINWORD.EXE", 1)
End SubCommand2 - Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click() Dim MyAppID
MyAppID = Shell("C:\Program Files\Microsoft Office\Office10\EXCEL.EXE", 1)
End SubCommand3 - Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command3_Click() Dim MyAppID
MyAppID = Shell("C:\Program Files\Microsoft Office\Office10\MSACCESS.EXE", 1)
End SubCommand4 - Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command4_Click() Dim MyAppID MyAppID = Shell("C:\PM65\PM65.EXE", 1)End Sub
438uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Command5 - Command Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command5_Click() Unload Me EndEnd Sub
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
439uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
tcef;(14)tcef;(14)tcef;(14)tcef;(14)tcef;(14)
taxGaxGtaxGaxGtaxGaxGtaxGaxGtaxGaxG
Multiple List Box rsm;zefwD;jcif;rsm;zefwD;jcif;rsm;zefwD;jcif;rsm;zefwD;jcif;rsm;zefwD;jcif;
atmufygtwdkif; Form wpfckudkwnfaqmuf&rnf/ yHk(468)/ 4if;wGif Label, TextBox, Command Button wdkYjzifhzefwD;xm;NyD; oufqdkif&m Properties rsm;udkjyifqif
jznfhpGufNyD;aemuf Command Button rsm;wGif atmufygy½dk*&rfrsm;udka&;om;&rnf/
Lable1 Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Label1AutoSize - TrueBackStype - 0 - TransparentCaption - How many number?Lable2 Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Label2AutoSize - TrueBackStype - 0 - TransparentCaption - Enter each number = >
yHk(468)
440uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Text1 Text Box Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Text1Alignment - 0 - Left JustifiedIndex - EmptyLocked - FalseText - EmptyText2 Text Box Properties twGuftwGuftwGuftwGuftwGuf
(Name) - TextAlignment - 0 - Left JustifiedIndex - 1Locked - FalseText - EmptyCommand1 Command Button Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Command1Caption - &Add (Text Box)Enabled - TrueCommand2 Command Button Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Command2Caption - E&xitEnabled - TrueForm1 Form Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Form1Enabled - TrueCaption - Example Multiple Text Box
Object: General, Proc: [Declaration] twGuftwGuftwGuftwGuftwGuf
Dim a1, a2 As IntegerAdd (Text Box) - Command1 Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click()a2 = Val(Text1)If a1 = 0 Then a1 = 1If a1 > a2 Then Exit Suba1 = a1 + 1Text1.Locked = True
441uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Load Text(a1)b1 = Text(a1).Name 'Text(a1).Name="Text"b2 = Text(a1).Index 'Text(a1).Index = a1+1b1 = "Text"b2 = a1 + 1Text(a1).Locked = TrueText(a1).Top = Text(a1 - 1).Top + 400Text(a1).Left = Text(a1).Left - 400Text(a1).Visible = TruePrint Text(a1), Text(a1).Name, Text(a1).IndexText(a1) = Text(a1)
End SubExit - Command2 Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click()Unload Me 'Unload this formEnd
End Sub
txufyg y½dk*&rfudk Run ygu yHk(469)ygtwdkif;jrifawGU&rnfjzpfygonf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(469)
442uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Exchange Sort udk udk udk udk udk Visual Basic jzifha&;om;jcif;jzifha&;om;jcif;jzifha&;om;jcif;jzifha&;om;jcif;jzifha&;om;jcif;
atmufygtwdkif; Form wpfckudkwnfaqmuf&rnf/ yHk(470)/ 4if;wGif Label, TextBox, Command Button wdkYjzifhzefwD;xm;NyD; oufqdkif&m Properties rsm;udkjyifqif
jznfhpGufNyD;aemuf Command Button rsm;wGif atmufygy½dk*&rfrsm;udka&;om;&rnf/
Lable1 Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Label1AutoSize - TrueBackStype - 0 - TransparentCaption - How many number?Lable2 Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Label2AutoSize - TrueBackStype - 0 - TransparentCaption - Enter each number = >
yHk(470)
443uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Text1 Text Box Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Text1Alignment - 0 - Left JustifiedIndex - EmptyLocked - FalseText - EmptyText2 Text Box Properties twGuftwGuftwGuftwGuftwGuf
(Name) - TextAlignment - 0 - Left JustifiedIndex - 1Locked - FalseText - EmptyCommand1 Command Button Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Command1Caption - &Add (Text Box)Enabled - TrueCommand2 Command Button Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Command2Caption - &Exchange SortEnabled - TrueCommand3 Command Button Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Command3Caption - E&xitEnabled - TrueForm1 Form Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Form1Enabled - TrueCaption - Exchange Sort (Ascending Order)
Object: General, Proc: [Declaration] twGuftwGuftwGuftwGuftwGuf
Dim num1, n, k(50) As IntegerAdd (Text Box) - Command1 Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click()n = Val(Text1)
444uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Text1.Locked = TrueIf num1 = 0 Then num1 = 1If num1 > n Then Exit Subnum1 = num1 + 1Load Text(num1)b1 = Text(num1).Name 'Text(num1).Name="Text"b2 = Text(num1).Index 'Text(num1).Index = num1+1Text(num1).Locked = TrueText(num1).Top = Text(num1 - 1).Top + 400Text(num1).Left = Text(num1).Left - 400Text(num1).Visible = TruePrint Text(num1), Text(num1).Name, Text(num1).Indexi = Text(num1).Index - 1k(i) = Text(num1)Print k(i), i
End SubExchange Sort - Command2 Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click()ClsFor i = 1 To n - 1
For j = 1 To n - 1If k(j) <= k(j + 1) Then GoTo 100t = k(j): k(j) = k(j + 1): k(j + 1) = t
100 Next jNext iFor x = 1 To n
Print k(x)Next
End SubExit - Command3 Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command3_Click()Unload MeEnd
End Subtxufyg y½dk*&rfudk Run ygu yHk(471)ygtwdkif;jrifawGU&rnfjzpfygonf/
445uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(471)
446uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Counting Sort udk udk udk udk udk Visual Basic jzifha&;om;jcif;jzifha&;om;jcif;jzifha&;om;jcif;jzifha&;om;jcif;jzifha&;om;jcif;
atmufygtwdkif; Form wpfckudkwnfaqmuf&rnf/ yHk(472)/ 4if;wGif Label, TextBox, Command Button wdkYjzifhzefwD;xm;NyD; oufqdkif&m Properties rsm;udkjyifqif
jznfhpGufNyD;aemuf Command Button rsm;wGif atmufygy½dk*&rfrsm;udka&;om;&rnf/
Lable1 Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Label1AutoSize - TrueBackStype - 0 - TransparentCaption - How many number?Lable2 Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Label2AutoSize - TrueBackStype - 0 - TransparentCaption - Enter each number = >
yHk(472)
447uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Text1 Text Box Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Text1Alignment - 0 - Left JustifiedIndex - EmptyLocked - FalseText - EmptyText2 Text Box Properties twGuftwGuftwGuftwGuftwGuf
(Name) - TextAlignment - 0 - Left JustifiedIndex - 1Locked - FalseText - EmptyCommand1 Command Button Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Command1Caption - &Add (Text Box)Enabled - TrueCommand2 Command Button Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Command2Caption - &Counting SortEnabled - TrueCommand3 Command Button Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Command3Caption - E&xitEnabled - TrueForm1 Form Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Form1Enabled - TrueCaption - Counting Sort (Ascending Order)Object: General, Proc: [Declaration] twGuftwGuftwGuftwGuftwGuf
Dim num1, n, k(50), f(50), kount(50) As IntegerAdd (Text Box) - Command1 Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click()n = Val(Text1)Text1.Locked = True
448uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
If num1 = 0 Then num1 = 1If num1 > n Then Exit Subnum1 = num1 + 1Load Text(num1)b1 = Text(num1).Name 'Text(num1).Name="Text"b2 = Text(num1).Index 'Text(num1).Index = num1+1Text(num1).Locked = TrueText(num1).Top = Text(num1 - 1).Top + 400Text(num1).Left = Text(num1).Left - 400Text(num1).Visible = TruePrint Text(num1), Text(num1).Name, Text(num1).Indexi = Text(num1).Index - 1k(i) = Text(num1)Print k(i), iText(num1) = Text(num1)
End SubCounting Sort - Command2 Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click()ClsFor i = 1 To n
kount(i) = 1NextFor i = 2 To n
For j = 1 To i - 1If k(i) > k(j) Then
kount(i) = kount(i) + 1Else
kount(j) = kount(j) + 1End If
Next jNext iFor i = 1 To n
f(kount(i)) = k(i)Next
449uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
For x = 1 To nPrint f(x)
NextEnd SubExit - Command3 Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command3_Click()Unload MeEnd
End Subtxufyg y½dk*&rfudk Run ygu yHk(473)ygtwdkif;jrifawGU&rnfjzpfygonf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(473)
450uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Insertion Sort udk udk udk udk udk Visual Basic jzifha&;om;jcif;jzifha&;om;jcif;jzifha&;om;jcif;jzifha&;om;jcif;jzifha&;om;jcif;
atmufygtwdkif; Form wpfckudkwnfaqmuf&rnf/ yHk(474)/ 4if;wGif Label, TextBox, Command Button wdkYjzifhzefwD;xm;NyD; oufqdkif&m Properties rsm;udkjyifqif
jznfhpGufNyD;aemuf Command Button rsm;wGif atmufygy½dk*&rfrsm;udka&;om;&rnf/
Lable1 Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Label1AutoSize - TrueBackStype - 0 - TransparentCaption - How many number?Lable2 Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Label2AutoSize - TrueBackStype - 0 - TransparentCaption - Enter each number = >
yHk(474)
451uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Text1 Text Box Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Text1Alignment - 0 - Left JustifiedIndex - EmptyLocked - FalseText - EmptyText2 Text Box Properties twGuftwGuftwGuftwGuftwGuf
(Name) - TextAlignment - 0 - Left JustifiedIndex - 1Locked - FalseText - EmptyCommand1 Command Button Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Command1Caption - &Add (Text Box)Enabled - TrueCommand2 Command Button Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Command2Caption - &Insertion SortEnabled - TrueCommand3 Command Button Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Command3Caption - E&xitEnabled - TrueForm1 Form Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Form1Enabled - TrueCaption - Counting Sort (Ascending Order)
Object: General, Proc: [Declaration] twGuftwGuftwGuftwGuftwGuf
Dim num1, n, k(50) As Integer
452uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Add (Text Box) - Command1 Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click()n = Val(Text1)Text1.Locked = TrueIf num1 = 0 Then num1 = 1If num1 > n Then Exit Subnum1 = num1 + 1Load Text(num1)b1 = Text(num1).Name 'Text(num1).Name="Text"b2 = Text(num1).Index 'Text(num1).Index = num1+1Text(num1).Locked = TrueText(num1).Top = Text(num1 - 1).Top + 400Text(num1).Left = Text(num1).Left - 400Text(num1).Visible = TruePrint Text(num1), Text(num1).Name, Text(num1).Indexi = Text(num1).Index - 1k(i) = Text(num1)Print k(i), iText(num1) = Text(num1)
End Sub
Insertion Sort - Command2 Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click()ClsFor i = 2 To n
current = k(i)j = i - 1
70 If j < 1 Or current >= k(j) Then GoTo 100k(j + 1) = k(j)j = j - 1GoTo 70
100 k(j + 1) = currentNext i
453uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Do While j >= 1 And current < k(j)k(j + 1) = k(j)j = j - 1
LoopFor x = 1 To n
Print k(x)Next
End Sub
Exit - Command3 Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command3_Click()Unload MeEnd
End Subtxufyg y½dk*&rfudk Run ygu yHk(475)ygtwdkif;jrifawGU&rnfjzpfygonf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(475)
454uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Selection Sort with Exchange udk udk udk udk udk Visual Basic jzifha&;om;jcif;jzifha&;om;jcif;jzifha&;om;jcif;jzifha&;om;jcif;jzifha&;om;jcif;
atmufygtwdkif; Form wpfckudkwnfaqmuf&rnf/ yHk(476)/ 4if;wGif Label, TextBox, Command Button wdkYjzifhzefwD;xm;NyD; oufqdkif&m Properties rsm;udkjyifqif
jznfhpGufNyD;aemuf Command Button rsm;wGif atmufygy½dk*&rfrsm;udka&;om;&rnf/
Lable1 Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Label1AutoSize - TrueBackStype - 0 - TransparentCaption - How many number?Lable2 Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Label2AutoSize - TrueBackStype - 0 - TransparentCaption - Enter each number = >
yHk(476)
455uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Text1 Text Box Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Text1Alignment - 0 - Left JustifiedIndex - EmptyLocked - FalseText - EmptyText2 Text Box Properties twGuftwGuftwGuftwGuftwGuf
(Name) - TextAlignment - 0 - Left JustifiedIndex - 1Locked - FalseText - EmptyCommand1 Command Button Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Command1Caption - &Add (Text Box)Enabled - TrueCommand2 Command Button Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Command2Caption - &Selection Sort with ExchangeEnabled - TrueCommand3 Command Button Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Command3Caption - E&xitEnabled - TrueForm1 Form Properties twGuftwGuftwGuftwGuftwGuf
(Name) - Form1Enabled - TrueCaption - Selection Sort with Exchange (Ascending Order)
Object: General, Proc: [Declaration] twGuftwGuftwGuftwGuftwGuf
Dim num1, n, k(50) As Integer
456uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
Add (Text Box) - Command1 Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command1_Click()n = Val(Text1)Text1.Locked = TrueIf num1 = 0 Then num1 = 1If num1 > n Then Exit Subnum1 = num1 + 1Load Text(num1)b1 = Text(num1).Name 'Text(num1).Name="Text"b2 = Text(num1).Index 'Text(num1).Index = num1+1Text(num1).Locked = TrueText(num1).Top = Text(num1 - 1).Top + 400Text(num1).Left = Text(num1).Left - 400Text(num1).Visible = TruePrint Text(num1), Text(num1).Name, Text(num1).Indexi = Text(num1).Index - 1k(i) = Text(num1)Print k(i), iText(num1) = Text(num1)
End Sub
Selection Sort with Exchange - Command2 Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command2_Click()ClsFor i = 1 To n - 1
mini = k(i): idx = iFor j = i + 1 To n
If k(j) >= mini Then GoTo 10mini = k(j): idx = j
10 Next jk(idx) = k(i): k(i) = mini
Next iFor i = 1 To n
Print k(i)Next
457uuuGefuuuGefuuuGefuuuGefuuuGef
Microsoft Visual Basic 6.0
For i = 1 To nPrint k(i)
NextEnd Sub
Exit - Command3 Button twGuftwGuftwGuftwGuftwGuf
Private Sub Command3_Click()Unload MeEnd
End Subtxufyg y½dk*&rfudk Run ygu yHk(477)ygtwdkif;jrifawGU&rnfjzpfygonf/
- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -
yHk(477)