VisualBasic6.0 in Burmese

464
uuuG e Microsoft Visual Basic 6.0 rmw um taMumif;t&m tcef; ( 1 ) 1/ Introduction pum;csD ; 1 2/ Visual Basic 6.0 pwi z i jci ; 1 3/ Creating an Application  *&rfwp c u  pwi tajcwn jci ; 2 4/ Create the interface tjye tvS e qufo , csufrsm;u  Bud Kwi pOf ;pm;jci ; 3 5/ Set Properties *kPf ow   d rsm;ud  kjyif qif jcif ; 6 6/ Write Code  k*&rfa&;jcif ; 9 7/ Factorial ½S  monfh y½dk*&rf a&;jcif ; 18 8/ Prime Number ud  ½S  mjci ; 23 tcef; ( 2 ) 9/ Menu wnfaqmuf jci ; 25 10/ Pulldown Menu wp ckjzp aom Test Buttons udka½G ;ygu jzpf vmrnf   Program udk a&;om;jcif ; 31 11/ Word Wrap and Autosize (Pulldown Menu) twG u Program a&;om;jci ; 33 12/ List Box (Pulldown Menu) tw u  Program a&;om;jci ; 34 13/ Check Box (Pulldown Menu) tw u  Program a&;om;jci ; 39 u tr w pOf pmrs u E m Home

Transcript of VisualBasic6.0 in Burmese

Page 1: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 1/463

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½d k*&rfwpfckud kpwiftajcwnfjcif; 2

4/ Create the interface tjyeftvSefqufoG,fcsufrsm;ud k

BudKwifpOf;pm;jcif; 3

5/ Set Properties *kPfowå  drsm;ud kjyifqifjcif; 6

6/ Write Code y½d k*&rfa&;jcif; 9

7/ Factorial ½S monfh y½dk*&rfa&;jcif; 18

8/ Prime Number ud k½S mjcif; 23

tcef; ( 2 )

9/ Menu wnfaqmufjcif; 25

10/ Pulldown Menu wpfckjzpfaom Test Buttons udka½G;ygu

jzpfvmrnf h 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

Home

Page 2: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 2/463

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;ud k  Windows yH kpHtwd kif;½S mazGjcif; 58

19/ Timer jzif htcsdefud kzefwD;jcif; 62

20/ tcsdefESifhywfoufaom Function rsm;ud k

Form

zefwD;íprf;oyfjcif; 65

tcef; ( 4 )

21/ ODBC ü Access File tm;toHk;jyKEd kifap&ef aqmif½Gufjcif; 70

22/ Visual Basic 6.0 wGif ODBC Data Sources qJ  Gwifjcif; 77

23/ Data Form Wizard wnfaqmufjcif; 78

24/ rdrdenf;jzif h Access File toH k;jyKaomy½dk*&rfa&;om;jcif; 85

taMumif;t&m

Page 3: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 3/463

uuuGefMicrosoft Visual Basic 6.0*

tcef; ( 5 )25/ String ESif hqd kifaomudpö&yfrsm; 91

26/ String Function rsm;ud ktoH k;jyKí udef;*Pef;rsm;wGufcsufjcif; 93

27/ String toH k;jyKí Fibonacci Sequence udef;pOfwef;ud k½S mjcif; 95

28/ Astrisk rsm;zefwD;jcif; 97

29/ Magic Square y½dk*&rfa&;om;jcif; 9830/ &m*Pef;½d kufxnf hygu 4if;udef;*Pef; 3 vH k;pvH k;aygif;jcif; 100

tcef; ( 6 )

31/ Mathematics ESif hqd kifaomudpö&yfrsm;

½d k;½d k;udef;pOfwef; 1, 2, 3, 4, ...? qwd k;udef; 1, 2, 4, 8, 16, ...?

xyfudef; 1, 4, 9, 16, 25, ... udef;pOfwef;wd k Yud k

y½d k*&rfa&;om;jcif; 104

32/ APudef;pOfwef;ud k y½d k*&rfa&;om;jcif; 105

33/ GPudef;pOfwef;udk y½d k*&rfa&;om;jcif; 107

34/ S = 1 + 2 + 3 + ... + N udef;pOfwef;wd k Yud  k aygif;jcif; 108

35/ S = 1 * 2 * 3 * ... * N udef;pOfwef;wd kYud k aygif;jcif; 109

36/ udef;pOfwef; S = 1 + 1/4 + 1/9 + ... + 1/N*N wd k Yud k½S  mazGjcif; 110

37/ udef;pOfwef; P = (2/3)(3/4)(4/5)...(N/N+1) wdk Yud k½S mazGjcif; 111

trSwfpOf pmrsufES mtaMumif;t&m

Page 4: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 4/463

uuuGefMicrosoft Visual Basic 6.0C

tcef; ( 7 )

38/ Access 2002 ½S  d Database File tm; Visual Basic 6.0 ESif h

Update jyKvkyfjcif; 113

39/ DataGrid jzif h Update jyKvkyfjcif; 119

40/ Access 2002 Database File wGif Field topfxyfxnf hí

Update vkyfjcif; 126

41/ Access 2002 Database File ½S  d Query File tm;ac:oHk;jcif; 130

tcef; ( 8 )

42/ Data Types rsm;\*kPfowådrsm; 135

43/ erlemy½d k*&rfrsm; 136

44/ Toolbox wGifyg0ifaom Icon rsm;ESif herlemy½d k*&rfrsm; 14945/ Microsoft Windows Common Controls

wGifyg0ifaom Icon rsm; 205

46/ Microsoft Calendar Control (Form twGif;jyu©'defxnf hjcif;) 223

47/ Execute File ud k y½d k*&rfjzif hvSrf;ac:toH k;jyKjcif; 224

48/ jr§m;rsm;ud kywfjcmvnfvSnf honf hy½d k*&rfud ka&;jcif; 226

trSwfpOf pmrsufES mtaMumif;t&m

Page 5: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 5/463

uuuGefMicrosoft Visual Basic 6.0i

trSwfpOf pmrsufESmtaMumif;t&m

tcef; ( 9 )

49/ Access 2002 ½S  d Database File xJrS

Table File wpfcktm;zGif hjcif; 229

50/ Access 2002 ½S  d Database File wpfckxJrS

Table File ESpfcktm; Updating jyKvkyfjcif; 235

51/ Access 2002 ½S  d Database File wpfckxJrS

Table File rsm;tm; Form wpfckjzif hzGif hjcif; 242

52/ Access 2002 ½S  d Database File trsm;pkxJrS

Table File trsm;pktm; Form wpfckjzif  h zGif hjcif; 246

53/ Access 2002 ½S  d Database File twGif;rS

Table File rsm;tm; Form wpfckjzif h Append jyKvkyfjcif; 252

54/ Access 2002 ½S  d Database File twGif;rS

Table File twGif;½S  d Record tm;½S mjcif; 255

tcef; ( 10 )

55/ Microsoft Visual 6.0 jzif h,cifoH k; Access zd kifwnfaqmufjcif; 258

56/ ,cifoH k;Access

zd kifudk Data Report

wnfaqmufíReport wnfaqmufjcif; 274

57/ ,cifoH k; Access zd kifudk Form wnfaqmufí"gwfyH krsm;Munf hjcif; 295

Page 6: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 6/463

uuuGefMicrosoft Visual Basic 6.0p

trSwfpOf pmrsufESmtaMumif;t&m

58/ Toolbox xJwGif Crystal Report Smart Icon xnf hjcif; 302

59/ Crystal Report wnfaqmufjcif; (,cif Access File  ) 304

60/ Crystal Report wnfaqmufjcif; (Access File 2000 txuf  ) 316

61/ Crystal Report jzifh Graphic File ½d kufxkwfjcif; 321

62/ Access zd kifud k Crystal Report wnfaqmufí

Print ½d kufxkwfjcif; 329

63/ Database File wpfcktwGif;½S  d

Table zd kifESpfckud ktoHk;jyKíuHprf;rJEI  dufjcif; 331

64/ ODBC jzif hzefwD;xm;aom Access zd kifud k

touf? vkyfouf? yifpif,lrnf hESpfwGufjcif; 358

65/ Visual Basic 6.0 jzif hzefwD;xm;aom

Access zd kifud k Printer jzif h½d kufxkwfjcif; 362

tcef; ( 11 )

66/ Visual Basic 6.0 jzif h Program wpfcktm;a&;NyD;

Execute File wnfaqmufjcif; 375

67/ Visual Basic 6.0 jzif h Program wpfcktm;a&;NyD;

Package jyKvkyfjcif; 381

68/ tjcm;uGefysLwmrsm;od k Y jyefvnf Install jyKvkyfjcif; 393

69/ InputBox a&;xHk;jzif h Password jyKvkyfjcif; 396

70/ omrefa&;xH k;jzif h Password jyKvkyfjcif; 400

Page 7: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 7/463

uuuGefMicrosoft Visual Basic 6.0q

trSwfpOf pmrsufESmtaMumif;t&m

tcef; ( 12 )71/ Microsoft Internet Explore zd kifud kqJ  G,ltoH k;csjcif; 405

tcef; ( 13 )

72/ Application Package rsm;ud ky½d k*&rfjzif hzGif hjcif; 436

tcef; ( 14 )taxGaxG

73/ Multiple List Box rsm;zefwD;jcif; 439

74/ Exchange Sort ud k Visual Basic jzif ha&;om;jcif; 442

75/ Counting Sort udk Visual Basic jzif ha&;om;jcif; 44676/ Insertion Sort ud k Visual Basic jzif ha&;om;jcif; 450

77/ Selection Sort with Exchange ud k

Visual Basic jzif ha&;om;jcif; 454

Page 8: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 8/463

1 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 Programmingrsm;a&;om;&mwGif toH k;jyKaom

Computer Language wpfckjzpfygonf/ ,cifu GWBASIC, BASIC, BASICA,

QBASIC wd k YrSwpfqif h ,cktcgwGif Visual Basic 4.0, Visual Basic 5.0, Visual

Basic 6.0 (Windows Mode) wGiftoH k;jyKEd kifaom Programming Language rsm;jzif ha&;om;cJ hMuygonf/ Visual rS  m tjrifESif houfqdkifaom[kt"dyÜ g,f&NyD; BASIC rSmBeginners All Purpose Symbolic Instruction Code [kt"dyÜ g,f&ygonf/

Visual Basic 6.0 pwifzGif hjcif;pwifzGif hjcif;pwifzGif hjcif;pwifzGif hjcif;pwifzGif hjcif;Windows 95 ESif h txufuGefysLwmpufwpfvH k;zGif hvd kufaomtcg Task Bar ay:wGif

Start ud k Mouse jzif h Left Click ES  dyf&rnf/ xd k Yaemuf Program tm;a½G;cs,fyg/ Sub-

Menu wpfckxyfrHay:vmrnf/ xd k Sub-Menu xJrS Microsoft Visual Basic 6.0

tm;a½G;ygu Visual Basic 6.0 tm;pwiftoH k;jyK&eftqifoif hjzpfaernf/ Desktop

nmzuftay:axmif hwGif Microsoft Office Short Cut Bar ½S  daeygu 4if; Bar wef;xJwGif Microsoft Visual Basic 6.0 Smart Icon jyyguvnf; Left Click ES  dyfjcif;jzif hvnf;aumif;? uGefysLwm Desktop ay:wGif Microsoft Visual Basic 6.0 Short Cut Icon

½S  daeyguvnf; 4if; Short Cut Icon ud k Double Click ES  dyfjcif;jzif hvnf;aumif; ac:,ltoH k;jyKEd kifayonf/

aemufwpfenf;rS m Start®®®®® Runud k Mouse Left Click vkyfvd kufygu yH k(1)ygtwd kif;Run Dialog Box ay:vmrnf/

yHk(1)

Contents

Page 9: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 9/463

2 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Open nmzuf½S  d List Box xJwGif Cursor 0ifaevdrf hrnf/ xd ktcg Browse ud ka½G;yg/VB6.EXE File ½S  d&mtqif hqif hod k Y0ifNyD; OK ud kES  dyfygu Visual Basic 6.0 yGif hvmrnf/yHk(2)/

Creating an Application y½d k*&rfwpfckud kpwiftajcwnfjcif;y½d k*&rfwpfckud kpwiftajcwnfjcif;y½d k*&rfwpfckud kpwiftajcwnfjcif;y½d k*&rfwpfckud kpwiftajcwnfjcif;y½d k*&rfwpfckud kpwiftajcwnfjcif;yxrOD;pG m Visual Basic Programming jzif h zm&if;[d kufrS pifwD*&dwfod k Yajymif;vJ

aomy½d k*&rfykpä muk  da&;om;&mwGif zm&if;[d kufrS pifwD*&dwfod k Yajymif;vJaom Formula

ud kod½S  d&rnf/ Oyrm - C = 5/9 * (F-32)

y½d k*&rfwpfckud ka&;om;&mwGif tqif h(3)qif h½S  donf/ 4if;wd k YrS m1. Create the interface

2. Set Properties

3. Write Code

yH k(2)

Contents

Page 10: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 10/463

3 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Create the interface tjyeftvSefqufoG,fcsufrsm;ud kBudKwifpOf;pm;jcif;tjyeftvSefqufoG,fcsufrsm;ud kBudKwifpOf;pm;jcif;tjyeftvSefqufoG,fcsufrsm;ud kBudKwifpOf;pm;jcif;tjyeftvSefqufoG,fcsufrsm;ud kBudKwifpOf;pm;jcif;tjyeftvSefqufoG,fcsufrsm;ud kBudKwifpOf;pm;jcif;yxrOD;pG m Project topfwpfckud kzefwD;&rnf/ xd k YaMumif h Menu Bar wGif½S  daom

File ud ka½G;yg/ Pulldown Menu (or) Dropdown Menu wpfckay:vmrnf/ 4if;xJrS

New Project ud ka½G;&rnf/ yH k(3)/

xd ktcg New Project Dialog Box wpfckay:vmNyD; yH krSeftm;jzif h Standard EXESmart Icon a½G;cs,fjcif;cHae&ygu OK ud ka½G;cs,f&ygrnf/ yk  H(4)/

yH k(3)

Contents

Page 11: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 11/463

4 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

zm&if;[d kufrS pifwD*&dwfod k Yajymif;vJrnf h y½d k*&rfa&;om;&ef Form1 qd konf h Form

yH kpHwpfckay:vmrnf/ yH k(5)/

yH k(4)

yH k(5)

Contents

Page 12: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 12/463

5 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

4if; Form yH kpHwGif Text, Memory Variable rsm;zefwD;&eftwGuf Visual Basic

wGiftqifoif hyg½S  daeaom Toolbox ud kac:,l&rnfjzpfygonf/ Toolbox ud krawG UyguMenu Bar ½Sd View rSwqif ha½G;yg/ yH k(6)/ xd ktcg Toolbox ay:vmayrnf/ yH k(7)/

  Icon ud ktoH k;jyKí Fahrenheit Degree, Centigrade Degree rsm;ud k

Form xJwGifa&;om;&rnf/ yH k(8)/

yHk(6)

yH k(7)

yHk(8)

Contents

Page 13: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 13/463

6 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

þuJ hod k Y Fahrenheit Degree, Centigradersm;ud k zefwD;&mwGif Form1xJod k Y Label

Icon ud ka½G;í Drag and Drop vkyfyg&ef/ xd ktcg Form1 xJwGif yH k(9)ygyH kpHtwd kif;jzpfaernf/

Set Properties *kPfowÅ   drsm;ud kjyifqifjcif;*kPfowÅ   drsm;ud kjyifqifjcif;*kPfowÅ   drsm;ud kjyifqifjcif;*kPfowÅ   drsm;ud kjyifqifjcif;*kPfowÅ   drsm;ud kjyifqifjcif;Label [kazmfjyonf h Text Frame ud kjrifawG U&rnfjzpfNyD; 4if; Text Frame ay:rS

Mouse Right Click ud kES  dyfygu Short Cut Menu wpfckay:vmrnf/ yH k(10)/

yH k(9)

yH k(10)

Contents

Page 14: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 14/463

7 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

4if; Short Cut Menu \atmufqH k;jzpfaom Properties ud ka½G;yg/ xd ktcg La-

bel1 ESif h oufqd kifaom Properties ud k yH k(11)ygtwd kif;jrifawG U&rnf/

yH k(11)yg Properties - Label1 xJ½S  d Label1 Label wGifyg0ifaomtcsufrsm;ud k

atmufygtwd kif;jyifqif&rnf -AutoSize - True

BackStyle - 0 - Transparant

Caption - Fahrenheit Degree = = = >

Font - Font Size - 12, Font Style - Bold

[kjyifqifjznf hpGufNyD; Properties \ Close Button ud ka½G;&rnfjzpfonf/xd kenf;wl Centigrade Degree = = = > ud kvnf; txufygtwd kif;zefwD;&rnf/

xd k Yaemuf Keyboard rS ocsF mqd kif&mudef;*Pef;rsm;½d kufxnf h&ef Text Box Icon jzifhFahrenheit Degree = = = > \nmzufwGifxyfrHzefwD;&ef/ xd k Yaemuf Right Click 

xyfrHES  dyfyg&ef/ xd ktcg Short Cut Menu wpfckxyfrHay:vmrnf/ yH k(12)/

yH k(11)

Contents

Page 15: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 15/463

8 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

4if;rS Short Cut Menu \atmufqH k;jzpfaom Properties ud ka½G;cs,f&rnf/ xd ktcgProperties - Text1 Text1 TextBox ay:vmrnf/ yH k(13)/

Text1 TextBox Properties wGifatmufygwd k Yud kjyifqif&ef-Font - Font Size - 12, Font Style - Bold

Text - Empty

[kjyifqifjznf hpGufNyD; Properties \ Close Button ud k Left Click vkyfyg/ xd ktcgText1 TextBox Properties ydwfoG m;vdrf hrnf/ xd kenf;wl Text2 ud kvnf; Text1 enf;wl

yH k(12)

yH k(13)

Contents

Page 16: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 16/463

9 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

zefwD;xm;&rnf/ yH k(14)/ Text1 rS m zm&if ;[d kuf'D*&DtwGufjzpfí Text2 rS m pifwD*&dwf'D*&DtwGufjzpfygonf/

Write Code y½d k*&rfa&;jcif;y½d k*&rfa&;jcif;y½d k*&rfa&;jcif;y½d k*&rfa&;jcif;y½d k*&rfa&;jcif;Fahrenheit Degree ½d kufoGif;&efjzpfaom Text Box ü*Pef;wpfck½d kufNyD; <En-

ter> ud kES  dyfyg/ Centigrade Degree ud koufqd kif&m Text Box üazmfjyrnfjzpfonf/Centigrade Degree ½d kufoGif;&efjzpfaom Text Box ü*Pef;wpfck½d kufNyD; <Enter>

udkESdyfygu Fahrenheit Degree ud koufqd kif&m Text Box ütjyeftvSefazmfjyrnfjzpfonf/ þuJ hod k YjyKvkyfí&Ed kifap&ef  Text1, Text2 TextBox wd k YwGif  View Code

(or) Program rsm;a&;om;&rnfjzpfonf/ Program a&;om;&mü Text1 Box wGifDouble Click ES  dyf&rnf/ xd ktcg Program a&;om;&eftqifoif htajctaeay;vmrnf/yHk(15)/

yH k(14)

yHk(15)

Contents

Page 17: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 17/463

10 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Text1 Text Box ud k Double Click ES  dyfí Private Sub Text1_Change() ESif hEnd Sub ay:vmygu Procedure List Box ud k Change tpm; KeyPress [kajymif;&rnf/ xd k Yaemuf Private Sub Text1_KeyPress(KeyAscii As Integer) ESifh End

Sub tMum;wGif atmufyg Program ud ka&;om;&efjzpfonf/ yH k(16)/

xd kenf;wl Text2 Text Box ud k Double Click ES  dyfí Private Sub Text2_Change

ESif h End Sub ay:vmygu Procedure List Box ud k Change tpm; KeyPress [kajymif;&rnf/ xd k Yaemuf Private Sub Test2_KeyPress(KeyAscii As Integer) ESif hEnd Sub tMum;wGif atmufyg Program ud ka&;om;&efjzpfonf/ yH k(17)/

4if;zd kifud k odrf;vd kygu Menu Bar ½S  d File ud ka½G;NyD; Pulldown Menu wGifyg0ifaomSave Project ud ka½G;&efjzpfonf/ yH k(18)? xd ktcg Save File as Dialog Box ay:vm

rnf/ File Name List Box wGif extest001 [ka&;NyD; Save ud k Mouse Left Click vkyf&rnf/ yH k(19)/

yH k(16)

yH k(17)

Contents

Page 18: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 18/463

11 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(18)

yHk(19)

xd ktcg Save Project As Dialog Box ay:vmNyD; File Name List Box wGifextest1 [ka&;NyD; Mouse Left Click vkyf&rnf/ yH k(20)/ yxrodrf;aomzd kifrS m Form

File, Extension rS m .frm jzpfNyD; 'kwd,trnfjzif hodrf;aomzd kifrS m Visual Basic Project

File, Extension rS m .Vbp jzpfygonf/

Contents

Page 19: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 19/463

12 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd ktcg Project - Project Dialog Box wGif Project1(extest001.vbp)ESif h Form1

(extest001.frm) [líyH k(21)ygtwd kif;jzpfay:vmayrnf/

ud k Click vkyfygu extest001 yH kpHay:vmrnfjzpfNyD; 4if; Form

ud kydwfvd kufygu Close Button ud ka½G;&rnf/ yH k(22)/ ud k Click vkyfyguProgram a&;om;xm;onfrsm;ud kawG U½S  d&rnf/ yH k(23)/

yH k(20)

yH k(21)

Contents

Page 20: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 20/463

13 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yHk(22)

yH k(23)

txufyg Project File jzpfaom extest001 ud k Run vd kygu Menu Bar ½Sd Run

ud ka½G;yg/ xd k Yaemuf Start ud ka½G;yg/ yH k(24)? (od k Yr[kwf ) Short Cut Key (or) Short

Hand Key taejzif h Function Key jzpfaom F5 ud kES  dyfívnf;&Ed kifayonf/ (od k Yr[kwf )Menu Bar atmuf½S  d Standard Toolbar rS Icon ud k Left Click ES  dyfjcif;jzif hvnf;&Ed kifayonf/ xd ktcg yH k(25)ygtwd kif; Text Box xJwGif Cursor tqifoif ha&muf½S  daernf/

yH k(24)

Contents

Page 21: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 21/463

14 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(25)

zm&if;[d kuf'D*&Dud kxnfhNyD; <Enter> ES    dyfygu pifwD*&dwf'D*&DtajcwGufay;rnf/pifwD*&dwf'D*&Dud kxnf hNyD; <Enter> ES  dyfyguvnf; zm&if;[d kuf'D*&Dud kwGufay;rnf/ rdrdBuKdufESpfouf&m Text Box ud k*Pef;½d kufxnf hNyD; <Enter>ES  dyfEd kifonf htcGif hta&;½S  donf/4if; Form tm;ydwfvd kufygu Form1 \nmzuftay:axmif hwGif½S  daom Close But-

ton ud ka½G;&rnf/Visual Basic 6.0 xJrS xGufvd kygu Menu Bar ½S  d  File ud ka½G;NyD; Pulldown

Menu \atmufqH k;jzpfaom Exit ud ka½G;&ygrnf/ xd ktcg Microsoft Visual Basic

Dialog Box wpfckay:vmrnf/ Yes ud ka½G;ygu aemufqH k; Current Project, Form

File wd k Yud kodrf;oG m;NyD; Microsoft Visual Basic rSxGufoG m;ayrnf/ No ud ka½G;ygurodrf;bJxGufoG m;ayrnf/ Cancel ud ka½G;ygu Microsoft Visual Basic 6.0 rSrxGufbJ,ciftwd kif;tvkyfvkyfEd kifrnfjzpfygonf/ yH k(26)/

yH k(26)

Contents

Page 22: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 22/463

15 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

½SdNyD;om; extest001 File ud kzGifhvdkygu Menu Bar ½Sd File udka½G;yg/ xd ktcgPulldown Menu ay:vmrnf/ 4if;rS ud ka½G;yg/ xd ktcg Open

Project Dialog Box ay:vmNyD; 4if;rS  extest001.vbp ud ka½G;í Open ud k  Click 

ES  dyf&efjzpfonf/ yH k(27)/

od k Yr[kwf extest001 File ud kzGif hvd kygu Menu Bar ½S  d File ud ka½G;yg/ Exit tay:½S  dRecent File xJwGif extest001.vbp ud ka½G;yguvnf; yGif hvmrnfjzpfonf/ yH k(28)/

yH k(27)

Contents

Page 23: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 23/463

16 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(28)

þuJ hod k Y zd kifzGif hvd kufaomtcg wcgw&H Project File rawG U½S  dygu Menu Bar ½SdView ud ka½G;yg/ 4if;rS Pulldown Menu wpfckjzpfaom Project Explorer ud ka½G;yg/od k Yr[kwf Short Cut Key jzpfonf h Ctrl+R udkES  dyfyg/ yHk(29)/

Contents

Page 24: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 24/463

17 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd ktcg yH k(30)wGifazmfjyxm;onf htwd kif; extest001 Dialog Box ay:vmayrnf/  , wd k Yud k toH k;jyKí Project File ud kjyefvnfjyKjyifodrf;Ed kif

ayonf/

yHk(29)

yHk(30)

Contents

Page 25: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 25/463

18 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Factorial ½S monfh y½dk*&rfa&;jcif;½S monf h y½d k*&rfa&;jcif;½S monfh y½dk*&rfa&;jcif;½S monf h y½d k*&rfa&;jcif;½S monf h y½d k*&rfa&;jcif;atmufygyH k(31)ygtwd kif; Visual Basic wGifzefwD;xm;&rnf/

Title Bar wGif ½kyfyH kESif hwuG Factorialpmom;xnf hoGif;&mwGif Properties ü Form1

Form ud ka½G;yg/ xd k Yaemufatmufygwd k Yud kjyifqif&ef/ yH k(32)/

yH k(31)

yHk(32)

Contents

Page 26: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 26/463

19 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Caption - Factorial

Icon - C:\Program Files\Microsoft Visual Studio\Common\  

Graphics\Icon\Misc xJrSoif hawmf&m½kyfyH kud ka½G;xnf hjcif;jzpf

onf/

Run ESif h Exit onf Command Button rsm;jzpfMuNyD; 4if;wd k Y\oufqd kif&m Prop-

erties rsm;ud kvnf; atmufygtwd kif;pDrHxm;&rnf? Run Command Button wGif -Caption - &Run

Font - MS Sans Serif, Font Style ®®®®® Bold, Font Size ®®®®® 10

Exit Command Button wGif -Caption - E&xit

Font - MS Sans Serif, Font Style ®®®®® Bold, Font Size ®®®®® 10

Exit Command Button wGifatmufyg Program ud ka&;om;&ef-Private Sub Command2_Click()

Unload Me

End

End Sub

Run Command Button wGifatmufyg Program ud ka&;om;&ef-Private Sub Command1_Click()

' Write a program to find the factorial of a given integer:

N! = 1*2*3*4*5*...*N

Cls

a = Text1

kount = 1: k = 1

Do While k < a + 1

kount = kount * k 

k = k +1

loop

print "Requirement Answer = = = > ", kount

Text2 = kount

End Sub

Contents

Page 27: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 27/463

20 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Factorial Program ud ka&;om;&mwGif Do ... Loop a&;xH k;ud k odoif honf/ Do ...

Loop a&;xH k;rS m atmufygtwd kif;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&rnf hudpörsm;wGif txufyg Do ... Loop a&;xH k;ud ktoH k;jyK onf/ xd ktcg Text1 Text Box xJwGif Cursor 0ifaernfjzpfNyD; 4if;wGif *Pef;wpfckck½d kufxnf h&rnf/ Oyrm - 4 [k½d kufNyD; Run Command Button ud k Click vkyfyguPrivate Sub Command1_Click() ESif h End Sub Mum;½S  d Command rsm;ud kwpfaMumif;csif;tvkyfvkyfoG m;rnf/ Cls a&;xH k;rS m Form ay:wGiftjcm;udpörsm;a&;xm;ygu ½Sif;vif;ypf&efjzpfygonf/ a = Text1 rS m a xJwGif 4 a&muf½S  dvmrnf/ kount = 1 rS m kount xJwGif 1 a&muf½S  dvmrnf/ k = 1 rS m k xJwGif 1 ud kxnf hxm;rnf/ Do While k<a+1 rS m,cktcsdefwGif k \wefzd k;rS m 1 jzpfaernf/ a \wefzd k;rS m 4 jzpfaeNyD; 1 jzif haygif;ygu 5jzpfrnf/ 1 onf 5 xufi,faeojzif h qufvkyf&efjzpfonf/ xd k YaMumif h k wefzd k;onf 5xufi,faeoíqufvkyfrnfud kajymjcif;jzpfonf/ k = kount * k rS m kount \wefzd k;rS m

1? k \wefzd k;rS m 1? 4if ;ESpfckajr§ mufygu 1 om&rnf/ Left Hand Side jzpfaom kountxJwGif 1 a&muf½S  doG m;rnf/ atmufwpfaMumif;qif;vmygu k \wefzd k;rS  m 1? 1 jzifhaygif;aomaMumif h 2 &rnf/ 4if;wefzd k;ud k Left Hand Side jzpfaom k xJwGif 2 a&muf½S  doG m;rnf/ atmufwpfaMumif;jzpfaom Loop od k Yqufrqif;bJ Do While k<a+1 od k YjyefwufNyD; Condition ud kpdppfrnf/ k \wefzd k;rS m ,cktcg 2 jzpfae rnf/ 2 onf 5 xufi,faeojzif h atmufwpfaMumif;jzpfaom kount = kount * k od k Y qif;vmrnf/ kount

Contents

Page 28: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 28/463

21 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

\wefzd k;onf 1 jzpfNyD; k wefzd k;rS m 2 jzpfaomaMumif h 2 ESif h 1 ajr§ mufygu 2 &rnf/4if; wefzd k; kount xJa&mufoGm;rnf/ atmufwpfaMumif;qif;ygu k = k +1

jzpfoG m;ayrnf/ xH kpHtwd kif; Do While k<a+1 od k YjyefwufNyD; Condition ud kpdppfayrnf/

k  \wefz d k ;r Sm ,cktcg 3 jzp faernf/ 3 onf 5 xufi,faeojzi f hatmufwpfaMumif;jzpfaom kount = kount * k od k Yqif;vmrnf/ kount \wefzd k;onf2 jzpfNyD; k \wefzd k;rS m 3 jzpfvmaom aMumif h 2 ESif h 3 ajr§ mufygu 6 &rnf/ 4if;wefzd k;tm;kount xJa&mufoG m;rnf/ atmuf wpfaMumif;quf qif;ygu k = k + 1 ud kawG Urnf/k \wefzd k;rS m 3 jzpfí 3 ESif h 1 ud k aygif;ygu 4 &rnf/ k \wefzd k;rS m 4 jzpfoG m;ayrnf/xH k;pHtwd kif; Do While k<a+1 od k YjyefwufNyD; Condition ud kpdppfrnf/ k \wefzd k;rS m,cktcg 4 jzpfaernf/ 4 onf 5 xufi,faeojzif h atmufwpfaMumif;jzpfaMumif;

kount = kount * k od k Yqif;vmrnf/ kount \wefzd k;onf 6 jzpfNyD; k \wefzd k;rS m 4jzpfaomaMumif h 6 ESif h 4 ajr§ mufygu 24 &rnf/ 4if;wefzd k; kount xJa&mufoG m;rnf/atmufwpfaMumif;qufqif;ygu k = k + 1 ud kawG Urnf/ k \wefzd k;rS m 4 jzpfí 4 ESif h1 ud kaygif;ygu 5 &rnf/ k \wefzd k;rS  m 5 jzpfoG m;ayrnf/ xH k;pHtwd kif; Do While

k<a+1 od k YjyefwufNyD; Condition ud kpdppfrnf/ k \wefzd k;rS m ,cktcg 5 jzpfaernf/ 5onf 5 xufi,faeojzif h Condition rS m;oG m; ayrnf/ xd ktcg Do While ... Loop

\ atmufwpfaMumif;jzpfaom Print "Requirement Answer = = = > ", kount

od k Yqif;vmayrnf/ Form \b,fbufaxmif hwGif  "Requirement Answer = = = >

pmom;ay:vmNyD; 24 [kazmf jyrnf/ Text2 xJwGifvnf; tajzjzpfaom 24

udkazmfjyaernfjzpfonf/ykpämykpä mykpämykpä mykpä m-

2 jzif hpm;u 1 <uif;rnf/ 3 jzif hpm;ygu 2 <uif;rnf/ 5 jzif hpm;ygu 4 <uif;rnf/ 72 jzif hpm;u 1 <uif;rnf/ 3 jzif hpm;ygu 2 <uif;rnf/ 5 jzif hpm;ygu 4 <uif;rnf/ 72 jzif hpm;u 1 <uif;rnf/ 3 jzif hpm;ygu 2 <uif;rnf/ 5 jzif hpm;ygu 4 <uif;rnf/ 72 jzif hpm;u 1 <uif;rnf/ 3 jzif hpm;ygu 2 <uif;rnf/ 5 jzif hpm;ygu 4 <uif;rnf/ 72 jzif hpm;u 1 <uif;rnf/ 3 jzif hpm;ygu 2 <uif;rnf/ 5 jzif hpm;ygu 4 <uif;rnf/ 7jzif hpm;ygu 6 <uif;rnf/ 4if;udef;wefzdk;ud k½Sm&ef/jzif hpm;ygu 6 <uif;rnf/ 4if;udef;wefzd k;ud k½S m&ef/jzif hpm;ygu 6 <uif;rnf/ 4if;udef;wefzdk;ud k½Sm&ef/jzif hpm;ygu 6 <uif;rnf/ 4if;udef;wefzd k;ud k½S m&ef/jzif hpm;ygu 6 <uif;rnf/ 4if;udef;wefzd k;ud k½S m&ef/

atmufazmfjyyg yH k(33)ygtwd kif; Visual Basic wGifzefwD;xm;yg&ef/

yH k(33)

Contents

Page 29: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 29/463

22 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Exit Command Button wGifatmufyg Program ud ka&;om;&ef-Private Sub Command2_Click()

Unload MeEnd

End Sub

Run Command Button wGifatmufyg Program ud ka&;om;&ef-Private Sub Command1_Click()

a = 1: Check = True

Do ' While Check = True

If a Mod 2 = 1 And a Mod 3 = 2 And a Mod 5 = 4

And a Mod 7 = 6 Then

Exit Do ' Exit Inner Loop

Else

a = a + 1

End If 

Loop Until Check = False 'Exit Outer Loop Immediately

Print "Requirement Answer = > ", a

Text1 = a

End Sub

txufyg Program ud k Run ygu tajzonf 209 &rnf/ 4if; Program ud ka&;&mwGif Mod (Modulus) Operator a&;xH k;ud k odoif honf/Syntax;

result = number1 Mod number2

A = 7 Mod 4, A ®®®®® 3

A = 7 Mod 3, A ®®®®® 1

Mod onf Operator jzpfonf/

Contents

Page 30: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 30/463

23 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Prime Number udk½S mjcif;ud k½Smjcif;udk½S mjcif;ud k½Smjcif;udk½S mjcif;atmufygyH k(34)ygtwd kif; Visual Basic wGifzefwD;xm;&rnf -

Exit Command Button wGifatmufyg Program ud ka&;om;&ef-Private Sub Command2_Click()

Unload Me

End

End SubRun Command Button wGifatmufyg Program ud ka&;om;&ef-

Private Sub Command1_Click()

'To determine whether the given number is Prime Number

Cls

mp = Text1

mc = 2

Do While Not (mp Mod mc = 0 And mc <= mp)

mc = mc + 1Loop

Print: Print

Print "MP ", mp

Print "MC ", mc

If Text1 = mc Then

Print

Print mp, " is a Prime Number."

Else

PrintPrint mp, " does not Prime Number."

End If 

End Sub

yHk(34)

Contents

Page 31: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 31/463

24 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

tu,fírdrdpdwfBuKduf*Pef;ud k½d kufoGif;NyD; 2 ESif h rdrd½d kufoGif;onf h *Pef;Mum; Prime

Number ta&twGufud k½S mvd kygu yH k(35)ygtwd kif; zefwD;wnfaqmuf&ef -

Exit Command Button wGifatmufyg Program ud ka&;om;&ef-Private Sub Command2_Click()

Unload Me

End

End Sub

Run Command Button wGifatmufyg Program ud ka&;om;&ef-Private Sub Command1_Click()

Cls

d = 1

pp = 2

zz = Val(Text1)Do While pp < zz

mc = 2

Do While Not (pp Mod mc = 0 And mc <= pp)

mc = mc + 1

Loop

If mc = pp Then

d = d + 1

Print mc;End If 

pp = pp + 1

Loop

Text2 = d - 1

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(35)

Contents

Page 32: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 32/463

25 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 ... ud ka½G;yg/ yH k(36)/ xd ktcg Menu Editor

Dialog Box wpfckay:vmrnf/ yH k(37)/

Caption nmzuf½S  d Box wGif &Options [ka&;&ef/ Name nmzuf½S  d Box wGifOptions [ktrnfowfrSwf&ef/ xd ktcg atmufzuf½S  d List Box wGif yH k(38)ygtwd kif;jzpfay:vmrnf/

yH k(36)

yH k(37)

Contents

Page 33: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 33/463

26 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

txufygyH k(38)wGif OK ud k Mouse Left Click vkyfygu yH k(39)ygtwd kif;jzpfay:vmrnf/ 4if;onf Menu Bar jzpfonf/

yH k(38)

yH k(39)

Contents

Page 34: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 34/463

27 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd k Yaemuf  Pulldown Menu rsm;ud kqufvufzefwD;&rnf/ Menu Bar rS  Tools

Menu udkjyefa½G;yg/ xd k Yaemuf Pulldown Menu xJrS  Menu Editor ... udka½G;yg/xd ktcg Menu Editor Dialog Box jyefvnfay:vmrnf/ Command Button wpfckjzpf

aom ud ka½G;yg/ xd k Yaemuf Caption List Box ü &Test Buttons ud kjznf hpGufyg/ Name List Box ü TestButtons ud kjznf hpGufNyD; ud ka½G;yg/ TestButtons ud kuyfía&;&rnf/ Test ESif h Buttons ud kcG gíra&;&yg/ yH k(40) wGifazmfjyxm;onf htwd kif;jzpfvmygu OK ud k Click vkyfyg/

xd ktcg yH k(41)wGifazmfjyxm;ouJ hod k Y Test Buttons onf Pulldown Menu (or)

Dropdown Menu wpfckjzpfvmrnf/

yH k(40)

Contents

Page 35: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 35/463

28 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

txufygenf;twd kif; Caption List Box wGif &Word Warp and Autosize,

&Check Box, &Number System, &List Box wdkYESifh Name List Box wGifWordWrapandAutosize, CheckBox, NumberSystem, ListBox wd k Yud kjznf hpGufNyD;OK ud k  Left Click vkyfygu yH k(42)wGifjrif&onfhtwdkif; Pulldown Menu (or)

Dropdown Menu rsm;toD;oD;jzpfvmrnf/

yH k(41)

yH k(42)

Contents

Page 36: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 36/463

29 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Pulldown Menu wpfckjzpfaom List Box ud k Mouse Left Click ES  dyfygu aemufxyf Sub-Menu wpfckay:xGufapvd kygu Menu Editor ... ud kjyefac:íud ka½G;yg/ xd k Yaemuf ud ka½G;yg/ Caption List Box wGif N&umber, T&ext wd k YESif h

Number List Box wGif Number, Text wd k Yud kjznf hpGufNyD; OK ud k Mouse Left Click vkyfygu yH k(43)wGif jrif&onf htwd kif; Pulldown Menu (or) Dropdown Menu rsm;toD;oD;jzpfvmrnf/

tqdkyg Pulldown Menu wpfckjzpfaom List Box onf  Word Wrap and

Autosize ESif h Check Box Mum;wGif ae&mjyefvnfajymif;a½T Uvd kygu Menu Bar ½SdTools ud ka½G;yg/ Dropdown Menu wpfckjzpfaom Menu Editor ... ud kjyefvnfa½G;yg/...&Check Box ud ka½G;í Dropdown Arrow jzif hatmufqH k;ud k a&mufatmifa½T U&ef/xd kenf;wl  ...&Number System ud kvnf; atmufqH k;od k Ya&mufatmifa½T UNyD; OK ud k

Click vkyfjcif;jzif h &½S  dEd kifayonf/ yH k(44)? xd ktcg yH k(45)ygtwd kif; Menu ajymif;vJoG m;ayrnf/

yH k(43)

Contents

Page 37: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 37/463

30 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Form1 Menu xJrSxGuf&ef Command Button jzif h Exit ud kzefwD;í xH k;pHtwd kif;y½d k*&rfa&;om;&rnf/ yH k(46)/Private Sub Command1_Click()

Unload Me

End

End Sub

yHk(44)

yH k(45)

Contents

Page 38: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 38/463

31 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Pulldown Menu wpfckjzpfaomwpfckjzpfaomwpfckjzpfaomwpfckjzpfaomwpfckjzpfaom Test Buttons ud ka½G;ygujzpfvmrnf h ud ka½G;ygujzpfvmrnf h ud ka½G;ygujzpfvmrnf h ud ka½G;ygujzpfvmrnf h ud ka½G;ygujzpfvmrnf h Program ud kud kud kud kud ka&;om;jcif;a&;om;jcif;a&;om;jcif;a&;om;jcif;a&;om;jcif;

Pulldown Menu wpfckjzpfaom Test Buttons ud ka½G;ygu 4if;ESif hvd kuavsmnDaxGjzpfap&ef Form wpfck  Insert jyKvkyfí vd ktyfaomy½d k*&rfrsm;a&;om;&rnf/ Form

wpfckud k Insert jyKvkyfvd kygu Menu Bar ½S  d Project ud ka½G;yg/ xd k Yaemuf Pulldown

Menu jzpfaom Add Form ud k a½G;&efjzpfonf/ yH k(47)/

yHk(46)

yH k(47)

Contents

Page 39: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 39/463

32 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Form2 jzpfay:vmygu yH k(48)ygtwd kif;wnfaqmuf&efjzpfonf/

Command Button wpfckjzpfaom Change Signal wGif atmufygy½d k*&rfud ka&;om;&rnf-Private Sub Command1_Click()

ChangeSignal

End Sub

Command Button aemufwpfckjzpfaom Close wGif atmufygy½d k*&rfud ka&;om;

&rnf-Private Sub Command2_Click()

Form2.Hide

Form1.Show

End Sub

Command1 wGifa&;om;xm;aomy½d k*&rfrS m wd kuf½d kuf Run aomy½d k*&rfjzpfojzif h4if;y½d k*&rfud k qufvufa&;om;&ef vd ktyfygonf/ yH k(49)/

Pulldown Menu wpfckjzpfaom Test Button ud k Click vkyfyg/ 4if;wGif Form2ud k vSrf;íac:aom y½d k*&rfud ka&;om;&rnf/Private Sub TestButtons_Click()

Form2.Show

End Sub

yH k(48)

Contents

Page 40: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 40/463

33 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Form2 \ General wGifatmufygy½d k*&rfud k 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 ud ka½G;ygu

4if;ESif hvd kufavsmnDaxGjzpfap&ef aemufxyf Form wpfckzefwD;í vd ktyfaomy½d k*&rfrsm;a&;om;&rnf/ yH k(50)/

Form3 ud katmufygtwd kif;wnfaqmuf&rnf? yH k(51)/

yHk(49)

yH k(50)

yHk(51)

Contents

Page 41: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 41/463

34 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(51)yg Form wGif  , ESif h wd k Yud koH k;xm;

ygonf/ Check1 wGif Auto Size ESifh Check2 wGif Word Wrap wd k Yud kowfrSwfxm;ygonf/ 4if;wd k Yud k atmufygtwd kif; y½d k*&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 If 

End 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 If 

End Sub

Private Sub Command1_Click()

Form3.Hide

Form1.Show

End 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 ud ka½G;vd kufygu Sub-Menu wpfckxyfrHay:vmrnf/ 4if;wd k YrS m Num-ber, Text wd k YjzpfMuonf/ Number ud ka½G;ygu Number ESif hywfoufaom Form wpfckay:&efESif h vd ktyfaomy½d k*&rfrsm;a&;om;&rnf/ yH k(52)/

Contents

Page 42: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 42/463

35 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yHk(53)

tqd kyg Form yH kpHwGif tpDtpOfrsm;ud k Run Ed kif&eftwGuf atmufygtwd kif;jyifqif&rnf/

txufygyH k(53)ud kzefwD;&mwGif  , , ESif h 

wd k Yud koH k;xm;ygonf/ txufyg Form yH kpHtm; Runí&Ed kifap&ef atmufyg

y½d k*&rfrsm;ud k a&;om;&rnf-

Add Command Button wGifatmufyg Program ud ka&;om;&ef-Private Sub Command1_Click()

List1.AddItem Text1.Text

Text1.Text = ""

yH k(52)

Contents

Page 43: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 43/463

36 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Text1.SetFocus

Label3.Caption=List1.ListCount

End Sub

Remove Command Button wGifatmufyg Program ud ka&;om;&ef-Private Sub Command2_Click()

Dim Ind As Integer

Ind = List1.ListIndex

If Ind >= 0 Then

List1.RemoveItem Ind

Label3.Caption = List1.ListCount

Else

Beep

End If Command2.Enabled = (List1.ListIndex <> -1)

End Sub

Clear Command Button wGifatmufyg Program ud ka&;om;&ef-Private Sub Command3_Click()

List1.Clear

Command2.Enabled = False

Label3.Caption = List1.ListCount

End SubClose Command Button wGifatmufyg Program ud ka&;om;&ef-Private Sub Command4_Click()

Unload Me

End Sub

List Box (Single Click) twGufPrivate Sub List1_Click()

Command2.Enabled = (List1.ListIndex <> -1)

End Sub

List Box (Double Click) twGufPrivate Sub List1_DblClick()

Command2.Value = True

End Sub

Contents

Page 44: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 44/463

37 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Text1, Add Command Button wd k YtwGufPrivate Sub Text1_Change()

Command1.Enabled = (Len(Text1.Text)>0)

End SubText ud ka½G;ygu Text ESif hywfoufaom Form wpfckay:&ef Form wpfckud kzefwD;ívd ktyfaomy½d k*&rfrsm;a&;om;&rnf/ yH k(54)/

txufygyH k(54)ud kzefwD;&mwGif  , , ESif h 

wd k Yud koH k;xm;ygonf/ txufyg Form yH kpHwGif tpDtpOfrsm;ud k Run Ed kif&eftwGuf atmufygtwd kif; y½d k*&rfrsm;ud k a&;om;&rnf/ yH k(55)/

yH k(54)

yH k(55)

Contents

Page 45: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 45/463

Page 46: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 46/463

39 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

List Box (Double Click) twGufPrivate Sub List1_DblClick()

Command2.Value = True

End SubText1, Add Command Button wd k YtwGufPrivate 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 ud ka½G;ygu 4if;ESif hvd kufavsmnDaxGjzpf

ap&ef aemufxyf Form wpfckzefwD;í vd ktyfaomy½d k*&rf rsm;a&;om;&rnf/ yH k(56)/

tqd kyg Form yH kpHwGif tpDtpOfrsm;ud k RunEd kif&ef twGuf atmufygtwd kif; jyifqif& 

rnf/ yH k(57)/ , , ESifh wd k Yud k

oH k;xm;ygonf/

yH k(56)

Contents

Page 47: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 47/463

40 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(57)

txufyg yH k(57)tm; Run í &Ed kifap&ef atmufygy½d k*&rfrsm;ud ka&;om;&rnf/Check1 wGifatmufyg Program ud ka&;om;&ef-Private Sub Check1_Click()

Dim a1 As FontSet a1 = Text1.Font

If Check1.Value = 1 Then

a1.Bold = True

Else

a1.Bold = False

End If 

End Sub

Check2 wGifatmufyg Program ud ka&;om;&ef-Private Sub Check2_Click()

Dim a1 As Font

Set a1 = Text1.Font

If Check2.Value = 1 Then

a1.Italic = True

Contents

Page 48: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 48/463

41 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Else

a1.Italic = False

End If 

End Sub

Check3 wGifatmufyg Program ud ka&;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 If End Sub

Check4 wGifatmufyg Program ud ka&;om;&ef-Private Sub Check4_Click()

Dim a1 As Font

Set a1 = Text1.Font

If Check4.Value = 1 Then

a1.Strikethrough = True

Elsea1.Strikethrough = False

End If 

End Sub

Close Command Button wGifatmufyg Program ud ka&;om;&ef-Private Sub Command1_Click()

Unload Me

End Sub

Contents

Page 49: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 49/463

42 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 ud ka½G;ygu 4if;ESif hvd kufavsmnDaxGjzpf

ap&ef aemufxyf Form wpfckzefwD;í vd ktyfaomy½d k*&rfrsm;a&;om;&rnf/ yH k(58)/

tqd kyg Form yH kpHwGif tpDtpOfrsm;ud k Run Ed kif&eftwGuf atmufygtwd kif;jyifqif

&rnf/ yH k(59)/

txufyg , , ESif  h  k Yud k

oH k;xm;ygonf/ 4if; Form yH kpHwGif Run í&Ed kifap&ef vd ktyfaomy½d k*&rfrsm;ud k a&;om;&rnf/

yH k(58)

yHk(59)

Contents

Page 50: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 50/463

Page 51: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 51/463

44 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 ud ka½G;ygu 4if;ESif h

vd kufavsmnDaxGjzpfap&ef aemufxyf Form wpfckzefwD;í vd ktyfaomy½d k*&rfrsm;a&;om;

&rnf/ yH k(61)/

tqd kyg Form yH kpHwGif tpDtpOfrsm;ud k Run Ed kif&eftwGuf atmufygwd kif; jyifqif&rnf/yH k(62)/

tqd kygyH k(62)ud k zefwD;&mwGif ESifh wd k Yud koH k;xm;ygonf/

List1 List Box \ Properties wGif atmufygwd k Yud kjyifqifxm;½S  d&rnf -Columns - 2

MultiSelect - 2 - Extended

yH k(61)

yH k(62)

Contents

Page 52: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 52/463

45 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(62)yg Form yH kpHtm; Run í&Ed kifap&ef atmufygy½d k*&rfrsm;ud ka&;om;&rnf/Transfer Command Button twGufPrivate Sub Command1_Click()

For n = 0 To (List1.ListCount - 1)If List1.Selected(n) = True Then ' If selected then add to the bottom

list.

List2.AddItem List1.List(n)

End If 

Next

Command2.Enabled = True

'An item is now in the bottom list, so enable the clear button.

End Sub

Clear Command Button twGufPrivate Sub Command2_Click()

List2.Clear

Command2.Enabled = False

End Sub

Close Command Button twGufPrivate Sub Command3_Click()

Unload Me

End SubForm Load twGufPrivate 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"

Contents

Page 53: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 53/463

46 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

List1.AddItem "South Dagon"

List1.Selected(1) = True

End Sub

List1 List Box Double Click twGufPrivate 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 ud ka½G;ygu 4if;ESif hvd kufavsmnDaxG

jzpfap&ef Form wpfckzefwD;í vd ktyfaomy½d k*&rfrsm;a&;om;&rnf/ yH k(63)/

tqd kyg Form yH kpHwGif tpDtpOfrsm;ud k Run Ed kif&eftwGuf yH k(64)ygtwd kif;jyifqif

&rnf/, ,

ESif  h w k Yud koH k;xm;ygonf/

yHk(63)

yH k(64)

Contents

Page 54: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 54/463

47 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Function wpfckjzpfaomwpfckjzpfaomwpfckjzpfaomwpfckjzpfaomwpfckjzpfaom DoColor twGuftwGuftwGuftwGuftwGufyH k(65)wGifazmfjyxm;ygonf/

Close Command Button twGufPrivate Sub Command1_Click()

Unload Me

End Sub

Red Horizontal Scroll Bar twGufPrivate Sub HScroll1_Change()

HScroll1_Scroll 'Call the event procedure directly.

End Sub

Private Sub HScroll1_Scroll()

DoColor

End Sub

Green Horizontal Scroll Bar twGufPrivate Sub HScroll2_Change()

HScroll2_Scroll 'Call the event procedure directly.

End Sub

Private Sub HScroll2_Scroll()

DoColor

End Sub

yH k(65)

Contents

Page 55: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 55/463

48 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Blue Horizontal Scroll Bar twGufPrivate Sub HScroll3_Change()

HScroll3_Scroll 'Call the event procedure directly.

End SubPrivate Sub HScroll3_Scroll()

DoColor

End Sub

Menu Bar aemufwpfckxyfrHjyKvkyfjcif;aemufwpfckxyfrHjyKvkyfjcif;aemufwpfckxyfrHjyKvkyfjcif;aemufwpfckxyfrHjyKvkyfjcif;aemufwpfckxyfrHjyKvkyfjcif;yH k(66)ygyH kwGif Menu wpfckom½S  dNyD; Menu rSxGufcG gvd kygu Command Button

wpfckud ktoH k;jyKí xd k Command Button ud k Click jyKvkyfjcif;jzif h xGufcG gEd kifayonf/

þuJ hod k Y Menu rSxGufcG gvd konf h aemufxyf Menu Bar wpfckwnfaqmufvd kygu Toolsud ka½G;yg/ xd k Yaemuf Pulldown Menu wpfckjzpfaom Menu Editor ... ud ka½G;yg/

xd ktcg yH k(67)ygtwd kif; Menu Editor ay:vmrnf/ 4if; ...&Scroll Bars wGifActive jzpfatmifxm;í Next Command Button ud ka½G;yg/ xd k Yaemuf Caption wGifE&xit, Name wGif Exit [kjznf hpGufí Left Arrow Button tm;a½G;ygu ...E&xit

onf E&xit jzpfoG m;ayrnf/ a½S UqH k;rSOD;aqmifonf h  ... aysmufoG m;ayrnf/ xd k YaemufExit \atmufwGif½S  daom Pulldown Menu rsm;tm; qufvufzefwD;&efjzpfonf/ yH k(67)?yHk(68)/

yH k(66)

Contents

Page 56: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 56/463

49 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(67)

yH k(68)

Contents

Page 57: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 57/463

50 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd ktcg yH k(69)ygtwd kif; Menu rsm;ajymif;vJoG m;ayrnf/ Exit Command But-

ton tm;zsufypf&rnf/

txufygyH k(69)yg Pulldown Menu wpfckjzpfaom Quit tm; Double Click ESdyfíatmufygy½d k*&rftm;a&;om;&rnf -Pulldown Menu wpfckjzpfaomwpfckjzpfaomwpfckjzpfaomwpfckjzpfaomwpfckjzpfaom Quit twGuftwGuftwGuftwGuftwGufPrivate Sub Quit_Click()

Unload Me

End

End Sub- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

txufyg y½d k*&rfrsm;ud ka&;&eftwGuf atmufyga&;xH k;rsm;ud k od½S  d&efvd ktyfygonf/Syntax;

Val(<String>)

String wpfcktm; wGufícsufí&aom wefzd k;wpfcktjzpf ajymif;vJay;onf/Oyrm -

MyValue = Val("2457") ' Returns 2457

MyValue = Val(" 2 45 7") ' Returns 2457MyValue = Val("24 and 57") ' Returns 24

Syntax;

If <Condition> Then <Statements>

[Else <Statements>]

End If 

yH k(69)

Contents

Page 58: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 58/463

51 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

(Or)

If <Condition> Then

[<Statements>]

ElseIf <Conditon-n> Then

[<Statements>]] ...

[Else

<Statements>]]

End If 

Oyrm -Number = 53 'Initialize Variable

If Number < 10 Then

Digits = 1ElseIf Number < 100 Then

'Condition evaluates to True so the next statement is executed.

Digits = 2

Else

Digits = 3

End If 

Syntax;

<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 I

Msg = "Choose OK to remove every other entry."

MsgBox Msg 'Display message.

Contents

Page 59: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 59/463

52 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

For I = 1 To 50 'Determine how to

List1.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 Sub

Syntax;

<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 Strikethrough

Font.Italic = Not Font.Italic 'Toggle italic

Font.Underline = Not Font.Underline 'Toggle underline

Font.Size = 16 'Set size property

If Font.Bold then

Print "Font weight is " & Font.Weight & " (bold)."Else

Print "Font weight is " & Font.Weight & " (not bold)."

End If 

End If 

Syntax;

Oct(<Number>)

Oyrm -MyOct = Oct(4) 'Returns 4

MyOct = Oct(8) 'Returns 10MyOct = Oct(459) 'Returns 713Syntax;

Hex(<Number>)

Oyrm -MyHex = Hex(5) 'Returns 5

Contents

Page 60: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 60/463

53 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

MyHex = Oct(8) 'Returns A

MyHex = Oct(459) 'Returns 1CB

Syntax;

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 Sub

Private Sub Timer1_Timer()BackColor = QBColor(Rnd * 15)

ForeColor = QBColor(Rnd * 10)

Picture1.BackColor = QBColor(Rnd * 15)

Picture1.ForeColor = QBColor(Rnd * 10)

End Sub

Contents

Page 61: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 61/463

54 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Syntax;

RGB(red, green, blue)

Red, Green, Blue wefzd k;rsm;onf 0 ESif h 0255 Mum;½S  dMuonf/

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 Value

Black 0 0 0

Blue 0 0 255Green 0 255 0

Cyan 0 255 255

Red 255 0 0

Magenta 255 0 255

Yellow 255 255 0

White 255 255 255Syntax;

<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 = True

Player(0) = "Miggey McMoo" 'Enter data into arrays.

Player(1) = "Alf Hinshaw"

Player(2) = "Woofer Dean"

Salary(0) = "$234,500"

Salary(1) = "$158,900"

Contents

Page 62: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 62/463

55 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Salary(2) = "$1,030,500"

For I = 0 To 2 'Add names to list.

Combo1.AddItem Player(I)

Next I

Combo1.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) Then

List2.AddItem List1.List(I)

End If Next I

End Sub

Contents

Page 63: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 63/463

56 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Syntax;

Load <Object>

Unload <Object>

Oyrm -Private Sub Form_Click()

Dim Answer.Msg 'Declare Variable

Unload Form1

Msg = "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 If 

End Sub

Syntax;

<Object>.Hide

<Object>.Show

Oyrm -Private Sub Form_Click()

Dim Answer.Msg 'Declare Variable

Hide

Msg = "Choose OK to make the form reappear."

MsgBox Msg 'Display message.Show 'Show form again.

End Sub

Contents

Page 64: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 64/463

57 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 - - - - - - - - - - - - - - -

Contents

Page 65: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 65/463

58 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

tcef;(3)tcef;(3)tcef;(3)tcef;(3)tcef;(3)

Graphic rsm;udk rsm;ud k rsm;udk rsm;ud k rsm;udk Windows yHkpHtwd kif;½S mazGjcif;yH kpHtwdkif;½S mazGjcif;yHkpHtwd kif;½S mazGjcif;yH kpHtwdkif;½S mazGjcif;yH kpHtwdkif;½S mazGjcif;

atmufyg yH k(70)ygtwd kif; Visual Basic 6.0 wGifzefwD;&ef/

yH k(70)yg Form wGif(1)ud k File List Box jzif hzefwD;xm;NyD;(2) tm;

Drive List Box jzif hzefwD;xm;ygonf/(3)ud k Label jzif hzefwD;xm;NyD;(4)tm; Dir List Box jzif hzefwD;xm;onf/(5)ud k Command

Button jzif hzefwD;xm;í(6)ud k Image jzif hzefwD;xm;ygonf/

File1 File List Box \ Properties wGifatmufygtwd kif;jyifqif&ef-Pattern = *.bmp;*.wmf;*.pic;*.jpg;*.ico;*.gif 

Label1 Label \ Properties wGif atmufygtwd kif;jyifqif&ef-Border Style = Fixed Single

Image1 Image \ Properties wGif atmufygtwd kif;jyifqif&ef-Border Style = Fixed Single

Stretch = True

Command1 Command Button \ Properties wGif atmufygtwd kif;jyifqif&ef-Caption = E&xit

yH k(70)

(1)

(2)

(3)

(4)

(5)

(6)

Contents

Page 66: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 66/463

59 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

wpfzufygtwd kif; Properties rsm;ud k jyifqifjznf hpGufNyD;ygu oufqd kif&mtyd kif;vd kufatmufygtwd kif; y½d k*&rfrsm;a&;om;&efjzpfygonf/Command Button jzpfaomjzpfaomjzpfaomjzpfaomjzpfaom Exit twGuftwGuftwGuftwGuftwGuf

Private Sub Command1_Click()Unload Me

End

End Sub

Directory List Box twGuftwGuftwGuftwGuftwGufPrivate Sub Dir1_Change()

File1.Path = Dir1.Path 'Update Files

End Sub

Drive List Box twGuftwGuftwGuftwGuftwGufPrivate Sub Drive1_Change()

Dir1.Path = Drive1.Drive 'Update Directory Path

End Sub

File List Box twGuf (twGuf (twGuf (twGuf (twGuf (Single Click ) ) ) ) )Private Sub File1_Click()

Label1 = File1

End Sub

File List BoxtwGuf (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 Sub

Form twGuftwGuftwGuftwGuftwGufPrivate Sub Form_Load()

Drive1.Drive = App.Path

Dir1.Path = App.Path

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

Contents

Page 67: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 67/463

60 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

wpfzufygy½d k*&rfrsm;ud ka&;&eftwGuf atmufyga&;xH k;rsm;ud k od½S  d&efvd ktyfygonf-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]

OyrmPrivate Sub Dir1_Change()

File1.Path = Dir1.Path 'Set File1 path.

End Sub

Private Sub File1_PathChange()

Dir1.Path = File1.Path 'Set Dir1 path.

End Sub

Private Sub File1_DblClick()'Display the selected filename when double-clicked.

Label1.Caption = "Your selection: " + UCase(File1.FileName)

End SubSyntax;

<Object>.Path [=pathname]

OyrmPrivate Sub Drive1_Change()

Dir1.Path = Drive1.Drive 'Set directory path.

End Sub

Private Sub Dir1_Change()

File1.Path = Dir1.Path

End Sub

Contents

Page 68: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 68/463

61 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 If Msg = "Choose OK to clear the bitmap from the form."

MsgBox Msg

Picture = LoadPicture() 'Clear form.

End Sub

Syntax;

<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 - - - - - - - - - - - - - - -

Contents

Page 69: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 69/463

62 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Timer jzif htcsdefud kzefwD;jcif;jzifhtcsdefudkzefwD;jcif;jzif htcsdefud kzefwD;jcif;jzifhtcsdefudkzefwD;jcif;jzifhtcsdefudkzefwD;jcif;atmufazmfjyygyH k(71)ygtwd kif; Visual Basic 6.0 wGifzefwD;&rnf-

yH k(71)yg Form wGif (1)ud k jzif hzefwD;xm;NyD;(2)tm; jzif h zefwD;

xm;ygonf/ txufygtwd kif;jyifqifNyD;ygu oufqd kif&mtyd kif;vd kuf y½d k*&rfrsm;a&;om;&efjzpfygonf/Form qJ  Gwif&mwGiftvkyfvkyf&eftwGufqJ  Gwif&mwGiftvkyfvkyf&eftwGufqJ  Gwif&mwGiftvkyfvkyf&eftwGufqJ  Gwif&mwGiftvkyfvkyf&eftwGufqJ  Gwif&mwGiftvkyfvkyf&eftwGufPrivate Sub Form_Load()

Timer1.Interval = 1000 'Set Time Interval

End Sub

Label1 wGiftcsdefjy&eftwGufwGiftcsdefjy&eftwGufwGiftcsdefjy&eftwGufwGiftcsdefjy&eftwGufwGiftcsdefjy&eftwGufPrivate Sub Timer1_Timer()

Label1.Caption = Time 'Update Time Display

End SubSyntax;

<Object>.Interval [=milliseconds]

OyrmPrivate Sub Form_Load()

Timer1.Interval = 900 'Set interval.

HScroll1.Min = 100 'Set minimum.

HScroll1.Max = 900 'Set maximum.

End Sub

yH k(71)

(1)

(2)

Contents

Page 70: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 70/463

63 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Private Sub HScroll_Change()

'Set interval according to scroll bar value.

Timer1.Interval = 1000 - HScroll.Value

End Sub

Private 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 Function

Syntax;

Time

OyrmMytime = Time 'Return Current System Time

Date Function

Syntax;

DateOyrm

MyDate = #February 12, 1985# 'Assign a date

Date = MyDate 'Change System Date.Syntax;

Now ' Returns the current date and time according.

OyrmToday = Now 'Assign current system date and time

Day Function

Syntax;

Day(date)

OyrmMyDate = #February 12, 1969# 'Assign a date

MyDay = Day(MyDate) 'MyDay contains ®®®®® 12

Contents

Page 71: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 71/463

64 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Hour Function

Syntax;

Hour(time)

OyrmMytime = #4:35:17 PM# 'Assign a time

MyHour = Hour(Mytime) 'MyHour contains 16

Minute Function

Syntax;

Minute(time)

OyrmMtime = #4:35:17 PM# 'Assign a time

MyMinute = Minute(Mytime) 'MyMinute contains 85

Month Function

Syntax;

Month(date)

OyrmMydate = #February 12, 1969# 'Assign a date

MyMonth = Month(Mydate) 'MyMonth contains 2

Second Function

Syntax;

Second(time)Oyrm

Mytime = Time 'Returns current system time

MySecond = Second(Mytime) 'MySecond contains 17Weekday Function

Syntax;

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 Function

Syntax;

Year(date)

Contents

Page 72: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 72/463

65 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

OyrmMyDate = #February 12, 1969# 'Assign a date.

MyYear = Year(MyDate) 'MyYear contains 1969.

tcsdefESif hywfoufaomtcsdefESif hywfoufaomtcsdefESif hywfoufaomtcsdefESif hywfoufaomtcsdefESif hywfoufaom Function rsm;udk rsm;ud k rsm;udk rsm;ud k rsm;udk Form zefwD;íprf;oyfjcif;zefwD;íprf;oyfjcif;zefwD;íprf;oyfjcif;zefwD;íprf;oyfjcif;zefwD;íprf;oyfjcif;atmufygyH k(72)ygtwd kif; 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

yH k(72)

Contents

Page 73: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 73/463

66 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 ", Today

End Sub

txufyg Program ud k Run ygu yH k(73)ygtwd kif;azmfjyrnfjzpfonf/

Random Function

Initializes the random-number generator.Syntax;

Randomize [number]

The number argument can be any valid numeric expression.

OyrmRandomize '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 Method

Syntax;

<Object>.Move left, top, width, height

yH k(73)

Contents

Page 74: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 74/463

67 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

<Object>.Left [=value]

<Object>.Top [=value]

atmufyg yH k(74)wGiftm; Move Sample Title Bar jzif hzefwD;xm;&ef -

txufygyH k(74)wGif  Image, Timer, Command Button wd k Yyg0ifMu

onf/ Timer Properties wGif Interval tm; 100 [kxm;yg/ Command Button wGifvd ktyfaomy½d k*&rfrsm;ud ka&;om;&rnf/Exit Command Button twGuftwGuftwGuftwGuftwGuf

Private Sub Command1_Click()Unload Me

End

End Sub

Timer1_Timer twGuftwGuftwGuftwGuftwGufPrivate Sub Timer1_Timer()

a = Image1.Left

b = Image1.Top

Image1.Move a + 50, b + 33

End Sub

atmufyg yH k(75)tm; Move Method Example Title Bar jzif h zefwD;xm;&ef-

yHk(74)

Contents

Page 75: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 75/463

68 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

txufygyH k(75)wGif  Image, Command Buttonwd k Yyg0ifMuonf/ Form1

Form Properties wGif Windows State tm; 2 - Maximized [kxm;yg/ Command

Button wGif vd ktyfaomy½d k*&rfrsm;ud ka&;om;&rnf/Run Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

For j = 1 To 10Image1.Left = 0

Image1.Top = 0

i = Image1.Left

k = Image1.Top

For i = 0 To 11500

Image1.Move i, k 

Next

Image1.Left = 11500

Image1.Top = 0i = Image1.Left

k = Image1.Top

For k = 0 To 7700

Image1.Move i, k 

Next

yHk(75)

Contents

Page 76: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 76/463

69 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Image1.Left = 11500

Image1.Top = 7700

i = Image1.Left

k = Image1.Top

For i = 11500 To 0 Step -1

Image1.Move i, k 

Next

Image1.Left = 0

Image1.Top = 7700

i = Image1.Left

k = Image1.Top

For k = 7700 To 0 Step -1

Image1.Move i, k Next

Print

Print

Print " ", j

Beep

Next

End Sub

Exit Command ButtontwGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Unload Me

End

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

Contents

Page 77: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 77/463

70 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

tcef;(4)tcef;(4)tcef;(4)tcef;(4)tcef;(4)

ODBC üüüüü Access File tm;toH k;jyKEd kifap&ef aqmif½Gufjcif;tm;toH k;jyKEd kifap&ef aqmif½Gufjcif;tm;toH k;jyKEd kifap&ef aqmif½Gufjcif;tm;toH k;jyKEd kifap&ef aqmif½Gufjcif;tm;toH k;jyKEd kifap&ef aqmif½Gufjcif;

yxrtqif htaejzif h Access 2002 jzif h Database File ESifh Table File tm;wnfaqmufyg/ xd k Yaemuf Windows Desktop Status Bar wGif½S  daom Start Menu tm;a½G;yg/ xd k Yaemuf Setting ud kxyfrHa½G;yg/ xd ktcg aemufxyf Sub-Menu wpfckay:vmrnf/ 4if;rS Control Panel ud ka½G;yg/ yH k(76)/

xd ktcg Control Panel Dialog Box ay:vmrnf/ yH k(77)/

yHk(76)

Contents

Page 78: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 78/463

71 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yHk(77)

Control Panel Dialog Box ½S  d Icon rsm;xJrS ODBC Data Sources [32bit] ud kDouble Click ES  dyfyg/ yH k(78)ygtwd kif; ODBC Data Source Administrator Dialog

Box ay:vmrnf/

Contents

Page 79: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 79/463

72 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

txufyg Dialog Box wGif User DSN, System DSN, File DSN, Drivers,

Tracing, Conection Pooling, About [lí Tab Command 7 ckyg½S  dygonf/ 4if;Tab Command rsm;xJrS System DSN ud ka½G;yg/ yH k(79)ygtwd kif;jzpfay:vmrnf/

yH k(78)

Contents

Page 80: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 80/463

73 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

txufygyH kwGif Add Command Button ud ka½G;&rnf/ xd ktcg Create New Data

Source Dialog Box ay:vmrnf/ yH k(80)/

txufyg Dialog Box wGif Driver do Microsoft Access [*.mdb] ud ka½G;NyD;Finish ud ka½G;cs,f&rnf/ ODBC Microsoft Access Setup Dialog Box ay:vmyguData Source Name acgif;pOfnmzuf½S  d List Box wGif rdrdBuKdufESpfouf&mtrnfwpfckud kjznf hpGufyg/ Oyrm Test1 [kjznf hpGufyg/ yH k(81)/

yH k(79)

yH k(80)

Contents

Page 81: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 81/463

Page 82: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 82/463

Page 83: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 83/463

76 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd ktcg yH k(85)yg ODBC Data Source Administrator Dialog Box od k Yjyefvnfa&muf½S  doG m;NyD; System Data Sources: acgif;pOfatmufwGif Name ®®®®® Test1, Driver

®®®®® Microsoft Access Driver(*.mdb) azmfjyaeayrnf/ xd k Yaemuf Command But-

ton wpfckjzpfaom OK ud ka½G;cs,f&rnf/ xd ktcg rlvae&mjzpfaom Control Panel

ae&mod k Yjyefvnfa&muf½S  doG m;NyD; Access 2002 Database File tm; Visual Basic

6.0 wGif toH k;jyKí&Ed kifrnf/ yH k(86)/ Microsoft Access 2002 jzif hwnfaqmufxm;aom C:\My Documents\Test1.mdb onf ODBC Data Sources (32bit) jzpfoG m;ayrnf/

yHk(85)

Contents

Page 84: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 84/463

Page 85: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 85/463

78 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Data Form Wizard wnfaqmufjcif;wnfaqmufjcif;wnfaqmufjcif;wnfaqmufjcif;wnfaqmufjcif;

Menu Bar ½S  d Add-Ins rS Data Form Wizard ud ka½G;yg/ yH k(89)/

xd ktcg Data Form Wizard - Introduction Dialog Box ay:vmrnf/ yH k(90)/

yH k(88)

yH k(89)

yH k(90)

Contents

Page 86: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 86/463

79 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(90)yg Dialog Box wGif From what profile do you want to load your

setting? acgif;pOfatmuf List Box ud k (None) xm;NyD; Next ud ka½G;yg/

xd ktcg txufygyH k(91)ygtwd kif; Data Form Wizard - Database Type Dialog

Box ay:vmNyD; 4if;xJ½S  d List Box xJwGif Access ud ka½G;xm;vdrf hrnf/ rdrdrS Remote

(ODBC) tm;a½G;NyD; Next ud ka½G;cs,f&rnf/

xd ktcg yH k(92)ygtwd kif; Data Form Wizard - Connect Information Dialog

Box ay:vmNyD; ODBC Connect Data acgif;pOfatmuf½S  d DSN: nmzuf½S  d List Box

ud ka½G;cs,fygu yH k(93)ygtwd kif; Dropdown List Box ay:vmygu Test1 ud ka½G;cs,fNyD;Next ud ka½G;cs,f&rnf/ yH k(94)/

yH k(91)

yH k(92)

Contents

Page 87: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 87/463

80 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(93)

yH k(94)

xd ktcg Data Form Wizard - Form Dialog Box ay:vmrnf/ What name

do you want for the form? acgif;pOfatmufList Box wGif rdrdBuKdufESpfouf&mtrnfud kjznf hpGuf&ef/ Oyrm - Form2 [kjznf hpGufí Next ud ka½G;&rnf/ yH k(95)/

Contents

Page 88: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 88/463

81 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(95)wGif Next ud ka½G;cs,fygu Dara Form Wizard - Record Source DialogBox ay:vmrnf/

txufygyH kwGif Record Source: List Box Dropdown Arrow tm;a½G;cs,fNyD;Test1 ud kxm;&ef/ xd ktcg Available Fields: acgif;pOfatmufwGif Test1 Database

File wGif wnfaqmufxm;aom Field rsm;a&muf½S  dvmvdrf hrnf/ 4if;rS rdrdESpfoufonf hField rsm;ud ka½G;cs,f&rnf/ yH k(97)/

yH k(95)

yH k(96)

Contents

Page 89: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 89/463

82 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(97)

yH k(98)

txufygyH k(97)wGif rdrdtvd k½S  donf h Field rsm;ud kwpfckcsif;tvd kuf  Right

Arrow Command Button jzif hvnf;aumif;? Field tm;vH k;ud k  Right Arrow ESpfckyg Command Button jzif hvnf;aumif;a½G;cs,fEd kifygonf/ Column to Sort By:

acgif;pOfatmuf List Box wGif rdrdtaejzif h i,fpOfBuD;vd kufpDpOfvd kaom Field rsm;ud ka½G;cs,fvd ku a½G;cs,fEd kifygonf/ xd k Yaemuf Next ud ka½G;cs,fyg/ yH k(98)/

Contents

Page 90: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 90/463

83 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

wpfzufygyH k(98)yg Data Form Wizard - Record Source Dialog Box wGifNext ud kxyfrHa½G;cs,fyg/ Data Form Wizard - Control Selection Dialog Box

ay:vmrnf/ yH k(99)/

txufygyH k(99)ud k ajymif;vJrIrjyKvkyfbJ  Next ud kxyfrHa½G;cs,fyg/ xd ktcg Data

Form Wizard - Finished! Dialog Box ay:vmayrnf/ yH k(100)/

txufygyH k(100)wGif Finish Command Button ud ka½G;cs,f&rnf/ yH k(101)/

yH k(99)

yH k(100)

Contents

Page 91: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 91/463

84 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(101)wGif OK ud ka½G;cs,f&rnf/ xd ktcg yH k(102)ygtwd kif;jzpfay:vmrnf/

Visual Basic 6.0 rS tvd ktavsmufwnfaqmufay;vd kufaom Form2 jzpfay:vmayrnf/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(101)

yH k(102)

Contents

Page 92: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 92/463

85 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

rdrdenf;jzif hrdrdenf;jzifh rdrdenf;jzif hrdrdenf;jzifh rdrdenf;jzifh Access File toH k;jyKaomy½dk*&rfa&;om;jcif;toH k;jyKaomy½d k*&rfa&;om;jcif;toH k;jyKaomy½dk*&rfa&;om;jcif;toH k;jyKaomy½d k*&rfa&;om;jcif;toH k;jyKaomy½d k*&rfa&;om;jcif;rdrdenf;? rdrd[efjzif h Access 2002 wGif Database File wnfaqmufxm;NyD; Vi-

sual Basic 6.0 ud ktoH k;jyKí Programming a&;om;Ed kifygonf/ atmufazmfjyygyH k(103)

tm; Toolbox ½S  d Icon rsm;ud ktoH k;jyKíwnfaqmufxm;&rnf/

yH k(103)yg Form wGif Command Button ud ktoH k;jyKí zd kifzGif h&ef? xGuf&efwd k Yud kzefwD;wnfaqmufxm;ygonf/ tqd kyg Form onf  Form1 jzpfNyD; xGuf&ef  Com-

mand Button ud kES  dyfygu 4if;y½d k*&rfxJrSxGufoG m;NyD;? zd kifzGif h&ef Command Button

udka½G;ygu Form2 jzifhpDpOfxm;aom Microsoft Access 2002 Database File

ay:vmayrnf/ xd k YaMumif h Form2 ud katmufygtwd kif;wnfaqmuf&ayrnf/ yH k(104)/

yHk(103)

yH k(104)

Contents

Page 93: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 93/463

86 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

yH k(104)yg Identification Number;, Rank;, Name;, Department; [kteufa&mifjzif ha&;om;xm;aompmrsm;onf Label1, Label2, Label3, Label4 wd k Yjzif hwnfaqmufxm;jcif;jzpfNyD; 4if;pmom;rsm;\nmzufwGif wnfaqmufxm;aom Box rsm;rS m Text

Box rsm;jzif hwnfaqmufxm;ygonf/ Add, Update, Delete, Refresh, Close wd k YrS mCommand Button rsm;jzpfMuygonf/ 4if; Command Button 5 ck\nmzufwGif½S  donf h Data Position Box rSm jzif hwnfaqmufxm;ygonf/ Command

Button rsm;ESif h Adodc wd k YatmufzufwGif½S  daeaomZ,m;ud k jzif hwnfaqmufxm;Muygonf/Label1 Label \ Properties wGifatmufygtwd kif;jyifqif&ef-Name - Label1

Alignment - 0 - Left Justify

AutoSize - True

Caption - Identification Number;

Label2 Label \ Properties wGifatmufygtwd kif;jyifqif&ef-Name - Label2

Alignment - 0 - Left Justify

AutoSize - True

Caption - Rank;

Label3 Label \ Properties wGifatmufygtwd kif;jyifqif&ef-

Name - Label3Alignment - 0 - Left Justify

AutoSize - True

Caption - Name;

Label4 Label \ Properties wGifatmufygtwd kif;jyifqif&ef-Name - Label4

Alignment - 0 - Left Justify

AutoSize - True

Caption - Department;Text1 Text \ Properties wGifatmufygtwd kif;jyifqif&ef-Name - Text1

Alignment - 0 - Left Justify

DataField - Identification Number

DataSource - Adodc1

Contents

Page 94: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 94/463

87 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Text2 Text \ Properties wGifatmufygtwd kif;jyifqif&ef-Name - Text2

Alignment - 0 - Left Justify

DataField - Rank  DataSource - Adodc1

Text3 Text \ Properties wGifatmufygtwd kif;jyifqif&ef-Name - Text3

Alignment - 0 - Left Justify

DataField - Name

DataSource - Adodc1

Text4 Text \ Properties wGifatmufygtwd kif;jyifqif&ef-Name - Text4

Alignment - 0 - Left Justify

DataField - Department

DataSource - Adodc1

Command1 Command Button \ Properties wGifatmufygtwd kif;jyifqif&ef-Name - Command1

Caption - &Add

Command2 Command Button \ Properties wGifatmufygtwd kif;jyifqif&ef-Name - Command2

Caption - &UpdateCommand3 Command Button \ Properties wGifatmufygtwd kif;jyifqif&ef-Name - Command3

Caption - &Delete

Command4 Command Button \ Properties wGifatmufygtwd kif;jyifqif&ef-Name - Command4

Caption - &Refresh

Command5 Command Button \ Properties wGifatmufygtwd kif;jyifqif&ef-Name - Command5Caption - &Close

Contents

Page 95: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 95/463

88 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Adodc1 Adodc \ Properties ud k yH k(105)? yH k(106)wd k Yjzif hazmfjytyfygonf/

ConnectionString - Provider=MSDASQL.1;DSN=TEST1;UID=;

PWD=;

RecordSource - Select [Identification Number], Rank, Name, De-

partment from Test1 Order By [IdentificationNumber]

yHk(105) yH k(106)

Contents

Page 96: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 96/463

89 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

yH k(107) yH k(108)

DataGrid1 DataGrid \ Properties ud k yH k(107)? yH k(108)wd k Yjzif hazmfjytyfygonf/txufyg Form2 ud k Run í&Ed kifap&eftwGuf vd ktyfaomy½d k*&rfrsm;a&;om;&ayrnf/Adodc1 Adodc wGif Record Position twGufPrivate Sub Adodc1_WillMove(ByVal adReason As ADODB.EventReason

Enum, adStatus As ADODB.EventStatusEnum, ByVal pRecordset As

ADODB.Recordset)

Adodc1.Caption =

"Record: " & CStr(Adodc1.Recordset. AbsolutePosition)

End Sub

Contents

Page 97: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 97/463

90 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Add Command Button twGufPrivate Sub Command1_Click()

Adodc1.Recordset.AddNew

End SubUpdate Command Button twGufPrivate Sub Command2_Click()

Adodc1.Recordset.Update

End Sub

Delete Command Button twGufPrivate Sub Command3_Click()

With Adodc1.Recordset

.Delete

.MoveNext

If .EOF Then .MoveLast

End With

End Sub

Refresh Command Button twGufPrivate Sub Command4_Click()

Adodc1.Refresh

End Sub

Close Command Button twGufPrivate Sub Command5_Click()

Form2.Hide

Form1.Show

End Sub

Mouse Pointer Position twGufPrivate Sub Form_Unload(Cancel As Integer)

Screen.MousePointer = vbDefault

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

Contents

Page 98: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 98/463

Page 99: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 99/463

92 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 of 

characters 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 of 

characters 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"

Contents

Page 100: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 100/463

93 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

String Function rsm;udktoH k;jyKí udef;*Pef;rsm;wGufcsufjcif;rsm;ud ktoH k;jyKí udef;*Pef;rsm;wGufcsufjcif;rsm;udktoH k;jyKí udef;*Pef;rsm;wGufcsufjcif;rsm;ud ktoH k;jyKí udef;*Pef;rsm;wGufcsufjcif;rsm;udktoH k;jyKí udef;*Pef;rsm;wGufcsufjcif;atmufazmfjyyg Form yH kpHtm;zefwD;wnfaqmufyg/ yH k(109)/

txufyg Form yH kpHwGif Label, Text Box, Command Button wd k Yjzif h zefwD;xm;NyD; Command Button rsm;wGif atmufygy½d k*&rfrsm;a&;om;&efjzpfygonf/Run Command Button twGufPrivate Sub Command1_Click()

Cls

Dim a(50) As Variantw = Text1.Text

b = 0

z = Len(Text1.Text)

Print z: Print

For i = 1 To z

a(i) = Left(Right(Str(w), z - i + 1), 1)

Print a(i) & "+";

Next

For i = 1 To z

b = b + Val(a(i))

Next

Print "=", b

c = Len(b)

d = 0

yHk(109)

Contents

Page 101: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 101/463

94 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Print c: Print

For j = 1 To c

a(j) = Left(Right(Str(b), c - j + 1), 1)

Print a(j) & "+";

Next

For i = 1 To c

d = d + Val(a(i))

Next

Print "=", d

e = Len(d)

f = 0

Print e: Print

If e >= 2 And d >= 10 ThenFor j = i To c

a(j) = Left(Right(Str(d), e - j + 1), 1)

Print a(j) & "+";

Next

For i = 1 To e

f = f + Val(a(i))

Next

Print "=", f 

End If 

End Sub

Exit Command Button twGufPrivate Sub Command2_Click()

Unload Me

End

End Sub

Contents

Page 102: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 102/463

95 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

tqd kyg y½d k*&rfud k Run ygu yH k(110)twd kif;jrifawG U&rnf/

Syntax;

RSet strinvar = string

Oyrm -MyString = "0123456789" 'Initialize String.

RSet MyString = "Right ->" 'MyString contains " Right ->".

String toH k;jyKítoH k;jyKítoH k;jyKítoH k;jyKítoH k;jyKí Fibonacci Sequence udef;pOfwef;ud k½S mjcif;udef;pOfwef;udk½S mjcif;udef;pOfwef;ud k½S mjcif;udef;pOfwef;udk½S mjcif;udef;pOfwef;udk½S mjcif;

atmufygForm

yH kpHtm; zefwD;wnfaqmufyg/ yH k(111)/ 4if;wGif Label, Text

Box, Command Button wd k Yjzif h zefwD;xm;NyD; Command Button rsm;wGif atmufygy½d k*&rfrsm;a&;om;&efjzpfygonf/

yH k(110)

yH k(111)

Contents

Page 103: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 103/463

96 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Run Command Button twGufPrivate Sub Command1_Click()

Dim n As Variant

str1 = "1234567"Cls

n = Text1: secondlast = 0: Last = 1

For k = 3 To n

term = secondlast + Last: secondlast = Last: Last = term

RSet str1 = Str(term)

Print k, str1

Next

End Sub

Exit Command Button twGufPrivate Sub Command2_Click()

Unload Me

End

End Sub

tqd kygy½d k*&rfud k Run ygu atmufygyH kpHtwd kif;jrifawG U&rnf/ yH k(112)/

yH k(112)

Contents

Page 104: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 104/463

97 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Astrisk rsm;zefwD;jcif;rsm;zefwD;jcif;rsm;zefwD;jcif;rsm;zefwD;jcif;rsm;zefwD;jcif;atmufyg Form yH kpHtm; zefwD;wnfaqmufyg/ yH k(113)/ 4if;wGif Command Button

rsm;jzif hzefwD;xm;NyD; Command Button rsm;wGif vd ktyfaomy½d k*&rfrsm;a&;om;&ef

jzpfygonf/

Run Command Button twGufPrivate Sub Command1_Click()

Dim a$(22, 21)

Cls

For i = 1 To 22

For j = 1 To 21a$(i, j) = "*"

Next j

Next i

For i = 1 To 20

For j = 1 To 21 - i

a$(i, j) = "*"

Next j

Next iFor i = 1 To 22

For j = 1 To 21

Print a$(i, j);

Next j: Print

Next i

End Sub

yH k(113)

Contents

Page 105: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 105/463

Page 106: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 106/463

99 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Run Command Button twGufPrivate Sub Command1_Click()

str1 = "12345"

10 ClsN = Val(Text1)

If N >= 31 Or N Mod 2 = 0 Then

Print "Between 3 and 19 ": GoTo 10

End If 

Dim A(31, 31)

For i = 1 To N

For j = 1 To N

A(i, j) = 0

Next jNext i

dat = 1: i = 1: j = N \ 2 + 1: A(i, j) = dat

For Kount = 1 To N * N - 1

i = i - 1: j = j + 1

If i < 1 And j > N Then i = i + 2: j = j - 1

If i < 1 Then i = N

If j > N Then j = 1

If A(i, j) <> 0 Then i = i + 2: j = j - 1dat = dat + 1: A(i, j) = dat

Next: Print

Print " Magic Square "; N

Print " ~~~~~~~~~~~~ ": Print

For i = 1 To N

For j = 1 To N

RSet str1 = A(i, j): Print str1;

'Print using;" ";str1; 'A(i,j);

Next j: PrintNext i

End Sub

Exit Command Button twGufPrivate Sub Command2_Click()

Unload Me

Contents

Page 107: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 107/463

100 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

End

End Sub

tqd kygy½d k*&rfud k Run ygu atmufygyH k(116)twd kif; azmfjyrnfjzpfonf/

&m*Pef;½d kufxnf hygu 4if;udef;*Pef; 3 vH k;pvH k;aygif;jcif;&m*Pef;½dkufxnfhygu 4if;udef;*Pef; 3 vH k;pvH k;aygif;jcif;&m*Pef;½d kufxnf hygu 4if;udef;*Pef; 3 vH k;pvH k;aygif;jcif;&m*Pef;½dkufxnfhygu 4if;udef;*Pef; 3 vH k;pvH k;aygif;jcif;&m*Pef;½dkufxnf hygu 4if;udef;*Pef; 3 vH k;pvH k;aygif;jcif;

atmufyg Form yH kpHtm; zefwD;wnfaqmufyg/ yH k(117)/ 4if;wGif  ,

, rsm;jzif hzefwD;xm;NyD; Command Button rsm;wGif vd ktyf

aomy½d k*&rfrsm;a&;om;&ef jzpfygonf/

Run Command Button twGuf

Private Sub Command1_Click()Cls

n = Text1.Text

A = n \ 100

n = n - (A * 100)

b = n \ 10

yH k(116)

yH k(117)

Contents

Page 108: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 108/463

101 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

n = n - (b * 10)

Print "("; A; "+"; b; "+"; n; ")"; "="; A + b + n

End Sub

Exit Command Button twGufPrivate Sub Command2_Click()

Unload Me

End

End Sub

tqd kygy½d k*&rfud k Run ygu yH k(118)twd kif; azmfjyrnfjzpfonf/

aemufwpfenf;aemufwpfenf;aemufwpfenf;aemufwpfenf;aemufwpfenf;

atmufyg Form yH kpHtm; zefwD;wnfaqmufyg/ yH k(119)/ 4if;wGif  ,

, rsm;jzif hzefwD;xm;NyD; Command Button rsm;wGif vd ktyf

aomy½d k*&rfrsm;a&;om;&ef jzpfygonf/

Run Command Button twGufPrivate 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";sum1

End Sub

yH k(118)

yH k(119)

Contents

Page 109: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 109/463

102 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Exit Command Button twGufPrivate Sub Command2_Click()

Unload Me

EndEnd Sub

tqd kygy½d k*&rfud k Run ygu yH k(120)twd kif; 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 yH kpHtm; zefwD;wnfaqmufyg/ yH k(121)/ 4if;wGif  ,

, rsm;jzif hzefwD;xm;NyD; Command Button rsm;wGif vd ktyfaomy½d k*&rfrsm;a&;om;&ef jzpfygonf/

Run Command Button twGufPrivate Sub Command1_Click()

Cls

n = Text1.Text

s1 = Val(Mid(Trim(Str(n)), 1, 1))

yH k(120)

yH k(121)

Contents

Page 110: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 110/463

103 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Print s1

s2 = Val(Mid(Trim(Str(n)), 2, 1))

Print s2

s3 = Val(Mid(Trim(Str(n)), 3, 1))

Print s3

Print "3 Digits Sum of "; n; " is"; s1 + s2 + s3

End Sub

Exit Command Button twGufPrivate Sub Command2_Click()

Unload Me

End

End Sub

tqd kygy½d k*&rfud k Run ygu yH k(122)twd kif; azmfjyrnfjzpfonf/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(122)

Contents

Page 111: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 111/463

104 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

tcef;(6)tcef;(6)tcef;(6)tcef;(6)tcef;(6)

Mathematics ESif hqd kifaomudpö&yfrsm;ESifhqdkifaomudpö&yfrsm;ESif hqd kifaomudpö&yfrsm;ESifhqdkifaomudpö&yfrsm;ESifhqd kifaomudpö&yfrsm;

½d k;½d k;udef;pOfwef;½d k;½dk;udef;pOfwef;½d k;½d k;udef;pOfwef;½d k;½dk;udef;pOfwef;½d k;½dk;udef;pOfwef; 1, 2, 3, 4, ...? qwdk;udef;? qwd k;udef;? qwdk;udef;? qwd k;udef;? qwdk;udef; 1, 2, 4, 8, 16, ... ? xyfudef;? xyfudef;? xyfudef;? xyfudef;? xyfudef; 1, 4, 9, 16,

25, ... udef;pOfwef;wdk Yud k y½d k*&rfa&;om;jcif;udef;pOfwef;wd k Yud k y½d k*&rfa&;om;jcif;udef;pOfwef;wdk Yud k y½d k*&rfa&;om;jcif;udef;pOfwef;wd k Yud k y½d k*&rfa&;om;jcif;udef;pOfwef;wdk Yud k y½d k*&rfa&;om;jcif;atmufyg Form yH kpHtm; zefwD;wnfaqmufyg/ yH k(123)/ 4if;wGif 

rsm;jzif hzefwD;xm;NyD; Command Button rsm;wGif vd ktyfaomy½d k*&rfrsm;a&;om;&efjzpfygonf/

Run Command Button twGufPrivate Sub Command1_Click()

'To find No., AP, GP, Square

ClsPrint 1, 1, 1, 1

For j = 2 To 22

Print j, 2 * j - 1, 2 ^ (j - 1), j ^ 2

Next

End Sub

Exit Command Button twGufPrivate Sub Command2_Click()

Unload MeEnd

End Sub

tqd kygy½d k*&rfud k Run ygu yH k(124)twd kif; azmfjyrnfjzpfonf/

yH k(123)

Contents

Page 112: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 112/463

105 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

APudef;pOfwef;ud k y½d k*&rfa&;om;jcif;udef;pOfwef;udk y½d k*&rfa&;om;jcif;udef;pOfwef;ud k y½d k*&rfa&;om;jcif;udef;pOfwef;udk y½d k*&rfa&;om;jcif;udef;pOfwef;udk y½d k*&rfa&;om;jcif;

atmufyg Form yH kpHtm; zefwD;wnfaqmufyg/ yH k(125)/ 4if;wGif  ,

, rsm;jzif hzefwD;xm;NyD; Command Button rsm;wGif vd ktyfaomy½d k*&rfrsm;a&;om;&ef jzpfygonf/

Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf vd ktyfaomy½d k*&rfrsm;ud ka&;om;&rnf/

yH k(124)

yH k(125)

Contents

Page 113: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 113/463

106 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Run Command Button twGufPrivate Sub Command1_Click()

'AP (Arithmetic Progression)

Clsa = Val(Text1)

d = Val(Text2)

n = Val(Text3)

Print " No? Terms Sum "

k = 1: t = a: s = a

Print k, t, s

For k = 2 To n

t = t + d: s = s + t: Print k, t, s

NextEnd Sub

Exit Command Button twGufPrivate Sub Command2_Click()

Unload Me

End

End Sub

tqd kygy½d k*&rfud k Run ygu yH k(126)twd kif; azmfjyrnfjzpfonf/

yH k(126)

Contents

Page 114: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 114/463

107 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

GP udef;pOfwef;ud k y½d k*&rfa&;om;jcif;udef;pOfwef;ud k y½d k*&rfa&;om;jcif;udef;pOfwef;ud k y½d k*&rfa&;om;jcif;udef;pOfwef;ud k y½d k*&rfa&;om;jcif;udef;pOfwef;ud k y½d k*&rfa&;om;jcif;

atmufyg Form yH kpHtm; zefwD;wnfaqmufyg/ yH k(127)/ 4if;wGif  ,

, rsm;jzif hzefwD;xm;NyD; Command Button rsm;wGif vd ktyf

aomy½d k*&rfrsm;a&;om;&ef jzpfygonf/

Run Command Button twGufPrivate Sub Command1_Click()

'GP (Arithmetic Progression)

Cls

a = Val(Text1)d = Val(Text2)

n = Val(Text3)

Print " No? Terms G.P Sum "

k = 1: t = a: s = a

Print k, t, s

For k = 2 To n

t = t * d: s = s + t: Print k, t, s

Next

End Sub

Exit Command Button twGufPrivate Sub Command2_Click()

Unload Me

End

End Sub

yH k(127)

Contents

Page 115: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 115/463

108 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

tqd kygy½d k*&rfud k Run ygu yH k(128)twd kif; azmfjyrnfjzpfonf/

S = 1 + 2 + 3 + ... + N udef;pOfwef;wd k Yud k aygif;jcif;udef;pOfwef;wd kYudk aygif;jcif;udef;pOfwef;wd k Yud k aygif;jcif;udef;pOfwef;wd kYudk aygif;jcif;udef;pOfwef;wd kYud k aygif;jcif;

atmufyg Form yH kpHtm; zefwD;wnfaqmufyg/ yH k(129)/ 4if;wGif  ,

, rsm;jzif hzefwD;xm;NyD; Properties toD;oD;ud k jyifqifjznf hpGufNyD;aemuf Command Button rsm;wGif vd ktyfaomy½d k*&rfrsm;a&;om;&ef jzpfygonf/

Run Command Button twGufPrivate Sub Command1_Click()

'To find the sum of N terms of the series

'S = 1 + 2 + 3 + ... + N

Cls

n = Val(Text1)If n = 0 Then End

Sum = 1

For i = 2 To n

Sum = Sum + i

Next

yH k(128)

yH k(129)

Contents

Page 116: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 116/463

109 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Print "The sum of the series is "; Sum Print k, t, s

End Sub

Exit Command Button twGuf

Private Sub Command2_Click()Unload Me

End

End Sub

tqd kygy½d k*&rfud k Run ygu yH k(130)twd kif; azmfjyrnfjzpfonf/

S = 1 * 2 * 3 * ... * N udef;pOfwef;wdk Yud k aygif;jcif;udef;pOfwef;wd k Yud k aygif;jcif;udef;pOfwef;wdk Yud k aygif;jcif;udef;pOfwef;wd k Yud k aygif;jcif;udef;pOfwef;wd k Yud k aygif;jcif;

atmufyg Form yH kpHtm; zefwD;wnfaqmufyg/ yH k(131)/ 4if;wGif  ,

, rsm;jzif hzefwD;xm;NyD; Properties toD;oD;ud k jyifqifjznf hpGufNyD;aemuf Command Button rsm;wGif vd ktyfaomy½d k*&rfrsm;a&;om;&ef jzpfygonf/

Run Command Button twGufPrivate Sub Command1_Click()

'To find the Product of N terms of the series'S = 1 * 2 * 3 * ... * N

Cls

n = Val(Text1)

If n = 0 Or n > 17 Then End

pro = 1

yH k(130)

yH k(131)

Contents

Page 117: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 117/463

110 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

For i = 2 To n

pro = pro * i

Next

Print "The Product of the series is "; pro

End Sub

Exit Command Button twGufPrivate Sub Command2_Click()

Unload Me

End

End Sub

tqd kygy½d k*&rfud k Run ygu yH k(132)twd kif; azmfjyrnfjzpfonf/

udef;pOfwef;udef;pOfwef;udef;pOfwef;udef;pOfwef;udef;pOfwef; S = 1 + 1/4 + 1/9 + ... + 1/N*N wd k Yud k½SmazGjcif;wd k Yud k½S mazGjcif;wd k Yud k½SmazGjcif;wd k Yud k½S mazGjcif;wd k Yud k½S mazGjcif;

atmufyg Form yH kpHtm; zefwD;wnfaqmufyg/ yH k(133)/ 4if;wGif  ,

, rsm;jzif hzefwD;xm;NyD; Properties toD;oD;ud k jyifqifjznf hpGufNyD;aemuf Command Button rsm;wGif vd ktyfaomy½d k*&rfrsm;a&;om;&ef jzpfygonf/

Run Command Button twGufPrivate Sub Command1_Click()

Cls

n = Text1

If n = 0 Then End

sum1 = 0

yH k(132)

yH k(133)

Contents

Page 118: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 118/463

111 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

For i = 1 To n

sum1 = sum1 + 1 / i ^ 2

Next

Print "The Sum of the series is "; sum1

End Sub

Exit Command Button twGufPrivate Sub Command2_Click()

Unload Me

End

End Sub

tqd kygy½d k*&rfud k Run ygu yH k(134)twd kif; azmfjyrnfjzpfonf/

udef;pOfwef;udef;pOfwef;udef;pOfwef;udef;pOfwef;udef;pOfwef; P = (2/3)(3/4)(4/5)...(N/N+1) wd kYud k½S mazGjcif;wdk Yudk½S mazGjcif;wd kYud k½S mazGjcif;wdk Yudk½S mazGjcif;wd kYudk½S mazGjcif;

atmufyg Form yH kpHtm; zefwD;wnfaqmufyg/ yH k(135)/ 4if;wGif  ,

, rsm;jzif hzefwD;xm;NyD; Properties toD;oD;ud k jyifqifjznf hpGuf

NyD;aemuf Command Button rsm;wGif vd ktyfaomy½d k*&rfrsm;a&;om;&ef jzpfygonf/

Run Command Button twGufPrivate Sub Command1_Click()

Cls

n = Text1

If n = 0 Or n > 18 Then End

pro = 1

yH k(134)

yH k(135)

Contents

Page 119: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 119/463

112 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

For i = 1 To n

pro = pro * (i + 1) / (i + 2)

Next

Print "The Product of the series is "; pro

End Sub

Exit Command Button twGufPrivate Sub Command2_Click()

Unload Me

End

End Sub

tqd kygy½d k*&rfud k Run ygu yH k(136)twd kif; azmfjyrnfjzpfonf/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(136)

Contents

Page 120: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 120/463

113 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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;wGifrsm;jzif hzefwD;xm;NyD; Command Button rsm;wGif vd ktyfaomy½d k*&rfrsm;

a&;om;&ef jzpfygonf/

Command1 Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

Form1.Hide

Form2.Show

End Sub

Command2 Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Unload Me

End

End Subxd k Yaemuf Form2 yH kpHtm;zefwD;wnfaqmufxm;&rnf/ yH k(138)/ 4if;wGif  ,

, , rsm;jzif hzefwD;xm;NyD; Command Button

rsm;wGif vd ktyfaomy½d k*&rfrsm; a&;om;&ef jzpfygonf/

yH k(137)

Contents

Page 121: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 121/463

114 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

yH k(138)

rS  m jzif hwnfaqmufxm;ygonf/ Adodc

\ Properties wGif yH k(139)? yH k(140)ygtwd kif;jyifqifxm;&rnf/(Name) - Wado

Caption - Empty

ConnectionString - PROVIDER = MSDASQL; dsn = Test2; uid=;

pwd=;

RecordSource - Select [Roll Number], Name, Myanmar, English,

Maths, Total from Test2

Contents

Page 122: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 122/463

115 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Connection String \ nmzuf Box wGif Cursor csygu EllipsistrSwftom;ygCommand Button ud k  Mouse Left Click  jzif ha½G;cs,fygu yH k(141)ygtwd kif;Property Pages Dialog Box ay:vmrnf/ General Tab Command Button ud ka½G;cs,fyg/ Use Connection String [ka&;om;xm;onf h Option Button ud ka½G;cs,fyg/

xd k Yaemuf4if;acgif;pOfatmuf List Box ü PROVIDER=MSDASQL;dsn=Test2;uid=;pwd=;ud kjznf hpGufí OK ud ka½G;cs,f&ayrnf/

yH k(139) yH k(140)

Contents

Page 123: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 123/463

116 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

yH k(141)

RecordSource \ nmzuf Box wGif Cursor csygu Ellipsis trSwftom;ygCommand Button ud k  Mouse Left Click  jzif ha½G;cs,fygu yH k(142)ygtwd kif;Property Pages Dialog Box ay:vmrnf/ Command Text (SQL) List Box wGifCursor xnf hyg/ xd k Yaemuf Select [Roll Number], Name,Myanmar,English,Maths,

Total from Test2ud kjznf hpGufí OK ud ka½G;cs,f&ayrnf/

yH k(142)

Contents

Page 124: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 124/463

117 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Text1 Text Box \ Properties wGifatmufygtwd kif;jyifqifjznf hpGuf&ef-DataSource - Wado

DataField - Roll Number

Text - EmptyText2 Text Box \ Properties wGifatmufygtwd kif;jyifqifjznf hpGuf&ef-

DataSource - Wado

DataField - Name

Text - Empty

Text3 Text Box \ Properties wGifatmufygtwd kif;jyifqifjznf hpGuf&ef-DataSource - Wado

DataField - Myanmar

Text - Empty

Text4 Text Box \ Properties wGifatmufygtwd kif;jyifqifjznf hpGuf&ef-DataSource - Wado

DataField - English

Text - Empty

Text5 Text Box \ Properties wGifatmufygtwd kif;jyifqifjznf hpGuf&ef-DataSource - Wado

DataField - Maths

Text - Empty

Text6 Text Box \ Properties wGifatmufygtwd kif;jyifqifjznf hpGuf&ef-DataSource - Wado

DataField - Total

Text - Empty

Form2 \ Command Button rsm;twGuf y½d k*&rfrsm;tm;atmufygtwd kif;a&;om;&rnf/(3)bmomaygif;jcif;(3)bmomaygif;jcif;(3)bmomaygif;jcif;(3)bmomaygif;jcif;(3)bmomaygif;jcif; Command Button twGuftwGuftwGuftwGuftwGufPrivate 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.Update

Contents

Page 125: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 125/463

118 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Wado.Recordset.MoveNext

Loop

Wado.Recordset.MoveFirst

End Sub

rlvae&mod k YjyefoGm;jcif;rlvae&mod kYjyefoG m;jcif;rlvae&mod k YjyefoGm;jcif;rlvae&mod kYjyefoG m;jcif;rlvae&mod kYjyefoG m;jcif; Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Form2.Hide

Form1.Show

End Sub

Record Position jyo&eftwGufjyo&eftwGufjyo&eftwGufjyo&eftwGufjyo&eftwGufPrivate Sub Wado_MoveComplete(ByVal adReason As ADODB.Event

ReasonEnum, ByVal pError As ADODB.Error, adStatus As

ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)

Wado.Caption = "Record: " & CStr(Wado.Recordset.AbsolutePosition)

End Sub

tqd kygy½d k*&rfud k Run ygu yH k(143)twd kif; azmfjyrnfjzpfonf/

yH k(143)

Contents

Page 126: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 126/463

119 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

DataGrid jzif hjzif hjzif hjzif hjzif h Update jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;atmufyg Form yHkpHtm; zefwD;wnfaqmufxm;&rnf/ yHk(144)/ 4if;wGif

rsm;jzif hzefwD;xm;NyD; Command Button rsm;wGif vd ktyfaomy½d k*&rfrsm;

a&;om;&ef jzpfygonf/

zd kifzGifjcif;zd kifzGifjcif;zd kifzGifjcif;zd kifzGifjcif;zd kifzGifjcif; Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

Form1.Hide

Form2.ShowEnd Sub

xGufjcif;xGufjcif;xGufjcif;xGufjcif;xGufjcif; Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Unload Me

End

End Sub

xd k Yaemuf Form2 yH kpHtm;zefwD;wnfaqmufxm;&rnf/ þuJ hod k Ywnfaqmuf&mwGif

Adodc, DataGrid rsm; Toolbox xJwGif½S  d&efvd ktyfayonf/ Toolbox xJ½Sd  IconvGwfaeaomrsufES mjyiftm; Mouse Pointer jzif haxmufí Right Click ud ka½G;cs,fyg/xd ktcg yH k(145)ygtwd kif; Short Cut Menu wpfckay:vmayrnf/

yH k(144)

Contents

Page 127: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 127/463

120 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

yHk(145)yg Short Cut Menu rS Components... udka½G;cs,f&rnf/ xdktcgyH k(146)ygtwd kif; Components Dialog Box ay:vmrnf/

Controls Tab Command acgif;pOfatmuf Vertical Scroll Bar rS Dropdown

Arrow ud ktoH k;jyKNyD; Adodc ESifh DataGrid wd k Y½S  donf hae&mrsm;ud k Check jyKvkyf&rnf/yH k(147)/

yH k(145)

yH k(146)

Contents

Page 128: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 128/463

121 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

xd k Yaemuf Apply Command Button ud ka½G;cs,fyg/ OK ae&m Command Button

wGif Close ay:vmygu4if;udka½G;cs,f&rnf/ xdktcg Toolbox xJü Adodc ESifhDataGrid wd k Y Icon rsm;a&muf½S  dvmrnf/ yH k(148)/

yH k(147)

yH k(148)

Contents

Page 129: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 129/463

122 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

xd k Yaemuf Form2 yH kpHtm;zefwD;wnfaqmufxm;&rnf/ yH k(149)/ 4if;wGif  ,

, , rsm;jzif hzefwD;xm;NyD; Properties rsm;ud kjyifqifjznf hpGuf

í Command Button rsm;wGif vd ktyfaomy½d k*&rfrsm;a&;om;&ef jzpfygonf/

DataGrid\

PropertieswGif atmufygwd k Yud kjyifqifjznf hpGuf&ef/ yH k(150)/AllowAddnew - True

AllowArrows - True

AllowDelete - True

AllowUpdate - True

DataSource - Wado

yH k(149)

Contents

Page 130: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 130/463

123 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

yH k(150)

xd k Yaemuf DataGrid ay:od k Y Mouse Left Click  jzif ha½G;cs,fNyD; Mouse Right

Click ud kES  dyfyg/ yHk(151)yg Short Cut Menu ay:vmygu Retrieve Fields ud kxyfrHa½G;cs,f&rnf/

Contents

Page 131: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 131/463

124 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

xd ktcg yH k(152)yg Retrieve fields Dialog Box ay:vmygu Yesud kxyfrHa½G;cs,fyg/

yH k(153)ygtwd kif; DataGrid xJwGif oufqd kif&m Fields ud kawG U½S  d&ayrnf/

yH k(151)

yHk(152)

Contents

Page 132: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 132/463

125 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

yH k(153)

(3)bmomaygif;jcif;(3)bmomaygif;jcif;(3)bmomaygif;jcif;(3)bmomaygif;jcif;(3)bmomaygif;jcif; Command Button twGuftwGuftwGuftwGuftwGufPrivate 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

Wado.Recordset.MoveNext

Loop

Wado.Recordset.MoveFirst

End Sub

rlvae&mod k YjyefoGm;jcif;rlvae&mod kYjyefoG m;jcif;rlvae&mod k YjyefoGm;jcif;rlvae&mod kYjyefoG m;jcif;rlvae&mod kYjyefoG m;jcif; Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Form2.Hide

Form1.Show

End Sub

Contents

Page 133: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 133/463

126 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Record Position jyo&eftwGufjyo&eftwGufjyo&eftwGufjyo&eftwGufjyo&eftwGufPrivate Sub Wado_MoveComplete(ByVal adReason As ADODB.Event

ReasonEnum, ByVal pError As ADODB.Error, adStatus As

ADODB.EventStatusEnum, ByVal pRecordset As ADODB.Recordset)

Wado.Caption = "Record: " & CStr(Wado.Recordset.AbsolutePosition)

End Sub

tqd kygy½d k*&rfud k Run ygu yH k(154)twd kif; azmfjyrnfjzpfonf/

Access 2002 Database File wGif wGif wGif wGif wGif Field topfxyfxnfhítopfxyfxnf hítopfxyfxnfhítopfxyfxnf hítopfxyfxnf hí Update vkyfjcif;vkyfjcif;vkyfjcif;vkyfjcif;vkyfjcif;Access 2002 Database File jzpfaom Test2.mdb wGif Result, Amount of 

Fail [lí Field topf(2)ckxyfrHxnf hyg/ xd k Yaemuf  Visual Basic 6.0 jzif hy½d k*&rfa&;om;rnfqd ku yxrOD;pG myH k(155)ygtwd kif; Form1 ud kwnfaqmuf&rnf/

yH k(154)

Contents

Page 134: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 134/463

127 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

yHk(155)

txufyg yH k(155)wGif rsm;jzif hzefwD;xm;NyD; Command Button

rsm;wGif vd ktyfaomy½d k*&rfrsm; a&;om;&ef jzpfygonf/zd kifzGifjcif;zd kifzGifjcif;zd kifzGifjcif;zd kifzGifjcif;zd kifzGifjcif; Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

Form1.Hide

Form2.Show

End Sub

xGufjcif;xGufjcif;xGufjcif;xGufjcif;xGufjcif; Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Unload Me

End

End Sub

xd k Yaemuf Form2 yH kpHtm; yH k(156)ygtwd kif; zefwD;wnfaqmufxm;&rnf/

Contents

Page 135: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 135/463

128 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

(3)bmomaygif;jcif;(3)bmomaygif;jcif;(3)bmomaygif;jcif;(3)bmomaygif;jcif;(3)bmomaygif;jcif; Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

Wado.Recordset.MoveFirst

b = 1 'Record Counter

Do 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 If 

If 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 And

Wado.Recordset("English") < 40 And

Wado.Recordset("Maths") >= 40 Then

Wado.Recordset("Amount of Fail") = "2"

yH k(156)

Contents

Page 136: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 136/463

129 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

ElseIf Wado.Recordset("Myanmar") < 40 And

Wado.Recordset("English") >= 40 And

Wado.Recordset("Maths") < 40 Then

Wado.Recordset("Amount of Fail") = "2"

ElseIf Wado.Recordset("Myanmar") >= 40 And

Wado.Recordset("English") < 40 And

Wado.Recordset("Maths") < 40 Then

Wado.Recordset("Amount of Fail") = "2"

ElseIf Wado.Recordset("Myanmar") < 40 And

Wado.Recordset("English") >= 40 And

Wado.Recordset("Maths") >= 40 Then

Wado.Recordset("Amount of Fail") = "1"

ElseIf Wado.Recordset("Myanmar") >= 40 AndWado.Recordset("English") < 40 And

Wado.Recordset("Maths") >= 40 Then

Wado.Recordset("Amount of Fail") = "1"

ElseIf Wado.Recordset("Myanmar") >= 40 And

Wado.Recordset("English") >= 40 And

Wado.Recordset("Maths") < 40 Then

Wado.Recordset("Amount of Fail") = "1"

Else

Wado.Recordset("Amount of Fail") = Null

End If 

Wado.Recordset.Update

Wado.Recordset.MoveNext

b = b + 1

Loop

Wado.Recordset.MoveFirst

Text1.Text = b - 1

End Subrlvae&mjyefoGm;jcif;rlvae&mjyefoG m;jcif;rlvae&mjyefoGm;jcif;rlvae&mjyefoG m;jcif;rlvae&mjyefoGm;jcif; Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Form2.Hide

Form1.Show

End Sub

Contents

Page 137: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 137/463

130 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

tqd kygy½d k*&rfud k Run ygu yH k(157)twd kif; azmfjyrnfjzpfonf/

Access 2002 Database File ½Sd ½S  d ½Sd ½S  d ½S  d Query File tm;ac:oH k;jcif;tm;ac:oHk;jcif;tm;ac:oH k;jcif;tm;ac:oHk;jcif;tm;ac:oH k;jcif;Access 2002 Database File jzpfaom Test2.mdb wGif Position [lí Field

topf(1)ckxyfrHxnf hyg/ Result Field ud k Descending, Amount of Fail Field ud k

Ascending, Total Field ud k Descending jzif hpDxm;aom ptest2 trnf½S  d QueryFile wpfckwnfaqmufxm;yg/ xd k Yaemuf Visual Basic 6.0 jzif hy½d k*&rfa&;om;rnfqd kuyxrOD;pG myH k(158)ygtwd kif; Form1 ud kwnfaqmuf&rnf/

yH k(157)

yH k(158)

Contents

Page 138: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 138/463

131 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

yH k(158)wGif rsm;jzif hzefwD;xm;NyD; Command Button rsm;wGifvd ktyfaomy½d k*&rfrsm; a&;om;&ef jzpfygonf/zd kifzGifjcif;zd kifzGifjcif;zd kifzGifjcif;zd kifzGifjcif;zd kifzGifjcif; Command Button twGuftwGuftwGuftwGuftwGuf

Private Sub Command1_Click()Form1.Hide

Form2.Show

End Sub

xGufjcif;xGufjcif;xGufjcif;xGufjcif;xGufjcif; Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Unload Me

EndEnd Sub

xd k Yaemuf Form2 yH kpHtm; yH k(159)ygtwd kif; zefwD;wnfaqmufxm;&rnf/

yH k(159)

Contents

Page 139: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 139/463

132 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Adodc \ Properties wGifatmufygwd k Yud kjyifqifjznf hpGuf&ef-(Name) - Wado

Caption - Empty

ConnectionString - PROVIDER = MSDASQL; dsn = Test2; uid=;pwd=;

RecordSource - Select [Roll Number], Name, Myanmar, English,

Maths, Total, Result, [Amount of Fail], Position

from ptest2

(3)bmomaygif;jcif;(3)bmomaygif;jcif;(3)bmomaygif;jcif;(3)bmomaygif;jcif;(3)bmomaygif;jcif; Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

Wado.Recordset.MoveFirstp = Wado.Recordset("Total") 'Initialize Total

q = Wado.Recordset("Result") 'Initialize Result

r = Wado.Recordset("Amount of fail") 'Initialize Amount of Fail

a = 1 'Duplicate Total

b = 1 'Record Counter

Do 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 If 

If Wado.Recordset("Myanmar") < 40 And Wado.Recordset("English")

< 40 And Wado.Recordset("Maths") < 40 Then

Wado.Recordset("Amount of Fail") = "3"

ElseIf Wado.Recordset("Myanmar") < 40 And

Wado.Recordset("English") < 40 And

Wado.Recordset("Maths") >= 40 Then

Wado.Recordset("Amount of Fail") = "2"

ElseIf Wado.Recordset("Myanmar") < 40 And

Contents

Page 140: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 140/463

Page 141: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 141/463

134 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

a = b

End If 

p = Wado.Recordset("Total") 'Initialize Total

q = Wado.Recordset("Result") 'Initialize Result

r = Wado.Recordset("Amount of fail") 'Initialize Amount of Fail

Wado.Recordset.Update

Wado.Recordset.MoveNext

b = b + 1

Loop

Wado.Recordset.MoveFirst

Text1.Text = b - 1

End Sub

rlvae&mjyefoGm;jcif; jcif;rlvae&mjyefoG m;jcif; jcif;rlvae&mjyefoGm;jcif; jcif;rlvae&mjyefoG m;jcif; jcif;rlvae&mjyefoGm;jcif; jcif; Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Form2.Hide

Form1.Show

End Sub

tqd kygy½d k*&rfud k Run ygu yH k(160)twd kif; azmfjyrnfjzpfonf/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(160)

Contents

Page 142: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 142/463

135 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 Type

Byte

Boolean

Integer

Long

(long integer)

Single

(single precision

floating-point

Double

(double-precision

floating-point

Currency

(scaled integer)

Decimal

Date

Object

String

(variable-length)

String

(fixed-length)

Variant(with numbers)

Variant

(with characters)

User-defined

(using type)

Storage Size

1 byte

2 bytes

2 bytes

4 bytes

4 bytes

8 bytes

8 bytes

14 bytes

8 bytes

4 bytes

10 bytes

+ string length

Length of string

16 bytes

22 bytes

+string length

Number

required by

elements

Range

0 to 255

True or False

-32,768 to 32767

-2,147,483,648 to 2,147,483,647

-3.402823E38 to -1.401298E-45 for negative

values; 1.401298E-45 to 3.402823E38 for

positive values

-1.79769313486232E308 to

-4.94065645841247E-324 for negative

values; 4.94065645841247E-324 to

1.79769313486232E308 for positive values

-922,337,203,685,477.5808 to

922,337,203,685,477.5808

+/-79,228,162,514,264,337,593,543,950,335

with no decimal point;

+/-79,228,162,514,264,337,593,543,950,335

with 28 places to the right of the decimal point;smallest nonzero number is

+/-0.00000000000000000000000000001

January 1, 100 December 31, 9999

Any Object reference

0 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 the

range of its data type

Contents

Page 143: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 143/463

136 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

erlemy½d k*&rfrsm;erlemy½d k*&rfrsm;erlemy½d k*&rfrsm;erlemy½d k*&rfrsm;erlemy½d k*&rfrsm;

yH k(161)yg Form wGif  , , wd k Yjzif hwnfaqmuf

xm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button toD;oD;wGifvd ktyfaom y½d k*&rfrsm;ud ka&;om;&ayrnf/Text1 TextBox \\\\\ Properties rS m -rS m -rS m -rS m -rS m -Alignment - 2 - Center

Font - MS Sans Serif, Regular, 24

Text - EmptyImage1 Image \\\\\ Properties rSm -rSm -rSm -rSm -rSm -Picture - Phone.wmf  

Stretch - True

Display Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

Text1.Text = Date

End Sub

Exit Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Unload Me

End

End Sub

yH k(161)

Contents

Page 144: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 144/463

137 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Form Click twGuftwGuftwGuftwGuftwGufPrivate Sub Form_Click()

Text1.Font.Bold = True

End SubImage1 Click twGuftwGuftwGuftwGuftwGufPrivate Sub Image1_Click()

Image1.Move Image1.Left + 50, Image1.Top - 550

MsgBox "Hello"

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(162)yg Form wGif  , , ,

wd k Yjzif hwnfaqmufxm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button

toD;oD;wGif vd ktyfaom y½d k*&rfrsm;ud ka&;om;&ayrnf/Picture1 PictureBox \\\\\ Properties rS m -rS m -rS m -rS m -rS m -

(Name) - Picture1AutoSize - False

Picture - "C:\WINDOWS\SETUP.BMP"

Text1 TextBox \\\\\ Properties rS m -rS m -rS m -rS m -rS m -Font - MS Sans Serif, Regular, 14

Text - Empty

yH k(162)

Contents

Page 145: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 145/463

138 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Command1 Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

Command1.Caption = Text1.Text

End SubExit Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Unload Me

End

End Sub

Private Sub Form_Load()

Picture1.Picture = LoadPicture("c:\windows\setup.bmp")

Label1.Caption = Date

Label2.Caption = TimeEnd Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)

If KeyAscii > 47 And KeyAscii <= 58 Then

KeyAscii = 8

End If 

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(163)

Contents

Page 146: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 146/463

139 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

yH k(163)yg Form wGif  , , wd k Yjzif hwnf

aqmufxm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button toD;oD;wGif vd ktyfaom y½d k*&rfrsm;ud ka&;om;&ayrnf/Text1 TextBox \\\\\ Properties rS m -rS m -rS m -rS m -rS m -Alignment - Left Justify

Font - MS Sans Serif, Regular, 12

Text - Empty

Add Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

List1.AddItem Text1.Text

End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

Unload Me

End

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(164)

Contents

Page 147: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 147/463

140 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

yH k(164)yg Form wGif  , , wd k Yjzif hwnf

aqmufxm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button toD;oD;wGif vd ktyfaom y½d k*&rfrsm;ud ka&;om;&ayrnf/>> Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

Dim i As Integer

For i = 0 To List2.ListCount - 1

If List2.Selected(i) Then

List1.AddItem List2.List(i)

End If 

Next i

For i = List2.ListCount - 1 To 0 Step -1If List2.Selected(i) Then

List2.RemoveItem (i)

End If 

Next i

End Sub

<< Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

Dim i As Integer

For i = 0 To List1.ListCount - 1

If List1.Selected(i) Then

List2.AddItem List1.List(i)

End If 

Next i

For i = List1.ListCount - 1 To 0 Step -1

If List1.Selected(i) Then

List1.RemoveItem (i)

End If Next i

End Sub

Contents

Page 148: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 148/463

141 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 Me

End

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -Looping Structure

Do ... Loop

For ... NextFor Each ... Next

Do While ... Loop

Do While <Condition>

[Statements]

[Exit Do]

[Statements]

Loop

Do Until ... Loop

Do Until <Condition>

[Statements]

[Exit Do]

[Statements]

Loop

Do ... Loop While <Condition>Do

[Statements]

Loop While <Condition>

Contents

Page 149: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 149/463

142 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 - - - - - - - - - - - - - - -

yH k(165)yg Form wGif wd k Yjzif hwnfaqmufxm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button toD;oD; wGif vd ktyfaom y½d k*&rfrsm;ud k

a&;om;&ayrnf/General, Declaration wGifwGifwGifwGifwGifPrivate Sub Demoloop()

n = 1

Do While n <= 10

MsgBox n

yH k(165)

Contents

Page 150: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 150/463

143 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

n = n + 1

Loop

End Sub

Private 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 Sub

Command1 Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

Demoloop

End Sub

Command2 Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

Demoloop1End Sub

For ... Next

For Counter = Start To End [Step Increment]

[Statements]

Next

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

Contents

Page 151: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 151/463

144 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

yH k(165)yg Form wGif jzif hwnfaqmufxm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button wGif vd ktyfaomy½d k*&rfrsm;ud k a&;om;&ayrnf/Command1 Command Button wGifwGifwGifwGifwGifPrivate Sub Command1_Click()

Unload MeEnd

End Sub

Form Click wGifwGifwGifwGifwGifPrivate Sub Form_Click()

Print Screen.FontCount

Dim i As Integer

For i = 0 To Screen.FontCount

Print Screen.Fonts(i)

NextEnd Sub

yH k(166)

Contents

Page 152: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 152/463

Page 153: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 153/463

146 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Case "+"

Text3.Text = num1 + num2

Case "-"

Text3.Text = num1 - num2

Case "*"

Text3.Text = num1 * num2

Case "/"

Text3.Text = num1 / num2

End Select

End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

Unload MeEnd

End Sub

Form 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;ud kjyifqifjznf hpGufNyD;aemuf Command Button

toD;oD;wGif vd ktyfaom y½d k*&rfrsm;ud ka&;om;&ayrnf/

yH k(168)

Contents

Page 154: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 154/463

147 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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

End

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(169)yg Form wGif  , , wd k Yjzif h wnfaqmuf

xm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button toD;oD;wGifvd ktyfaom y½d k*&rfrsm;ud ka&;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

yH k(169)

Contents

Page 155: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 155/463

Page 156: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 156/463

149 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Timer1 Timer twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Timer1_Timer()

Dim i As Integer

Label1.Caption = Right(Trim(Label1.Caption), Len(Trim(Label1.Caption)) - 1) + Trim(Left(Label1.Caption, 1))

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

Toolbox wGifyg0ifaomwGifyg0ifaomwGifyg0ifaomwGifyg0ifaomwGifyg0ifaom Icon rsm;ESif herlemy½d k*&rfrsm;rsm;ESif herlemy½d k*&rfrsm;rsm;ESif herlemy½d k*&rfrsm;rsm;ESif herlemy½d k*&rfrsm;rsm;ESif herlemy½d k*&rfrsm;

Pointer PictureBox Label

TextBox Frame Command

Button

CheckBox OptionButton ComboBox

ListBox HScrollBar VScrollBar

Timer DriveListBox DirListBox

FileListBox Shape Line

Image DataControl OLE

Contents

Page 157: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 157/463

150 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

yH k(171)yg Form wGif  FileListBox, DriveListBox, DirListBox,

 Image, wd k Yjzif h wnfaqmufxm;NyD; Properties rsm;ud kjyifqif

jznf hpGufNyD;aemuf Command Button toD;oD;wGif vd ktyfaom y½d k*&rfrsm;ud ka&;om;&ayrnf/Image1 Image Properties twGuf -(Name) - Image1

Stretch - TrueFile FileListBox Properties twGuf -(Name) - File1

Pattern - *.bmp;*.jpg;*.gif;*.pic;*.tif;*.ico

Show Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

Image1.Picture = LoadPicture(Dir1.Path & "\" & File1.FileName)

End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

Unload Me

End

End Sub

yH k(171)

Contents

Page 158: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 158/463

151 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Directory Change &eftwGuf -&eftwGuf -&eftwGuf -&eftwGuf -&eftwGuf -Private Sub Dir1_Change()

File1.Path = Dir1.Path

End SubDrive Change &eftwGuf -&eftwGuf -&eftwGuf -&eftwGuf -&eftwGuf -Private Sub Drive1_Change()

Dir1.Path = Drive1.Drive

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(172)yg Form wGif  Frame , Shape, HScrollBar,

VScrollBar, CheckBox, OptionButton, wdk Y jzif hwnfaqmufxm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button

toD;oD;wGif vd ktyfaom y½d k*&rfrsm;ud ka&;om; &ayrnf/Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

Unload Me

End

End Sub

yH k(172)

Contents

Page 159: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 159/463

152 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Horizontal Scroll Bar twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub HScroll1_Change()

Shape1.Width = HScroll1.Value

End SubVertical Scroll Bar twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub VScroll1_Change()

Shape1.Height = VScroll1.Value

End Sub

Option1 Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Option1_Click()

If Option1.Value Then

Shape1.Shape = 0

End If 

End Sub

Option2 Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Option2_Click()

If Option2.Value Then

Shape1.Shape = 2

End If 

End Sub

Option3 Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Option3_Click()

If Option3.Value Then

Shape1.Shape = 4

End If 

End Sub

Shape1 - Fill Style

0 Solid 4 Upward Diagonal1 Transparent 5 Downward Diagonal

2 Horizontal Line 6 Cross

3 Vertical Line 7 Diagonal Cross

Contents

Page 160: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 160/463

Page 161: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 161/463

154 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Timer1 twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Timer1_Timer()

Text1.Text = Time$

End Sub

rivate Sub Command1_Click()

Unload Me

End

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(174)yg Form wGif  TextBox, wd k Yjzif h wnfaqmufxm;NyD;Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button toD;oD;wGif vd ktyfaomy½d k*&rfrsm;ud ka&;om;&ayrnf/Text1, Text2, Text3, Text4 TextBox Properties twGuf -Alignment - 2 - Center

Font - MS Sans Serif, 14, Bold

Text - Empty

Command1 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.Text

End Sub

yH k(174)

Contents

Page 162: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 162/463

155 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Command2 Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Text4.Text = Format(Text3.Text, ">")

End SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command3_Click()

Unload Me

End

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(175)yg Form wGif  Label,  TextBox, wd k Yjzif h wnfaqmufxm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button toD;oD;wGif vd ktyfaom y½d k*&rfrsm;ud ka&;om;&ayrnf/Text1, Text2 TextBox Properties twGuf -Alignment - 2 - Center

Font - MS Sans Serif, 12, Bold

Text - Empty

Command1 Command Button twGuf -twGuf -twGuf -twGuf -twGuf -

Private Sub Command1_Click()Unload Me

End

End Sub

yH k(175)

Contents

Page 163: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 163/463

156 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Text1 wGifwGif wGifwGif wGif Data xnf honfESif hxnf honfESifh xnf honfESif hxnf honfESifh xnf honfESif h 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) + 32

End SubText2 wGifwGif wGifwGif wGif Data xnf honfESif hxnf honfESifh xnf honfESif hxnf honfESifh xnf honfESif h 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 / 9

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(176)yg Form wGif  Label,  TextBox, wd k Yjzif h wnfaqmufxm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Select Command Button

wGif vd ktyfaom y½d k*&rfrsm;ud ka&;om;&ayrnf/Label1 Label Properties twGuf -(Name) - Label1

AutoSize - True

BackStyle - Transparent

Caption - Empty

Text1 TextBox Properties twGuf -Alignment - 2 - Center

Font - MS Sans Serif, 12, Bold

Text - Empty

Command1 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

yH k(176)

Contents

Page 164: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 164/463

157 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 If 

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(177)yg Form wGif  TextBox, ComboBox, wdkYjzif h wnfaqmufxm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button

toD;oD;wGif vd ktyfaom y½d k*&rfrsm;ud ka&;om;&ayrnf/Text1 TextBox Properties twGuf -Alignment - 2 - Center

Font - MS Sans Serif, 8, Bold

Text - Empty

Add Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

Combo1.AddItem Text1.Text

Text1.Text = Empty

Command2.Enabled = True

End Sub

yH k(177)

Contents

Page 165: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 165/463

158 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Delete Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

n = Combo1.ListIndex

If n <> -1 ThenCombo1.RemoveItem n

End If 

End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command3_Click()

Unload Me

End

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(178)yg Form wGif  OptionButton, wd k Yjzif hwnfaqmuf

xm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Option Button, Command ButtontoD;oD;wGif vd ktyfaom y½d k*&rfrsm;ud ka&;om;&ayrnf/Option Button1 twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Option1_Click()

Form1.BackColor = QBColor(2)

End Sub

yH k(178)

Contents

Page 166: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 166/463

159 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

Unload Me

End

End 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 - - - - - - - - - - - - - - -

Contents

Page 167: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 167/463

160 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

yH k(179)yg Form wGif  OptionButton, wd k Yjzif hwnfaqmuf

xm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Option Button, Command Button

toD;oD;wGif vd ktyfaom y½d k*&rfrsm;ud ka&;om;&ayrnf/Option Button1 twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Option1_Click()

Form1.BackColor = QBColor(0)

End Sub

Option Button2 twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Option2_Click()

Form1.BackColor = QBColor(1)End Sub

Option Button3 twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Option3_Click()

Form1.BackColor = QBColor(2)

End Sub

Option Button4 twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Option4_Click()

Form1.BackColor = QBColor(3)End Sub

Option Button5 twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Option5_Click()

Form1.BackColor = QBColor(4)

End Sub

yH k(179)

Contents

Page 168: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 168/463

161 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 Sub

Option Button8 twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Option8_Click()

Form1.BackColor = QBColor(7)

End Sub

Option Button9 twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Option9_Click()

Form1.BackColor = QBColor(8)

End Sub

Option Button10 twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Option10_Click()

Form1.BackColor = QBColor(9)

End Sub

Option Button11 twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Option11_Click()

Form1.BackColor = QBColor(10)

End Sub

Option Button12 twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Option12_Click()

Form1.BackColor = QBColor(11)

End Sub

Option Button13 twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Option13_Click()

Form1.BackColor = QBColor(12)

End Sub

Contents

Page 169: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 169/463

162 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 Sub

Option Button16 twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Option16_Click()

Form1.BackColor = QBColor(15)

End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

Unload Me

End

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(180)yg Form wGif  CheckBox, wd k Yjzif hwnfaqmufxm;NyD;Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button toD;oD;wGif vd ktyfaomy½d k*&rfrsm;ud ka&;om;&ayrnf/

yH k(180)

Contents

Page 170: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 170/463

Page 171: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 171/463

164 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

End If 

End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -

Private Sub Command2_Click()Unload Me

End

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(182)yg Form wGif Fans, Music System wd k Yud k Menu Editor... jzif hvnf;aumif; TextBox, wd k Yjzif hvnf;aumif;wnfaqmufxm;NyD; Properties

rsm;ud k jyifqifjznf hpGufNyD;aemuf Command Button toD;oD;wGif vd ktyfaomy½d k*&rfrsm;ud k a&;om;&ayrnf/General, Declaration wGif -wGif -wGif -wGif -wGif -Dim LastItem As Integer

Menu Editor Dialog Box wGif -wGif -wGif -wGif -wGif -Caption - &Fans

Name - Fans

Caption - &Music System

Name - mnMusic

mnMusic \ Properties ud k yH k(183)ygtwd kif; Index tm; 0 (Zero) xm;ay;&rnf/xd krSom y½d k*&rf Run í&ayrnf/

yH k(182)

Contents

Page 172: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 172/463

165 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Run Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

lastitem = lastitem + 1

If lastitem > 10 Then

MsgBox "Limit Exceeded"

ElseLoad mnMusic(lastitem)

mnMusic(lastitem).Caption = Text1.Text

End If 

End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

Unload Me

End

End Sub

tqd kyg y½d k*&rfud k Run ygu yH k(184)ygtwd kif;jrifawG U&ayrnf/

yH k(183)

Contents

Page 173: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 173/463

166 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

yH k(184)

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(185)yg Form wGif File, Add, Delete, Exit wd k Yud k Menu Editor... jzif hvnf;aumif;? TextBox, wdkYjzifhvnf;aumif;wnfaqmufxm;NyD;Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button toD;oD;wGifvd ktyfaomy½d k*&rfrsm;ud k a&;om;&ayrnf/Menu Editor Dialog Box wGif -wGif -wGif -wGif -wGif -

Caption Name&File mnFile

&Add mnAdd

&Delete mnDelete

E&xit mnExit

mnSep

yH k(185)

Contents

Page 174: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 174/463

Page 175: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 175/463

168 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Add Menu ud ka½G;ygu ITEM rsm;wd k;vmNyD; Delete Menu a½G;ygu ITEM rsm;ysufoG m;onfud kawG U½S  d&ayrnf/- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(187)yg Form wGif  OptionButton, ,

wdkYjzifhvnf;aumif;wnfaqmufxm;NyD; Properties rsm;udkjyifqifjznfhpGufNyD;aemufCommand Button toD;oD;wGifvdktyfaom y½dk*&rfrsm;udk a&;om;&ayrnf/CommonDialog Control ud k Toolbox twGif;od k YqJ  Gwif&mwGif Toolbox EIwfcrf;om;vGwfaeaomae&mwpfckud k Mouse Pointer ñTefí Right Click ES  dyfyg/ yH k(188)ygtwd kif;Short Cut Menu wpfckay:vmrnf/

yH k(186)

yH k(187)

Contents

Page 176: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 176/463

169 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

yH k(188)wGif Components... ud kxyfrHa½G;cs,fyg/ xd ktcg Components Dialog

Boxay:vmrnf/ yH k(189)/ 4if;rS Microsoft Common Dialog Control 6.0 ud ka½G;cs,fNyD; Apply Command Button ud ka½G;cs,fyg/ xd k Yaemuf Close Command Button ud kxyfrHa½G;cs,f&rnf/

xd ktcg Toolbox wGif yH k(190)ygtwd kif; CommonDialog Control a&muf½S  dvmayrnf/

yH k(188)

yH k(189)

Contents

Page 177: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 177/463

170 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Option1 Option Properties wGif Index ud k 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 If 

End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

Unload Me

End

End Sub

Form xJwGif aemufxyfxJwGif aemufxyf xJwGif aemufxyfxJwGif 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 ThenFor i = 1 To 2

Load Option1(i)

Option1(i).Top = Option1(i - 1).Top + 350

Option1(i).Visible = True

Next i

yH k(190)

Contents

Page 178: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 178/463

171 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Option1(0).Caption = "Open"

Option1(1).Caption = "Save"

Option1(2).Caption = "Color"

Command1.Caption = "Show Dlg"

F = True

End If 

End Sub

txufyg y½d k*&rfud k Run ygu atmufygtwd kif;jrifawG U&rnf/ yH k(191)/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(191)

yH k(192)

Contents

Page 179: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 179/463

172 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

yH k(192)yg Form wGif File, Points, Line, Clear, Exit wd k Yud k Menu Editor... jzifh

vnf;aumif;? vIyf½S m;&rnf htcsdefumvud k  Timer wd k Yjzif hvnf;aumif; wnfaqmuf

xm;NyD; Propertiesrsm;ud kjyifqifjznf hpGufNyD;aemuf Pulldown Menu toD;oD;wGifvd ktyfaom y½d k*&rfrsm;ud k a&;om;&ayrnf/Timer1 Timer Properties wGif -Interval - 100

Caption Name

&File mnFile

...&Points mnPoints

...&Lines mnLines

...&Clear mnClear...- mnSep

...E&xit mnExit

General, Declaration wGif -wGif -wGif -wGif -wGif -Dim Points

Form Load twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Form_Load()

Points = 0

End Sub

Clear Pulldown Menu twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub mnClear_Click()

Points = 0

Form1.Cls

End Sub

Exit Pulldown Menu twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub mnExit_Click()

Unload Me

EndEnd Sub

Contents

Page 180: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 180/463

173 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Lines Pulldown Menu twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub mnLines_Click()

Dim Counter

For Counter = 1 To 100 Step 1Line -(Rnd * Form1.ScaleWidth, Rnd * Form1.ScaleHeight),

RGB(0, 0, 0)

Next

End Sub

Points Pulldown Menu twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub mnPoints_Click()

Points = 1

End Sub

vIyf½S m;&rnfhtcsdefumvtwGuf -vIyf½Sm;&rnf htcsdefumvtwGuf -vIyf½S m;&rnfhtcsdefumvtwGuf -vIyf½Sm;&rnf htcsdefumvtwGuf -vIyf½S m;&rnfhtcsdefumvtwGuf -Private Sub Timer1_Timer()

Dim R, G, B

Dim X, Y

Dim Counter

If Points = 1 Then

For Counter = 1 To 100 Step 1

R = Rnd * 255

G = Rnd * 255B = Rnd * 255

X = Rnd * Form1.ScaleWidth

Y = Rnd * Form1.ScaleHeight

Form1.PSet (X, Y), RGB(R, G, B)

Next

End If 

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

Contents

Page 181: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 181/463

174 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

yH k(192)yg Form wGif Command Button wpfckwnf;jzif homwnfaqmufxm;NyD;vd ktyfaom y½d k*&rfrsm;ud k a&;om;&ayrnf/Form ud k ud k ud k ud k ud k Click vkyfygujzpfay:vm&eftwGuf -vkyfygujzpfay:vm&eftwGuf -vkyfygujzpfay:vm&eftwGuf -vkyfygujzpfay:vm&eftwGuf -vkyfygujzpfay:vm&eftwGuf -Private Sub Form_Click()

Dim i

ScaleHeight = 8

For i = 0 To 5

DrawStyle = i

Line (0, i + 1)-(ScaleWidth, i + 1)Next

End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

Unload Me

End

End Sub

tqd kygy½d k*&rfud k Run NyD; Form xJud k Mouse Left Click vkyfygu yH k(194)ygtwd kif;jrifawG U&rnf/

yHk(193)

Contents

Page 182: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 182/463

175 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(195)yg Form wGif Command Button wpfckwnf;jzif homwnfaqmufxm;NyD;vd ktyfaom y½d k*&rfrsm;ud k a&;om;&ayrnf/Form ud k ud k ud k ud k ud k Click vkyfygujzpfay:vm&eftwGuf -vkyfygujzpfay:vm&eftwGuf -vkyfygujzpfay:vm&eftwGuf -vkyfygujzpfay:vm&eftwGuf -vkyfygujzpfay:vm&eftwGuf -Private Sub Form_Click()

Dim CX, CY, Radius

ScaleMode = 3

CX = ScaleWidth / 2

CY = ScaleHeight / 2

If CX > CY Then Limit = CY Else Limit = CX

yH k(194)

yHk(195)

Contents

Page 183: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 183/463

176 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

For Radius = 0 To Limit

Circle (CX, CY), Radius, RGB(Rnd * 255, Rnd * 255, Rnd * 255)

Next

End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

Unload Me

End

End Sub

tqd kygy½d k*&rfud k Run NyD; Form xJud k Mouse Left Click vkyfygu yH k(196)ygtwd kif;jrifawG U&rnf/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(196)

Contents

Page 184: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 184/463

177 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

yH k(197)yg TextBox, wd k Yjzif hvnf;aumif;wnfaqmufxm;NyD;Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button toD;oD;wGifvd ktyfaomy½d k*&rfrsm;ud k a&;om;&ayrnf/Text1 TextBox Properties wGif -wGif -wGif -wGif -wGif -(Name) - Text1

Alignment - Left JustifyMultiLine - True

Form Click jyKvkyf&eftwGuf -jyKvkyf&eftwGuf -jyKvkyf&eftwGuf -jyKvkyf&eftwGuf -jyKvkyf&eftwGuf -Private Sub Form_Click()

filenum = FreeFile

Open "C:\Setupxlg.txt" For Input As filenum

Text1.Text = Input(LOF(filenum), filenum)

Close filenum

End SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

Unload Me

End

End Sub

yH k(197)

Contents

Page 185: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 185/463

178 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

tqd kygy½d k*&rfud k Run NyD; Form xJud k Mouse Left Click vkyfygu yH k(198)ygtwd kif;jrifawG U&rnf/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(199)yg Form yH kpHwGif  Label, TextBox, Frame, Combo

yH k(198)

yH k(199)

Contents

Page 186: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 186/463

179 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Box, CheckBox, wdkYjzifhvnf;aumif;wnfaqmufxm;NyD;Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button toD;oD;wGifvd ktyfaomy½d k*&rfrsm;ud k a&;om;&ayrnf/

Combo1 Combo Properties wGif -Text - Fonts

List - Arial, Tahoma, Times, Times New Roman

Combo2 Combo Properties wGif -Text - Style

List - Regular, Bold, Italic, Bold Italic

Combo3 Combo Properties wGif -Text - Size

List - 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 frame

Dim f, h As Integer 'the variable f and h are declared globally

Checkl twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Check1_Click()

'Executes when check box Underline is checked

If (Check1.Value = 1) ThenLabel2.FontUnderline = True

Else

Label2.FontUnderline = False

End If 

End Sub

Check2 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 If 

End Sub

Contents

Page 187: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 187/463

180 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Combol1 twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Combo1_LostFocus()

'Executes after you selected font name

Label2.FontName = Combo1.TextEnd Sub

Combol2 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 = FalseLabel2.FontBold = True

End If 

End Sub

Combol3 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 = True

End Sub

Preview 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

Contents

Page 188: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 188/463

181 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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

ElseText1.FontStrikethru = False

End If 

End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command3_Click()

Unload Me

End

End 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 button

End Sub

Text1 Change twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Text1_Change()

Label2.Caption = Text1.Text

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

Contents

Page 189: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 189/463

182 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

yH k(200)

yH k(200)yg Form yH kpHwGif  Label, TextBox, wd k Yjzif h

wnfaqmufxm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button

toD;oD;wGifvd ktyfaom y½d k*&rfrsm;ud k 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 Sub

Exit - Command Button2 twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

Unload MeEnd

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

Contents

Page 190: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 190/463

183 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

yH k(201)

yH k(201)yg Form yH kpHwGif  DirListBox, FileListBox, DriveList

Box, Label, Image, wd k Yjzif hwnfaqmufxm;NyD; Properties

rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button

toD;oD;wGifvd ktyfaom y½d k*&rfrsm;ud ka&;om;&ayrnf/File1 FileListBox - Properties wGif -wGif -wGif -wGif -wGif -(Name) - File1

Pattern - *.bmp;*.pic;*.jpg;*.gif;*.wmf;*.tif  

Label1 Label - Properties wGif -wGif -wGif -wGif -wGif -(Name) - Label1

AutoSize - False

Caption - Empty

BorderStyle - 1 - Fixed Single

WordWrap - True

Image1 Image - Properties wGif -wGif -wGif -wGif -wGif -(Name) - Image1

Stretch - True

Contents

Page 191: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 191/463

184 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Access 2002

Directory Change twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Dir1_Change()

File1.FileName = Dir1.Path

End 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.FileName

End Sub

Exit - Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

Unload Me

End

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

Contents

Page 192: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 192/463

Page 193: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 193/463

186 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

 

c:\windows\system\mschrt20.ocx

yH k(202)yg Form yH kpHwGif  , Command Button wd k Yjzif hwnfaqmuf

xm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button toD;oD;wGifvd ktyfaom y½d k*&rfrsm;ud ka&;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

yH k(203)

Contents

Page 194: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 194/463

187 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

.Column = Column

.Row = Row

Next Row

Next Column

End With

End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command4_Click()

Unload Me

End

End Sub

txufygy½d k*&rfud k Run ygu yH k(204)ygtwd kif;jrifawG U&ayrnf/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(203)

yH k(204)

Contents

Page 195: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 195/463

188 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

SS Tab

c:\windows\system\tabctl32.ocx

yH k(205)

Contents

Page 196: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 196/463

189 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(206)yg Form yH kpHwGif  , , Label, TextBox,

 CheckBox, Command Button wd k Yjzif h wnfaqmufxm;NyD; Properties rsm;

ud kjyifqifjznf hpGufNyD;aemuf Command Button toD;oD;wGifvd ktyfaom y½d k*&rfrsm;ud ka&;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 If End Sub

Refresh Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

MSChart1.Row = 1

MSChart1.Column = 1

yH k(206)

Contents

Page 197: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 197/463

190 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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.TextMSChart1.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.Text

End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

Unload Me

EndEnd Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

Contents

Page 198: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 198/463

191 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

MSFlexGrid

c:\windows\system\msflxgrd.ocx

yHk(207)yg Form yHkpHwGif , Command Button wdk Y jzif hwnfaqmufxm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button

toD;oD;wGif vd ktyfaom y½d k*&rfrsm;ud ka&;om;&ayrnf/MSFlexGrid1 MSFlexGrid Properties twGuf -twGuf -twGuf -twGuf -twGuf -Cols - 13

Rows - 13

Add Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

Form1.Caption = "Addition Program"Dim x, y

For x = 1 To 12 Step 1

MSFlexGrid1.Row = x

For y = 1 To 12 Step 1

MSFlexGrid1.Col = y

yH k(207)

Contents

Page 199: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 199/463

192 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

MSFlexGrid1.Text = x + y

Next

Next

End Sub

Subtract Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

Form1.Caption = "Subtraction Program"

Dim x, y

For x = 1 To 12 Step 1

MSFlexGrid1.Row = x

For y = 1 To 12 Step 1

MSFlexGrid1.Col = y

MSFlexGrid1.Text = x - yNext

Next

End Sub

Division Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command3_Click()

Form1.Caption = "Division Program"

Dim x, y

For x = 1 To 12 Step 1MSFlexGrid1.Row = x

For y = 1 To 12 Step 1

MSFlexGrid1.Col = y

MSFlexGrid1.Text = x / y

Next

Next

End Sub

Multiplication Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command4_Click()

Form1.Caption = "Multiplication Program"

Dim x, y

For x = 1 To 12 Step 1

MSFlexGrid1.Row = x

For y = 1 To 12 Step 1

Contents

Page 200: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 200/463

193 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

MSFlexGrid1.Col = y

MSFlexGrid1.Text = x * y

Next

Next

End Sub

Grid Line Width Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command5_Click()

If MSFlexGrid1.GridLineWidth < 4 Then

MSFlexGrid1.GridLineWidth = MSFlexGrid1.GridLineWidth + 1

Else

MSFlexGrid1.GridLineWidth = 1

End If 

End SubExit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command6_Click()

Unload Me

End

End Sub

Form Load twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Form_Load()

Dim a As IntegerMSFlexGrid1.Row = 0

For a = 1 To 12

MSFlexGrid1.Col = a

MSFlexGrid1.Text = Str(a)

Next

MSFlexGrid1.Col = 0

For a = 1 To 12

MSFlexGrid1.Row = a

MSFlexGrid1.Text = Str(a)

Next

End Sub

Contents

Page 201: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 201/463

194 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(207)yg Form yH kpH Programud k Run yguatmufygtwd kif;jrifawG U&rnf/ yH k(208)/

Add Command Button ud ka½G;cs,fygu yH k(209)ygtwd kif;jrifawG U&rnf/

yH k(208)

yH k(209)

Contents

Page 202: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 202/463

195 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Subtract Command Button ud ka½G;cs,fygu yH k(210)ygtwd kif;jrifawG U&rnf/

Division Command Button ud ka½G;cs,fygu yH k(211)ygtwd kif;jrifawG U&rnf/

yH k(210)

yH k(211)

Contents

Page 203: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 203/463

196 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Multiplication Command Button ud ka½G;cs,fygu yH k(212)ygtwd kif;jrifawG U&rnf/

Grid Line Width Command Button ud ka½G;cs,fyguyH k(213)ygtwd kif;jrifawG U& rnf/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yHk(212)

yH k(213)

Contents

Page 204: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 204/463

197 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(214)yg Form yH kpHwGif  , Label, Command Button

wd k Yjzif h wnfaqmufxm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command But-ton toD;oD;wGif vd ktyfaom y½d k*&rfrsm;ud ka&;om;&ayrnf/Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

Unload Me

End

End Sub

Form Load twGuf -twGuf -twGuf -twGuf -twGuf -

Private Sub Form_Load()MSFlexGrid1.Cols = 6

MSFlexGrid1.Rows = 7

End Sub

Grid Line Change &eftwGuf -&eftwGuf -&eftwGuf -&eftwGuf -&eftwGuf -Private Sub MSFlexGrid1_RowColChange()

Msg = "Active Cell: " & Chr(64 + MSFlexGrid1.Col)

Msg = Msg & MSFlexGrid1.Row

Label1.Caption = Msg

End Sub

tqd kyg y½d k*&rfud k Run NyD; rdrdtvd k½S  d&m Row (or) Column wd k Yud ka½G;cs,fyguGrid Line Cell tuGuf½S  d Cell Reference ud k yH k(215)ygtwd kif;azmfjyvdrf hrnf/

yH k(214)

Contents

Page 205: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 205/463

198 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

RichTextBox

c:\windows\system\richtx32.ocx

yH k(216)yg Form yH kpHwGif  , Command Button wd k Yjzif hwnf

aqmufxm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button toD;oD;wGifvd ktyfaom y½d k*&rfrsm;ud ka&;om;&ayrnf/

yH k(215)

yH k(216)

Contents

Page 206: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 206/463

199 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

RichTextBox1 - RichTextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - RichTextBox1

Font - MS Sans Serif, Bold, 12

ScrollBars - 3 - rtfBothRichTextBox2 - RichTextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - RichTextBox2

Font - MS Sans Serif, Regular, 8

ScrollBars - 3 - rtfBoth

Add Text Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

RichTextBox2.Text = RichTextBox2.Text & RichTextBox1.SelText

End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

Unload Me

End

End Sub

Form Load twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Form_Load()

RichTextBox1.FileName = "c:\tm.rtf"

End Subtxufyg y½d k*&rfud k Run ygu yH k(217)ygtwd kif;awG Ujrif&rnf/

yH k(217)

Contents

Page 207: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 207/463

200 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(217)yg b,fbufwGif½S  daeaompmom;tm; Selected Text vkyfNyD;? yH k(218)? Add

Text Command Button ud ka½G;cs,fygu yH k(219)ygtwd kif;jzpfay:vmrnf/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(218)

yH k(219)

Contents

Page 208: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 208/463

201 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

CommonDialog

c:\windows\system\comdlg32.ocx

yH k(220)yg Form yH kpHwGif  , , Command

Button wd k Yjzif hwnfaqmufxm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Com-mand Button toD;oD;wGifvd ktyfaom y½d k*&rfrsm;ud ka&;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.ShowOpen

If CommonDialog1.FilterIndex = 1 Then

RichTextBox1.LoadFile CommonDialog1.FileName, rtfTextElse

RichTextBox1.LoadFile CommonDialog1.FileName, rtfRTF

End If 

Me.Caption = CommonDialog1.FileName

End Sub

yH k(220)

Contents

Page 209: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 209/463

202 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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, rtfText

Else

RichTextBox1.SaveFile CommonDialog1.FileName, rtfRTF

End If 

End Sub

Fonts Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command3_Click()

CommonDialog1.Flags = cdlCFEffects + cdlCFBothCommonDialog1.ShowFont

With RichTextBox1

.SelBold = CommonDialog1.FontBold

.SelFontName = CommonDialog1.Name

.SelFontSize = CommonDialog1.FontSize

.SelItalic = CommonDialog1.FontItalic

.SelStrikeThru = CommonDialog1.FontStrikethru

.SelUnderline = CommonDialog1.FontUnderline

.SelColor = CommonDialog1.Color

End With

End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command4_Click()

Unload Me

End

End Sub

Form 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 Sub

RichTextBox1.Height = Me.Height - 1260

RichTextBox1.Width = Me.Width - 285

Contents

Page 210: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 210/463

Page 211: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 211/463

204 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

txufyg Dialog Box wGif Files of type: nmzuf½S  d List Box ü Dropdown

Arrow jzpfaom ud ka½G;cs,fygu Text File ESif h Rich Text Format File trsKd;tpm;(2)ckxJrS BuKduf&mzd kiftrsKd;tpm;ud k a½G;cs,fí Open Command Button ud ka½G;cs,fygua½G;cs,fjcif;cH&aom *.txt (or) *.rtf File rsm;yGif hvmayrnf/ yH k(223)/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(222)

yH k(223)

Contents

Page 212: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 212/463

205 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Microsoft Windows Common Controls wGifyg0ifaomwGifyg0ifaomwGifyg0ifaomwGifyg0ifaomwGifyg0ifaom Icon rsm;rsm;rsm;rsm;rsm;

c:\windows\system\mscomctl.ocx

TabStrip Toolbar StatusBar

ProgressBar TreeView ListView

ImageList Slider ImageCombo

yH k(224)yg Form yH kpHwGif  TextBox, Toolbar, Command Buttonwd k Yjzif h wnfaqmufxm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command But-

ton toD;oD;wGif vd ktyfaom y½d k*&rfrsm;ud ka&;om;&ayrnf/Text1 - Text Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - Text1

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

Font - MS Sans Serif, Regular, 10

MultiLine - TrueScrollBar - 3 - Both

Toolbar1 - Toolbar Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - Toolbar1

Alignment - 0 - vbAlignNone

BorderStyle - 1 - ccFixedSingle

yH k(224)

Contents

Page 213: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 213/463

206 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Form yH kpHtwGif;½S  d Toolbar ud ka½G;cs,fí Right Click ES  dyfyg/ xd k Yaemuf Properties

ud ka½G;cs,fygu yH k(225)ygtwd kif; Property Pages Dialog Box ay:vmrnf/

Property Pages Dialog Box xJ½S  d General, Buttons, Picture Tab Command

Button (3)ckxJrS Buttons Tab Command Button udka½G;cs,fyg/ xdk Yaemuf4if;xJwGifyg0ifaomtcsuftvufrsm;tm; atmufygtwd kif;jyifqifjznf hpGuf&ef -

Index Caption Key Tag

1 Cut Button1 1

2 Copy Button2 2

3 Paste Button3 3

Toolbar xJ½Sd xJ½S  d xJ½Sd xJ½S  d 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.Clear

Clipboard.SetText Text1.SelText

yHk(225)

Contents

Page 214: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 214/463

207 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Case "Button1":

Clipboard.Clear

Clipboard.SetText Text1.SelText

Text1.Text = " "

Case "Button3":

Text1.SelText = Clipboard.GetText()

End Select

End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

Unload Me

End

End Subtqd kyg y½d k*&rfud k Run NyD; Text Box xJwGif pmrsm;½d kufES  dyfírdrdtvd k½S  d&mpmrsm;ud k

Selected Text (or) Drag jyKvkyfum ul;jcif;? jzwfjcif;? uyfjcif;wd k Yud kaqmif½GufEd kifygonf/y½d k*&rfxJrS xGufvd kygu Exit Command Button ud ka½G;cs,f&efjzpfygonf/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(226)yg Form yH kpHwGif  Toolbar, StatusBar,  Command Button

wd k Yjzif h wnfaqmufxm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command But-

ton toD;oD;wGif vd ktyfaom y½d k*&rfrsm;ud ka&;om;&ayrnf/

yH k(226)

Contents

Page 215: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 215/463

208 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Toolbar1 - Toolbar Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - Toolbar1

Align - 1 - vbAlignTop

Index Caption Key Tag1 Subject One Sub1 1

2 Subject Two Sub2 2

3 Subject Three Sub3 3

4 Subject Four Sub4 4

StatusBar1 - StatusBar Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - StatusBar1

Align - 2 - vbAlignBottom

Add Button Command ButtontwGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

Static i As Integer

Dim c As String

i = i + 1

c = InputBox("Enter Button Title")

Toolbar1.Buttons.Add i, , c

End Sub

Private Sub Command1_GotFocus()

StatusBar1.Panels(1).Text = "Click to Add a Button of the Toolbar"End Sub

Delete Button Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

Dim i As Integer

i = InputBox("Enter Button No. to Delete")

Toolbar1.Buttons.Remove i

End Sub

Private Sub Command2_GotFocus()StatusBar1.Panels(1).Text = "Click to Delete a Button from the Toolbar"

End Sub

Add Panel Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command3_Click()

Static i As Integer

Dim c As String

Contents

Page 216: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 216/463

209 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

i = i + 1

If StatusBar1.Panels.Count = 16 Then

MsgBox "You can add only 16 Panels in a Status Bar"

Exit Sub

End If 

c = InputBox("Enter Panel Title")

StatusBar1.Panels.Add i, , c

StatusBar1.Panels(i).AutoSize = sbrSpring

End Sub

Private Sub Command3_GotFocus()

StatusBar1.Panels(1).Text = "Click to Add a Panel to the Status Bar"

End Sub

Delete Panel Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command4_Click()

Dim i As Integer

i = InputBox("Enter Panel No. to Delete")

StatusBar1.Panels.Remove i

End Sub

Private 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 Me

End

End Sub

Status Bar Panel Click twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub StatusBar1_PanelClick(ByVal Panel As MSComctlLib.Panel)

MsgBox "You have Clicked" & Panel.Text

End Sub

Tool Bar Button Click twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)

MsgBox "You have Clicked" & Button.Caption

End Sub

Contents

Page 217: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 217/463

210 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

txufyg y½d k*&rfud k Run NyD; Add Button ud ka½G;cs,fygu Enter Button Title

\acgif;pOfatmuf List Box wGif rdrdtvd k½S  d&mpmom;ud k½d kufES  dyfNyD; OK ud ka½G;cs,fyg/yH k(227)? yHk(228)/

Delete Button ud ka½G;cs,fygu Enter Button No. to Delete \acgif;pOfatmufList Box wGif rdrdz,f½S m;vd konf htrSwfpOfud k½d kufES  dyfNyD; OKud ka½G;cs,fyg/ yH k(229)? yH k(230)/

yH k(227)

yH k(228)

Contents

Page 218: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 218/463

Page 219: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 219/463

212 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

DeletePanel ud ka½G;cs,fygu Enter Button No. to Delete \acgif;pOfatmuf

List Box wGif rdrdz,f½S m;vd konf htrSwfpOfud k½d kufES  dyfNyD; OKud ka½G;cs,fyg/ yH k(233)? yH k(234)/

yH k(231)

yH k(232)

Contents

Page 220: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 220/463

213 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(233)

yHk(234)

Contents

Page 221: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 221/463

214 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(235)yg Form yH kpHwGif  ProgressBar,  Command Button wd k Yjzif h wnfaqmufxm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button toD;oD;wGifvd ktyfaom y½d k*&rfrsm;ud ka&;om;&ayrnf/ProgressBar1 - ProgressBar Properties twGuf -twGuf -twGuf -twGuf -twGuf -

(Name) - ProgressBar1Align - 0 - vbAlignNone

BorderStyle - 1 - ccFixedSingle

Max - 30000

Min - 1

Run Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

Dim n1 As Integer

For n1 = 1 To 30000

Form1.Caption = "Processing Step " & Trim$(CStr(n1)) & " of 30000"

ProgressBar1 = n1

Next n1

End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

Unload Me

End

End Sub- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(235)

Contents

Page 222: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 222/463

Page 223: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 223/463

216 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

Unload Me

EndEnd Sub

tqd kyg y½d k*&rfud k Run yguyH k(237)ygtwd kif;jrifawG U&rnfjzpfNyD; Slider \twd k;^tavsmhajymif;Munf hygu Text Box tus,f̂ tusOf;jzpfoG m;onfud k jrifawG U&ayrnf/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(238)yg Form yH kpHwGif  ImageList, PictureBox, Command

Button wd k Y jzif h wnfaqmufxm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Com-

mand Button toD;oD;wGifvd ktyfaom y½d k*&rfrsm;ud ka&;om;&ayrnf/

yH k(237)

yH k(238)

Contents

Page 224: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 224/463

217 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Picture1 - PictureBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - Picture1

Align - None

AutoSize - TrueBorderStyle - 1 - Fixed Single

Form yHkpHtwGif;½Sd ImageList udka½G;cs,fí Right Click  ESdyfyg/ xdkYaemufProperties ud ka½G;cs,fygu yH k(239)ygtwd kif; Property Pages Dialog Box ay:vmrnf/

Property Pages Dialog Box xJ½S  d General, Images, Color Tab Command

Button (3)ckxJrS Images Tab Command Button ud ka½G;cs,fyg/ xd k Yaemuf 4if;xJwGifyg0ifaom Insert Picture... Command Button ud ka½G;cs,fyg/ xd ktcg rdrdtvd k½S  donf h*.bmp File (od k Yr[kwf ) *.ico File ½S  donf h vrf;aMumif;rsm;ud k½S mazGa½G;cs,fí zd kifrsm;tm;qJ  Gwif&rnf/ yH k(240)/

yH k(239)

Contents

Page 225: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 225/463

Page 226: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 226/463

219 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(242)yg Form yH kpHwGif  TabStrip, TextBox, Command Button

wd k Yjzif h wnfaqmufxm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command But-

ton ESif h Tab toD;oD;twGufvd ktyfaom y½d k*&rfrsm;ud ka&;om;&ayrnf/Form yH kpHtwGif;½S  d TabStrip ud ka½G;cs,fí Right Click ES  dyfyg/ xd k Yaemuf Proper-

ties ud ka½G;cs,fygu yH k(243)ygtwd kif; Property Pages Dialog Box ay:vmrnf/

yH k(242)

yH k(243)

Contents

Page 227: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 227/463

220 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Property Pages Dialog Box xJ½S  d General, Tabs, Font, Picture Command

Button (4)ckxJrS Tabs Tab Command Button ud ka½G;cs,fyg/ xd k Yaemuf 4if;xJwGifyg0ifaomtcsuftvufrsm;ud k atmufygtwd kif;jznf hpGuf&ef -

Index Caption Tag1 Department One

2 Items Two

3 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" Then

Text1.Text = "Keyboard"

Text2.Text = "Monitor"

Text3.Text = "Hard Disk"

ElseIf TabStrip1.SelectedItem.Tag = "Three" Then

Text1.Text = "London"

Text2.Text = "New York"

Text3.Text = "Singapore"End If 

End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

Unload Me

End

End Sub

tqd kyg y½d k*&rfud k Run yguyH k(244)ygtwd kif;jrifawG U&rnf/

Contents

Page 228: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 228/463

221 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(244)wGif Tab Command Button wpfckjzpfaom Department ud ka½G;cs,fyguyH k(245)ygtwd kif; Department ESif hqd kifaomXmersm;ud k azmfjyrnfjzpfonf/

yHk(245)wGif Tab Command Button wpfckjzpfaom Items udka½G;cs,fyguyH k(246)ygtwd kif; Item ESif hqd kifaomudpö&yfrsm;ud k azmfjyrnfjzpfonf/

yH k(244)

yH k(245)

Contents

Page 229: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 229/463

222 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(246)wGif  Tab Command Button wpfckjzpfaom Branches ud ka½G;cs,fyguyH k(247)ygtwd kif; Branches ESif hqd kifaomudpö&yfrsm;ud k azmfjyrnfjzpfonf/

þy½d k*&rfxJrS xGufvd kygu Command Button wpfckjzpfaom Exit ud ka½G;cs,f&efjzpfygonf/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(246)

yH k(247)

Contents

Page 230: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 230/463

Page 231: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 231/463

224 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Execute File udk y½d k*&rfjzif hvSrf;ac:toHk;jyKjcif;ud k y½d k*&rfjzifhvSrf;ac:toH k;jyKjcif;udk y½d k*&rfjzif hvSrf;ac:toHk;jyKjcif;ud k y½d k*&rfjzifhvSrf;ac:toH k;jyKjcif;udk y½d k*&rfjzif hvSrf;ac:toHk;jyKjcif;

yH k(249)yg Form yH kpHwGif  OLE, Command Button wd k Yjzif h wnfaqmuf

xm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button toD;oD;twGufvd ktyfaom y½d k*&rfrsm;ud ka&;om;&ayrnf/Call Indirect Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

OLE1.CreateLink "c:\pm65\pm65.exe"

End Sub

Call Direct Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

Call Shell("c:\pm65\pm65.exe c:\vb6\vb601.p65", 1)

End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command3_Click()

Unload Me

End

End Sub

tqd kyg y½d k*&rfud k Run ygu yH k(250)ygtwd kif;jrifawG U&rnf/

yH k(249)

Contents

Page 232: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 232/463

225 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

txufygyHk(250)wGif Call Indirect Command Button Sub udka½G;cs,fygu

yH k(251)ygtwd kif;azmfjyrnf/

yH k(251)wGif OLE Box xJod k Ya&mufaeaom Page Maker 6.5 Icon tm; Double

Click ES  dyfjcif;jzif h Page Maker 6.5 Application Package Run vmayrnf/Call Direct Command Button ud ka½G;cs,fjcif;jzif h Page Maker 6.5 Application

Package Run vmrnf htjyif c:\vb6\vb601.p65 zd kifygwd kuf½d kufyGif hvmNyD;tvd k½S  d&mjyKvkyfEd kifayrnf/

4if;y½d k*&rfrSxGufvd kygu Exit Command Button tm;a½G;cs,f&efjzpfonf/- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(250)

yH k(251)

Contents

Page 233: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 233/463

226 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

jr§ m;rsm;ud kywfjcmvnfvSnf honf hy½d k*&rfud ka&;jcif;jr§ m;rsm;ud kywfjcmvnfvSnf honf hy½d k*&rfud ka&;jcif;jr§ m;rsm;ud kywfjcmvnfvSnf honf hy½d k*&rfud ka&;jcif;jr§ m;rsm;ud kywfjcmvnfvSnf honf hy½d k*&rfud ka&;jcif;jr§ m;rsm;ud kywfjcmvnfvSnf honf hy½d k*&rfud ka&;jcif;

yH k(248)yg Form yH kpHwGif  Image, Command Button wd k Yjzif h wnfaqmufxm;NyD; Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button rsm;twGufvd ktyfaom y½d k*&rfrsm;ud ka&;om;&ayrnf/Form1 - Form Properties wGif -wGif -wGif -wGif -wGif -WindowState - 2 - Maximized

General wGif -wGif -wGif -wGif -wGif -

Private Sub rotate()For t = 0 To 100

Next

End Sub

Run 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 = 0

Image1.Visible = True

Image2.Visible = False

Image3.Visible = False

Image4.Visible = False

yH k(252)

Contents

Page 234: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 234/463

Page 235: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 235/463

228 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Image4.Left = 0

Image4.Top = 8300

Image1.Visible = False

Image2.Visible = False

Image3.Visible = False

Image4.Visible = True

For j = 8300 To 0 Step -1

rotate

Image4.Move Image4.Left, Image4.Top - 1

Next j

Image4.Left = 0

Image4.Top = 8300

Print: Print: Print " ", k: BeepNext k 

Image1.Left = 0

Image1.Top = 0

Image1.Visible = True

Image2.Visible = False

Image3.Visible = False

Image4.Visible = False

End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

Unload Me

End

End Sub

tqd kyg y½d k*&rfud k  Run ygu jr§ m;wpfpif;onf vuf sm;&pf(10)Budrfywfaeonfud kjrifawG U&vdrf hrnf/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

Contents

Page 236: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 236/463

229 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

tcef;(9)tcef;(9)tcef;(9)tcef;(9)tcef;(9)

Access 2002 ½S  d½S  d½S  d½S  d½S  d Database File xJrS xJrSxJrS xJrSxJrS Table File wpfcktm;zGif hjcif;wpfcktm;zGif hjcif;wpfcktm;zGif hjcif;wpfcktm;zGif hjcif;wpfcktm;zGif hjcif;

atmufyg Form yH kpH(2)cktm; zefwD;wnfaqmufxm;&rnf/ yH k(253)? yH k(254)/

yH k(253)

yH k(254)

Contents

Page 237: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 237/463

230 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(253)yg Form yH kpHwGif rsm;jzif hzefwD;xm;NyD; Command Button

rsm;wGif vd ktyfaomy½d k*&rfrsm;a&;om;&ef jzpfygonf/Open File Command Button twGuftwGuftwGuftwGuftwGuf

Private Sub Command1_Click()Form1.Hide

Form2.Show

End Sub

Exit Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Unload Me

End

End Subxd k Yaemuf Form2 yH kpHtm;zefwD;wnfaqmufxm;&rnf/ yH k(254)/ 4if;wGif  ,

, , , rsm;jzif hzefwD;xm;NyD; oufqd kif

&m Properties rsm;wGifjyifqifjznf hpGufNyD;aemuf Command Button rsm;wGif vd ktyfaomy½d k*&rfrsm;a&;om;&ef jzpfygonf/Label1, 2, 3, 4, 5, 6, 7, 8 wGifyg0ifMuaomwGifyg0ifMuaomwGifyg0ifMuaomwGifyg0ifMuaomwGifyg0ifMuaom Properties rsm;twGuf -rsm;twGuf -rsm;twGuf -rsm;twGuf -rsm;twGuf -Alignment - 0 - Left Justify

AutoSize - True

BackStyle - 0 - TransparentBorderStyle - 0 - None

Font - MS Sans Serif, Bold, 8

Text1 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - Text1

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

DataField - Roll Number

DataFormat - GeneralDataSource - Adodc1

Font - MS Sans Serif, Bold, 8

Text2 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - Text2

Alignment - 0 - Left Justify

Contents

Page 238: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 238/463

231 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

BorderStyle - 1 - Fixed Single

DataField - Name

DataFormat - General

DataSource - Adodc1

Font - MS Sans Serif, Bold, 8

Text3 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - Text3

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

DataField - Myanmar

DataFormat - General

DataSource - Adodc1

Font - MS Sans Serif, Bold, 8Text4 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - Text4

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

DataField - English

DataFormat - General

DataSource - Adodc1

Font - MS Sans Serif, Bold, 8Text5 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - Text5

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

DataField - Maths

DataFormat - General

DataSource - Adodc1

Font - MS Sans Serif, Bold, 8

Text6 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - Text6

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

DataField - Total

Contents

Page 239: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 239/463

232 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

DataFormat - General

DataSource - Adodc1

Font - MS Sans Serif, Bold, 8

Text7 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - Text7

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

DataField - Result

DataFormat - General

DataSource - Adodc1

Font - MS Sans Serif, Bold, 8

Text8 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - Text8Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

DataField - Amount of Fail

DataFormat - General

DataSource - Adodc1

Font - MS Sans Serif, Bold, 8

Adodc1 - Adodc Properties twGuf -twGuf -twGuf -twGuf -twGuf -

(Name) - Adodc1Align - 0 - vbAlignNone

BOFAction - 0 - adDoMoveFirst

ConnectingString - provider=msdasql;dsn=exam01;uid=;pwd=;

EOFAction - 0 - adDoMoveLast

Font - MS Sans Serif, Bold, 8

RecordSource - select [Roll Number], Name, Myanmar, English,

Maths,Total,Result,[Amount of Fail] from

exam01 order by [Roll Number]

DataGrid1 - DataGrid Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - DataGrid1

Align - 0 - vbAlignNone

AllowAddNew - True

AllowArrows - True

Contents

Page 240: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 240/463

233 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

AllowDelete - True

AllowUpdate - True

DataSource - Adodc1

Font - MS Sans Serif, Bold, 8

Form rSxGufoG m;aomtcgrSxGufoG m;aomtcgrSxGufoG m;aomtcgrSxGufoG m;aomtcgrSxGufoG m;aomtcg Mouse Pointer yH krSefjyefjzpf&eftwGuf -yH krSefjyefjzpf&eftwGuf -yH krSefjyefjzpf&eftwGuf -yH krSefjyefjzpf&eftwGuf -yH krSefjyefjzpf&eftwGuf -Private Sub Form_Unload(Cancel As Integer)

Screen.MousePointer = vbDefault

End Sub

Record Position od&eftwGuf -od&eftwGuf -od&eftwGuf -od&eftwGuf -od&eftwGuf -Private Sub Adodc1_MoveComplete(ByVal adReason As ADODB.Event

ReasonEnum, ByVal pError As ADODB.Error, adStatus As

ADODB.EventStatusEnum, ByVal pRecordset As

ADODB.Recordset)Adodc1.Caption = "Record: " & CStr(Adodc1.Recordset.

AbsolutePosition)

End Sub

Add Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

Adodc1.Recordset.AddNew

End Sub

Update Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

Adodc1.Recordset.UpdateBatch adAffectAll

End Sub

Delete Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command3_Click()

With Adodc1.Recordset

.Delete

.MoveNextIf .EOF Then .MoveLast

End With

End Sub

Contents

Page 241: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 241/463

234 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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.Hide

Form1.Show

End Sub

tqd kyg y½d k*&rfud k Run ygu yH k(255)ygtwd kif;jrifawG U&rnfjzpfonf/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(255)

Contents

Page 242: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 242/463

235 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Access 2002 ½S  d ½S  d ½S  d ½S  d ½S  d Database File wpfckxJrS wpfckxJrS wpfckxJrS wpfckxJrS wpfckxJrS Table File ESpfcktm;ESpfcktm;ESpfcktm;ESpfcktm;ESpfcktm; Updating jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;atmufyg Form yH kpH(3)cktm; zefwD;wnfaqmufxm;&rnf/ yH k(256)? yH k(257)? yH k(258)/

yH k(256)

yH k(257)

Contents

Page 243: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 243/463

236 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(256)yg Form yH kpHwGif rsm;jzif hzefwD;xm;NyD; Command But-

ton rsm;wGif vd ktyfaomy½d k*&rfrsm;a&;om;&ef jzpfygonf/(9)wef;(u)zd kif (9)wef;(u)zd kif (9)wef;(u)zd kif (9)wef;(u)zd kif (9)wef;(u)zd kif Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

Form1.Hide

Form2.Show

End Sub

(9)wef;(c)zd kif (9)wef;(c)zd kif (9)wef;(c)zd kif (9)wef;(c)zd kif (9)wef;(c)zd kif Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

Form1.HideForm3.Show

End Sub

Exit Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Unload Me

yH k(258)

Contents

Page 244: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 244/463

237 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

End

End Sub

xd k Yaemuf Form2, Form3 yH kpHtm;zefwD;wnfaqmufxm;&rnf/ yH k(257)? yH k(258)/

4if;wGif  , , , , rsm;jzif hzefwD;xm;NyD; oufqd kif&m Properties rsm;wGifjyifqifjznf hpGufNyD;aemuf  Command

Button rsm;wGif vd ktyfaomy½d k*&rfrsm;a&;om;&ef jzpfygonf/Label1, 2, 3, 4, 5, 6, 7, 8 wGifyg0ifMuaomwGifyg0ifMuaomwGifyg0ifMuaomwGifyg0ifMuaomwGifyg0ifMuaom Properties rsm;twGuf -rsm;twGuf -rsm;twGuf -rsm;twGuf -rsm;twGuf -Alignment - 0 - Left Justify

AutoSize - True

BackStyle - 0 - Transparent

BorderStyle - 0 - None

Font - MS Sans Serif, Bold, 8Text1 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - Text1

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

DataField - Roll Number

DataFormat - General

DataSource - Adodc1

Font - MS Sans Serif, Bold, 8Text2 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - Text2

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

DataField - Name

DataFormat - General

DataSource - Adodc1

Font - MS Sans Serif, Bold, 8

Text3 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - Text3

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

DataField - Myanmar

DataFormat - General

Contents

Page 245: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 245/463

238 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

DataSource - Adodc1

Font - MS Sans Serif, Bold, 8

Text4 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -

(Name) - Text4Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

DataField - English

DataFormat - General

DataSource - Adodc1

Font - MS Sans Serif, Bold, 8

Text5 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - Text5

Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed Single

DataField - Maths

DataFormat - General

DataSource - Adodc1

Font - MS Sans Serif, Bold, 8

Text6 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - Text6

Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed Single

DataField - Total

DataFormat - General

DataSource - Adodc1

Font - MS Sans Serif, Bold, 8

Text7 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - Text7

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

DataField - Result

DataFormat - General

DataSource - Adodc1

Font - MS Sans Serif, Bold, 8

Contents

Page 246: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 246/463

239 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Text8 - TextBox Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - Text8

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed SingleDataField - Amount of Fail

DataFormat - General

DataSource - Adodc1

Font - MS Sans Serif, Bold, 8

Adodc1 - Adodc Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - Adodc1

Align - 0 - vbAlignNone

BOFAction - 0 - adDoMoveFirst

ConnectingString - provider=msdasql;dsn=exam01;uid=;pwd=;EOFAction - 0 - adDoMoveLast

Font - MS Sans Serif, Bold, 8

RecordSource - select [Roll Number], Name, Myanmar, English,

Maths,Total,Result,[Amount of Fail] from

exam01 order by [Roll Number][Form2 twGuftwGuftwGuftwGuftwGuf]RecordSource - select [Roll Number], Name, Myanmar, English,

Maths,Total,Result,[Amount of Fail] from

exam02 order by [Roll Number][Form3 twGuftwGuftwGuftwGuftwGuf]DataGrid1 - DataGrid Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - DataGrid1

Align - 0 - vbAlignNone

AllowAddNew - True

AllowArrows - True

AllowDelete - True

AllowUpdate - True

DataSource - Adodc1Font - MS Sans Serif, Bold, 8

Form rSxGufoG m;aomtcgrSxGufoG m;aomtcgrSxGufoG m;aomtcgrSxGufoG m;aomtcgrSxGufoG m;aomtcg Mouse Pointer yH krSefjyefjzpf&eftwGuf -yH krSefjyefjzpf&eftwGuf -yH krSefjyefjzpf&eftwGuf -yH krSefjyefjzpf&eftwGuf -yH krSefjyefjzpf&eftwGuf -Private Sub Form_Unload(Cancel As Integer)

Screen.MousePointer = vbDefault

End Sub

Contents

Page 247: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 247/463

240 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Record Position od&eftwGuf -od&eftwGuf -od&eftwGuf -od&eftwGuf -od&eftwGuf -Private Sub Adodc1_MoveComplete(ByVal adReason As ADODB.Event

ReasonEnum, ByVal pError As ADODB.Error, adStatus As

ADODB.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.MoveFirst

Do 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 Then

Adodc1.Recordset("Result") = "Fail"

Else

Adodc1.Recordset("Result") = "Pass"

End If 

If Adodc1.Recordset("Myanmar") < 40 And Adodc1.Recordset("English") < 40 And Adodc1.Recordset("Maths") < 40 Then

Adodc1.Recordset("Amount of Fail") = "3"

ElseIf Adodc1.Recordset("Myanmar") < 40 And Adodc1.Recordset

("English") < 40 And Adodc1.Recordset("Maths") >= 40 Then

Adodc1.Recordset("Amount of Fail") = "2"

ElseIf Adodc1.Recordset("Myanmar") < 40 And Adodc1.Recordset

("English") >= 40 And Adodc1.Recordset("Maths") < 40 Then

Adodc1.Recordset("Amount of Fail") = "2"

ElseIf Adodc1.Recordset("Myanmar") >= 40 And Adodc1.Recordset("English") < 40 And Adodc1.Recordset("Maths") < 40 Then

Adodc1.Recordset("Amount of Fail") = "2"

ElseIf Adodc1.Recordset("Myanmar") < 40 And Adodc1.Recordset

("English") >= 40 And Adodc1.Recordset("Maths") >= 40

Then

Contents

Page 248: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 248/463

241 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 Then

Adodc1.Recordset("Amount of Fail") = "1"

ElseIf Adodc1.Recordset("Myanmar") >= 40 And Adodc1.Recordset

("English") >= 40 And Adodc1.Recordset("Maths") < 40 Then

Adodc1.Recordset("Amount of Fail") = "1"

Else

Adodc1.Recordset("Amount of Fail") = Null

End If 

Adodc1.Recordset.Update

Adodc1.Recordset.MoveNext

LoopAdodc1.Recordset.MoveFirst

End Sub

rlvae&mod k YjyefoGm;jcif;rlvae&mod kYjyefoG m;jcif;rlvae&mod k YjyefoGm;jcif;rlvae&mod kYjyefoG m;jcif;rlvae&mod kYjyefoG m;jcif; Command Button twGuf -twGuf -twGuf -twGuf -twGuf - [Form2 twGuftwGuftwGuftwGuftwGuf]Private Sub Command2_Click()

Form2.Hide

Form1.Show

End Sub

rlvae&mod k YjyefoGm;jcif;rlvae&mod kYjyefoG m;jcif;rlvae&mod k YjyefoGm;jcif;rlvae&mod kYjyefoG m;jcif;rlvae&mod kYjyefoG m;jcif; Command Button twGuf -twGuf -twGuf -twGuf -twGuf - [Form3 twGuftwGuftwGuftwGuftwGuf]Private Sub Command2_Click()

Form3.Hide

Form1.Show

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

Contents

Page 249: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 249/463

242 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Access 2002 ½S  d ½S  d ½S  d ½S  d ½S  d Database File wpfckxJrS wpfckxJrS wpfckxJrS wpfckxJrS wpfckxJrS Table File rsm;tm;rsm;tm;rsm;tm;rsm;tm;rsm;tm; Form wpfckjzif hzGif hjcif;wpfckjzif hzGif hjcif;wpfckjzif hzGif hjcif;wpfckjzif hzGif hjcif;wpfckjzif hzGif hjcif;atmufyg Form yH kpHtm; zefwD;wnfaqmufxm;&rnf/ yH k(259)/

yH k(259)yg Form yH kpHwGif  , , rsm;jzifh

zefwD;xm;NyD; oufqd kif&m Properties rsm;wGifjyifqifjznf hpGufNyD;aemuf  Command

Button rsm;wGif vd ktyfaomy½d k*&rfrsm;a&;om;&ef jzpfygonf/a1 - Adodc Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - a1

Align - 0 - vbAlignNone

BOFAction - 0 - adDoMoveFirst

ConnectingString - provider=msdasql;dsn=exam01;uid=;pwd=;

EOFAction - 0 - adDoMoveLast

Font - MS Sans Serif, Bold, 8

RecordSource - select [Roll Number], Name, Myanmar, English,

Maths,Total,Result,[Amount of Fail] from

exam01 order by [Roll Number]

yH k(259)

Contents

Page 250: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 250/463

243 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

a2 - Adodc Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - a2

Align - 0 - vbAlignNone

BOFAction - 0 - adDoMoveFirstConnectingString - provider=msdasql;dsn=exam01;uid=;pwd=;

EOFAction - 0 - adDoMoveLast

Font - MS Sans Serif, Bold, 8

RecordSource - select [Roll Number], Name, Myanmar, English,

Maths,Total,Result,[Amount of Fail] from

exam02 order by [Roll Number]

a3 - Adodc Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - a3

Align - 0 - vbAlignNoneBOFAction - 0 - adDoMoveFirst

ConnectingString - provider=msdasql;dsn=exam01;uid=;pwd=;

EOFAction - 0 - adDoMoveLast

Font - MS Sans Serif, Bold, 8

RecordSource - select [Roll Number], Name, Myanmar, English,

Maths,Total,Result,[Amount of Fail] from

exam03 order by [Roll Number]

DataGrid1 - DataGrid Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - DataGrid1

Align - 0 - vbAlignNone

AllowAddNew - True

AllowArrows - True

AllowDelete - True

AllowUpdate - True

Font - MS Sans Serif, Bold, 8

A1 - Adodc\\\\\

Record PositiontwGuf -twGuf -twGuf -twGuf -twGuf -Private Sub a1_MoveComplete(ByVal adReason As ADODB.EventReason

Enum, ByVal pError As ADODB.Error, adStatus As ADODB.Event

StatusEnum, ByVal pRecordset As ADODB.Recordset)

a1.Caption = "Record: " & CStr(a1.Recordset.AbsolutePosition)

End Sub

Contents

Page 251: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 251/463

244 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

A2 - Adodc \\\\\ Record Position twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub a2_MoveComplete(ByVal adReason As ADODB.EventReason

Enum, ByVal pError As ADODB.Error, adStatus As ADODB.

EventStatusEnum, ByVal pRecordset As ADODB.Recordset)a2.Caption = "Record: " & CStr(a2.Recordset.AbsolutePosition)

End Sub

A3 - Adodc \\\\\ Record Position twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub a3_MoveComplete(ByVal adReason As ADODB.EventReason

Enum, ByVal pError As ADODB.Error, adStatus As ADODB.

EventStatusEnum, ByVal pRecordset As ADODB.Recordset)

a3.Caption = "Record: " & CStr(a3.Recordset.AbsolutePosition)

End Sub

File One Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

Set DataGrid1.DataSource = a1

a1.Left = 2880

a1.Top = 4440

a2.Left = 2640

a2.Top = 5760

a3.Left = 5160

a3.Top = 5760Form1.Height = 5985

Form1.Caption = "Standard 9th, Section (A)"

End Sub

File Two Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

Set DataGrid1.DataSource = a2

a1.Left = 120

a1.Top = 5760

a2.Left = 2880

a2.Top = 4440

a3.Left = 5160

a3.Top = 5760

Form1.Height = 5985

Contents

Page 252: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 252/463

245 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Form1.Caption = "Standard 9th, Section (B)"

End Sub

File Three Command Button twGuf -twGuf -twGuf -twGuf -twGuf -

Private Sub Command3_Click()Set DataGrid1.DataSource = a3

a1.Left = 120

a1.Top = 5760

a2.Left = 2640

a2.Top = 5760

a3.Left = 2880

a3.Top = 4440

Form1.Height = 5985

Form1.Caption = "Standard 9th, Section (C)"End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command4_Click()

Unload Me

End

End Sub

Form Load twGuf -twGuf -twGuf -twGuf -twGuf -

Private Sub Form_Load()Form1.Height = 6975

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

Contents

Page 253: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 253/463

Page 254: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 254/463

247 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

RecordSource - select [Identification Number],Rank,Name,

Department from Test1 order by [Identification

Number]

a2 - Adodc Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - a2

Align - 0 - vbAlignNone

BOFAction - 0 - adDoMoveFirst

ConnectingString - provider=msdasql;dsn=exam02;uid=;pwd=;

EOFAction - 0 - adDoMoveLast

Font - MS Sans Serif, Bold, 8

RecordSource - select [Roll Number], Name, Myanmar, English,

Maths,Total,Result,[Amount of Fail] from

exam02 order by [Roll Number]a3 - Adodc Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - a3

Align - 0 - vbAlignNone

BOFAction - 0 - adDoMoveFirst

ConnectingString - provider=msdasql;dsn=exam01;uid=;pwd=;

EOFAction - 0 - adDoMoveLast

Font - MS Sans Serif, Bold, 8

RecordSource - select [Roll Number], Name, Myanmar, English,Maths,Total,Result,[Amount of Fail] from

exam03 order by [Roll Number]

DataGrid1 - DataGrid Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - DataGrid1

Align - 0 - vbAlignNone

AllowAddNew - True

AllowArrows - True

AllowDelete - True

AllowUpdate - True

Font - MS Sans Serif, Bold, 8

Contents

Page 255: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 255/463

248 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

A1 - Adodc \\\\\ Record Position twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub a1_MoveComplete(ByVal adReason As ADODB.EventReason

Enum, ByVal pError As ADODB.Error, adStatus As ADODB.Event

StatusEnum, ByVal pRecordset As ADODB.Recordset)a1.Caption = "Record: " & CStr(a1.Recordset.AbsolutePosition)

End Sub

A2 - Adodc \\\\\ Record Position twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub a2_MoveComplete(ByVal adReason As ADODB.EventReason

Enum, ByVal pError As ADODB.Error, adStatus As ADODB.

EventStatusEnum, ByVal pRecordset As ADODB.Recordset)

a2.Caption = "Record: " & CStr(a2.Recordset.AbsolutePosition)

End Sub

A3 - Adodc \\\\\ Record Position twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub a3_MoveComplete(ByVal adReason As ADODB.EventReason

Enum, ByVal pError As ADODB.Error, adStatus As ADODB.Event

StatusEnum, ByVal pRecordset As ADODB.Recordset)

a3.Caption = "Record: " & CStr(a3.Recordset.AbsolutePosition)

End Sub

File One Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

Set DataGrid1.DataSource = a1a1.Left = 2880

a1.Top = 4440

a2.Left = 2640

a2.Top = 5760

a3.Left = 5160

a3.Top = 5760

Form1.Height = 5985

Form1.Caption = "Economic File (Table File) from Test1.mdb"

End Sub

File Two Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

Set DataGrid1.DataSource = a2

a1.Left = 120

Contents

Page 256: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 256/463

249 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

a1.Top = 5760

a2.Left = 2880

a2.Top = 4440

a3.Left = 5160

a3.Top = 5760

Form1.Height = 5985

Form1.Caption = "Standard 9th, Section (B) (Table File) from

exam02.mdb"

End Sub

File Three Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command3_Click()

Set DataGrid1.DataSource = a3

a1.Left = 120a1.Top = 5760

a2.Left = 2640

a2.Top = 5760

a3.Left = 2880

a3.Top = 4440

Form1.Height = 5985

Form1.Caption = "Standard 9th, Section (C) (Table File) from

exam01.mdb"End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command4_Click()

Unload Me

End

End Sub

Form Load twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Form_Load()

Form1.Height = 6975

End Sub

tqd kyg y½d k*&rfud k Run ygu yH k(261)? (262)? (263)ygtwd kif;jrifawG U&rnf/

Contents

Page 257: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 257/463

250 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yHk(261)

yH k(262)

Contents

Page 258: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 258/463

251 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(263)

Contents

Page 259: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 259/463

252 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Access 2002 ½Sd ½S  d ½Sd ½S  d ½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 wpfckjzif hwpfckjzif hwpfckjzif hwpfckjzif hwpfckjzif hAppend jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;

atmufyg Form yH kpHtm; zefwD;wnfaqmufxm;&rnf/ yH k(264)/

yH k(264)yg Form yH kpHwGif  , , rsm;jzifh

zefwD;xm;NyD; oufqd kif&m Properties rsm;wGifjyifqifjznf hpGufNyD;aemuf  Command

Button rsm;wGif vd ktyfaomy½d k*&rfrsm;a&;om;&ef jzpfygonf/a1 - Adodc Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - a1

Align - 0 - vbAlignNone

BOFAction - 0 - adDoMoveFirstConnectingString - provider=msdasql;dsn=exam01;uid=;pwd=;

EOFAction - 0 - adDoMoveLast

Font - MS Sans Serif, Bold, 8

RecordSource - select [Identification Number],Rank,Name,

Department from Test1 order by [Identification

Number]

yH k(264)

Contents

Page 260: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 260/463

253 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

a2 - Adodc Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - a2

Align - 0 - vbAlignNone

BOFAction - 0 - adDoMoveFirstConnectingString - provider=msdasql;dsn=exam02;uid=;pwd=;

EOFAction - 0 - adDoMoveLast

Font - MS Sans Serif, Bold, 8

RecordSource - select [Roll Number], Name, Myanmar, English,

Maths,Total,Result,[Amount of Fail] from Test1

order by [Roll Number]

DataGrid1 - DataGrid Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - DataGrid1

Align - 0 - vbAlignNoneAllowAddNew - False

AllowArrows - False

AllowDelete - False

AllowUpdate - False

Font - MS Sans Serif, Bold, 8

DataSource - a1

DataGrid2 - DataGrid Properties twGuf -twGuf -twGuf -twGuf -twGuf -

(Name) - DataGrid2Align - 0 - vbAlignNone

AllowAddNew - True

AllowArrows - True

AllowDelete - True

AllowUpdate - True

Font - MS Sans Serif, Bold, 8

DataSource - a2

A1 - Adodc\\\\\

Record PositiontwGuf -twGuf -twGuf -twGuf -twGuf -Private Sub a1_MoveComplete(ByVal adReason As ADODB.EventReason

Enum, ByVal pError As ADODB.Error, adStatus As ADODB.Event

StatusEnum, ByVal pRecordset As ADODB.Recordset)

a1.Caption = "Record: " & CStr(a1.Recordset.AbsolutePosition)

End Sub

Contents

Page 261: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 261/463

254 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

A2 - Adodc \\\\\ Record Position twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub a2_MoveComplete(ByVal adReason As ADODB.EventReason

Enum, ByVal pError As ADODB.Error, adStatus As ADODB.

EventStatusEnum, ByVal pRecordset As ADODB.Recordset)a2.Caption = "Record: " & CStr(a2.Recordset.AbsolutePosition)

End Sub

To Append Table File Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

Set DataGrid1.DataSource = a1

a1.Recordset.MoveFirst

Do While a1.Recordset.EOF = False

a2.Recordset.AddNew

z01 = a1.Recordset("Identification Number")z02 = a1.Recordset("Rank")

z03 = a1.Recordset("Name")

z04 = a1.Recordset("Department")

a2.Recordset("Identification Number") = z01

a2.Recordset("Rank") = z02

a2.Recordset("Name") = z03

a2.Recordset("Department") = z04

a1.Recordset.MoveNexta2.Recordset.Update

Loop

a1.Recordset.MoveFirst

a1.Refresh

a2.Recordset.MoveFirst

a2.Refresh

Form1.Caption = "To add Test1 Table File from Exam02 Database File"

End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

Unload Me

End

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

Contents

Page 262: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 262/463

255 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Access 2002 ½S  d½S  d½S  d½S  d½S  d Database File twGif;rS twGif;rS twGif;rS twGif;rS twGif;rS Table File twGif;½Sd twGif;½S  d twGif;½Sd twGif;½S  d twGif;½S  d Record tm;½Smjcif;tm;½S mjcif;tm;½Smjcif;tm;½S mjcif;tm;½S mjcif;atmufyg Form yH kpHtm; zefwD;wnfaqmufxm;&rnf/ yH k(265)/

yH k(265)yg Form yH kpHwGif  , , , ,

rsm;jzif h zefwD;xm;NyD; oufqd kif&m Properties rsm;wGifjyifqifjznf hpGufNyD;aemuf Command Button rsm;wGif vd ktyfaomy½d k*&rfrsm;a&;om;&ef jzpfygonf/a1 - Adodc Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - a1

Align - 0 - vbAlignNone

BOFAction - 0 - adDoMoveFirst

ConnectingString - provider=msdasql;dsn=exam02;uid=;pwd=;

EOFAction - 0 - adDoMoveLast

Font - MS Sans Serif, Bold, 8

RecordSource - select [Identification Number], Rank, Name,

Department from Test1 order by [Identification

Number]

yH k(265)

Contents

Page 263: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 263/463

256 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

DataGrid1 - DataGrid Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - DataGrid1

Align - 0 - vbAlignNone

AllowAddNew - TrueAllowArrows - True

AllowDelete - True

AllowUpdate - True

Font - MS Sans Serif, Bold, 8

DataSource - a1

A1 - Adodc \\\\\ Record Position twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub a1_MoveComplete(ByVal adReason As ADODB.EventReason

Enum, ByVal pError As ADODB.Error, adStatus As ADODB.Event

StatusEnum, ByVal pRecordset As ADODB.Recordset)a1.Caption = "Record: " & CStr(a1.Recordset.AbsolutePosition)

End Sub

To Find Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

Set DataGrid1.DataSource = a1

z1 = Text1

a1.Recordset.MoveFirst

Do While a1.Recordset.EOF = FalseIf a1.Recordset("Identification Number") = z1 Then

Cls

Print

Print a1.Recordset("Identification Number"), a1.Recordset

("Rank"),a1.Recordset("Name"), a1.Recordset

("Department")

Exit Do

Else

Cls

Print

Print "Not Fount"

End If 

a1.Recordset.MoveNext

Loop

Contents

Page 264: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 264/463

257 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

Unload MeEnd

End Sub

txufyg Program ud k Run yguatmufygtwd kif;jrifawG U&rnf/ yH k(266)/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(266)

Contents

Page 265: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 265/463

258 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

tcef;(10)tcef;(10)tcef;(10)tcef;(10)tcef;(10)

Microsoft Visual 6.0 jzifh,cifoHk;jzif h,cifoH k;jzifh,cifoHk;jzif h,cifoH k;jzif h,cifoHk; Access zd kifwnfaqmufjcif;zd kifwnfaqmufjcif;zd kifwnfaqmufjcif;zd kifwnfaqmufjcif;zd kifwnfaqmufjcif;

yxrOD;pG m Microsoft Visual 6.0 ud kzGif hyg/ xd k Yaemuf yH k(267)yg Form1 wGifCommand Button ud koH k;í atmufygtwd kif;zefwD;&rnf/ Command Button rsm;wGifoufqd kif&m y½d k*&rfrsm;a&;om;&rnf/

Open Database Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

Form1.Hide

frmForm2.Show

End Sub

Exit Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Unload Me

End

End Sub

Menu Bar ½S  d Add-Ins ud ka½G;yg/ tay:qH k; Pulldown Menu wpfckjzpfonf hVisual Data Manager udka½G;yg/ yH k(268)/

xd ktcg VisData Window Dialog Box wpfckay:vmrnf/ yH k(269)/

yH k(267)

yH k(268)

Contents

Page 266: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 266/463

259 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

4if; Window xJrS Menu Bar wpfckjzpfonf h File ud ka½G;cs,f&efjzpfonf/ New...

udkxyfrHa½G;ygu Visual Basic 6.0 rSwnfaqmufEd kifonfh atmufygzd kifrsm;ay:vmayrnf/ yH k(270)/

yHk(269)

yH k(270)

Contents

Page 267: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 267/463

260 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yHk(270)yg yHkrS Microsoft Access 4ud ka½G;cs,f&rnf/ xd ktcg Version 2.0

MDB... ESif h Version 7.0 MDB... wd k Yay:vmayrnf/ yH k(271)/

4if;r S Version 7.0 udka½G;cs,f&rnf/ xd ktcgzd ki fopfwnfaqmuf&efzd kiftrnftopf awmif;onf h Dialog Box ay:vmrnf/ yH k(272)/

yH k(272)wGif zd kiftrnfay;NyD; Save ud ka½G;cs,fyg/ Oyrm/ Test01/ xd ktcg Da-

tabase Window ay:vmrnf/ yH k(273)/

yH k(271)

yH k(272)

yH k(273)

Contents

Page 268: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 268/463

261 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yHk(273)yg Database Windows Dialog Box wGifyg0ifaom Properties

ud ka½G;NyD; Right Click ES  dyfyg/ xd ktcg Short Cut Menu wpfckyH k(274)ygtwd kif;ay:vmrnf/

Short Cut Menu rS New Table ud ka½G;cs,f&rnf/ xd ktcg Table StructureDialog Box ay:vmrnf/ yH k(275)/

yHk(274)

yH k(275)

Contents

Page 269: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 269/463

262 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Table Name: List Box wGif Table File Name ud krdrdpdwfBuKdufjznf hpGufyg/Oyrm/ Test01 [k owfrSwfNyD; Add Field Command Button ud ka½G;cs,f&rnf/ xd ktcgAdd Field Dialog Box ay:vmrnf/ 4if;wGif Field Name, Field Type, Field

Size wd k Yud k pdwfBuKdufjznf hpGufNyD;aemuf OK ud k Click jyKvkyfyg/ yH k(276)/

xd kaemuf Add Field Dialog Box xyfrHay:vmNyD; rdrdBuKdwifpDrHxm;aom Field

Name, Field Type, Field Size rsm;ud kowfrSwfNyD; OK ud ka½G;cs,f&rnf/ Field tm;vH k;

owfrSwfNyD;ygu Close Command Button ud ka½G;cs,fyg/ yH k(277)/

yHk(277)

yHk(276)

Contents

Page 270: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 270/463

263 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd ktcg yH k(278)ygtwd kif;jrifawG U&rnf/

Field Type wGifatmufyg vkyfyd kifcGif htcsufrsm;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 jyKvkyfvd kygu Add Index ud ka½G;cs,fyg/Add Index to Test01 Dialog Box ay:vmygu Name List Box wGiftrnfowfrSwfyg/ Index Fields tm;rdrdowfrSwfvd konf h Field Name ud k Available

Fields wGif Double Click  jyKvkyfjcif;jzifhwnfaqmufEdkifayonf/ xdkYaemuf OK

ud kowfrSwf&rnf/ yH k(279)

yH k(278)

Contents

Page 271: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 271/463

264 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(279) wGif OK ud kowfrSwfvd kufygu Table Structure Dialog Box ay:vmrnf/ yH k(280)/

yH k(279)

yH k(280)

Contents

Page 272: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 272/463

265 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(280)wGif Close Command Button ud ka½G;cs,fygu rdrdwnfaqmufxm;aomTable File qHk;½IH;oGm;Edkifonf/ xdkYaMumifh Build the Table Command Button

ud ka½G;cs,f &rnf/ xd  ktcg yH  k(281)yg twd kif; Database Windows Dialog Box

wpfckjyefvnfay:vm ayrnf/

xd k Yaemuf Utility Menu rS Data Form Designer... ud ka½G;yg/ yH k(282)/

yHk(282)

yH k(281)

Contents

Page 273: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 273/463

266 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd ktcg yH k(283)ygtwd kif; Data Form Designer Dialog Box ay:vmrnf/

Form Name [w/o Extension]: List Box wGifrdrdowfrSwfvd konf h trnfud kjznf hpGufyg/ Oyrm - Form2 [kjznf hpGufNyD; RecordSource: List Box wGif Dropdown

List Arrow ud k Mouse jzif h Click jyKvkyfyg/ xd ktcg Pulldown Menu xJrS rdrdzefwD;xm;onf h Table File tm;a½G;cs,fygu yH k(284)ygtwd kif;jzpfay:vmrnf/

yH k(284)

yH k(283)

Contents

Page 274: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 274/463

Page 275: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 275/463

268 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Form2 wGifyg0ifaom Toolbox Icon rsm;rS  m ud kavhvmygu Label,

Text Box, Command Button, Data wd k Yyg0ifNyD; 4if;wd k Y\ Properties

rsm;ud k jyifqifjznf hpGufNyD;aemuf Command Button rsm;wGif vd ktyfaomy½d k*&rfrsm;a&;om;&rnfjzpfonf/lblLabels(0) - Label Properties rSm

(Name) - lblLabelsAlignment - 0 - Left Justify

AutoSize - False

BackStyle - Opaque

Caption - LabourID:

DataFormat - General

Font - MS Sans Serif, Regular, 8

Index - 0

WordWrap - False

lblLabels(1) - Label Properties rSm(Name) - lblLabels

Alignment - 0 - Left Justify

AutoSize - False

BackStyle - Opaque

yHk(287)

Contents

Page 276: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 276/463

269 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Caption - Name:

DataFormat - General

Font - MS Sans Serif, Regular, 8

Index - 1WordWrap - False

lblLabels(2) - Label Properties rSm(Name) - lblLabels

Alignment - 0 - Left Justify

AutoSize - False

BackStyle - Opaque

Caption - Date of Birth:

DataFormat - GeneralFont - MS Sans Serif, Regular, 8

Index - 2

WordWrap - False

lblLabels(3) - Label Properties rSm(Name) - lblLabels

Alignment - 0 - Left Justify

AutoSize - False

BackStyle - Opaque

Caption - Salary:

DataFormat - General

Font - MS Sans Serif, Regular, 8

Index - 3

WordWrap - False

txtFields(0) - Text Properties rS m(Name) - txtFields

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

DataField - LabourID

DataFormat - General

DataSource - Data1

Contents

Page 277: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 277/463

270 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Font - MS Sans Serif, Regular, 8

Index - 0

MultiLine - False

txtFields(1) - Text Properties rS m(Name) - txtFields

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

DataField - Name

DataFormat - General

DataSource - Data1

Font - MS Sans Serif, Regular, 8

Index - 1MultiLine - False

txtFields(2) - Text Properties rS m(Name) - txtFields

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

DataField - Date of Birth

DataFormat - General

DataSource - Data1

Font - MS Sans Serif, Regular, 8

Index - 2

MultiLine - False

txtFields(3) - Text Properties rS m(Name) - txtFields

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

DataField - Salary

DataFormat - General

DataSource - Data1

Font - MS Sans Serif, Regular, 8

Index - 3

Contents

Page 278: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 278/463

271 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

MultiLine - False

Data1 - Data Properties rS m(Name) - Data1

Align - 2 - Align BottomBOFAction - 0 - Move First

DatabaseName-C:\Program Files\Microsoft Visual Studio\VB98\Test01.mdb

EOFAction - 0 - Move Last

ReadOnly - False

RecordsetType - 1 - Dynaset

RecordSource - Test01

cmdAdd - Command Button Properties rSm

(Name) - cmdAddCaption - &Add

Font - MS Sans Serif, Regular, 8

cmdDelete - Command Button Properties rSm(Name) - cmdDelete

Caption - &Delete

Font - MS Sans Serif, Regular, 8

cmdRefresh - Command Button Properties rSm(Name) - cmdRefresh

Caption - &Refresh

Font - MS Sans Serif, Regular, 8

cmdUpdate - Command Button Properties rS m(Name) - cmdUpdate

Caption - &Update

Font - MS Sans Serif, Regular, 8

cmdClose - Command Button Properties rSm(Name) - cmdClose

Caption - &Close

Font - MS Sans Serif, Regular, 8

Contents

Page 279: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 279/463

Page 280: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 280/463

273 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Response = 0 'throw away the error

End Sub

Record Position twGuftwGuftwGuftwGuftwGuf

Private Sub Data1_Reposition()Screen.MousePointer = vbDefault

On Error Resume Next

'This will display the current record position

'for dynasets and snapshots

Data1.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)) + 1

End Sub

Data1 Validate twGuftwGuftwGuftwGuftwGufPrivate Sub Data1_Validate(Action As Integer, Save As Integer)

'This is where you put validation code

'This event gets called when the following actions occur

Select Case Action

Case vbDataActionMoveFirst

Case vbDataActionMovePrevious

Case vbDataActionMoveNext

Case vbDataActionMoveLast

Case vbDataActionAddNew

Case vbDataActionUpdate

Case vbDataActionDelete

Case vbDataActionFind

Case vbDataActionBookmark 

Case vbDataActionClose

End Select

Screen.MousePointer = vbHourglass

End Sub

- - - - - - - - - - 0 - 0 - 0 - - - - - - - - - -

Contents

Page 281: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 281/463

274 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

,cifoH k;,cifoH k;,cifoH k;,cifoH k;,cifoH k; Access zdkifudk zdkifudk zdkifudk zdkifudk zdkifudk Data Report wnfaqmufíwnfaqmufíwnfaqmufíwnfaqmufíwnfaqmufí Report wnfaqmufjcif;wnfaqmufjcif;wnfaqmufjcif;wnfaqmufjcif;wnfaqmufjcif;yxrOD;pG m Microsoft Visual 6.0 ud kzGif hyg/ xd k Yaemuf yH k(288)yg Form1 wGif

Command Button ud koH k;í atmufygtwd kif;zefwD;&rnf/

xd k Yaemuf Menu Bar ½Sd Project ud ka½G;yg/ xd k Yaemuf Pulldown Menu xJrSAdd Data Report ud kxyfrHa½G;cs,f&rnf/ yH k(289)/

yH k(288)

yH k(289)

Contents

Page 282: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 282/463

275 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yHk(290)ygtwdkif; Project1 - DataReport1 [DataReport] Form ay:vmayrnf/

txufyg Report Form yH kpHtm;zefwD;vd kufonfESif h  Project Explore wGifvnf; yH k(291)ygtwd kif; DataReport1(DataReport1) topfwpfckwd k;vmayrnf/

txufyg Report Form yH kpHtm;trnfajymif;vJ&ayrnf/ Properties - Data

Report1 wGif Name ü RDataReport1 [kajymif;vJowfrSwfyg/ yH k(292)/

yH k(290)

yH k(291)

Contents

Page 283: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 283/463

276 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Project Explore wGif vnf; yH k(293)ygtwd kif; RDataReport1(DataReport1)

[ktrnfajymif;oG m;ayrnf/

tqd kyg RDataReport1(RDataReport1) File ud kodrf;vd kygu Menu Bar ½SdFile ud ka½G;cs,fyg/ xd k Yaemuf Save Project ud kxyfrHa½G;cs,fygu Save File As Dia-

log Box ay:vmrnf/ Save Command Button ud ka½G;cs,f&rnf/ yH k(293)/

yHk(292)

yH k(292)

Contents

Page 284: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 284/463

277 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xyfrHí Menu Bar jzpfaom Project rS More ActiveX Designers... ud k

a½G;cs,f&rnf/ xd ktcg Data Environment qd konf h Sub-Menu wpfckxyfrHay:vmrnf/4if;ud kxyfrHa½G;cs,fyg/ yH k(294)/

yH k(293)

yH k(294)

Contents

Page 285: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 285/463

278 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xdktcg yH k(295)wGifazmfjyxm;aom Project1 - DataEnvironment1

[DataEnvironment] Dialog Box ay:vmayrnf/ 4if;ud ktrnfajymif;&ef Proper-

ties ud ka½G;í Properties - DataEnvironment wGif Name RDataEnvironment1

[kajymif;vJowfrSwf&rnf/ yH k(296)

Project Explore wGif vnf; yH k(297)ygtwd kif; RDataReport1(DataReport1)

[ktrnfajymif;oG m;ayrnf/

yH k(295)

yH k(296)

Contents

Page 286: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 286/463

279 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd kaemuf Project1 - RDataEnvironment [DataEnvironment] wGif Con-

nection1 ud ka½G;í Right Click ud kES  dyfyg/ Short Cut Menu ay:vmygu yH k(298)wGifazmfjyxm;onf htwd kif; Properties... ud k xyfrHa½G;cs,fyg/

yH k(297)

yH k(298)

Contents

Page 287: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 287/463

280 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd ktcg Data Link Properties Dialog Box ay:vmrnf/ 4if;rS Provider

Tab Command Button ud ka½G;í Microsoft Jet 3.51 OLE DB Provider ud ka½G;cs,fyg/ yHk(299)/

xd k Yaemuf Connection Tab Command Button ud ka½G;cs,fyg/ yH k(300)ygtwd kif;1. Select or enter a database name: List Box wGif Database File Name awmif;ygu rdrdud k,fwd kif Database File Name ½d kufxnf hjcif;jzif hvnf;aumif;? ud kxyfrHa½G;cs,fjcif;jzif hvnf;aumif; tvd k½S  daom Database File Name ud ka½G;cs,fyg/ yH k(301)/

yHk(299)

Contents

Page 288: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 288/463

281 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Test Connection ud ka½G;cs,fygu rdrda½G;cs,fcJ haom Database File ESifh Path

vrf;aMumif;rSefuefygu yH k(302)ygtwd kif;azmfjyrnfjzpfonf/

yH k(300)

yH k(301)

yH k(302)

Contents

Page 289: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 289/463

282 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd kenf;wl Data Link Properties Dialog Box \ Tab Command Button

rsm;jzpfMuaom Advanced yH k(303) ESif h All yH k(304)wd k YwGifrnfonf htcsufrQajymif;vJ&efrvd kbJ OK ud ka½G;cs,f&efjzpfygonf/

yH k(303)

yH k(304)

Contents

Page 290: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 290/463

283 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd kaemuf Project1 - RDataEnvironment [DataEnvironment] wGif Con-

nection1 ud ka½G;í Right Click ud kES  dyfyg/ Short Cut Menu ay:vmygu yH k(305)wGifazmfjyxm;onf htwd kif; Add Command ud k xyfrHa½G;cs,fyg/

xd ktcg yH k(306)ygtwd kif; jzpfay:vmrnf/

yH k(305)

yH k(306)

Contents

Page 291: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 291/463

Page 292: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 292/463

285 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Project1 - RDataEnvironment [DataEnvironment] wGif Connection1

ud ka½G;í Right Click ud kES  dyfyg/ Short Cut Menu ay:vmygu yH k(309)wGifazmfjyxm;onf htwd kif; Properties ud k xyfrHa½G;cs,fyg/

xd ktcg Command1 Properties Dialog Box wpfckay:vmrnf/ 4if;wGifGeneral, Parameters, Relation, Grouping, Aggregates, Advanced qd konf h Tab

Command Button (6)ckay:vmrnf/ 4if; Tab Command rsm;xJrS General Tab

Command ud ka½G;yg/ yH k(310)/

yH k(309)

Contents

Page 293: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 293/463

286 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Source of Data acgif;pOfatmufwGif½S  daom Database Object: List Box

Dropdown Arrow ud ka½G;í Table udkajymif;yg/ Object Name: List Box wGifDropdown Arrow tultnDjzif h rdrdzefwD;xm;cJ haom Test01 ud ka½G;cs,f&rnf/ yH k(311)/

usef Tab Command Button rsm;tm;jyKjyifp&mrvd kawmhonf htwGuf Apply

-> OK ud ka½G;cs,fyg/ xd ktcg Project1 - DataEnvironment1 [DataEnvironment]

Dialog Box ½S    d \ ud ka½G;ygu yH k(312)wGif azmfjyxm;ouJ hod k Y Field

Name rsm;azmfjyaeayrnf/

yH k(310)

yH k(311)

Contents

Page 294: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 294/463

287 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd k Yaemuf Project1 - RDataReport1 [DataReport] ud kjyefvnfqJ  Gwif&rnf/yH k(313)/

Page Header (Section2) Activate jzpfaeaomtcg Right Click ud kES  dyfyg/Short Cut Sub-Menu wpfckay:vmrnf/ 4if;rS Insert Control ud ka½G;NyD; Labelud kxyfrHa½G;cs,f&rnf/ yH k(314)/

yH k(312)

yH k(313)

Contents

Page 295: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 295/463

Page 296: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 296/463

289 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd kenf;twd kif; Label (4)ckzefwD;NyD; Labour ID, Name, Date of Birth, Sal-

ary ponfjzif htrnfowfrSwfyg/ yH k(316)? yH k(317)/

Datail (Section1) Activate jzpfaeaomtcg Right Click ud kES  dyfyg/ Short

Cut Sub-Menu wpfckay:vmrnf/ 4if;rS Insert Control ud ka½G;NyD; TextBox ud kxyfrHa½G;cs,f&rnf/ yH k(318)/

yHk(316)

yH k(317)

Contents

Page 297: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 297/463

290 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd ktcg yH k(319)ygtwd kif;jzpfay:vmrnf/

yH k(318)

Contents

Page 298: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 298/463

291 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd kenf;twd kif; TextBox (4)ckzefwD;&rnf/ yH k(320)/

Project1 - RDataReport1 [DataReport] Activate jzpfaeaomtcg SmartIcon jzpfaom \tultnDjzif h yH k(321)wGifazmfjyxm;onf htwd kif; Properties -

RDataReport1 ü DataSource wGif List Dropdown Arrow jzif h RData Environ-

ment1 ud ka½G;cs,f&rnf/ DataMember wGif List Dropdown Arrow jzif h Com-

mand1 ud kxyfrHa½G;cs,f&rnf/

yH k(319)

yH k(320)

Contents

Page 299: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 299/463

292 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Detail (Section1) Activate ap&efjyKvkyfí yxrOD;qH k;jrifawG Uae&onf h Text

Box ud ka½G;yg/ Smart Icon jzpfaom \tultnDjzif h yH k(322)wGifazmfjyxm;onf htwd kif; Properties - Text1 ü DataMember\ List Dropdown Arrow jzif h Com-

mand1 ud kvnf;aumif;? DataField \ List Dropdown Arrow jzif h LabourID

ud kvnf;aumif;a½G;cs,f&rnf/ xd kenf;wlusef Text Box toD;oD;ud kvnf; DataMember,

DataField wd k Yud kqDavsmfatmifjyKvkyf&rnf/ yH k(323)/

yH k(321)

Contents

Page 300: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 300/463

293 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(322)

yH k(323)

Contents

Page 301: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 301/463

294 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

txufyg yHk(324)udkjyefoGm;NyD; oufqdkif&m Command Button rsm;wGifatmufazmfjyyg yH k(325)yg twd kif; Coding rsm;ud ka&;&rnf/

rSwfcsuf/rSwfcsuf/rSwfcsuf/rSwfcsuf/rSwfcsuf/ ///// DataReporttoH k;jyKygu DataEnvironmentud koH k;ud koH k;&rnfjzpfonf/ DataEnvironment wGif Database File rwlnDygu Connection1, Con-

nection2, ... [lí cJ  Gjcm;toH k;jyK Ed kifNyD; Database File wlnDNyD; Table File (rwlnDvQif )rsm;jym;aeygu Command1, Command2, ... zefwD;ítoH k;jyKEd kifygonf/

- - - - - - - - - - 0 - 0 - 0 - - - - - - - - - -

yH k(324)

yH k(325)

Contents

Page 302: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 302/463

295 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

,cifoH k;,cifoHk;,cifoH k;,cifoHk;,cifoHk; Access zd kifudk zd kifud k zd kifudk zd kifud k zd kifudk Form wnfaqmufí"gwfyH krsm;Munf hjcif;wnfaqmufí"gwfyH krsm;Munf hjcif;wnfaqmufí"gwfyH krsm;Munf hjcif;wnfaqmufí"gwfyH krsm;Munf hjcif;wnfaqmufí"gwfyH krsm;Munf hjcif;yxrOD;pG m Microsoft Visual 6.0 ud kzGif hyg/ xd k Yaemuf yH k(326)yg Form1 wGif

Command Button rsm;ud koH k;í atmufygtwd kif;zefwD;NyD; vd ktyfaomy½d k*&rfrsm;a&;om;

&rnf/

Data Entry Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

frmForm2.Show

End Sub

Exit Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Unload Me

End

End Sub

xd k Yaemuf yH k(327)yg frmForm2 wGifvd ktyfaom Label, TextBox, OLE, Data,

Command Button rsm;ud koH k;í atmufygtwd kif;zefwD;&rnf/ vd ktyfaom Proper-

ties rsm;ud kvnf;jyifqif&rnf/

yH k(326)

Contents

Page 303: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 303/463

296 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

OLE Data

lblLabels(0) - lblLabels Properties twGuftwGuftwGuftwGuftwGuf(Name) - lblLabels

Alignment - 0 - Left Justify

AutoSize - False

BackStyle - 1 - OpaqueCaption - LabourID:

Font - MS Sans Serif, Regular, 8

Index - 0

WordWrap - False

lblLabels(1) - lblLabels Properties twGuftwGuftwGuftwGuftwGuf(Name) - lblLabels

Alignment - 0 - Left Justify

AutoSize - FalseBackStyle - 1 - Opaque

Caption - Name:

Font - MS Sans Serif, Regular, 8

Index - 1

WordWrap - False

yHk(327)

Contents

Page 304: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 304/463

297 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

lblLabels(2) - lblLabels Properties twGuftwGuftwGuftwGuftwGuf(Name) - lblLabels

Alignment - 0 - Left Justify

AutoSize - FalseBackStyle - 1 - Opaque

Caption - Date of Birth:

Font - MS Sans Serif, Regular, 8

Index - 2

WordWrap - False

lblLabels(3) - lblLabels Properties twGuftwGuftwGuftwGuftwGuf(Name) - lblLabels

Alignment - 0 - Left Justify

AutoSize - FalseBackStyle - 1 - Opaque

Caption - Salary:

Font - MS Sans Serif, Regular, 8

Index - 1

WordWrap - False

lblLabels(4) - lblLabels Properties twGuftwGuftwGuftwGuftwGuf(Name) - lblLabels

Alignment - 0 - Left JustifyAutoSize - False

BackStyle - 1 - Opaque

Caption - Photos:

Font - MS Sans Serif, Regular, 8

Index - 1

WordWrap - False

txtFields(0) - txtFields Properties twGuftwGuftwGuftwGuftwGuf(Name) - txtFields

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

DataField - LabourID

DataFormat - General

DataSource - Data1

Contents

Page 305: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 305/463

298 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Font - MS Sans Serif, Regular, 8

Index - 0

MultiLine - False

txtFields(1) - txtFields Properties twGuftwGuftwGuftwGuftwGuf(Name) - txtFields

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

DataField - Name

DataFormat - General

DataSource - Data1

Font - MS Sans Serif, Regular, 8

Index - 1

MultiLine - FalsetxtFields(2) - txtFields Properties twGuftwGuftwGuftwGuftwGuf(Name) - txtFields

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

DataField - Date of Birth

DataFormat - General

DataSource - Data1

Font - MS Sans Serif, Regular, 8Index - 2

MultiLine - False

txtFields(3) - txtFields Properties twGuftwGuftwGuftwGuftwGuf(Name) - txtFields

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

DataField - Salary

DataFormat - General

Font - MS Sans Serif, Regular, 8

Index - 3

MultiLine - False

Contents

Page 306: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 306/463

Page 307: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 307/463

300 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Data1 - Data Properties rS m(Name) - Data1

Align - 0 - None

BOFAction - 0 - Move FirstConnect - Access

DatabaseName-C:\Program Files\Microsoft Visual Studio\VB98\Test01.mdb

EOFAction - 0 - Move Last

Font - MS Sans Serif, Regular, 8

ReadOnly - False

RecordsetType - 1 - Dynaset

RecordSource - Test01

Add Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub cmdAdd_Click()

Data1.Recordset.AddNew

End Sub

Delete Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub cmdDelete_Click()

'this may produce an error if you delete the last

'record or the only record in the recordset

Data1.Recordset.Delete

Data1.Recordset.MoveNext

End Sub

Refresh Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub cmdRefresh_Click()

'this is really only needed for multi user apps

Data1.Refresh

End SubUpdate Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub cmdUpdate_Click()

Data1.UpdateRecord

Data1.Recordset.Bookmark = Data1.Recordset.LastModified

End Sub

Contents

Page 308: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 308/463

301 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Close Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub cmdClose_Click()

frmForm2.Hide

Form1.ShowEnd Sub

Error twGuftwGuftwGuftwGuftwGufPrivate 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 them

MsgBox "Data error event hit err:" & Error$(DataErr)

Response = 0 'throw away the errorEnd Sub

Record Position twGuftwGuftwGuftwGuftwGufPrivate Sub Data1_Reposition()

Screen.MousePointer = vbDefault

On Error Resume Next

'This will display the current record position

'for dynasets and snapshots

Data1.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)) + 1

End Sub

Data1 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 occur

Select Case Action

Case vbDataActionMoveFirst

Case vbDataActionMovePrevious

Contents

Page 309: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 309/463

302 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Case vbDataActionMoveNext

Case vbDataActionMoveLast

Case vbDataActionAddNew

Case vbDataActionUpdateCase vbDataActionDelete

Case vbDataActionFind

Case vbDataActionBookmark 

Case vbDataActionClose

End Select

'Screen.MousePointer = vbHourglass

End Sub

OLEField Double Click twGuftwGuftwGuftwGuftwGufPrivate 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 table

oleFields(Index).InsertObjDlg

End Sub

- - - - - - - - - - 0 - 0 - 0 - - - - - - - - - -Toolbox xJwGifxJwGif xJwGifxJwGif xJwGif Crystal Report Smart Icon xnf hjcif;xnf hjcif;xnf hjcif;xnf hjcif;xnf hjcif;

Toolbox wGif Right Click ES  dyfyg/ xd ktcg Short Cut Menu ay:vmyguComponents... ud kxyfrHa½G;cs,f&rnf/ yH k(328)/

yHk(328)

Contents

Page 310: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 310/463

303 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Components Dialog Box ay:vmygu Crystal Report Control 4.6 ud ka½G;NyD; Check vkyf&rnf/ xd k Yaemuf Apply, OK ud kxyfrHa½G;cs,f&rnf/ yH k(329)/

Crystal Report Control 4.6 ud ka½G;Ed kifjcif;onf C:\WINDOWS\SYSTEM\ 

CRYSTL32.OCX zd kif½S  djcif;aMumif hjzpfonf/ xd ktcg Toolbox ü Crystal Report

Icon a&muf½S  dvmrnf/ yH k(330)/

- - - - - - - - - - 0 - 0 - 0 - - - - - - - - - -

yH k(329)

yH k(330)

Contents

Page 311: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 311/463

304 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Crystal Report wnfaqmufjcif; ( ,cif wnfaqmufjcif; ( ,cif wnfaqmufjcif; ( ,cif wnfaqmufjcif; ( ,cif wnfaqmufjcif; ( ,cif Access File ) ) ) ) )yxrOD;pG m Visual Basic 6.0 ud kzGif hyg/ xd k Yaemuf Menu Bar rS Add-Ins ud k

a½G;í Pulldown Menu wpfckjzpfaom Report Designer... ud ka½G;cs,f&rnf/ yH k(331)

yH k(332)ygtwd kif;jzpfay:vmygu Cancel Command Button ud ka½G;cs,fyg/

yH k(331)

yH k(332)

Contents

Page 312: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 312/463

305 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Crystal Reports Registration Express Dialog Box aysmufoG m;vdrf hrnf/xd ktcg Report wnfaqmuf&eftqifoif hjzpfaeayvdrf hrnf/

Crystal Reports Pro Dialog Box wGif New... ud k yH k(333)a½G;ygu yH k(334)yg

twd kif; Create New Report Dialog Box jzpfay:vmrnf/

Create New Report Dialog Box xJrS Standard ud kxyfrHa½G;cs,fygu yH k(335)ygtwd kif;jzpfay:vmayrnf/

yH k(333)

yH k(334)

Contents

Page 313: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 313/463

306 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Create Report Expert Dialog Box wGif Data File Command Button ud kxyfrHa½G;cs,f&rnf/ yH k(336)

Choose Database File Dialog Box xyfrHay:vmNyD; rdrdtoH k;jyKvd konf h Da-tabase File ud kxyfrHa½G;cs,f&ef List Files of Type:List Box ud k Access Files (or)

User Default [kajymif;yg/ rdrdtvd k½S  donf h Drives:, Directories: wd k Ytm; ajymif;vJítvd k½S  donf h Microsoft Database File ud ka½G;cs,fNyD; Add Command Button ud ka½G;cs,f&rnf/ yH k(337)

yH k(335)

yH k(336)

Contents

Page 314: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 314/463

307 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Choose Database File Dialog Box \trS m;jcpf Close Button ud ka½G;jcif;jzif h

aomfvnf;aumif;? Done Command Button ud ka½G;jcif;jzif haomfvnf;aumif; xyfrHaqmif½Guf&rnf/ xd ktcg Choose Database File Dialog Box aysmufoG m;rnf/ yH k(338)

yH k(337)

Contents

Page 315: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 315/463

308 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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: Fields

tm;xyfrHa½G;cs,fyg/ yH k(339)/

Database Fields: acgif;pOfatmuf½S  d Database Fields: rsm;xJrS rdrdtvd k½S  daomField rsm;tm; Report Fields: acgif;pOfatmufod k Yyd k Y&rnf/ Field wpfckcsif;a½G;vd kygu

 Command Button jzif ha½G;cs,fNyD; Field tm;vH k;a½G;vd kygu

Command Button jzifha½G;cs,f&rnf/ yHk(340)/

yH k(338)

yH k(339)

Contents

Page 316: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 316/463

309 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd k Yaemuf Next>> Command Button ud ka½G;cs,fyg/ yH k(341)/

xd ktcg Tab Command wpfckjzpfaom 3: Sort od k Ya&muf½S  doG m;rnf/ txufyg

yH k(341)wGif rdrdtkyfpkzJ  G Uvd konf h Field tm; tkyfpkzJ  G UEd kifonf/ tkyfpkzJ  G U&ef rvd ktyfyguPreview Report ud kxyfrHa½G;yg/ yH k(342)/

yH k(340)

yH k(341)

Contents

Page 317: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 317/463

310 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

txufygyH kwGifazmfjyxm;aom Design tm;a½G;cs,fygu yH k(343)twd kif; jyKjyifrGrf;rHEd kif&ef tajctaeay;vdrf hrnf/

yH k(342)

Contents

Page 318: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 318/463

311 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd k Yaemuf Menu Bar ½S  d Insert ud ka½G;cs,fyg/ Pulldown Menu wpfckjzpfaomText Field ud ka½G;cs,fyg/ yH k(344)/

yH k(343)

Contents

Page 319: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 319/463

312 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd ktcg Edit Text Field Dialog Box ay:vmNyD; acgif;pOftm;rdrdpdwfBuKdufzefwD;í&ayonf/ yH k(345)/ xd k Yaemuf Accept Command Button ud ka½G;cs,fyg/

acgif;pOftm; Alignment csdef&efrdrd½d kufES  dyfxm;onf h acgif;pOf Text Box tm;a½G;NyD; Right Click ud ka½G;yg/ Short Cut Menu ay:vmrnf/ xd k Yaemuf  Change

Format... ud ka½G;cs,f&rnf/ yH k(346)/

yH k(344)

yHk(345)

Contents

Page 320: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 320/463

313 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd ktcg Format String Dialog Box ay:vmrnf/ yH k(347) 4if;rS Alignment

wGif Centered ud k a½G;NyD; OKud kxyfrHa½G;cs,fygu acgif;pOfpmom; tv,fñd  §oG m;ayrnf/yH k(348)

yH k(346)

yH k(347)

Contents

Page 321: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 321/463

314 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

txufyg Report File tm;odrf;vd kygu Menu Bar ½Sd File ud ka½G;cs,fyg/xd k Yaemuf Pulldown Menu xJrS Save ud ka½G;cs,fyg/ yH k(349)

yH k(348)

yH k(349)

Contents

Page 322: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 322/463

315 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd ktcg File Save As Dialog Box ay:vmrnf/ rdrdpdwfBuKdufodrf;vd konf hzd kiftrnfud kay;NyD; OK ud k Click vkyf&rnf/ yH k(350)/

Crystal Reports Title Bar onfvnf; [Untitled Report #1] r[kwfawmhbJ[c:\program files\microsoft visual studio\vb98\std09.rpt] [líajymif;vJoG m;ayrnf/ yHk(351)/

- - - - - - - - - - 0 - 0 - 0 - - - - - - - - - -

yH k(350)

yHk(351)

Contents

Page 323: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 323/463

316 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Crystal Report wnfaqmufjcif; (wnfaqmufjcif; (wnfaqmufjcif; (wnfaqmufjcif; (wnfaqmufjcif; ( Access File 2000 txuf )txuf )txuf )txuf )txuf )yxrOD;pG m Visual Basic 6.0 ud kzGif hyg/ xd k Yaemuf Menu Bar rS Add-Ins ud k

a½G;í Pulldown Menu wpfckjzpfaom Report Designer... ud ka½G;cs,f&rnf/ Create

Report Expert Dialog Box a&mufonftxdtqif hqif hjyKvkyfNyD; SQL/ODBC Com-mand Button ud ka½G;cs,f&rnf/ yH k(352)

xd ktcg Log On Server Dialog Box topfwpfckay:vmrnf/ yH k(353)

yHk(353)yg Dialog Box rS ODBC:exam01 ud ka½G;cs,fyg/ xd k Yaemuf OK ud kClick vkyfyg/ xd ktcg Choose SQL Table Dialog Box ay:vmrnf/ yH k(354)/

yH k(352)

yH k(353)

Contents

Page 324: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 324/463

317 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Choose SQL Table Dialog Box xJrS SQL Tables: acgif;pOfatmuf½S  d List

Box wGif rdrdpdwfBuKduf Table File ud k  da½G;cs,f&rnf/ Oyrm - exam01 ud ka½G;cs,fyg/Add Command Button ud kxyfrHa½G;cs,fyg/ Close Button ud ka½G;cs,fygu yH k(355)ygtwd kif;jzpfvmrnf/

yH k(355)wGif Next >> Command Button ud kxyfrHa½G;cs,f&rnf/ yH k(356)ygtwd kif;azmfjyrnf/

yH k(354)

yH k(355)

Contents

Page 325: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 325/463

318 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

txufygyHk(356)wGif  Database Fields: ü Field rsm;pdwfBuKduf(odkYr[kwf)tm;vH k;ud k a½G;cs,fEd kifayonf/ Oyrm - Fields rsm;tm;vH k;a½G;cs,f&ef All ->> Com-

mand Button ud ka½G;cs,f&rnf/ yH k(357)

xd k Yaemuf Next ud kxyfrHa½G;cs,fyg/ yH k(358)ygtwd kif;azmfjyrnf/

yH k(356)

yH k(357)

Contents

Page 326: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 326/463

Page 327: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 327/463

320 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Design Tab Command Button ud ka½G;cs,fygu yH k(360)ygtwd kif;jzpfay:vmrnf/

txufygyHk(360)wGifazmfjyxm;aom Crystal Report File tm;odrf;vd kyguMenu Bar wGif½S  donf h File ud ka½G;cs,fyg/ Pulldown Menu wpfckjzpfaom Save ud ka½G;cs,fyg/ xd ktcg File Save As Dialog Box ay:vmrnf/ rdrdpdwfBuKdufvrf;aMumif;wGif  Report File Name ud kjznf hpGufNyD; OK Command Button ud ka½G;cs,f&rnf/yH k(361)/

yH k(360)

Contents

Page 328: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 328/463

321 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

- - - - - - - - - - 0 - 0 - 0 - - - - - - - - - -Crystal Report jzifh jzif h jzifh jzif h jzifh Graphic File ½d kufxkwfjcif;½d kufxkwfjcif;½d kufxkwfjcif;½d kufxkwfjcif;½d kufxkwfjcif;yxrOD;pGm Visual Basic 6.0 wGif "gwfyHkrsm;yg0ifaom Access File udk

wnfaqmufxm;&rnf/ "gwfyH krsm;ud k Windows BitMap File Format jzif hom Data

Entry jyKvkyf&rnf/ Access 2000 xufapmaom ,cif Access File rsm;twGufrlCrystal Report \vkyfyd kifcGif hjzpfaom Create Report Expert Dialog Box ay:vmatmifzefwD;í Data File Command Button ud ka½G;&rnf/ Access 2000 ESif h txufAccess File rsm;twGufrl Crystal Report \vkyfyd kifcGif hjzpfaom Create Report Ex-

pert Dialog Box ay:vmatmifzefwD;í SQL/ODBC File Command Button ud ka½G;&rnf/

yH k(361)

yH k(362)

Contents

Page 329: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 329/463

322 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd ktcg Log On Server Dialog Box ay:vmrnf/ Server Type: acgif;pOfatmufwGif rdrda½G;cs,frnf h Database File tm;½S mazG&rnf/ Oyrm - ODBC - Photo01

ud ka½G;cs,fyg/ xd k Yaemuf OK ud k Click vkyf&rnf/ yH k(363)/

Choose SQL Table Dialog Box ay:vmygu rdrdwnfaqmufxm;aomDatabase File xJwGifyg0ifonf h Table File ud ka½G;cs,fNyD; Add Command Button

ud k xyfrHa½G;cs,f&rnf/ yH k(364)/

Create Report Expert Dialog Box ay:vmNyD; Table File jzpfonf h Photo01

File ay:vmrnf/ yH k(365)/

yHk(363)

yH k(364)

Contents

Page 330: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 330/463

323 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(365)wGif Next >> Command Button ud kxyfrHa½G;cs,f&rnf/ yH k(366)ygtwd kif;azmfjyrnf/

txufygyHk(366)wGif  Database Fields: ü Field rsm;pdwfBuKduf(odkYr[kwf)tm;vH k;ud k a½G;cs,fEd kifayonf/ Oyrm - Fields rsm;tm;vH k;a½G;cs,f&ef All ->> Com-

mand Button ud ka½G;cs,f&rnf/ yH k(367)

yH k(365)

yH k(366)

Contents

Page 331: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 331/463

324 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd k Yaemuf Next ud kxyfrHa½G;cs,fyg/ yH k(368)ygtwd kif;azmfjyrnf/

txufygyH k(368)wGif  Group Fields aqmif½Gufvd kygu vkyfyd kifcGif hay;xm;NyD;raqmif½Gufvd kygu Preview Report Command Button ud ka½G;cs,f&rnf/ xd ktcgyH k(369)twd kif; jzpfay:vmrnf/

yH k(367)

yH k(368)

Contents

Page 332: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 332/463

325 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Design Tab Command Button ud ka½G;cs,fygu yH k(370)ygtwd kif;jzpfay:vm

rnf/

yH k(369)

Contents

Page 333: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 333/463

Page 334: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 334/463

327 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd ktcg Insert Database Field Dialog Box rS Field wpfckjzpfaom photos

ud ka½G;NyD; Insert Command Button ud ka½G;cs,f&rnf/ yH k(372)

yH k(371)

yH k(372)

Contents

Page 335: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 335/463

328 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd ktcg yH k(373)ygtwd kif; "gwfyH k½S  d&rnf htuGufud kcsdefqí tpm;xd k;twnfjyKNyD;aomtcg Insert -> Text Field jzif h vd ktyfrnf hpmom;rsm;a&;om;yg/ yH k(374)/

tqd kyg Crystal Report File tm; File -> Save ud ka½G;NyD; Report File Name

ay;&efjzpfonf/- - - - - - - - - - 0 - 0 - 0 - - - - - - - - - -

yH k(373)

yH k(374)

Contents

Page 336: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 336/463

329 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Access zd kifud kzd kifudk zd kifud kzd kifudk zd kifud k Crystal Report wnfaqmufíwnfaqmufíwnfaqmufíwnfaqmufíwnfaqmufí Print ½dkufxkwfjcif;½dkufxkwfjcif;½dkufxkwfjcif;½dkufxkwfjcif;½dkufxkwfjcif;yH k(375)yg Form1 wGif Command Button rsm;ud koH k;í atmufygtwd kif; zefwD;

wnfaqmufxm;&rnf/ /

Crystal Report

Private Sub Command1_Click()

CrystalReport1.PrintReport

End Sub

Private Sub Command2_Click()

Unload Me

End

End Sub

Microsoft Visual Basic 6.0 wGif Menu Bar wpfckjzpfaom Add-inud ka½G;cs,fyg/ xd k Yaemuf Pulldown Menu xJrS Report Designer... jzif h *.rpt File wpfzd kifud kwnfaqmufxm;&rnf/ Oyrm - c:\program files\microsoft visual studio\vb98\ 

exam01.rpt ud kwnfaqmufxm;&rnf/ yH k(376)/

yH k(375)

Contents

Page 337: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 337/463

330 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Crystal Report \\\\\ Properties wGifwGifwGifwGifwGif

(Name) - CrystallReport1BoundReportFooter - False

CopiesToPrinter - 1

Destination - 0 - crptToWindow

DetailCopies - 1

DiscardSaveData - False

Left - 4200

MarginBottom - 0

MarginLeft - 0

MarginRight - 0MarginTop - 0

PrinterCollation - 2 - crptDefault

PrinterCopies - 1

PrinterStopPage - 0

PrintFileType - 0 - crptRecord

yH k(376)

Contents

Page 338: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 338/463

331 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

PrintFileUserRptDateFmt - False

PrintFileUserRptNumberFmt - False

ReportFileName - C:\Program Files\Microsoft Visual

Studio\VB98\exam01.rpt

ReportSource - 0 - crptReport

Top - 960

WindowBorderStyle - 2 - crptSizable

WindowControlBox - True

WindowControls - True

WindowHeight - 300

WindowLeft - 100

WindowMaxButton - True

WindowMinButton - TrueWindowState - 0 - crptNormal

WindowTop - 100

WindowWidth - 490

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

Database File wpfcktwGif;½Sd wpfcktwGif;½S  d wpfcktwGif;½Sd wpfcktwGif;½S  d wpfcktwGif;½S  d Table zd kifESpfckud ktoH k;jyKíuHprf;rJEI  dufjcif;zd kifESpfckud ktoH k;jyKíuHprf;rJEI  dufjcif;zd kifESpfckud ktoH k;jyKíuHprf;rJEI  dufjcif;zd kifESpfckud ktoH k;jyKíuHprf;rJEI  dufjcif;zd kifESpfckud ktoH k;jyKíuHprf;rJEI  dufjcif;yxrOD;pG m Microsoft Visual Basic 6.0 \vkyfyd kifcGif hwGifyg0ifaom Menu Bar

rS Add-ins ud ka½G;cs,f&rnf/ xdk Yaemuf Pulldown Menu jzpfaom Visual Data

Manager... ud ka½G;cs,fyg/ yH k(377)/

xd ktcg VisData Dialog Box ay:vmvdrf hrnf/ 4if;rS Menu Bar jzpfaom File

ud ka½G;cs,fyg/ xd k Yaemuf New ud kxyfrHa½G;cs,f&rnf/ yH k(378)/

yH k(377)

Contents

Page 339: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 339/463

Page 340: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 340/463

333 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(380)wGif Select Microsoft Access Database to Create Dialog Box

ay:vmygu rdrdwnfaqmuftrnfay;vd konf h Database File trnfud kjznf hpGufí Save

Command Button ud ka½G;cs,f&ayrnf/ Oyrm - Lucky [kjznf hpGufNyD; Save Com-

mand Button ud ka½G;yg/ VisData Dialog Box wGif VisData:C:\Program\Lucky

Draw\Lucky.mdb [k Title Bar üay:vmayrnf/ xd k Yaemuf Database Window

Dialog Box wpfckxyfrHay:vmrnf/ yH k(381)/

yH k(380)

yHk(381)

Contents

Page 341: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 341/463

Page 342: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 342/463

335 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Add Field Dialog Box ay:vmvdrf hrnf/ xd ktcg rdrdtvd k½S  donf h Field Name,

Field Type, Field Size wd k Yud kowfrSwf&rnf/ yH k(384)? yH k(385)/

Field Name wpfckcsif;oGif;NyD;ygu OK Command Button ud ka½G;cs,f&rnf/

Field Name xyfrHroGif;vd kawmhygu Close Command Button ud ka½G;cs,fyg/ xd ktcgyH k(386)ygtwd kif;jzpfay:vmrnf/

yH k(384)

yH k(385)

Contents

Page 343: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 343/463

336 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Index Field owfrSwfvd kygu Add Index Command Button ud ka½G;cs,f&rnf/xd ktcg Add Index to Luck01 Dialog Box ay:vmygu Name List Box, In-

dexed Fields List Box wd k Ytm; rdrdpdwfBuKdufowfrSwfNyD; OK Command Button ud ka½G;cs,fyg/ xyfrHí Close Command Button ud k a½G;cs,f&rnf? yH k(387)/

yH k(386)

yH k(387)

Contents

Page 344: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 344/463

337 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd ktcg rlv Table Structure Dialog Box od k Yjyefvnfa&muf½S  doG m;rnf/ yH k(388)/

txufyg Table Structure ud kodrf;vdkygu Build the Table Command

Button ud ka½G;cs,f&rnf/ rlv Database Window Dialog Box od k Yjyefvnfa&muf½S  doG m;ayrnf/ Close Command Button ud ka½G;cs,fygu tqd kyg Luck01 Table File

ud kodrf;rnfr[kwfyg/ yH k(389)/

yHk(388)

Contents

Page 345: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 345/463

338 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

C:\Program Files\LuckDraw\Lucky.mdb ud kwnfaqmufNyD; Luck01 Table

File uk  dwnfaqmufcJ hNyD;jzpfonf/ ,cktcg 4if; Database File xJwGifyif Luck02

Table File ud kxyfrHwnfaqmuf&rnf/ Luck01 ESif h Luck02 Table File rsm;rS m waoGrwdrf;wlnDMuojzif h Luck02 Table File tm; Luck01 Table File uJ hod k Yyif tptqH k;jyefwnfaqmufyguvnf;&onf/ jzwfvrf;enf;jzifhwnfaqmufvdkygu yHk(389)wGif

jrifawG Uae&aom Database Window Dialog Box rS Luck01 ud ka½G;yg/ xd k YaemufRight Click ES  dyfyg/ xd ktcg Short Cut Menu wpfckay:vmrnf/ yH k(390)/

yH k(389)

yH k(390)

Contents

Page 346: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 346/463

339 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Short Cut Menu xJrS Copy Structure... ud kxyfrHa½G;cs,fyg/ xd ktcg yH k(391)ygCopy Structure Dialog Box ay:vmrnf/

4if; Dialog Box rS Target Connect String: acgif;pOfatmuf Text Box üLucky [kjznf hpGufNyD; Table: acgif;pOfatmuf Text Box ü Luck01 ud ka½G;cs,f&rnfjzpfNyD; Copy Data Check Box ud k Check jyK vkyf&efjzpfonf/ xd k Yaemuf OK Com-

mand Button ud ka½G;cs,fyg/ yH k(392)/

xd ktcg VisData Dialog Box ay:vmrnf/ Enter New Table Name acgif;pOfatmuf Text Box ü rdrdwnfaqmufvd konf h Table Name ud kjznf hpGuf&rnf/ Oyrm -

Luck02 [kjznf hpGufNyD; OK Command Button ud ka½G;cs,f&rnf/ yH k(394)/

yH k(391)

yHk(392)

Contents

Page 347: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 347/463

340 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xdktcg Copy Structure Dialog ay:vmrnf/ rdrdul;vdkonfh StructureatmifjrifpG mul;NyD;aMumif; Message Box ay:vmayrnf/ OK Command Button

ud ka½G;yg/ yH k(394)/

xd ktcg Lucky.mdb Database File xJwGif Luck01 Table File ESif htvm;o@mefwlaom Luck02 Table File jzpfvmrnf/ yH k(395)/

yH k(393)

yH k(394)

yHk(395)

Contents

Page 348: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 348/463

341 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

uHprf;rJazgufrnf h y½d k*&rfa&;om;&eftwGufatmufyg Form yH kpHud kwnfaqmuf&rnf/ yH k(396)/

yHk(396)ygForm

yH kpHwGifyg0ifaomToolbox Icon

rsm;rS m ud kavhvmyguLabel, Text Box, Command Button, Data, Frame wd k Yyg0ifNyD;

4if;wdk Y\ Properties rsm;ud k jyifqifjznfhpGufNyD;aemuf  Command Button rsm;wGifvd ktyfaomy½d k*&rfrsm; a&;om;&rnfjzpfonf/Label1 - Label Properties rSm(Name) - Label1

Alignment - 0 - Left Justify

AutoSize - False

BackStyle - Opaque

BorderStyle - 1 - Fixed Single

Caption - uHprf;rnfhta&&twGuf  (qkrJta&twGuf )Font - -Win---Kalaw, Bold, 18

WordWrap - False

yHk(396)

Contents

Page 349: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 349/463

342 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Label2 - Label Properties rSm(Name) - Label2

Alignment - 0 - Left Justify

AutoSize - FalseBackStyle - Opaque

BorderStyle - 1 - Fixed Single

Caption - uHprf;rnfhta&&twGuf  (uHprf;rnf hta&twGuf )Font - -Win---Kalaw, Bold, 18

WordWrap - False

Label3 - Label Properties rSm(Name) - Label3

Alignment - 0 - Left JustifyAutoSize - False

BackStyle - Opaque

BorderStyle - 1 - Fixed Single

Caption - qkrJeHygwf  (qkrJeHygwf )Font - -Win---Kalaw, Bold, 18

WordWrap - False

Label4 - Label PropertiesrSm(Name) - Label4

Alignment - 0 - Left Justify

AutoSize - False

BackStyle - Opaque

BorderStyle - 1 - Fixed Single

Caption - uHxl;½SiftrSwf  (uHxl;½SiftrSwf )Font - -Win---Kalaw, Bold, 18

WordWrap - FalseLabel5 - Label Properties rSm(Name) - Label5

Alignment - 0 - Left Justify

AutoSize - False

BackStyle - Opaque

Contents

Page 350: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 350/463

343 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

BorderStyle - 1 - Fixed Single

Caption - qkrJeHygwf tm; uHxl;½SiftrSwf rS &&½Sdygonf 

(qkrJeHygwf tm; uHxl;½SiftrSwf rS &&½S  dygonf )

Font - -Win---Kalaw, Bold, 18WordWrap - False

Text1 - Text Properties rSm(Name) - Text1

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

Font - -Win---Kalaw, Bold, 18

Text - Empty

Text2 - Text Properties rSm(Name) - Text2

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

Font - -Win---Kalaw, Bold, 18

Text - Empty

Text3 - Text Properties rSm(Name) - Text3

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

Font - -Win---Kalaw, Bold, 18

Text - Empty

Text4 - Text Properties rSm(Name) - Text4

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed SingleFont - -Win---Kalaw, Bold, 18

Text - Empty

Text5 - Text Properties rS m (qkrJeHygwf tm;)(qkrJeHygwf tm;)(qkrJeHygwf tm;)(qkrJeHygwf tm;)(qkrJeHygwf tm;)(Name) - Text5

Alignment - 0 - Left Justify

Contents

Page 351: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 351/463

344 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

BorderStyle - 1 - Fixed Single

Font - -Win---Kalaw, Bold, 18

Text - Empty

Text6 - Text Properties rSm (uHxl;½SiftrSwf rS &½Sdygonf)(uHxl;½SiftrSwf rS &½S  dygonf )(uHxl;½SiftrSwf rS &½Sdygonf)(uHxl;½SiftrSwf rS &½S  dygonf )(uHxl;½SiftrSwf rS &½S  dygonf)(Name) - Text6

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

Font - -Win---Kalaw, Bold, 18

Text - Empty

Text7 - Text Properties rS m (uHprf;&ef Command Button atmuf0Sufxm;onf )(Name) - Text7

Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed Single

Font - -Win---Kalaw, Bold, 18

Text - Empty

Command1 - CommandButton Properties rSm(Name) - Command1

Caption - uHprf;&&ef  (uHprf;&ef )BorderStyle - 1 - Fixed Single

Font - -Win---Yadanapon, Bold, 22

Command2 - CommandButton Properties rSm(Name) - Command2

Caption - y½dk*&&rfrSxGuf&&ef  (y½d k*&rfrSxGuf&ef )BorderStyle - 1 - Fixed Single

Font - -Win---Innwa, Bold, 20

Command3 - CommandButton Properties rSm

(Name) - Command3Caption - uHprf;&&ef  (uHprf;rJtrnfpm&if;Munf h&ef )BorderStyle - 1 - Fixed Single

Font - -Win---Innwa, Bold, 20

Data1 - Data Properties rS m(rjrifap&efwpfckckatmuf0Sufxm;&rnf/)(Name) - Data1

Contents

Page 352: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 352/463

345 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Align - None

BOFAction - 0 - Move First

Caption - Data1

Connect - AccessDatabaseName - C:\Program Files\LuckyDraw\Lucky.mdb

EOFAction - 0 - Move Last

Font - MS Sans Serif, Regular, 8

RecordsetType - 0 - Table

Frame1 - Frame Properties rSm(Name) - Frame1

BorderStyle - 1 - Fixed Single

Caption - EmptyFont - MS Sans Serif, Regular, 8

Frame2 - Frame Properties rSm(Name) - Frame2

BorderStyle - 1 - Fixed Single

Caption - Empty

Font - MS Sans Serif, Regular, 8

Frame3 - Frame Properties rSm(Name) - Frame3

BorderStyle - 1 - Fixed Single

Caption - Empty

Font - MS Sans Serif, Regular, 8

Frame4 - Frame Properties rSm(Name) - Frame4

BorderStyle - 1 - Fixed Single

Caption - EmptyFont - MS Sans Serif, Regular, 8

Contents

Page 353: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 353/463

346 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

(General), (Declaration) twGuftwGuftwGuftwGuftwGufDim MyDb As Database, MyData As Recordset

uHprf;&ef uHprf;&ef uHprf;&ef uHprf;&ef uHprf;&ef Command Button1 twGuftwGuftwGuftwGuftwGuf

Private Sub Command1_Click()Dim MyDb As Database, MyData As Recordset

Dim zaw As Boolean

Dim a, b As Integer

a = Val(Text1)

b = Val(Text3)

If Text1 <> Empty Then

Text5 = b + 1

Text3 = b + 1Text5 = Text3

If b + 1 >= a Then

Text3 = b + 1

Text5 = b + 1

Text6 = 0

Command1.Visible = False

Form2.Show

End If 

Text5.ForeColor = "255"

Else

Form3.Show

End If 

Text6.ForeColor = "0"

''''''''

zaw = True

Set MyDb = Workspaces(0).OpenDatabase("c:\Program Files\ 

LuckyDraw\Lucky.mdb")

Set MyData = MyDb.OpenRecordset("Luck01", dbOpenTable)

MyData.MoveFirst

c = Text2

Contents

Page 354: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 354/463

Page 355: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 355/463

348 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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.Delete

MyDatapp.MoveNext

Loop

End If 

MyData.MoveFirst

ss = 0

Do While MyData.EOF = Falseyy = MyData("Luckno")

If yy < 9999 And yy <> 0 Then

MyDatapp.AddNew

MyDatapp("Luckno") = yy

MyDatapp("srno") = ss

MyDatapp.Update

End If 

MyData.MoveNextss = ss + 1

Loop

MyDatapp.MoveFirst

Form5.Show

End Sub

Data1 Reposition twGuftwGuftwGuftwGuftwGufPrivate Sub Data1_Reposition()

Data1.Caption = "Record: " & (Data1.Recordset.AbsolutePosition + 1)

End Sub

Contents

Page 356: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 356/463

349 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Form Load twGuftwGuftwGuftwGuftwGufPrivate Sub Form_Load()

Set MyDb = Workspaces(0).OpenDatabase("C:\Program Files\ 

LuckyDraw\Lucky.mdb")Set MyData = MyDb.OpenRecordset("Luck01", dbOpenTable)

MyData.AddNew

MyData("Luckno") = 0

MyData.Update

Data1.Refresh

End Sub

Form 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.MoveFirst

Do Until MyData.EOF

MyData.Delete

MyData.MoveNext

Loop

Data1.Refresh

End Sub

Lucky Draw Program BuD;ud k Run í&Ed kifap&ef yH k(397)wGifyg0ifaom Form

File rsm;ud kwnfaqmuf&ayrnf/

yH k(397)

Contents

Page 357: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 357/463

350 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

qufvufí Form2 ud kwnfaqmuf&ayrnf/ yH k(398)/

yH k(398)yg Form yH kpHwGifyg0ifaom Toolbox Icon rsm;rS  m ud kavhvmygu

Label, Command Button, Frame wd k Yyg0ifNyD; 4if;wd k Y\ Properties rsm;ud k

jyifqifjznf hpGufNyD;aemuf Command Button rsm;wGif vd ktyfaomy½d k*&rfrsm; a&;om;&rnfjzpfonf/Label1 - Label Properties rSm

(Name) - Label1Alignment - 2 - Center

AutoSize - False

BackStyle - Opaque

BorderStyle - 0 - None

Caption - uHprf;rJukefaeygNyD (uHprf;rJukefaeygNyD )Font - -Win---Taungyi, Bold, 26

WordWrap - False

Frame1 - Frame Properties rSm(Name) - Frame1

BorderStyle - 1 - Fixed Single

Caption - Empty

Font - MS Sans Serif, Regular, 8

yH k(398)

Contents

Page 358: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 358/463

351 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Command1 - CommandButton Properties rSm(Name) - Command1

Caption - ydwf&&ef  (ydwf&ef )

BorderStyle - 1 - Fixed SingleFont - -Win---Yadanapon, Bold, 28

ydwf&efydwf&ef ydwf&efydwf&ef ydwf&ef Command Button1 twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

Form2.Hide

Unload Form2

End Sub

qufvufí Form3 ud kwnfaqmuf&ayrnf/ yH k(399)/

yH k(399)yg Form yH kpHwGifyg0ifaom Toolbox Icon rsm;rS  m ud kavhvmygu

Label, Command Button, Frame wd k Yyg0ifNyD; 4if;wd k Y\ Properties rsm;ud k

jyifqifjznf hpGufNyD;aemuf Command Button rsm;wGif vd ktyfaomy½d k*&rfrsm; a&;om;&rnfjzpfonf/Label1 - Label Properties rSm(Name) - Label1

Alignment - 2 - Center

yH k(399)

Contents

Page 359: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 359/463

352 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

AutoSize - False

BackStyle - Opaque

BorderStyle - 0 - None

Caption - uHprf;rJta&&twGufxnfhyg (uHprf;rJta&twGufxnf h&ef )Font - -Win---Taungyi, Bold, 24

WordWrap - False

Frame1 - Frame Properties rSm(Name) - Frame1

BorderStyle - 1 - Fixed Single

Caption - Empty

Font - MS Sans Serif, Regular, 8

Command1 - CommandButton Properties rSm(Name) - Command1

Caption - ydwf&&ef  (ydwf&ef )BorderStyle - 1 - Fixed Single

Font - -Win---Yadanapon, Bold, 28

ydwf&efydwf&ef ydwf&efydwf&ef ydwf&ef Command Button1 twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

Form3.Hide

Unload Form3

Form1.Show

End Sub

qufvufí Form4 ud kwnfaqmuf&ayrnf/ yH k(400)/

yHk(400)

Contents

Page 360: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 360/463

353 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(400)yg Form yH kpHwGifyg0ifaom Toolbox Icon rsm;rS  m ud kavhvmygu

Label, Command Button, Frame wd k Yyg0ifNyD; 4if;wd k Y\ Properties rsm;ud k

jyifqifjznf hpGufNyD;aemuf Command Button rsm;wGif vd ktyfaomy½d k*&rfrsm; a&;om;&rnfjzpfonf/Label1 - Label Properties rSm(Name) - Label1

Alignment - 2 - Center

AutoSize - False

BackStyle - Opaque

BorderStyle - 0 - None

Caption - qkrJwpfcktwGufwpfBudrfomESdyfyg(qkrJwpfcktwGufwpfBudrfomES  dyfyg)

Font - -Win---Kalaw, Bold, 22

WordWrap - False

Frame1 - Frame Properties rSm(Name) - Frame1

BorderStyle - 1 - Fixed Single

Caption - Empty

Font - MS Sans Serif, Regular, 8

Command1 - CommandButton Properties rSm(Name) - Command1

Caption - ydwf&&ef  (ydwf&ef )BorderStyle - 1 - Fixed Single

Font - -Win---Yadanapon, Bold, 28

ydwf&efydwf&ef ydwf&efydwf&ef ydwf&ef Command Button1 twGuftwGuftwGuftwGuftwGuf

Private Sub Command1_Click()Form4.Hide

Unload Form4

End Sub

Contents

Page 361: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 361/463

354 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

qufvufí Form5 ud kwnfaqmuf&ayrnf/ yH k(401)/

yHk(401)yg Form yHkpHwGifyg0ifaom Toolbox Icon rsm;rSm ud kavhvmygu

DBGrid, Data, Command Buttonwd k Yyg0ifNyD; 4if;wd k Y\ Properties rsm;ud k

jyifqifjznf hpGufNyD;aemuf Command Button wGif vd ktyfaomy½d k*&rfrsm; a&;om;&rnfjzpfonf/DBGrid1 - DBGrid Properties rS m

(Name) - DBGrid1Align - 0 - vbAlignNone

AllowAddNew - False

AllowArrows - True

AllowDelete - False

yH k(401)

Contents

Page 362: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 362/463

355 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

AllowUpdate - True

BorderStyle - 1 - Fixed Single

Caption - None

DataMode - 0 - BoundDataSource - Data1

Font - MS Sans Serif, Regular, 8

Data1 - Data Properties rS m(Name) - Data1

Align - 0 - None

BOFAction - 0 - Move First

Connect - Access

DatabaseFile - C:\Program Files\LuckyDraw\Lucky.mdbEOFAction - 0 - Move Last

Font - MS Sans Serif, Regular, 8

RecordsetType - 1 - Dynaset

RecordsetSource - Luck02

Command1 - CommandButton Properties rSm(Name) - Command1

Caption - ydwf&&ef  (ydwf&ef )BorderStyle - 1 - Fixed Single

Font - -Win---Yadanapon, Bold, 20

ydwf&efydwf&ef ydwf&efydwf&ef ydwf&ef Command Button1 twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

Unload Me

End Sub

Data1 Reposition twGuftwGuftwGuftwGuftwGuf

Private Sub Data1_Reposition()Data1.Caption = " Record: " & (Data1.Recordset.AbsolutePosition + 1)

End Sub

tqd kyg y½d k*&rfud k Run ygu yH k(402)ygtwd kif;jrifawG U&rnf/

Contents

Page 363: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 363/463

356 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Oyrm - qkrJta&twGuf 6 ckom½S  dNyD;? uHrJprf;&rnf hta&twGufrS m 125 OD;½S  dyguqkrJta&twGufnmzuf½S  d tqd kyg y½d k*&rfud k Run ygu yH k(402)ygtwd kif;jrifawG U&rnf/qkrJta&twGuf 6 ck½S  dojzifh uHprf;&ef Command Button tm; 6 cgESdyfNyD;yguuHprf;rJukefaeygNyD[laom Message Box jyvmrnf/ yH k(403)/

tqd kyg Message Box tm; ydwf&ef Command Button ud kES  dyfygu Message

Box aysmufoG m;NyD;? uHprf;&ef Command Button ygaysmufoG m;vdrf hrnf/ yH k(404)/

yH k(402)

yH k(403)

Contents

Page 364: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 364/463

357 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

uHprf;rJtrnfpm&if;Munf h&ef Command Button ud kES  dyfygu yH k(405)ygtwd kif;jrifawG U&rnf/

txufyg Form yH kpHwGif ydwf&ef Command Button ud ka½G;cs,fygu rlvuHprf;rJEd  Iufonfh  Form yHkpHodkYjyefvnfa&muf½SdoGm;NyD;? y½dk*&rfrSxGuf&ef Command Button

ud kES  dyfygu tqd kyg Form yH kpHrSxGufoG m;vdrf hrnf/- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(404)

yH k(405)

Contents

Page 365: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 365/463

358 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

ODBC jzif hzefwD;xm;aomjzif hzefwD;xm;aomjzif hzefwD;xm;aomjzif hzefwD;xm;aomjzif hzefwD;xm;aom Access zdkifud ktouf? vkyfouf? yifpif,lrnf hESpfwGufjcif;zdkifud ktouf? vkyfouf? yifpif,lrnf hESpfwGufjcif;zdkifud ktouf? vkyfouf? yifpif,lrnf hESpfwGufjcif;zdkifud ktouf? vkyfouf? yifpif,lrnf hESpfwGufjcif;zdkifud ktouf? vkyfouf? yifpif,lrnf hESpfwGufjcif;Access 2000 (or) Access 2002 wd k Yjzif h Database File wpfckud kwnfaqmufxm;

&rnf/ 4if; Database File rS Table File wGifatmufygtwd kif;wnfaqmufxm;NyD;

Record rsm;xnf hxm;&rnf/Field Name Data Type Field Size

IDNo Text 8

Name Text 30

Date of Birth Date

Enrolment Date

Age Number Double, Fixed, Decimal 2

Services Year Number Double, Fixed, Decimal 2

Retire Year DateOyrm - Retire [k Database File, Table File wd k YwGiftrnfay;xm;yg/ xd k Yaemuf4if;zdkifudk ODBC \vkyfydkifcGifhodkYajymif;vJNyD; Microsoft Visual Basic 6.0 jzifhatmufazmfjyyg Form yH kpHud kwnfaqmufxm;&rnf/

yH k(406)yg Form yH kpHwGif  , , rsm;jzifh

zefwD;xm;NyD; oufqd kif&m Properties rsm;wGifjyifqifjznf hpGufNyD;aemuf  Command

Button rsm;wGif vd ktyfaomy½d k*&rfrsm;a&;om;&ef jzpfygonf/

yHk(406)

Contents

Page 366: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 366/463

359 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Adodc1 - Adodc Properties twGuf -twGuf -twGuf -twGuf -twGuf -(Name) - Adodc1

Align - 0 - vbAlignNone

BOFAction - 0 - adDoMoveFirstConnectingString - provider=msdasql;dsn=retire;uid=;pwd=;

EOFAction - 0 - adDoMoveLast

Font - MS Sans Serif, Bold, 8

RecordSource - 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) - DataGrid1

Align - 0 - vbAlignNoneAllowAddNew - False

AllowArrows - True

AllowDelete - False

AllowUpdate - True

Font - MS Sans Serif, Regular, 8

DataSource - Adodc1

Adodc1 - 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.Event

StatusEnum, ByVal pRecordset As ADODB.Recordset)

Adodc1.Caption = "Record: " & CStr(Adodc1.Recordset.AbsolutePosition)

End Sub

Age Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command1_Click()

Adodc1.Recordset.MoveFirst

Do While Adodc1.Recordset.EOF = False

x = (Date - Adodc1.Recordset("Date of Birth")) / 365.25

Adodc1.Recordset("Age") = x

Adodc1.Recordset.MoveNext

Loop

Adodc1.Recordset.MoveFirst

End Sub

Contents

Page 367: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 367/463

360 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Services Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command2_Click()

Adodc1.Recordset.MoveFirst

Do While Adodc1.Recordset.EOF = Falsey = (Date - Adodc1.Recordset("Enrolment")) / 365.25

Adodc1.Recordset("Services Year") = y

Adodc1.Recordset.MoveNext

Loop

Adodc1.Recordset.MoveFirst

End Sub

Retire 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) + 60

mmth = Month(mdy)

mday = Day(mdy)

zzz = mday & "-" & mmth & "-" & myear

Adodc1.Recordset("Retire Year") = zzz

Adodc1.Recordset.MoveNextLoop

Adodc1.Recordset.MoveFirst

End Sub

Exit Command Button twGuf -twGuf -twGuf -twGuf -twGuf -Private Sub Command4_Click()

Unload Me

End

End Sub

tqd kygy½d k*&rfud k Runygu yH k(406)ygtwd kif;jrifawG U&rnf/ Age Command Button

ud k ES  dyfygu toufrsm;wGufcsufay;rnfjzpfNyD;? Services Year Command Button ud kES  dyfygu trIxrf;oufrsm;wGufcsufay;vdrf hrnf/ Retire Year Comamand Button ud kES  dyfygu yifpif,lrnf h &uf? v? ckESpfwd k Yud kwGufcsufay;vdrf hrnf/ yH k(407)/

Contents

Page 368: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 368/463

361 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yHk(406)

yH k(407)

Contents

Page 369: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 369/463

362 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Visual Basic 6.0 jzif hzefwD;xm;aomjzif hzefwD;xm;aomjzif hzefwD;xm;aomjzif hzefwD;xm;aomjzif hzefwD;xm;aom Access zd kifud kzd kifudk zd kifud kzd kifudk zd kifud k Printer jzif h½d kufxkwfjcif;jzifh½d kufxkwfjcif;jzif h½d kufxkwfjcif;jzifh½d kufxkwfjcif;jzifh½d kufxkwfjcif;Visual Basic 6.0 jzifhyif Database File wpfckud kwnfaqmufxm;&rnf/ 4if;

Database File rS Table File wGifatmufygtwd kif;wnfaqmufxm;NyD; Record rsm;

xnf hxm;&rnf/Field Name Data Type Field Size

IDNo Text 8

Name Text 25

Date of Birth Date

Enrolment Date

Age Double

Services Year Double

Retire Year DateOyrm - Retired [k Database File, Table File wd k YwGiftrnfay;xm;yg/ xd k YaemufMicrosoft Visual Basic 6.0 jzif h atmufazmfjyyg Form yH kpHud kwnfaqmufxm;&rnf/

yH k(408)yg Form yH kpHwGif rsm;jzif h zefwD;xm;NyD; oufqd kif&m Prop-

erties rsm;wGifjyifqifjznf hpGufNyD;aemuf Command Button rsm;wGif vd ktyfaomy½d k*&rf

rsm;a&;om;&ef jzpfygonf/Report Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

Command3.Visible = True

Command4.Visible = True

End Sub

yH k(408)

Contents

Page 370: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 370/463

363 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Exit Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Command3.Visible = False

Command4.Visible = FalseUnload Me

End

End Sub

Soft Copy Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command3_Click()

Form3.Show

End Sub

Hard Copy Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command4_Click()

Form2.Show

End Sub

Form Load twGuftwGuftwGuftwGuftwGufPrivate Sub Form_Load()

Command3.Visible = False

Command4.Visible = False

End Sub

Soft Copy Command Button ud ka½G;cs,fygu Form2.Show [ky½d k*&rfa&;om;xm;ojzif h Form2 ud kyH k(409)ygtwd kif;zefwD;wnfaqmuf&rnf/

Contents

Page 371: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 371/463

364 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yHk(409)yg Form yHkpHwGifyg0ifaom Toolbox Icon rsm;rSm ud kavhvmygu

DBGrid, Label, Text Box, Data, Command Buttonwd k Yyg0ifNyD;

4if;wdkY\ Properties rsm;udk jyifqifjznfhpGufNyD;aemuf Command Button wGifvd ktyfaomy½d k*&rfrsm; a&;om;&rnf jzpfonf/DBGrid1 - DBGrid Properties rS m(Name) - DBGrid1

Align - 0 - vbAlignNone

AllowAddNew - False

AllowArrows - True

AllowDelete - False

AllowUpdate - True

BorderStyle - 1 - Fixed Single

Caption - None

DataMode - 0 - Bound

DataSource - Data1Font - MS Sans Serif, Regular, 8

Label1 - Label Properties rSm(Name) - Label1

Alignment - 0 - Left Justify

AutoSize - False

yH k(409)

Contents

Page 372: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 372/463

365 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

BackStyle - 0 - Transparent

BorderStyle - 1 - Fixed Single

Caption - All Records

Font - MS Sans Serif, Bold, 8Text1 - Text Properties rSm(Name) - Text1

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

Font - MS Sans Serif, Bold, 8

Text - Empty

Data1 - Data Properties rS m

(Name) - Data1Align - 0 - None

BOFAction - 0 - Move First

Connect - Access

DatabaseFile - C:\Program Files\Microsoft Visual Studio\VB98\ 

Retired.mdb

EOFAction - 0 - Move Last

Font - MS Sans Serif, Regular, 8

RecordsetType - 1 - Dynaset

RecordsetSource - Retired

Command1 - CommandButton Properties rSm(Name) - Command1

Caption - To Calculate Age

Font - MS Sans Serif, Regular, 8

Command2 - CommandButton Properties rSm

(Name) - Command2Caption - To Calculate Services Year

Font - MS Sans Serif, Regular, 8

Command3 - CommandButton Properties rSm(Name) - Command3

Caption - To Calculate Retire Year

Font - MS Sans Serif, Regular, 8

Contents

Page 373: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 373/463

366 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Command4 - CommandButton Properties rSm(Name) - Command4

Caption - &Return to Main Menu

Font - MS Sans Serif, Regular, 8To Calculate Age Command Button1 twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

Set MyDb = Workspaces(0).OpenDatabase("Retired.mdb")

Set MyData = MyDb.OpenRecordset("Retired", dbOpenTable)

MyData.MoveFirst

Do While MyData.EOF = False

MyData.Edit

x = (Date - MyData("Date of Birth")) / 365.25MyData("Age") = x

MyData.Update

MyData.MoveNext

Loop

MyData.MoveFirst

End Sub

To Calculate Services Year Command Button2 twGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Set MyDb = Workspaces(0).OpenDatabase("Retired.mdb")

Set MyData = MyDb.OpenRecordset("Retired", dbOpenTable)

MyData.MoveFirst

Do While MyData.EOF = False

MyData.Edit

y = (Date - MyData("Enrolment")) / 365.25

MyData("Services Year") = y

MyData.Update

MyData.MoveNext

Loop

MyData.MoveFirst

End Sub

Contents

Page 374: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 374/463

367 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

To Calculate Retire Year Command Button3 twGuftwGuftwGuftwGuftwGufPrivate Sub Command3_Click()

Set MyDb = Workspaces(0).OpenDatabase("Retired.mdb")

Set MyData = MyDb.OpenRecordset("Retired", dbOpenTable)MyData.MoveFirst

Do While MyData.EOF = False

MyData.Edit

mdy = MyData("Date of Birth")

myear = Year(mdy) + 60

mmth = Month(mdy)

mday = Day(mdy)

zzz = mday & "-" & mmth & "-" & myearMyData("Retire Year") = zzz

MyData.Update

MyData.MoveNext

Loop

MyData.MoveFirst

End Sub

Return to Main Menu Command Button4 twGuftwGuftwGuftwGuftwGufPrivate Sub Command4_Click()

Unload Me

End Sub

Data1 Reposition twGuftwGuftwGuftwGuftwGufPrivate Sub Data1_Reposition()

Data1.Caption = " Record: " & (Data1.Recordset.AbsolutePosition + 1)

End Sub

Form LoadtwGuftwGuftwGuftwGuftwGufPrivate Sub Form_Load()

Set MyDb = Workspaces(0).OpenDatabase("Retired.mdb")

Set MyData = MyDb.OpenRecordset("Retired", dbOpenTable)

MyData.MoveLast

Text1.Text = MyData.RecordCount

End Sub

Contents

Page 375: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 375/463

368 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

tqd kygy½d k*&rfud k Run ygu yH k(410)ygtwd kif;jrifawG U&rnf/ To Calculate Age

Command Button ud kES  dyfygutoufrsm;wGufcsufay;rnfjzpfNyD;? To Calculate Ser-

vices Year Command Button ud kES  dyfygu trIxrf;oufrsm;wGufcsufay;vdrf hrnf/ To

Calculate Retire Year Comamand Button ud kES  dyfyguyifpif,lrnf h &uf? v? ckESpfwd k Yud kwGufcsufay;vdrf hrnf/

yH k(410)

Contents

Page 376: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 376/463

369 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Hard Copy Command Button ud ka½G;cs,fygu Form3.Show [ky½d k*&rfa&;om;xm;ojzif h Form3 ud kyH k(411)ygtwd kif;zefwD;wnfaqmuf&rnf/

yH k(411)yg Form yH kpHwGifyg0ifaom Toolbox Icon rsm;rS mud kavhvmygu La-

bel, Crstal Report, Combo Box, Command Buttonwd k Yyg0ifNyD; 4if;wd k Y\Propertiesrsm;ud k jyifqifjznf hpGufNyD;aemuf Command Button wGif vd ktyfaomy½d k*&rfrsm;a&;om;&rnf jzpfonf/Combo1 - ComboBox Properties rS m(Name) - Combo1

Font - MS Sans Serif, Regular, 8

ItemData - (List)

0 ^ Enter jzif h½d kuf&ef0

List - [List]

Window ^ Enter jzif h½d kuf&efPrinter

Style - 0 - DropdownCombo

Text - Window

Label1 - Label Properties rSm(Name) - Label1

Alignment - 2 - Center

yH k(411)

Contents

Page 377: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 377/463

370 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

AutoSize - False

BackStyle - 0 - Transparent

BorderStyle - 0 - None

Caption - Using Crystal ReportFont - MS Sans Serif, Bold, 14

Label2 - Label Properties rSm(Name) - Label2

Alignment - 0 - Left Justify

AutoSize - False

BackStyle - 0 - Transparent

BorderStyle - 0 - None

Caption - Print DestinationFont - MS Sans Serif, Bold, 10

Label3 - Label Properties rSm(Name) - Label3

Alignment - 0 - Left Justify

AutoSize - False

BackStyle - 0 - Transparent

BorderStyle - 0 - None

Caption - Identification Number From

Font - MS Sans Serif, Bold, 10

Label4 - Label Properties rSm(Name) - Label4

Alignment - 0 - Left Justify

AutoSize - False

BackStyle - 0 - Transparent

BorderStyle - 0 - None

Caption - To

Font - MS Sans Serif, Bold, 10

Report1 - Crystal Report Properties rS m(Name) - Report1

Destination - 0 - crptToWindow

Contents

Page 378: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 378/463

371 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

PrintFileType - 0 - crptRecord

RecordSource - 0 - crptReport

WindowState - 0 - crptNormal

Text1 - Text Properties rSm(Name) - Text1

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed Single

Font - MS Sans Serif, Regular, 8

Text - A-00001

Text2 - Text Properties rSm(Name) - Text2

Alignment - 0 - Left JustifyBorderStyle - 1 - Fixed Single

Font - MS Sans Serif, Regular, 8

Text - A-99999

Combo Box a½G;cs,f&eftwGufa½G;cs,f&eftwGufa½G;cs,f&eftwGufa½G;cs,f&eftwGufa½G;cs,f&eftwGufPrivate Sub Combo1_Click()

If Combo1.Text = "Printer" Then

Form4.Show

End If 

End Sub

Print Report Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

If Combo1.Text = "Window" Then

rpt1 = 0

Else

Combo1.Text = "Printer"rpt1 = 1

Report1.CopiesToPrinter = num1

End If 

pt1 = "{Retired.IDNo} in '" + Trim(Text1.Text) + "' to '" +

Trim(Text2.Text) + "'"

Contents

Page 379: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 379/463

372 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Report1.SelectionFormula = pt1

Report1.Destination = rpt1

a1 = 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

tqd kygy½d k*&rfud k  Run ygu yH k(412)ygtwd kif;jrifawG U&rnf/ Print Destination

nmzuf½S  d Combo Box Dropdown Arrow ud ka½G;cs,fygu Window ESifh Printer [l

íjrifawG U&NyD; rdrdtvd k½S  d&mud ka½G;cs,fEd kifygonf/ Identification Number From \nmzuf Text Box wGif Record Identification Number rdrdpvd konf h eHygwfrSp&efjzpfNyD;To \nmzuf Text Box ürdrdtqH k;owf½d kufES  dyfvd konf h Record Identification Number

ud kjyifqifjznf hpGuf&efjzpfonf/ Print Report Command Button ud kES  dyfygu Combo

Box ud k Window a½G;cs,fcJ hygu Printer jzif h½d kufES  dyf&ef Print Preview ud k jyrnfjzpfNyD;Printer ud ka½G;cs,fcJ hygu wd kuf½d kuf Printer jzif h ½d kufES  dyfrnfjzpfygonf/

yH k(412)

Contents

Page 380: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 380/463

373 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Combo Box wGif Printer ud ka½G;cs,fygu Form4.Show [ky½d k*&rfa&;om;xm;jzif hForm4 ud kyH k(413)ygtwd kif;zefwD;wnfaqmuf&rnf/

yH k(413)yg Form yH kpHwGifyg0ifaom Toolbox Icon rsm;rS mud kavhvmygu La-

bel, Text Box, Command Buttonwd k Yyg0ifNyD; 4if;wd k Y\ Properties rsm;ud k

jyifqifjznf hpGufNyD;aemuf Command Button wGif vd ktyfaomy½d k*&rfrsm;a&;om;&rnfjzpfonf/Label1 - Label Properties rSm(Name) - Label1

Alignment - 0 - Left Justify

BackStyle - 0 - Transparant

BorderStyle - 0 - None

Caption - Please enter the number of copies

Font - MS Sans Serif, Bold, 10

Label2 - Label Properties rSm(Name) - Label2

Alignment - 0 - Left Justify

BackStyle - 0 - TransparantBorderStyle - 0 - None

Caption - you wish to print

Font - MS Sans Serif, Bold, 10

yHk(413)

Contents

Page 381: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 381/463

374 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Text1 - TextBox Properties rSm(Name) - Text1

Alignment - 0 - Left Justify

BorderStyle - 1 - Fixed SingleFont - MS Sans Serif, Bold, 10

Text - 1

Command1 - CommandButton Properties rSm(Name) - Command1

Caption - Accept Number of Copies

Font - MS Sans Serif, Bold, 10

Command2 - CommandButton Properties rSm

(Name) - Command2Caption - Reset Number of Copies

Font - MS Sans Serif, Bold, 10

Command1 twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

num1 = Text1

Form4.Hide

End Sub

Command2 twGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Text1.Text = "1"

End Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

Contents

Page 382: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 382/463

375 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

tcef;(11)tcef;(11)tcef;(11)tcef;(11)tcef;(11)

Visual Basic 6.0 jzifh jzif h jzifh jzif h jzifh Program wpfcktm;a&;NyD;wpfcktm;a&;NyD;wpfcktm;a&;NyD;wpfcktm;a&;NyD;wpfcktm;a&;NyD; Execute File wnfaqmufjcif;wnfaqmufjcif;wnfaqmufjcif;wnfaqmufjcif;wnfaqmufjcif;

yxrtqif htaejzif h Microsoft Visual Basic 6.0 jzif h Programwpfyk'fa&;om;yg/Oyrm - vuf½S  dESpf-v-&uf-em&D-rdepf-puúef Yud kjyaom Program wpfyk'fud ka&;om;xm;& rnf/ zd kif\y½d k*&rftrnfud k extest017.vbp [ktrnfowfrSwfxm;NyD; Form File ud kextest017 .frm [ktrnfowfrSwfyg/ yH k(414)/

txufygzd kifud k Execute File vkyfrnfqd kygu Menu Bar ½S  d File ud ka½G;yg/ Pull

Down Menu usvmygu 4if;xJrS Make extest017.exe... ud ka½G;cs,f&rnf/ yH k(415)/

yH k(414)

Contents

Page 383: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 383/463

376 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(415)

txufygzd kifud k Execute File vkyfrnfqd kygu Menu Bar ½S  d File ud ka½G;yg/ Pull

Down Menu usvmygu 4if;xJrS Make extest017.exe... ud ka½G;cs,f&rnf/ yH k(415)/

yHk(416)

Contents

Page 384: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 384/463

377 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd ktcg Make Project Dialog Box ay:vmrnf/ rdrdodrf;vd konf hvrf;aMumif;?rdrdodrf;vd konf h zd kiftrnfud k jyKjyifjznf hpGufí Execute File ud kwnfaqmufEd kifayonf/yH k(417)? yHk(418)/

yHk(417)

yHk(418)

Contents

Page 385: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 385/463

378 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd ktcgrdrdtrnfay;vd kufonf htwd kif; c:\Example001.exe jzpfoG m;ayrnf/ 4if;zd kifud kRun vd kygu Computer Desktop wGif½S  daeaom My Computer Short Cut Icon ud kDouble Click (or) Active jzpfaeaomtcg Enter ES  dyfyg/ yH k(419)/

xd ktcg yH k(420)wGifazmfjyxm;onf htwd kif; [C:] ud k Double Click (or) Active

jzpfaeaomtcg Enter ES  dyfyg/

yH k(419)

yH k(420)

Contents

Page 386: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 386/463

379 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(421)wGifjrifawG Uae&aom Example001.exe zd kifud k Runvd kygu Double Click 

(or) Active jzpfaeaomtcg Enter ESdyfyg/

yH k(421)

yHk(422)

Contents

Page 387: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 387/463

380 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(422)wGifjrifawG Uae&aom Date and Time Testing Form tm; Command

Button wpfckjzpfaom Run ud ka½G;cs,fygu yH k(423)ygtwd kif; &ufpJ  G? tcsdefrsm;azmfjyrnf/4if;y½d k*&rfrSxGufvd kygu Close Button ud ka½G;cs,f&rnf/

Execute File jyKvkyfí&onf htwGuf Start ® Run ® c:\Example001 (or)

c:\Example001.exe ® OK ud ka½G;cs,fjcif;jzif hvnf;aumif;? Start ® Run ®

command ® OK udka½G;cs,fNyD; DOS Prompt rS C:\>Example001 (or)

Example001.exe ® Enter ud  d kES  dyfjcif;jzif hvnf;aumif; y½d k*&rfud k Run Ed kifayonf/Visual Basic 6.0 Language r½S  daomtjcm;pufrsm;od k Yul;,lNyD;vnf; Run Ed kifayonf/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(423)

Contents

Page 388: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 388/463

381 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Visual Basic 6.0 jzif h jzif hjzif h jzif hjzif h Program wpfcktm;a&;NyD;wpfcktm;a&;NyD;wpfcktm;a&;NyD;wpfcktm;a&;NyD;wpfcktm;a&;NyD; Package jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;yxrtqif htaejzif h Microsoft Visual Basic 6.0 jzif h Programwpfyk'fa&;om;yg/

Oyrm - Database File wpfzd kifwnfaqmufNyD; Record tenf;i,foGif;xm;&rnf/ tqd kyg

Database File wGif½S  d Record tcsKd Uud k wGufcsufay;onf h y½d k*&rfwpfyk'ftm; a&;om;xm;&rnf/ zd kif\y½d k*&rftrnfud k extest111.vbp [ktrnfowfrSwfxm;NyD; Form File ud kextest111 .frm [ktrnfowfrSwfyg/ yH k(424)/

txufygzd kifud k Application Package vkyfrnfqd kygu Menu Bar ½S  d Add-Ins

ud ka½G;yg/ Pull Down Menu usvmygu 4if;xJrS Package and Deployment Wiz-

ard... ud ka½G;cs,f&rnf/ yH k(425)/

yH k(424)

yH k(425)

Contents

Page 389: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 389/463

382 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd ktcg Package and Deployment Wizard Dialog Box ay:vmrnf/ yH k(426)?Package rjyKvkyfciftqd kyg Project File ud kodrf;vd kygu Yes ud ka½G;&efjzpfNyD;? rodrf;vd kygu No ud ka½G;cs,f&rnf/ yH k(426)/ Oyrm - No ud ka½G;yg/

Package and Deployment Wizard Dialog Box ay:vmrnf/ 4if; DialogBox wGif rdrd  Package vkyfvd konf h  Visual Basic Project File \ wnfae&mud kjyaernfjzpfNyD; Package Command Button ud ka½G;cs,f&rnf/ yH k(427)/

xd kaemuf Compile Command Button ud ka½G;cs,f& rnf/ xd ktcgrSom ExecuteFile &½Sdayrnf/ yH k(428)/

yHk(426)

yH k(427)

Contents

Page 390: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 390/463

383 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Compile vkyfNyD;oG m;ygu yH k(429)yg Dialog Box ay:vmygu Yes Command

Button ud ka½G;cs,fyg/

Package trsKd;tpm;a½G;cs,fonf h Dialog Box ay:vmrnf/ Package Type ud kStandard Setup Package ae&mwGifyifxm;í Next ud ka½G;cs,fyg/ yH k(430)/

Package ud krdrdxnf hvd konf hvrf;aMumif;üxnf h&eftcGif hta&;&½S  drnf h  Dialog Box

ay:vmrnf/ yH k(431)/

yH k(428)

yH k(429)

yH k(430)

Contents

Page 391: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 391/463

384 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

tqd kyg Dialog Box wGifyif  Folder ud kajymif;í Next ud ka½G;cs,fyg/ yH k(432)/

DAO Driver rsm;udka½G;cs,f&eftajctaeayonfh Dialog Box ay:vmyguzd kiftm;vH k;ud ka½G;cs,fNyD; Next ud k Click ES  dyf&rnf/ yH k(433)/

yH k(430)

yH k(431)

yH k(432)

Contents

Page 392: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 392/463

385 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Folder vrf;aMumif;topfa½G;cs,fojzifh ayskmufaeonfh *.dll zdkifrsm;pm&if;ud kjyaevdrf hrnf/ rnfod k Yyifjzpfap OK ud k Click ES  dyf&rnfjzpfonf/ yH k(434)/

Out-of-Date Dependency Information Dialog Box xyfrHay:vmrnf/ OK

ud kom Click ES  dyf&rnfjzpfonf/ yH k(435)/

yH k(433)

yH k(434)

Contents

Page 393: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 393/463

386 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

rdrdwnfaqmufrnf h Application Package wGif yg0ifonf h *.dll zd kifrsm;ud k Check 

Box jzif h Mark vkyfxm;onf/ ra½G;cs,fvd kygu Uncheck jyKvkyfEd kifonf/ tm;vH k;a½G;cs,f

xm;ojzif h Next Command Button ud koma½G;cs,fyg/ yH k(436)/

Cab File wnfaqmuf&eftcGif hta&;ay;onf h  Dialog Box wpfckay:vmrnf/tqd kyg Dialog Box wGif Single cab File wnfaqmufygu cab File wpfzd kifwnf;omwnfaqmufNyD; Disk Space rsm;vdrf hrnf/ Multiple cabs Option Button ud ka½G;cs,fygu rdrdwnfaqmufvd konf h cab size ud k 1.44 MB, 2.88 MB, 1.2 Mb, 720KB

ponfjzif ha½G;cs,fwnfaqmufEd kifayonf/ Oyrm - 1.44 MB ud ka½G;cs,fygu jzpfay:vm

yH k(435)

yH k(436)

Contents

Page 394: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 394/463

387 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

aom cab File rsm;onf 1.44 MB xufrausmfapbJ cab File rsm;wpfzd kifxufrujzpfvmayrnf/ tqd kyg Dialog Box wGif Multiple cabs Option Button ud ka½G;cs,fyg/xd k Yaemuf Cab size ud k 1.44 MB wGifxm;NyD; Next Command Button ud ka½G;cs,f&efjzpf

onf/ yH k(437)/

Installation Title ud kowfrSwf&ef Dialog Box xyfrHay:vmrnf/ Installation

title tm;rdrdpdwfBuKdufowfrSwfyg/ Oyrm - Result of the Students [kjyifqifjznf hpGufíNext ud ka½G;cs,f&rnf/ yH k(438)/

Package and Deployment Wizard - Start Menu Items Dialog Box ay:vmrnf/ Next ud ka½G;cs,fyg/ yH k(439)/

yH k(437)

yH k(438)

Contents

Page 395: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 395/463

388 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Package and Deployment Wizard - Install Locations Dialog Box ay:vmrnf/ Next ud ka½G;cs,fyg/ yH k(440)/

Package and Deployment Wizard - Shared Files Dialog Box ay:vmrnf/Shared Files rsm;ud k Check jyKvkyfí Next ud ka½G;cs,fyg/ yH k(441)/

yH k(439)

yHk(440)

Contents

Page 396: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 396/463

389 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Package and Deployment Wizard - Finished! Dialog Box ay:vmrnf/Finish ud ka½G;cs,fyg/ yH k(442)/

Packaging Report Dialog Box xyfrHay:vmrnf/ Save Report CommandButton ud ka½G;cs,fyg/ yH k(443)/

yH k(441)

yH k(442)

Contents

Page 397: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 397/463

390 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Save Report Dialog Box xyfrHay:vmrnf/ Save in: List Box wGif vrfaMumif;ajymif;vd kygu ajymif;NyD; Text File ud k odrf;Ed kifayonf/ yH k(444)/

c:\My Documents\Package od k Yvrf;aMumif;ajymif;yg/ xd k Yaemuf Save Command

Button ud ka½G;cs,fyg/ yH k(445)/

yH k(443)ygtwd kif; Dialog Box xyfrHay:vmrnf/ a½G;cs,fyg/ yH k(446)/ Close

Command Button ud ka½G;cs,fyg/

yH k(443)

yH k(444)

yH k(445)

Contents

Page 398: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 398/463

391 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(446)

yH k(447)

yH k(447)ygtwd kif; Package and Deployment Wizard Dialog Box xyfrHay:vmrnf/ Close Command Button ud ka½G;cs,fyg/ rlvy½d k*&rfod k Yomjyefa&mufoG m;rnf/

Application Package tm; C:\My Documents\Package xJwGifvrf;aMumif;

ay;xm;ojzif h uGefysLwm Desktop ay:wGif½S  daeonf h Short Cut Icon wpfckjzpfaomMy Computer rS Munf hygu yH k(448)ygtwd kif;jrifawG UEd kifygonf/

Contents

Page 399: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 399/463

392 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

tjcm;uGefysLwmpufwpfvH k;od k Y Install jyKvkyfvd kygu C:\My Documents\Package

Folder atmuf½S  dzd kiftm;vH k;ud k ul;oG m;NyD; Setup.exeud k Double Click ES  dyf&rnfjzpfonf/Microsoft Visual Basic 6.0 rwyfqif&ao;aom uGefysLwmrsm;wGifvnf; Install

vkyfNyD;ygu Run í&Ed kifayonf/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(447)

Contents

Page 400: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 400/463

393 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

tjcm;uGefysLwmrsm;od k Y jyefvnf tjcm;uGefysLwmrsm;od k Y jyefvnf tjcm;uGefysLwmrsm;od k Y jyefvnf tjcm;uGefysLwmrsm;od k Y jyefvnf tjcm;uGefysLwmrsm;od k Y jyefvnf Install jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;yH k(447)wGifawG Ujrifae&aom zd kifrsm;ud k Compact Disc (CD) jzif haomfvnf;aumif;?

Diskette jzif haomfvnf;aumif;ul;,lí tjcm;uGefysLwmpufwpfvH k;od k Y Install jyKvkyfEd kif

ayonf/ tqd kygzd kifrsm;xJrS Setup.exe ud k Double Click ESdyfyg/ yH k(448)ygtwd kif;jrifawG U&rnf/ OK Command Button ud ka½G;cs,f&rnf/

aemufxyf Dialog Box wpfckxyfrHay:vmrnf/ yHk(449)/ uGefysLwmyHkygaomCommand Button tm;a½G;cs,fygu C:\Program Files\Project1 xJwGif Install jyK vkyfrnfjzpfNyD; tjcm;vrf;aMumif;ajymif;vJí Install vkyfvd kygu Change Directory

ud ka½G;írdrdESpfouf&mvrf;aMumif;ajymif; Install jyKvkyfEd kifayonf/ xd k YaMumif h uGefysLwmyH kygaom Command Button tm;a½G;cs,fyg/

yH k(448)

Contents

Page 401: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 401/463

394 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

aemufxyf Dialog Box wpfckxyfrHay:vmrnf/ yH k(449)/ uGefysLwmyH kygaom Com-

mand Button tm;a½G;cs,fygu C:\Program Files\Project1 xJwGif Install jyK vkyfrnfjzpfNyD; tjcm;vrf;aMumif;ajymif;vJí Install vkyfvd kygu Change Directory

ud ka½G;írdrdESpfouf&mvrf;aMumif;ajymif; Install jyKvkyfEd kifayonf/ xd k YaMumif h uGefysLwmyH kygaom Command Button tm;a½G;cs,fyg/ yH k(450)yg Dialog Box wpfckxyfrHay:vmrnf/

yH k(449)

Contents

Page 402: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 402/463

395 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(450)

Continue Command Button ud ka½G;cs,f&rnf/ y½d k*&rfrsm;tm; Install vkyfNyD;yguyH k(451)ygtwd kif; atmifjrifpG mNyD;qH k;aMumif; Message Box ay:vmygu OK ud k Click 

vkyf&efjzpfygonf/

yH k(451)

Contents

Page 403: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 403/463

396 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

y½d k*&rfrsm;onf uGefysLwmxJwGif C:\Program Files\Project1 vrf;aMumif;atmufod k Ya&muf½S  doG m;onfud k My Computer Short Icon tqif hqif hud ka½G;cs,fjcif;jzif h jrifawG UEd kifayonf/ yH k(452)/

tqd kyg extest111.exe zd kifud k Run ygu y½d k*&rftouf0ifrnfjzpfonf/- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

InputBox a&;xHk;jzif h a&;xH k;jzif h a&;xHk;jzif h a&;xH k;jzif h a&;xH k;jzif h Password jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;

InputBox a&;xH k;jzif h Password jyKvkyf&eftwGuf yH k(453)wGifazmfjyxm;onf h Formzd kifwpfckud kwnfaqmufyg/

yH k(452)

yH k(453)

Contents

Page 404: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 404/463

397 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yH k(453)yg Form zd kifwGif Label, Timer, Command Button wd k Yjzif hwnfaqmufxm;NyD; vd ktyfaom Properties rsm;ud kjyifqifí y½d k*&rfrsm;ud ka&;om;&ayrnf/Label1 - Label Properties twGuftwGuftwGuftwGuftwGuf

(Name) - Label1Alignment - 2 - Center

AutoSize - False

BackColor - &H80000018&

BackStyle - 1 - Opaque

BorderStyle - 1 - Fixed Single

ForeColor - &H80000002&

Command1 - Command Button Properties rS m

(Name) - Command1Caption - E&xit

Font - MS Sans Serif, Regular, 8

Timer1 - Timer Properties rS m(Name) - Timer1

Enabled - True

Index - Empty

Interval - 100

Left - 3960Tag - Empty

Top - 1920

Exit Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

Unload Me

End

End Sub

Form Load twGuftwGuftwGuftwGuftwGufPrivate Sub Form_Load()

Dim Pw, Pword

a = 1

Pw = "Naing"

Contents

Page 405: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 405/463

398 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Do While a <= 3

Pword = InputBox("Type in your password", "Password")

If Pword <> Pw Then

MsgBox "Sorry, incorrect password"

Else

Exit Sub

End If 

a = a + 1

Loop

End

End Sub

Timer1_Timer() twGuftwGuftwGuftwGuftwGuf

Private Sub Timer1_Timer()Dim i As Integer

Label1.BackColor = &H80000018

Label1.ForeColor = blue

Label1.Caption = Now

End Sub

txufygy½d k*&rfud k Run ygu yH k(454)ygtwd kif;jzpfay:vmrnf/

InputBox a&;xH k;jzif ha&;xm;ojzif h yxrOD;pG m Password awmif;onf h Input

Box ay:vmrnf/ rdrdrS Password ud krSefuefpG m½d kufES  dyfEd kifygu wpfBudrfwnf;y½d k*&rfRun rnfjzpfonf/ Password (3)Budrf½d kufírSefuefrIr½S  dygu y½d k*&rfxJrSxGufoG m;vdrf hrnf/ 3 BudrftwGif; Password wpfcgr[kwfwpfcgrSefuefrI½S  drSom y½d k*&rf Run rnfjzpfonf/ yxrtBudrfwGif naing [k½d kufES  dyfNyD; Enter od k Yr[kwf OK Command Button

ud ka½G;cs,fyguyH k(455)ygtwd kif; Message Box wpfckjzif hjyrnfjzpfonf/ Enter od k Yr[kwfOK Command Button ud ka½G;cs,fyg/

yH k(454)

Contents

Page 406: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 406/463

399 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

xd ktcg Input Box aemufwpfzefjyefay:vmygu Password trSefud k jznf hpGufíEnter (od k Yr[kwf ) OK Command Button ud ka½G;cs,f&rnf/ yH k(456)/

xd ktcg y½d k*&rf Run vmrnfud  k yHk(457)ygtwd kif;jrifawG UEd kifayonf/ y½d k*&rfrSxGufvd kygu Exit Command Button ud ka½G;cs,f&rnf/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(455)

yH k(456)

yH k(457)

Contents

Page 407: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 407/463

400 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

omrefa&;xHk;jzifh omrefa&;xH k;jzif h omrefa&;xHk;jzifh omrefa&;xH k;jzif h omrefa&;xHk;jzif h Password jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;jyKvkyfjcif;omrefa&;xH k;jzif h Password jyKvkyf&eftwGuf yH k(458)wGifazmfjyxm;onf h Form

zd kifwpfckud kwnfaqmufyg/

yH k(458)yg Form zd kifwGif Label, Text Box, Command Button wd k Yjzif hwnfaqmufxm;NyD; vd ktyfaom Properties rsm;ud kjyifqifí y½d k*&rfrsm;ud ka&;om;&ayrnf/Label1 - Label Properties twGuftwGuftwGuftwGuftwGuf(Name) - Label1

Alignment - 0 - Left JustifyAutoSize - True

BackColor - &H8000000F&

BackStyle - 0 - Transparent

BorderStyle - 0 - None

Caption - Enter Password = = = >

ForeColor - &H80000012&

Command1 - Command Button Properties rS m

(Name) - Command1Caption - &Run

Font - MS Sans Serif, Regular, 8

yH k(458)

Contents

Page 408: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 408/463

401 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Run Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

Dim Pw, Pword

Pw = "Naing"Pword = Text1.Text

If Pword <> Pw Then

Label2.Caption = "Sorry, incorrect password"

Else

Form1.Hide

Form2.Show

End If 

End Sub

Form Load twGuftwGuftwGuftwGuftwGufPrivate Sub Form_Load()

If Text1.PasswordChar = "" Then

Text1.PasswordChar = "*"

Else

Text1.PasswordChar = ""

End If 

End Sub

Password rSefuefrI½S  dyguaemufxyf Form zd kifwpfckay:vmap&eftwGuf xyfrHí Form zd kifwpfckwnfaqmuf&rnf/ yH k(459)/

yH k(459)

Contents

Page 409: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 409/463

402 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yHk(459)yg Form zdkifwGif Text Box, Timer, Command Button wdkYjzifhwnfaqmufxm;NyD; vd ktyfaom Properties rsm;ud kjyifqifí y½d k*&rfrsm;ud ka&;om;&ayrnf/

Text1 - TextBox Properties twGuftwGuftwGuftwGuftwGuf(Name) - Text1

Alignment - 2 - Center

AutoSize - True

BorderStyle - 1 - Fixed Single

Font - MS Sans Serif, Regular, 14

Text - Empty

Text2 - TextBox Properties twGuftwGuftwGuftwGuftwGuf

(Name) - Text2Alignment - 2 - Center

AutoSize - True

BorderStyle - 1 - Fixed Single

Font - MS Sans Serif, Regular, 14

Text - Empty

Timer1 - Timer Properties rS m(Name) - Timer1

Enabled - TrueIndex - Empty

Interval - 100

Left - 960

Tag - Empty

Top - 1800

Command1 - Command Button Properties rS m(Name) - Command1

Caption - E&xitFont - MS Sans Serif, Regular, 8

Contents

Page 410: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 410/463

403 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Exit Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

Unload Me

EndEnd Sub

Form Load twGuftwGuftwGuftwGuftwGufPrivate Sub Form_Load()

Text1.Text = Time$

Text2.Text = Date$

End Sub

Timer1_Timer() twGuftwGuftwGuftwGuftwGuf

Private Sub Timer1_Timer()Text1.Text = Time$

End Sub

yHk(458)yg Form zd kifud k Run ygu yH k(460)ygtwd kif;jzpfay:vmrnf/

Text Box wGif rdrdtaejzif h jzpfEd kifonfxifonf h pmom;ud k½d kuf&rnf/ Oyrm -Maung [k½d kufyg/ Text Box wGif  Asterisk (*) rsm;omay:vmrnf/ Run Com-

mand Button ud ka½G;onfjzpfap? Alt+R ud ka½G;onfjzpfap Password rSefuefrI½S  drSomy½dk*&rf Run rnfjzpfonf/ Password rrSefuefygu yH k(461)ygtwd kif; jyovdrf hrnf/

yH k(460)

Contents

Page 411: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 411/463

404 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Password ud krSefuefpG m½d kufrxnf hEd kifygu y½d k*&rfxJod k YvH k;00ifcGif hjyKrnf r[kwfbJPassword rSefuefrI½S  drSom aemuf Form wpfckod k Yqufvuftvkyfvkyfrnfjzpfygonf/xd k YaMumif h y½d k*&rfxJwGifowfrSwfxm;aom Password jzpfaom Naing ud k jznf hpGufNyD;Enter od k Yr[kwf OK Command Button ud ka½G;cs,fyg/ yH k(462)ygtwd kif;jzpfay:vmrnf/y½d k*&rfxJrSxGufvd kygu Exit Command Button ud ka½G;cs,fyg/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yHk(461)

yHk(462)

Contents

Page 412: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 412/463

405 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

tcef;(12)tcef;(12)tcef;(12)tcef;(12)tcef;(12)

Microsoft Internet Explore zd kifud kqJ  G,ltoH k;csjcif;zd kifudkqJ  G,ltoH k;csjcif;zd kifud kqJ  G,ltoH k;csjcif;zd kifudkqJ  G,ltoH k;csjcif;zd kifud kqJ  G,ltoH k;csjcif;

yxrOD;pG m Microsoft Internet Explore wGif Run í&Edkifap&ef HTML (HyperText Mark-Up Language) jzif h y½d k*&rfrsm;ud ka&;om;&rnf/ Oyrm - c:\html_notes

vrf;aMumif;xJwGif rdrdtvd k½S  donf h HTML zd kifrsm;a&;om;xm;&rnf/Index.htm zd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGuf<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 zd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGuf<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"> Welcome

to My Home Page</marquee>

</big></big></b></p>

</body></html>

content.htm zd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGuf<html>

<head><title> Content </Title>

<base target="main"></head>

Contents

Page 413: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 413/463

406 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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>

Contents

Page 414: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 414/463

407 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 zd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGuf<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">&nbsp;HTML Basic

Lessons</font></b></big></p>

<p></p>

</body>

</html>

heading.htm zd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGuf<html>

<head><title>Heading Text Styles</Title></head>

<body>

<H1>Heading 1 </H1>

<H2>Heading 2 </H2>

<H3>Heading 3 </H3>

Contents

Page 415: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 415/463

408 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

<H4>Heading 4 </H4>

<H5>Heading 5 </H5>

<H6>Heading 6 </H6>

<H7>Normal Size </H7>

</body>

</html>

hruler2.htm zd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGuf<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 zd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGuf<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 zd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGuf<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>

Contents

Page 416: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 416/463

409 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 zd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGuf<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 zdkiftwGufzd kiftwGufzdkiftwGufzd kiftwGufzdkiftwGuf<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>

Contents

Page 417: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 417/463

410 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

</b>

</body>

</html>

bgsound.htm zd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGuf<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 zd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGuf<html>

<head><title>Background Color Code</Title></head>

<body BGCOLOR="#00ff00">

<h1>BGCOLOR is Green ... (Code)</h1>

</body>

</html>

font attrs.html zd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGuf

<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

Contents

Page 418: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 418/463

411 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Monotype Text Style, This is a Monotype Text Style. </tt>

</body>

</html>

fontType.html zd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGuf<html>

<head><title>Font Type</Title></head>

<body><pre>

1. Pre-formated

2. 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 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 is text area. This istext 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 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 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 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 is text area. This is text area.

</textarea></body>

</html>

format.htm zd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGuf<html>

<head><title>Text Formatting</Title></head>

Contents

Page 419: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 419/463

412 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 zd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGuf<html>

<head><title>Sparating Paragraphs</Title></head>

<body><p>Paragraph1 Paragraph1 Paragraph1 Paragraph1 Paragraph1 Paragraph1

Paragraph1 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 Paragraph1

Paragraph1 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>

Contents

Page 420: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 420/463

413 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Form_table1.htmzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGuf<HTML>

<HEAD> <TITLE>JavaScript & Forms</TITLE> </HEAD>

<BODY><Center>

<SCRIPT LANGUAGE="JavaScript">

<!-- begining of script

function 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>

Contents

Page 421: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 421/463

414 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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&nbsp;&nbsp;&nbsp;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&nbsp;&nbsp;&nbsp;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>

Contents

Page 422: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 422/463

Page 423: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 423/463

416 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

<img src="./Images/222.jpg" Height=300 width=175 alt="222.gif"><br>

</center>

</body>

</html>

ImageTable.htm zd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGuf<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>

Contents

Page 424: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 424/463

417 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

<b> <Font color=red size=6 face="NuptialScript"> Image Table </Font> </ 

b>

</Center>

</body>

</html>

Table1.htm zd kiftwGufzdkiftwGufzd kiftwGufzdkiftwGufzd kiftwGuf<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>

Contents

Page 425: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 425/463

418 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

</html>

Video.htm zd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGuf<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 zdkiftwGufzd kiftwGufzdkiftwGufzd kiftwGufzdkiftwGuf<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.value

a_int = cint(a_str)

b_int = cint(b_str)

c = 0

c = a_int+b_int

MsgBox "The answer is: " & c

End Sub

<!-- end of script --></SCRIPT>

<FORM NAME="Form1">

<P>A=<INPUT TYPE="TEXT" NAME="Text1"><BR>

Contents

Page 426: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 426/463

419 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 zd kiftwGufzdkiftwGufzd kiftwGufzdkiftwGufzd kiftwGuf<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>

Contents

Page 427: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 427/463

420 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

</FORM>

</BODY>

</HTML>

HTML_Option.htmzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGuf<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>

Contents

Page 428: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 428/463

Page 429: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 429/463

422 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

<H2><font color="blue">Enter Fahrenheit Degree&nbsp;&nbsp;&nbsp;

&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp

<INPUT TYPE="TEXT" NAME="P1"><br>

Equivalent Centigrade Degree&nbsp<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 zd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGuf<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;

Contents

Page 430: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 430/463

423 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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> &nbsp; &nbsp; &nbsp; &nbsp; <br> <br>

Sy s t e m&nbsp; V e r s i o n . . . . <font color=#00FF00>v2.5

</font> <br> <br> L i f e&nbsp; S u p p o r t . . . .<font color=#00FF00>-ok</font> <br> <br> V i t a l &nbsp;

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); }

Contents

Page 431: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 431/463

424 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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">

Contents

Page 432: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 432/463

425 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

<embed src="type.au" width="37" height="0" controls="playbutton"

hidden="true" autostart="false" alt="">

</OBJECT>

-->

</BODY>

</HTML>

Water3.html zd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzdkiftwGuf<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">

Contents

Page 433: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 433/463

426 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 zd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGuf<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">

Contents

Page 434: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 434/463

427 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 zd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGuf<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="./">

Contents

Page 435: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 435/463

428 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 zd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGufzd kiftwGuf<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>

Contents

Page 436: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 436/463

Page 437: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 437/463

430 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 zd kiftwGufzdkiftwGufzd kiftwGufzdkiftwGufzd kiftwGuf<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>

Contents

Page 438: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 438/463

431 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 zd kiftwGufzdkiftwGufzd kiftwGufzdkiftwGufzd kiftwGuf<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>

Contents

Page 439: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 439/463

432 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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 zdkifwpfckudkwnfaqmuf&rnf/

yH k(463)yg Form zd kifwGif Timer, Label, Progress Bar wd k Yjzif h wnfaqmufxm;NyD;vd ktyfaom Properties rsm;ud kjyifqifí y½d k*&rfrsm;ud ka&;om;&ayrnf/Timer1 - Timer Properties rS m(Name) - Timer1

Enabled - True

yH k(463)

Contents

Page 440: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 440/463

433 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Index - Empty

Interval - 5000

Left - 3480

Tag - EmptyTop - 0

Label1 - Label Properties rSm(Name) - Label1

Alignment - 2 - Center

AutoSize - False

BackStyle - 1 - Opaque

BorderStyle - 1 - Fixed Single

Caption - uGefysLwmXme (uGefysLwmXme)Font - -Win---Taungyi, Bold, 36

ProgressBar1 - ProgressBar Properties rSm(Name) - ProgressBar1

Align - 0 - vbAlignNone

Max - 1000

Min - 0

Font - MS Sans Serif, Regular, 8

Timer1 Timer() twGuftwGuftwGuftwGuftwGufPrivate Sub Timer1_Timer()

Private Sub Timer1_Timer()

Dim n1 As Integer

For n1 = 1 To 1000

Form1.Caption = "Processing Step " & Trim$(CStr(n1)) & " of 1000"

ProgressBar1 = n1

Next n1

Call Shell("C:\Program Files\Internet Explorer\IEXPLORE.EXEc:\html_notes\index.htm", 1)

End

End Sub

Contents

Page 441: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 441/463

434 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

yHk(463)yg Form zd kifud k Run ygu yH k(464)ygtwd kif;jzpfay:vmrnf/

acwåcP(Oyrm - 5 puúef Ycef YMumjrif hygu yH k(465)ygtwd kif;y½d k*&rf Run rnfjzpfonf/ Time Interval tm; 5000 ay;xm;aomaMumif hjzpfonf/

Progress Bar wef;jynf hoG m;ygu yH k(466)ygtwd kif; Microsoft Internet Ex-

plore ay:vmNyD; HTML jzif ha&;om;xm;onf h y½d k*&rfrsm;ud k toH k;csí&NyDjzpfonf/tu,fí Microsoft Internet Explore rSxGufvd kygu Close Button ud kES  dyf&rnf/

yH k(464)

yH k(465)

Contents

Page 442: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 442/463

435 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(466)

Contents

Page 443: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 443/463

436 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

tcef;(13)tcef;(13)tcef;(13)tcef;(13)tcef;(13)

Application Package rsm;ud ky½d k*&rfjzif hzGif hjcif;rsm;ud ky½d k*&rfjzif hzGif hjcif;rsm;ud ky½d k*&rfjzif hzGif hjcif;rsm;ud ky½d k*&rfjzif hzGif hjcif;rsm;ud ky½d k*&rfjzif hzGif hjcif;

Microsoft Visual Basic 6.0 jzifh  Application Package rsm;ud kqJ  Gwifvd kyguatmufygtwd kif; Form wpfckud kwnfaqmuf&rnf/ yH k(467)/

Form1 - Form Properties

(Name) - Form1

BorderStyle - 2 - SizableCaption - Openning of the Application Package

Font - MS Sans Serif, Regular, 8

WindowState - 0 - Normal

Command1 - Command Button Properties

(Name) - Command1

Caption - Open Microsoft &Word

Font - MS Sans Serif, Regular, 8

Command2 - Command Button Properties(Name) - Command2

Caption - Open Microsoft &Excel

Font - MS Sans Serif, Regular, 8

yH k(467)

Contents

Page 444: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 444/463

437 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Command3 - Command Button Properties

(Name) - Command3

Caption - Open Microsoft &Access

Font - MS Sans Serif, Regular, 8Command4 - Command Button Properties

(Name) - Command4

Caption - Open Adobe &Page Maker 6.5

Font - MS Sans Serif, Regular, 8Command5 - Command Button Properties

(Name) - Command5

Caption - E&xit

Font - MS Sans Serif, Regular, 8

Command1 - Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

Dim MyAppID

MyAppID = Shell("C:\Program Files\Microsoft Office\Office10\ 

WINWORD.EXE", 1)

End Sub

Command2 - Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Dim MyAppIDMyAppID = Shell("C:\Program Files\Microsoft Office\Office10\ 

EXCEL.EXE", 1)

End Sub

Command3 - Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command3_Click()

Dim MyAppID

MyAppID = Shell("C:\Program Files\Microsoft Office\Office10\ 

MSACCESS.EXE", 1)

End Sub

Command4 - Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command4_Click()

Dim MyAppID

MyAppID = Shell("C:\PM65\PM65.EXE", 1)

End Sub

Contents

Page 445: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 445/463

438 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Command5 - Command Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command5_Click()

Unload Me

EndEnd Sub

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

Contents

Page 446: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 446/463

439 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft 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;atmufygtwd kif; Form wpfckud kwnfaqmuf&rnf/ yH k(468)/ 4if;wGif Label, Text

Box, Command Button wd k Yjzif hzefwD;xm;NyD; oufqd kif&m Properties rsm;ud kjyifqifjznf hpGufNyD;aemuf Command Button rsm;wGif atmufygy½d k*&rfrsm;ud ka&;om;&rnf/

Lable1 Properties twGuftwGuftwGuftwGuftwGuf(Name) - Label1

AutoSize - True

BackStype - 0 - Transparent

Caption - How many number?Lable2 Properties twGuftwGuftwGuftwGuftwGuf(Name) - Label2

AutoSize - True

BackStype - 0 - Transparent

Caption - Enter each number = >

yH k(468)

Contents

Page 447: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 447/463

440 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Text1 Text Box Properties twGuftwGuftwGuftwGuftwGuf(Name) - Text1

Alignment - 0 - Left Justified

Index - EmptyLocked - False

Text - Empty

Text2 Text Box Properties twGuftwGuftwGuftwGuftwGuf(Name) - Text

Alignment - 0 - Left Justified

Index - 1

Locked - False

Text - Empty

Command1 Command Button Properties twGuftwGuftwGuftwGuftwGuf(Name) - Command1

Caption - &Add (Text Box)

Enabled - True

Command2 Command Button Properties twGuftwGuftwGuftwGuftwGuf(Name) - Command2

Caption - E&xit

Enabled - True

Form1 Form Properties twGuftwGuftwGuftwGuftwGuf(Name) - Form1

Enabled - True

Caption - Example Multiple Text Box

Object: General, Proc: [Declaration] twGuftwGuftwGuftwGuftwGufDim a1, a2 As Integer

Add (Text Box) - Command1 Button twGuftwGuftwGuftwGuftwGuf

Private Sub Command1_Click()a2 = Val(Text1)

If a1 = 0 Then a1 = 1

If a1 > a2 Then Exit Sub

a1 = a1 + 1

Text1.Locked = True

Contents

Page 448: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 448/463

441 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Load Text(a1)

b1 = Text(a1).Name 'Text(a1).Name="Text"

b2 = Text(a1).Index 'Text(a1).Index = a1+1

b1 = "Text"

b2 = a1 + 1

Text(a1).Locked = True

Text(a1).Top = Text(a1 - 1).Top + 400

Text(a1).Left = Text(a1).Left - 400

Text(a1).Visible = True

Print Text(a1), Text(a1).Name, Text(a1).Index

Text(a1) = Text(a1)

End Sub

Exit - Command2 Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Unload Me 'Unload this form

End

End Sub

txufyg y½d k*&rfud k Run ygu yH k(469)ygtwd kif;jrifawG U&rnfjzpfygonf/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(469)

Contents

Page 449: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 449/463

442 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Exchange Sort udk udk udk udk udk Visual Basic jzifha&;om;jcif;jzif ha&;om;jcif;jzifha&;om;jcif;jzif ha&;om;jcif;jzif ha&;om;jcif;atmufygtwd kif; Form wpfckud kwnfaqmuf&rnf/ yH k(470)/ 4if;wGif Label, Text

Box, Command Button wd k Yjzif hzefwD;xm;NyD; oufqd kif&m Properties rsm;ud kjyifqif

jznf hpGufNyD;aemuf Command Button rsm;wGif atmufygy½d k*&rfrsm;ud ka&;om;&rnf/

Lable1 Properties twGuftwGuftwGuftwGuftwGuf(Name) - Label1

AutoSize - True

BackStype - 0 - Transparent

Caption - How many number?

Lable2 Properties twGuftwGuftwGuftwGuftwGuf(Name) - Label2AutoSize - True

BackStype - 0 - Transparent

Caption - Enter each number = >

yH k(470)

Contents

Page 450: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 450/463

443 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Text1 Text Box Properties twGuftwGuftwGuftwGuftwGuf(Name) - Text1

Alignment - 0 - Left Justified

Index - EmptyLocked - False

Text - Empty

Text2 Text Box Properties twGuftwGuftwGuftwGuftwGuf(Name) - Text

Alignment - 0 - Left Justified

Index - 1

Locked - False

Text - Empty

Command1 Command Button Properties twGuftwGuftwGuftwGuftwGuf(Name) - Command1

Caption - &Add (Text Box)

Enabled - True

Command2 Command Button Properties twGuftwGuftwGuftwGuftwGuf(Name) - Command2

Caption - &Exchange Sort

Enabled - True

Command3 Command Button Properties twGuftwGuftwGuftwGuftwGuf(Name) - Command3

Caption - E&xit

Enabled - True

Form1 Form Properties twGuftwGuftwGuftwGuftwGuf(Name) - Form1

Enabled - True

Caption - Exchange Sort (Ascending Order)

Object: General, Proc: [Declaration] twGuftwGuftwGuftwGuftwGufDim num1, n, k(50) As Integer

Add (Text Box) - Command1 Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

n = Val(Text1)

Contents

Page 451: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 451/463

444 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Text1.Locked = True

If num1 = 0 Then num1 = 1

If num1 > n Then Exit Sub

num1 = num1 + 1

Load Text(num1)

b1 = Text(num1).Name 'Text(num1).Name="Text"

b2 = Text(num1).Index 'Text(num1).Index = num1+1

Text(num1).Locked = True

Text(num1).Top = Text(num1 - 1).Top + 400

Text(num1).Left = Text(num1).Left - 400

Text(num1).Visible = True

Print Text(num1), Text(num1).Name, Text(num1).Index

i = Text(num1).Index - 1k(i) = Text(num1)

Print k(i), i

End Sub

Exchange Sort - Command2 Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Cls

For i = 1 To n - 1

For j = 1 To n - 1If k(j) <= k(j + 1) Then GoTo 100

t = k(j): k(j) = k(j + 1): k(j + 1) = t

100 Next j

Next i

For x = 1 To n

Print k(x)

Next

End Sub

Exit - Command3 Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command3_Click()

Unload Me

End

End Sub

txufyg y½d k*&rfud k Run ygu yH k(471)ygtwd kif;jrifawG U&rnfjzpfygonf/

Contents

Page 452: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 452/463

445 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(471)

Contents

Page 453: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 453/463

446 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Counting Sort ud kudk ud kudk udk Visual Basic jzif ha&;om;jcif;jzifha&;om;jcif;jzif ha&;om;jcif;jzifha&;om;jcif;jzif ha&;om;jcif;atmufygtwd kif; Form wpfckud kwnfaqmuf&rnf/ yH k(472)/ 4if;wGif Label, Text

Box, Command Button wd k Yjzif hzefwD;xm;NyD; oufqd kif&m Properties rsm;ud kjyifqif

jznf hpGufNyD;aemuf Command Button rsm;wGif atmufygy½d k*&rfrsm;ud ka&;om;&rnf/

Lable1 Properties twGuftwGuftwGuftwGuftwGuf(Name) - Label1

AutoSize - True

BackStype - 0 - Transparent

Caption - How many number?

Lable2 Properties twGuftwGuftwGuftwGuftwGuf(Name) - Label2

AutoSize - True

BackStype - 0 - Transparent

Caption - Enter each number = >

yH k(472)

Contents

Page 454: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 454/463

447 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Text1 Text Box Properties twGuftwGuftwGuftwGuftwGuf(Name) - Text1

Alignment - 0 - Left Justified

Index - EmptyLocked - False

Text - Empty

Text2 Text Box Properties twGuftwGuftwGuftwGuftwGuf(Name) - Text

Alignment - 0 - Left Justified

Index - 1

Locked - False

Text - Empty

Command1 Command Button Properties twGuftwGuftwGuftwGuftwGuf(Name) - Command1

Caption - &Add (Text Box)

Enabled - True

Command2 Command Button Properties twGuftwGuftwGuftwGuftwGuf(Name) - Command2

Caption - &Counting Sort

Enabled - True

Command3 Command Button Properties twGuftwGuftwGuftwGuftwGuf(Name) - Command3

Caption - E&xit

Enabled - True

Form1 Form Properties twGuftwGuftwGuftwGuftwGuf(Name) - Form1

Enabled - True

Caption - Counting Sort (Ascending Order)

Object: General, Proc: [Declaration] twGuftwGuftwGuftwGuftwGufDim num1, n, k(50), f(50), kount(50) As Integer

Add (Text Box) - Command1 Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

n = Val(Text1)

Text1.Locked = True

Contents

Page 455: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 455/463

448 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

If num1 = 0 Then num1 = 1

If num1 > n Then Exit Sub

num1 = num1 + 1

Load Text(num1)

b1 = Text(num1).Name 'Text(num1).Name="Text"

b2 = Text(num1).Index 'Text(num1).Index = num1+1

Text(num1).Locked = True

Text(num1).Top = Text(num1 - 1).Top + 400

Text(num1).Left = Text(num1).Left - 400

Text(num1).Visible = True

Print Text(num1), Text(num1).Name, Text(num1).Index

i = Text(num1).Index - 1

k(i) = Text(num1)Print k(i), i

Text(num1) = Text(num1)

End Sub

Counting Sort - Command2 Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Cls

For i = 1 To n

kount(i) = 1Next

For i = 2 To n

For j = 1 To i - 1

If k(i) > k(j) Then

kount(i) = kount(i) + 1

Else

kount(j) = kount(j) + 1

End If 

Next jNext i

For i = 1 To n

f(kount(i)) = k(i)

Next

Contents

Page 456: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 456/463

449 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

For x = 1 To n

Print f(x)

Next

End Sub

Exit - Command3 Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command3_Click()

Unload Me

End

End Sub

txufyg y½d k*&rfud k Run ygu yH k(473)ygtwd kif;jrifawG U&rnfjzpfygonf/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(473)

Contents

Page 457: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 457/463

450 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Insertion Sort ud k ud k ud k ud k ud k Visual Basic jzif ha&;om;jcif;jzif ha&;om;jcif;jzif ha&;om;jcif;jzif ha&;om;jcif;jzif ha&;om;jcif;atmufygtwd kif; Form wpfckud kwnfaqmuf&rnf/ yH k(474)/ 4if;wGif Label, Text

Box, Command Button wd k Yjzif hzefwD;xm;NyD; oufqd kif&m Properties rsm;ud kjyifqif

jznf hpGufNyD;aemuf Command Button rsm;wGif atmufygy½d k*&rfrsm;ud ka&;om;&rnf/

Lable1 Properties twGuftwGuftwGuftwGuftwGuf(Name) - Label1

AutoSize - True

BackStype - 0 - Transparent

Caption - How many number?

Lable2 Properties twGuftwGuftwGuftwGuftwGuf(Name) - Label2AutoSize - True

BackStype - 0 - Transparent

Caption - Enter each number = >

yH k(474)

Contents

Page 458: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 458/463

451 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Text1 Text Box Properties twGuftwGuftwGuftwGuftwGuf(Name) - Text1

Alignment - 0 - Left Justified

Index - EmptyLocked - False

Text - Empty

Text2 Text Box Properties twGuftwGuftwGuftwGuftwGuf(Name) - Text

Alignment - 0 - Left Justified

Index - 1

Locked - False

Text - Empty

Command1 Command Button Properties twGuftwGuftwGuftwGuftwGuf(Name) - Command1

Caption - &Add (Text Box)

Enabled - True

Command2 Command Button Properties twGuftwGuftwGuftwGuftwGuf(Name) - Command2

Caption - &Insertion Sort

Enabled - True

Command3 Command Button Properties twGuftwGuftwGuftwGuftwGuf(Name) - Command3

Caption - E&xit

Enabled - True

Form1 Form Properties twGuftwGuftwGuftwGuftwGuf(Name) - Form1

Enabled - True

Caption - Counting Sort (Ascending Order)

Object: General, Proc: [Declaration] twGuftwGuftwGuftwGuftwGufDim num1, n, k(50) As Integer

Contents

Page 459: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 459/463

452 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Add (Text Box) - Command1 Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

n = Val(Text1)

Text1.Locked = TrueIf num1 = 0 Then num1 = 1

If num1 > n Then Exit Sub

num1 = num1 + 1

Load Text(num1)

b1 = Text(num1).Name 'Text(num1).Name="Text"

b2 = Text(num1).Index 'Text(num1).Index = num1+1

Text(num1).Locked = True

Text(num1).Top = Text(num1 - 1).Top + 400

Text(num1).Left = Text(num1).Left - 400Text(num1).Visible = True

Print Text(num1), Text(num1).Name, Text(num1).Index

i = Text(num1).Index - 1

k(i) = Text(num1)

Print k(i), i

Text(num1) = Text(num1)

End Sub

Insertion Sort - Command2 Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command2_Click()

Cls

For i = 2 To n

current = k(i)

 j = i - 1

70 If j < 1 Or current >= k(j) Then GoTo 100

k(j + 1) = k(j)

 j = j - 1GoTo 70

100 k(j + 1) = current

Next i

Contents

Page 460: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 460/463

453 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Do While j >= 1 And current < k(j)

k(j + 1) = k(j)

 j = j - 1

Loop

For x = 1 To n

Print k(x)

Next

End Sub

Exit - Command3 Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command3_Click()

Unload Me

EndEnd Sub

txufyg y½d k*&rfud k Run ygu yH k(475)ygtwd kif;jrifawG U&rnfjzpfygonf/

- - - - - - - - - - - - - - - 0 - 0 - 0 - - - - - - - - - - - - - - -

yH k(475)

Contents

Page 461: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 461/463

454 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Selection Sort with Exchange ud k ud k ud k ud k ud k Visual Basic jzif ha&;om;jcif;jzif ha&;om;jcif;jzif ha&;om;jcif;jzif ha&;om;jcif;jzif ha&;om;jcif;atmufygtwd kif; Form wpfckud kwnfaqmuf&rnf/ yH k(476)/ 4if;wGif Label, Text

Box, Command Button wd k Yjzif hzefwD;xm;NyD; oufqd kif&m Properties rsm;ud kjyifqif

jznf hpGufNyD;aemuf Command Button rsm;wGif atmufygy½d k*&rfrsm;ud ka&;om;&rnf/

Lable1 Properties twGuftwGuftwGuftwGuftwGuf(Name) - Label1

AutoSize - True

BackStype - 0 - Transparent

Caption - How many number?

Lable2 Properties twGuftwGuftwGuftwGuftwGuf(Name) - Label2AutoSize - True

BackStype - 0 - Transparent

Caption - Enter each number = >

yH k(476)

Contents

Page 462: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 462/463

455 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Text1 Text Box Properties twGuftwGuftwGuftwGuftwGuf(Name) - Text1

Alignment - 0 - Left Justified

Index - EmptyLocked - False

Text - Empty

Text2 Text Box Properties twGuftwGuftwGuftwGuftwGuf(Name) - Text

Alignment - 0 - Left Justified

Index - 1

Locked - False

Text - Empty

Command1 Command Button Properties twGuftwGuftwGuftwGuftwGuf(Name) - Command1

Caption - &Add (Text Box)

Enabled - True

Command2 Command Button Properties twGuftwGuftwGuftwGuftwGuf(Name) - Command2

Caption - &Selection Sort with Exchange

Enabled - True

Command3 Command Button Properties twGuftwGuftwGuftwGuftwGuf(Name) - Command3

Caption - E&xit

Enabled - True

Form1 Form Properties twGuftwGuftwGuftwGuftwGuf(Name) - Form1

Enabled - True

Caption - Selection Sort with Exchange (Ascending Order)

Object: General, Proc: [Declaration] twGuftwGuftwGuftwGuftwGufDim num1, n, k(50) As Integer

Contents

Page 463: VisualBasic6.0 in Burmese

8/14/2019 VisualBasic6.0 in Burmese

http://slidepdf.com/reader/full/visualbasic60-in-burmese 463/463

456 uuuGefuuuGefuuuGefuuuGefuuuGefMicrosoft Visual Basic 6.0

Add (Text Box) - Command1 Button twGuftwGuftwGuftwGuftwGufPrivate Sub Command1_Click()

n = Val(Text1)

Text1.Locked = TrueIf num1 = 0 Then num1 = 1

If num1 > n Then Exit Sub

num1 = num1 + 1

Load Text(num1)

b1 = Text(num1).Name 'Text(num1).Name="Text"

b2 = Text(num1).Index 'Text(num1).Index = num1+1

Text(num1).Locked = True

Text(num1).Top = Text(num1 - 1).Top + 400

Text(num1).Left = Text(num1).Left - 400Text(num1).Visible = True

Print Text(num1), Text(num1).Name, Text(num1).Index

i = Text(num1).Index - 1

k(i) = Text(num1)

Print k(i), i

Text(num1) = Text(num1)

End Sub

Contents