Computer Programming With Visual Studio
Computer Programming With Visual Studio
Computer Programming With Visual Studio
Studio
Computer Programming
úIqj,a fíisla fvdÜfkÜ mß.Kl NdIdj iu`. lghq;= lsÍugkï m<uqj th Tnf.A
mß.Klh ;=, msysgqjd.; hq;=fjhs¡ fuh olakg ,efnkafka úIqj,a iagqäfhda kñka
;j;a mß.Kl NdIdj, tl;=jla jYfhks¡
fuu úIqj,A iagqäfhda meflach ;=, wka;¾.; lr we;s úIqj,A fíisla fvdÜfkÜ
mß.Kl NdIdj ie,l+úg tys yhjk ixialrKfhka miqj fjku l%ufõohla
hgf;A fjkiaujQ wdldrhlska úIqj,A fíisla fvdÜfkÜ 2003 f,i 2003 j¾IfhaoS
ksl=;A lrk,o w;r tys ilia lrkq ,nk lsisÿ fla;uh jevigykla úIqj,A
fíisla 6 ixialrKh fyda Bg fmr meñKs ixialrKhla ;=,ska jeäoshqKq
l,fkdyels ùu úfYaI ,laIKhla úh' tkï mQ¾K Tífcla Tßhkagâ wdldrfha
mß.Kl NdIdjla jYfhka fuu kj;u ixialrKh y÷kajdfok ,oS' Bg miqj
úIqj,A fíisla fvdÜfkÜ ys 2005 f,i ;j;a ixialrKhla y÷kajdfok ,oS' bka
wk;=rej 2008 j¾IfhaoS úIqj,A fíisla fvdÜfkÜ 2008 f,i fuu mß.Kl
NdIdfjys ;j;a ixialrKhla y÷kajdfok ,oS' fuh fuu y÷kajdÿka ixialrK
w;r jvd;Au ckm%shjQ ixialrKh f,i ye|skajQjdg jrola ke;' bka wk;=rej
2010 ixialrKh;A uE;loS 2013 ixialrKh;A t,solajk ,oS'
kuq;A uDÿldx. ixj¾Olhl= jYfhka úIqj,A fíisla fvdÜfkÜ mß.Kl NdIdj
yeoEÍu i|yd jvd;Au iqÿiq ixialrKh f,i ud olskafka úIqj,A fíisla
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
fvdÜfkÜ 2008 ixialrKh fjhs¡ ukaoh;A fuh l%udKql+,j yeoErEmiq Bg miqj
meñKs iy meñfKk ´kEu ixialrKhla fj; myiqfjka wkq.;ùug
yelsùuh' fuu mß.Kl NdIdj bf.kSfïoS ud Tng fok ,nkq m<uq wjjdoh
jkqfha Tn óg fmr bf.k.;A úIqj,A fíisla 6 mß.Kl NdIdj iu`.
ixikaokh lsÍug W;Aidy fkdlrk f,igh' kuq;A Tn bf.k.;A isoaOdka;
fldgia l%ufõo ms,sn|j wjfndaOh muKla ;nd.kakd f,ig u;la lr isáuq¡
WodyrKhla f,ig b*A iafÜÜukaÜ" isf,laÜ flaia iafÜÜukaÜ" Æmaia hk tajd
l%shd;Auljk wdldrh oekg olakg ,efnk iEu mß.Kl NdIdjla ;=,u
we;Af;A tlu l%ufõohlg fjhs¡ th Ndú;d lrk wdldrh yd fla; ,shk
wdldrh mß.Kl NdIdj wkqj fjkia fjhs¡ tfukau úIqj,A fíisla 6 mß.Kl
NdIdjg miq tys lsisÿ ixialrKhla olakg fkd,enqKq w;r thu kjuq
l%ufõohla hgf;A úIqj,A fíisla fvdÜfkÜ mß.Kl NdIdj y÷kajdÿkanj Tng
l,skau lshdÿkakd u;l we;s¡ tfukau úIqj,A fíisla fvdÜfkÜ mß.Kl NdIdj
Ndú;d lrñka ,shk,o jevigykla úIqj,A fíisla 6 mß.Kl NdIdj fyda Bg
fmr mej;s lsisÿ ixialrKhla Ndú;d lrñka ixialrKh l,fkdyelsnj Tn
;rfhau u;l ;nd.; hq;=fjhs¡
fyd|hs úIqj,A iagqäfhda 2008 ixialrKh Tnf.A mß.Klfha msysgqùugkï Tfí
mß.Klfha wju jYfhka my; YlH;djhka ;sìh hq;=fjhs¡ oekg ksl=;A lr
we;s úIqj,A iagqäfhda 2008 ixialrKh .;Aúg th x86 iy x64 hk fufyhqï
moaO;s wdldr folgu iyh olajk mßos ,nd.ekSfï yelshdj we;' fufyhqï
moaO;s ie,l+úg Windows XP Service Pack 2 j,g miqj meñKs ish¿u fufyhqï
moaO;s i|yd iyh olajkq ,nhs¡ oDvdx. wjYH;d ie,l+úg wju jYfhka 1.6 GHz
fõ.hlskahq;A fm%dfiirhlao" 384 MB u;l Odß;djhlao wjYHùu isÿfjhs¡ kuq;A
wkqu; lrkq ,nkafka 2.2 GHz fõ.hlskahq;A fm%dfiirhla jk w;r 1024 MB
u;l Odß;djhla fjhs¡
fuu Download nÜka tl la,sla lr bkamiqj olakg ,efnk msgqfjys we;s Free
Download ,skala tl u; la,sla l,úg *h¾f*dlaia fjí n%jqi¾ tll kï my;
mßos vhf,d.A fndlaia tlla olakg ,efnk w;r tys Save File nÜka tl la,sla
lsÍfuka fuu uDÿldx.h Tfí mß.Klh fj; vjqkaf,daâ lr.; yel'
*h¾f*dlaia fjí n%jqi¾ tllkï fjku geí tll fuu ,skala tlg wod, msgqj
újD; lr.kak¡ fuúg olakg ,efnk msgqfjys GET THIS TORRENT fld, meye;s
,skala tl l%shd;Aul lrkak¡
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
fuúg olakg ,efnk vhf,d.A fndlaia tflka fuh vjqkaf,daâúh hq;= fgdrkaÜia
wema,sflaIka tl jYfhka bkaiafgda,A lr.;A Bit Torrent hkak f;dard OK nÜka tl
la,sla lrkak¡ fuúg Add New Torrent f,i ;j;a vhf,d.A fndlaia tlla olakg
,efnhs¡ fuys Save bosßfhys olakg ,efnk ;s;A ;=kla iys; nÜka tl la,sla lr
fuu vjqkaf,daâjk úIqj,a iagqäfhda 2008 ixialrKfhys iq/l=ï jk ia:dkh
,ndosh yel' th úfYaIfhkau fjkia fkdl<fyd;A th vjqkaf,daâùu isÿjkqfha
Tnf.A fufyhqï moaO;sfhys Download f*da,Av¾ tl ;=,g fjhs¡ fuys ol=Kqmi
msysá iqÿmdg fldgqfjys vjqkaf,daâ jk *hs,a tflys Odß;djh wdoS úia;r
fmkajkq ,nhs¡ fuu úIqj,a iagqäfhda 2008 ixialrKh fndfydaúg iso *hs,A tlla
jYfhka ,nd.; yel'
oeka fuu vhf,d.A fndlaia tflys olakg ,efnk OK nÜka tl la,sla l,úg
fuu úIqj,A iagqäfhda ys iso *hs,A tl l%ul%ufhka fgdrkaÜia la,hkaÜ uDÿldx.h
yryd vjqkaf,daâùu wdrïNjkq we;' Tnf.A wka;¾cd, in|;djh ;=, by,
nEkaâú;A tlla mj;Skï mehla fyda Bg wdikak ld,hla ;=, fuh
iïmQ¾Kfhkau vjqkaf,daâ lr.ekSfï yelshdj we;' fuys fldmuK m%;sY;hla
vjqkaf,daâù we;sohkj. fuu uDÿldx.fhys jïmi Downloading hgf;ys la,sla
l,úg n,d.ekSfï yelshdj we;' fuh Tnf.A mß.Klhg iïmQ¾Kfhkau
vjqkaf,daâjQmiq th Completed u; la,sla l,úg oel n,d.; yel' bkamiq tu
*hs,A tl u; rhsÜ la,sla lr Open containt folder fukq úOdkh wkq.ukh
l,úg th vjqkaf,daâù we;s f*da,Av¾ tl fj; .ukal, yel' fuh Tnf.A
mß.Klhg ksjerosj bkaiafgda,A lr.ekSugkï m,uqj Power Iso jeks f;jk
md¾Yùh uDÿldx.hla m<uqj bkaiafgda,A lr.; hq;=fjhs¡ ta i|yd Power Iso Ndú;d
lrhskï th Filehippo jeks fjí wvúhlska vjqkaf,daâ lr.;yel' tfia
bkaiafgda,A lr.;Amiq mß.Klh kej; mK.ekajQmiq th u.ska uhs lïmshqg¾ys
;kdfokq ,nk j¾pqj,A v%hsõ tl fj; ujqkaÜ l,hq;= fjhs¡ ta i|yd vjqkaf,daâ
lr.;A iso *hs,a tl u; rhsÜ la,sla lr olakg ,efnk fukq tflka Power ISO
fukq ludkaâ tl hgf;ys we;s Mout Image to Drive fukq úOdkh wkq.ukh
l,úg uhs lïmshqg¾ ys olakg ,efnk j¾pqj,a v%hsõ tlg ujqkaÜ l,yel' oeka
fuh fndfydaúg my; mßos vhf,d.A fndlaia tlla olakg ,efnk w;r fuys Install
Visual Studio 2008 f,i ,skala tlla olakg ,efnk w;r th u; la,sla
l,hq;=fjhs¡
oeka iagd¾Ü fukq tl ;=, olakg ,efnk fláu`. Ndú;dl,miq fuu úIqj,A
iagqäfhda 2008 ixialrKh ;=,ska Tn iïu;hla jYfhka Ndú;d lrkq ,nkafka
l=uk mß.Kl NdIdj o hkak f;dard.ekSug wjia:djla Wodfjhs' fuys iïu;
mß.Kl NdIdj jYfhka úIqj,A fíisla fvdÜ fkÜ jYfhka f;ArEmiq úIqj,A
iagqäfhda úkafvda tl újD;ùu isÿfjhs¡
úIqj,A fíisla fvdÜ fkÜ mß.Kl NdIdj Ndú;d lrñka uDÿldx.hla ks¾udKh
lsÍug n,dfmdfrd;A;= fjkjdkï New Project tlla fyj;A w¿;A jHdmD;shla
wdrïN l,hq;=nj u;l ;nd.; hq;=h' wms m<uqj n,uq uDÿldx.hla hkq l=ulao
lshd¡ uDÿldx.hla hkq BtlaiS *hs,A tlla fyj;A tlaialshqgn,A wdldrfha *hs,A
tlls¡ tkï thg ;ksj Odjkhùfï yelshdj we;' WodyrKhla f,i Ms Paint
jevigyk ie,l+úg tys whslka tl u; la,sla l,úg th ;ksj Odjkhjk *hs,a
tlla jYfhka l%shd;Aulùu isÿfjhs¡ idudkH *hs,A tlla tfia fkdjk w;r tajd
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
fudkhï fyda by;ska i|yka lrk,o tialshqgn,A *hs,A tlla yryd újD;ùu
isÿfjhs¡ Calculator, Ms Excel, Photoshop hkq l=uk fyda mß.Kl NdIdjla Ndú;d
lrñka ilia lrk,o ;ksj Odjkhjk jevigyka fyj;A tlaialshqgn,A *hss,A
tlla fjhs¡
b;ska fulS fkdlS úúO j¾.fha uDÿldx. fyj;A mß.Kl jevigyka ks¾udKh
lsÍu i|yd wmg úIqj,A fíisla fvdÜfkÜ mß.Kl NdIdj Ndú;d lsÍug mq¿jk'
fuu mß.Kl NdIdj fu;rïu f,dj ckm%sh ùug m%Odk;u fya;=jjQfha fuys
we;s ñ;%YS,S Ndjhhs¡ tkï wmg úúO gQ,Aia Ndú;d lrñka uDÿldx.hl uQ,sl
miqìu wmg fmfkk mßos ks¾udKh lsÍug yelsùu m%Odk;u jdish fjhs¡ tkï
wm úiska ks¾udKh lrk uDÿldx.h th Ndú;d lrkakdg fldhs wdldrhlg
l=uk w;=reuqyqK;lska hq;=o hkak äihska l,yelsùuh' ta i|yd wu;r
jYfhka fla;kh lsÍug wjYH fkdfjhs¡ fï ksid jeä mßY%uhla fkdorñka
b;du;a myiqfjka blaukska uDÿldx.fhys w;=reuqyqK; ks¾udKh l,yels w;r
bkamiq ld¾hhg .e,fmk f,i fla;kh lsÍfï yelshdj we;' tkï fldákau
lsjfyd;A úIqj,A fíisla fvdÜfkÜ mß.Kl NdIdj IDE fyj;A Intergrated
Development Environment hq;= mß.Kl NdIdjla fjhs'
fyd|hs jeä l;d ke;sj wms oeka fuu mß.Kl NdIdj uq, isgu yeoEÍug
mgka.ksuq¡ fyd|hs uu l,ska lSjdla fuka úIqj,A fíisla fvdÜfkÜ mß.Kl
NdIdj Ndú;d lrñka l=uk fyda uDÿldx.hla ks¾udKh lsÍug woyia
lrkjdkï th ;ekSu wdrïN lsÍu w¿;a jHdmD;shla fyj;A New Project tlla
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
jYfhka y÷kajkq ,nhs¡ fyd|hs ta i|yd iagd¾Ü fukq tl Ndú;d lrñka m,uqj
úIqj,a iagqäfhda úkafvda tl újD; lr.kak¡ fyd|hs bkamiq File fukq tflys
olakg ,efnk New Project fukq úOdkh wkq.ukh lrkak'
fuúg wdrïNl wjia:dfõoS my; mßos New Project vhf,d.A fndlaia tl olakg
,efnhs¡
fuu fukq tflysu we;s Floating wdldrh f;dard.;Aúg gQ,A fndlaia tl l=vd
úkafvda tlla f,i ksoyia f,i ;srfha l=uk fyda ia:dkhl msysgqjd.ekSfï
yelshdj we;' fuys idudkHfhka f;aÍ we;af;a Dockable wdldrh fjhs¡ fuúg
gQ,A fndlaia tl fuu wdldrh f;dardf.k gQ,A fndlaia tl by,ska la,sla lrf.k
tydg fuydg f.khkúg ueoska iy osYdj,g fhduqjQ úksúo fmfkk
fldgqj,ska hq;A nÜkaia olakg ,efnhs¡ fuúg ujqia tl la,sla lrf.k w;A
fkdyer tu osYdjlg úysoS we;s nÜka tlla u;g ujqia fmdhskag¾ tl f.k
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
f.dia w;yeßhúg tu osYdjg ia:Sr f,i gQ,A fndlaia tl we,ùu fyj;A ia:Sr
f,i ia:dk.;ùu isÿfjhs¡
Properties Window
idudkHfhka fuh úIqj,A iagqäfhda úkafvda tflys ol=Kqmi my,skau olakg
,efnhs¡ fuh u.ska m%Odk jYfhkau isÿlrkq ,nkafka f*daï tl we;=¿j f*daï
tlg lsishï lkafg%da,A tlla ,nd.;Amiq jevigyk äihska lrk wjia:dfõoS
tu lkafg%da,Aia j,g úúO fjkialï isÿlr.ekSu i|yd fjhs¡
fuh yßhg ñksiqkaf.A olakg ,efnk .;s.=K j,g iudk l,yel' f*daï tlg
lsishï lkafg%da,A tlla ,nd.;Amiq th la,sla lr f;dard.;Aúg tu lkafg%da,A
tlg wod, úúO fjkialï l,yels ,ehsia;=jla njg m;Aùu isÿfjhs¡
WodyrKhla f,ig Tn gQ,A fndlaia tflka nÜka lkafg%da,A tlla f;dardf.k
fm%dm¾àia úkafvda tflka Backcolor fm%dmá tl yryd fuu nÜka tflys miqìï
j¾Kh fjkia lr.ekSfï yelshdj we;' tla tla lkafg%da,Aia j,g wdfõKsl
fm%dm¾àia fyj;A .=Kdx. úYd, m%udKhla fuu ,ehsia;=j ;=, olakg ,efnhs¡
Solution Explorer
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
úIqj,a iagqäfhda úkafvda tflys ol=Kqmi by,skau olakg ,efnkafka fuu
fid,shqIka tlaiamaf,dar¾ úkafvda tl fjhs¡ fm%dfclaÜ tlg ,ndf.k we;s
ish¿u f*daïia fudähq,j, wdo¾Yhla fuys fmkajkq ,nhs¡ lsishï f*daï tlla
;srfhka bj;Aù we;s wjia:djl oS tu f*daï wdo¾Yh u; vn,A la,sla lsÍfuka
kej;;A fuu f*daï tl ;srfha u;= lr.; yel'
tfukau fm%dfclaÜ tl i|yd w¿;A f*daï wdosh tl;= lr.ekSu i|yd i|ydo fuu
fid,shqIka tlaiamaf,dar¾ úkafvda tl Ndú;d lsÍfï yelshdj we;' fuu
fid,shqIka tlaiamaf,dar¾ úkafvda tflys by,skau fv%daúka mska nÜka tl olakg
,efnhs¡ gQ,A fndlaia tflys fv%daúka mska nÜka tflka isÿlrk ,o ld¾hh fuu
fid,shqIka tlaiamaf,dar¾ úkafvda tl i|ydo wod,ùu isÿfjhs¡
Standard Tool Box
iïu; fuj,ï ;Srej jk fuh u.ska ;srfha we;s gQ,A fndlaia" fid,shqIka
tlaiamaf,dar¾ úkafvda" fm%dm¾àia úkafvda wdosh ;srfhys olakg fkd,efnk
wjia:djl tajd blaukska ,nd.ekSfï yelshdj we;' tfukau ixj¾Okh
lrf.khk fm%dfclaÜ tlla újD; lr.ekSug" w¿;A f*daï wdosh tl;=
lr.ekSu i|ydo fuh Ndú;d l, yel'
fyd|hs Tng úIqj,A fíisla fvdÜfkÜ mß.Kl NdIdfjys uQ,sl ;srh iy th
Ndú;d lrk wkaou ms,sn|j mQ¾K jegySula ,efnkakg we;ehs lshd wfmalaId
lruq¡ fuu mß.Kl NdIdj fõjd l=uk fyda mß.Kl NdIdjla mokï
lr.ksñka jevigykla ks¾udKh lsÍfïoS Tng Tn n,dfmdfrd;A;=jk ld¾hhg
.e,fmk lkafg%da,aia Ndú;d lsÍu ms,sn|j mQ¾K jegySula ;sìh hq;=fjhs¡ tu
Button
fuho jevigykla ks¾udKfhaoS w;sYhskau nyq,ju Ndú;d lrkq ,nk lkafg%da,a
tlla fjhs¡ f*daï tlla ;=, lsishï lkafg%da,aia Ndú;d lrñka ieliSula ilia
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
l,miq th ;yjre lsÍu i|yd fndfyda úg Ndú;d lrkq ,nkafka nÜka
lkafg%da,a tlfjhs¡ tfukau hï .Kkh lsÍula isÿlsÍug wdoS foa i|ydo
Ndú;d lrkq ,nkafkao fuu lkafg%da,a tl fjhs¡
WodyrKhla f,i by; fmkajd we;s vhf,d.A fndlaia tflys Width iy Height
bosßfhys lekajia tflys os. iy m<, wjYH mßos fjkia l,miq tu m%udKhg
lekajia tl iliaùu i|yd fldákau lsjfyd;A th ;yjre lsÍu i|yd Ndú;d
lr we;Af;Ao nÜka lkafg%da,A tlla fjhs¡ WodyrKhla f,i by; i|yka
lrk,o o;A; mokï iys; jevigyfkys wod, ksjerosu hQi¾ fkaï tl iy
mdiaj¾â tl ,ndoS we;Akï muKla jevigykg msúiSu i|yd Ndú;d lrkq
,nkafkao nÜka tlla fjhs¡
RadioButton
lsishï jevigykl f;AÍï lsysmhlska tla f;Aíula muKla isÿlsÍug we;s
wjia:dj,oS Ndú;d lrkq ,nkafka f¾äfhdanÜka lkafg%da,A tlfjhs¡
GroupBox
fuh jeä jYfhkau fhdod fkd.;A;do f¾äfhda nÜka yd ine÷kq lkafg%da,A
tlla jYfhka y÷kajdosh yel' ukao f¾äfhda nÜka fhdod .ksñka ks¾udKh
lrkq ,nk jevigykaj,oS fndfyda úg fuu lkafg%da,A tlo fhdod.ekSug
isÿfjhs¡ fuh gQ,A fndlaia tflys Containers leg.ßh ;=, olakg ,efnhs¡ f*daï
tl ;=, wm l,ska lSjd fl;rï f¾äfhda nÜkaia fhdodf.k ;snqK;A tla
wjia:djloS f;dard.; yelafla tlla nj¡ kuq;A Tng tla wjia:djloS ldKAv
jYfhka tla ldKAvhlska tla f¾äfhda nÜka tlla ne.ska f;AÍug isÿjQ
wjia:djloS tu f¾äfhda nÜka ldKAv lsÍu i|yd .ArEma fndlaia lkafg%da,A tl
Ndú;d lrkq ,nhs¡ m,uqj fjka fjka jYfhka f;AÍug n,dfmdfrd;A;=jk
ldKAv m%udKhg .ArEma fndlaia lkafg%da,A ne.ska f*daï tl ;=, msysgqjd miqj tu
.ArEma fndlaia lkafg%da,A ;=, fjk fjku f¾äfhda nÜka we|.; hq;=fjhs¡
CheckBox
fuho jevigyka ks¾udKfhaoS nyq,ju Ndú;d lsÍug isÿjk lkafg%da,A tlla fjhs¡
f;AÍï lsysmhla we;s wjia:djloS bka tlla fyda wjYHkï ish,A,u fyda lsysmhla
f;AÍug we;s wjia:djloS fuu lkafg%da,A tl Ndú;d lrkq ,nhs¡
by; rEmfhys jevigyfkys by;ska i|yka lr we;s Effects tlla fyda lsysmhla
jqjo wl=re i|yd Ndú;dl, yelsúh hq;=h' fï i|yd f¾äfhda nÜka Ndú;d lf,Akï
,ndosh yelafla tla Effects tlla muKs¡ kuq;A fplafndlaia fhdod.;Aúg tlla
folla fyda ish,A,u jqjo ,ndosh yel' fplafndlaia lkafg%da,A tl f*daï tlg
,nd.;Amiq th f,An,hlska iukaú; iqÿ meye;s fldgqjlska ksfhdackh fjhs¡
jevigyk OdjkfhaoS fuu fldgqj u; la,sla l,úg l=vd yß ,l=Kla olakg
,efnhs¡ fuúg fplafndlaia lkafg%da,A tl f;dardf.k we;s nj y`.jkq ,nhs¡
kej; fuu fldgqj u; la,sla l,úg yß ,l=K bj;Aùu isÿfjhs¡ fuúg tu
fplafndlaia lkafg%da,A tl f;dardf.k ke;s nj y`.jkq ,nhs¡
ComboBox
jevigyk äihska lrk wjia:dfõoS fyda o;A; mokula Ndú;d lrñka ilia lr
we;s uDÿldx.hla kï jevigyk Odjkh lrk wjia:dfõoS fÜn,A tll lsishï
*S,Aâ tllska ,nd.kakd lsishï whs;u iuQyhlska tla whs;uhla muKla
f;dard.ekSu i|yd fuh Ndú;d lrkq ,nhs¡
kuq;A Tng isf;kakg mq¿jk fï i|yd f¾äfhda nÜka o Ndú;d l,yels nj'
WodyrKhla f,i Tn lsishï o;A; mokula Ndú;d lrñka lsishï uDÿldx.hla
ks¾udKh lsÍfïoS tys lsishï mqoa.,fhl= ,shdmosxÑ lsÍug o;A; ,ndfok
wjia:djloS lsishï osia;%slalhla f;AÍug ;snqfkahehs is;kak¡ fuúg osia;%slal 25
i|ydu f¾äfhda nÜka 25 la fm,.eiajQúg f*daï tl wkjYH f,i úYd,ùu
je,elaúh fkdyel' fuúg jevigyfkys w;=reuqyqKf;ys ñ;%YS,SNdjhg
fl,skau n,mdk nj Tng wuq;=fjka lsjhq;= ke;' kuq;A lïfndfndlaia tlla
ie,l+úg th f*daï tflys msysgjQmiq .kq ,nkafka jevigyk äihska lrk
wjia:dfõoS ,ndÿka bv m%udKh fjhs¡ thg fl;rï whs;u we;=,;A l,o tajd
f;AÍu i|yd olakg ,efnkafka my,g .,dyef,k fukqjla jYfhks¡
ListBox
fuho fndfyda ÿrg l%shdldÍ;Ajfhka lïfnd fndlaia tlg iudk fjhs¡ kuq;A fuh
f*daï tl ;=, msysgqùfïoS wksjd¾fhkau lïfnd fndlaia tlg jvd wu;r bvla
jehùu isÿfjhs¡ tkï jevigyk äihska lrk wjia:dfõoS ,ndfokq ,nk ish¿u
whs;u m%udKh fyda bka fldgila jqjo fmfkk yelsjk mßos fuu lkafg%da,A
tflys fmfkk m%udKh fjkia l,yel' tu ksid lïfnd fndlaia tflys fuka
fkdj jevigyk Odjkhjk úgoS ish¿u whs;u fyda bka fldgila jqjo tljr
n,d.ekSfï yelshdj we;'
PictureBox
Tn lsishï jevigykla äihska lrk wjia:dfõoS lsishï f*daï tlla ;=, tys
w;=reuqyqK; ks¾udKh lsÍfïoS ta i|yd mska;+rhla we;=,;A lsÍug isÿjQúg ta i|yd
Ndú;d lrkq ,nkafka mslap¾ fndlaia lkafg%da,A tl fjhs¡
TextBox Properties
Cursor
fuhska Tng fuu fglaiaÜ fndlaia tl u;g ujqia fmdhskag¾ tl f.k wdúg th
l=uk wdldrfha tllao ke;Akï th l=uk wdldrfha fmdhskag¾ tlla úhhq;=o
hkak fuysoS f;dard.; yel' fuu fm%dmá tl bosßfhys we;s nÜka tl la,sla
l,úg fjku fukq tlla ;=, Ndú;d l,yels ujqia fmdhskag¾ úYd, m%udKhla
olakg ,efnhs¡ tys ku iu`. tys rEmigklao fmkajd we;s neúka Ndú;d
lrkafka l=uk wdldrhlao hkak myiqfjka f;dard.; yel'
Font
fuu fglaiaÜ fndlaia tl ;=, ghsma lrkq ,nk wl=rej, yevh fyj;A f*dkaÜ tl"
tu wl=rej, úYd,;Ajh wdosh fjkia lsÍug n,dfmdfrd;A;= fjkjdkï
Ndú;dl, hq;Af;A fuu fm%dmá tl fjhs¡ fuu fm%dmá tl bosßfhys we;s ;s;a
;=klska ksfhdackhjk nÜka tl la,sla l,úg tajd fjkia lsÍu i|yd fjku
Font kñka vhf,d.A fndlaia tlla olakg ,efnhs¡
fuh Ndú;d lsÍfuka wl=re rgdj iy tys m%udKh fjkia lr.; yel'
Forecolor
fuu fm%dmá tlo f;ArEúg olakg ,efnkafka l,ska ,enqKq wdldrfha
Custom,Web,System f,i geí ;=klska iukaú; fukqjls¡ fglaiaÜ fndlaia tlla
;=, wl=rej, iïu; l¿ j¾Kh fjkqjg fjk;A ´kEu j¾Khla ,ndosh yel'
MaxLength
fglaiaÜ fndlaia tlla ;=, ,ndosh yels Wmßu le/lag¾ia m%udKh fldmuKoehs
fuu.ska ;SrKh l,yel' WodyrKhla f,i Tn lsishï fglaiaÜ fndlaia tlla
ÿrl:k wxlhla we;=,;A lsÍu i|yd Ndú;d lrk wjia:djloS fuys Wmßu i|yka
l, yelafla b,lalï 10 neúka fuys mj;sk w.h fjkqjg 10 we;=,;A l,úg
Wmßuj i|yka l,yelafla le/lag¾ia 10 la muKs'
Multilne
idudkHfhka fglaiaÜ fndlaia tlla ie,l+úg wl=re fma,s jYfhka ghsma
l,fkdyel' fuu fm%dmá tl True f,i ilia l,úg fglaiaÜ fndlaia tl ;=,
wl=re fma,s jYfhka ,ndoSu isÿl, yel'
PasswordChar
idudkHfhka jevigyka j, mdiaj¾â tlla we;=,;A lsÍu isÿlrkúg ghsma lrkq
,nk le/lag¾ia fjkqjg fmkajkq ,nkafka ;re i,l=Kla fyda fjk;A i,l=Kla
ReadOnly
Button Properties
Text
FlatStyle
Text
f¾äfhda nÜka tflys iqÿ meye;s rjqug msgqmiska th l=ulaoehs ye|skaùug
n,dfmdfrd;A;=jk fglaiaÜ tl i|yka lrkq ,nkafka fuu fm%dmá tl ;=,
fjhs¡¡
Appearance
Text
f,an,hla ;=, fglaiaÜ tlla fyj;A lssishï úia;rhla ,ndoSu i|yd Ndú;d lrkq
,nkafka fuu fm%dmá tl fjhs¡
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
BoderStyle
fuúg fglaiaÜ fndlaia tll fuka we;=,g fkrd we;s wdldrhg f,an,h jgd
iSudjla olakg ,efnhs¡
fyd|hs wm wfkl=;A lkafg%da,Aia j, fm%dm¾àia bosß jevigyka ks¾udKh lrk
wjia:d j,oS meyeos,s lsÍug n,dfmdfrd;A;= fjuq¡
úIqj,A fíisla fvdÜfkÜ mß.Kl NdIdj Ndú;d lrñka jevigykla ks¾udKh
lrkúgoS uQ,sl wjia:d ;=kla olakg ,efnhs¡
m<uq wjia:dj jkqfha jevigyfkka isÿlsÍug n,dfmdfrd;A;=jk ld¾hhg
wkqj Bg .e,fmk lkafg%da,aia fhdod.ksñka jevigyfkys w;=reuqyqK;
ks¾udKh lsÍu fjhs¡ jevigyk Ndú;d lrkafka tkï fl,skau .Kqfokq lrkq
,nkafka w;=reuqyqK; yryd neúka fuh is;A.kakdiq¿ jevigyk Ndú;d
lrkakdyg jvd;A ñ;%YS,S whqßka ks¾udKh lsÍug j.n,d .;hq;= fjhs¡ ukao
fl;rï jeo.;A uDÿldx.hla jqj;A w;=reuqyqK; wjq,Aiy.;kï tu uDÿldx.h
fndfydaúg fj<|mf,ka úisùug neßke;'
oeka fuu jevigyfkys w;=reuqyqK; fl;rï fyd|ska ks¾udKh l,o thska wod,
ld¾hh isÿlr.ekSugkï wm úiska jevigyk äihska lsÍfuka wk;=rej
Wmfoia ,ndosh hq;=fjhs¡ fuh wm fla;kh lsÍu fyj;A Coding lsÍu jYfhka
y÷kajkq ,nhs¡ fuh isÿlrk wdldrh mß.Kl NdIdfjka NdIdjg fjkia jk
w;r th tu NdIdfjys kS;s moaO;shg wkqj isÿl, hq;=fjhs¡
fyd|hs Tng jevigykla ks¾udKh lsÍug wod, miqìu ukdj jegfykakg we;ehs
lshd wms wfmalaId lruq¡ wms tfiakï oeka yd yd mqrd lsh,d w¿;A jevigykla
ks¾udKh lsÍug w;.iuq¡
fyd|hs ta i|yd úIqj,A iagqäfhda úkafvda tflys File fukq tflys we;s New
Project fukq úOdkh wkq.ukh lrkak¡ fuúg oekg jevlrñka isák jHdmD;sh
iq/l=ï fkdlr ;snqfkakï th iq/l=ï lrkjdo keoao hkak úuid isák w;r
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
iq/l=ï lsÍugkï Yes nÜka tl;A iq/l=ï lsÍug wkjYHkï No nÜka tl;A
la,sla lrkak¡ fuúg New Project vhf,d.A fndlaia tl olakg ,efnhs¡ fuys
jïmi msysá ,ehsia;=fjka Windows hkak;A ta hgf;A fgïmaf,AÜ tl jYfhka
Windows Form Application hk wdldrh f;dard fuu jHdmD;sh iq/l=ï lrk
ksYAÑ; ia:dkhlao f;dard OK nÜka tl la,sla lrkak¡ fuúg w¿;Au fm%dfclaÜ
tlla wdrïN fjñka jevigyk ks¾udKh lsÍu i|yd w¿;A f*daï tlla olakg
,efnhs¡ jïmi msysá gQ,Afndlaia tflka fglaiaÜ fndlaia lkafg%da,A tll=;A nÜka
lkafg%da,A ;=kl=;A fï i|yd wjYH fjhs¡ ta i|yd wod, gQ,A tl u; la,sla lr
f*daï tl ;=, la,sla lrf.k v%e.Alr w;yeÍfuka tu lkafg%da,A tl f*daï tl
u; msysgqjd.ekSfï yelshdj we;' oeka nÜka ;=fkys fglaiaÜ tl jYfhka
ms,sfj,ska Hello, Clear iy Exit f,i ,ndfokak¡ ta i|yd nÜka tl isf,laÜ lr
fm%dm¾àia úkafvda tflys Text bosßfha mj;sk fglaiaÜ tl bj;Alr wod,
fglaiaÜ tl ,ndfokak¡ fuúg my; oelafjk mßos w;=reuqyqK; ks¾udKh lr
;sìh hq;=fjhs¡
End Sub
;=, fla;kh isÿl, hq;=fjhs¡
fuysoS Hello World hk jpkh fmkajkq ,nkafka fglaiaÜ fndlaia tl ;=, neúka
m,uqj fglaiaÜ fndlaia tflys ku i|yka l,hq;= fjhs¡ bkamiqj ;s;la ;enQúg
tu fglaiaÜ fndlaia tlg wod, ld¾hhka isÿlr.; yels fu;â iy fm%dm¾àia
,ehsia;=jla olakg ,efnhs¡ fuhska Text fm%dmá tl f;dard.kak¡ fglaiaÜ fndlaia
tll lsishï fglaiaÜ tlla fmkaùu i|yd Ndú;d lrkq ,nkafka Text fm%dmá tl
fjhs¡ oeka fuys fmkajkafka l=ulao hkak mejßh hq;=fjhs¡ tu ksid mejÍula
isÿlrk ksid = ,l=K fhdod fmr,sfldud ;=, tkï “ “ ;=, Hello World hk
jpkh i|yka l,hq;= fjhs¡ fuf,i úfYaI jpkhla mjrk wjia:djloS úIqj,A
fíisla fvdÜfkÜ mß.Kl NdIdj ;=, ta i|yd fmr,sfldud Ndú;d lrkq ,nhs¡
oeka jevigyk Odjkh lrne,Su i|yd iagEkav¾â gQ,And¾ tflys we;s fld,mdg
;%sfldaKhlska ksfhdackhjk nÜka tl la,sla lrkak¡ oeka Hello nÜka tl la,sla
lrn,kak¡ fyd|hs jevigyk Odjkfhka bj;A lsÍu i|yd iagEkav¾â gQ,And¾
tflysu we;s ks,Amdg fldgqjlska ksfhdackhjk nÜka tl la,sla lrkak¡ Clear
nÜka tl la,sla l,úg fglaiaÜ fndlaia tflys we;s jpkh bj;A lsÍu i|yd my;
oelafjk mßos fla;kh l,hq;= fjhs¡
TextBox1.Clear()
fuys Clear fu;â tl fl,skau Ndú;d lsÍfuka fglaiaÜ fndlaia tlla ysial,
yel' ke;fyd;a TextBox1.Text = "" ,ndÿkak; .eg¿jla fkdue;' fuúg "" ;=,
lsisjla olakg fkd,efnk neúka fglaiaÜ fndlaia tl ysiaùu isÿfjhs¡ Exit nÜka
tl la,sla l,úg jevigyk iïmQ¾Kfhkau Odjkfhka bj;Aúh hq;=h' fï
i|yd Exit nÜka tl vn,A la,sla lr my; mßos fla;kh lrkak¡
Application.Exit()
fuys Red nÜka tl la,sla l,úg f*daï tflys miqìu r;= meyefhkq;A Green
nÜka tl la,sla l,úg f*daï tflys miqìu fld, meyefhkq;A tfukau Blue
nÜka tl la,sla l,úg f*daï tflys miqìu ks,a meyefhkq;A iliaúh hq;=h'
fyd|hs tfiakï fla;kh l,hq;Af;A tla tla nÜkaj, nj Tng jegysh hq;=h'
fyd|hs ta i|yd Red nÜka tl vn,A la,sla lr fldaâ úkafvda tl ,nd.kak¡ fuysoS
f*daï tflys miqìu r;= meyefhka iliajkafka tysu we;s nÜka tlla la,sla
lrkúgoS neúka tkï tu Form Class tflysu nÜka tlla la,sla lrkúgoS neúka
tu Class tflys fjkialï isÿlrkúg Form1 fjkqjg Me f,i y÷kajñka
fla;kh l,hq;= fjhs¡ fyd|hs ta i|yd Me f,i ghsmalr ;s;la ;enQúg tys
fjkialï isÿl,yels fm%dm¾àia iy fu;â ,ehsia;=jla olakg ,efnhs¡ Form
tl fyj;A Form Class tflys miqìu fjkia lsÍu i|yd Backcolor fm%dmá tl
Ndú;d lrkq ,nhs¡ oeka fuhg mejßh hq;Af;A j¾Khla neúka = ,l=K fhdod Color
f,i i|ykalr ;s;la ;enQúg olakg ,efnk j¾K fukqfjka Red f,i
f;dardfokak¡ fï wdldrhg wksl=;A nÜka ;=,o my; oelafjk mßos fla;kh
lrkak¡
oeka jevigyk Odjkh lr n,kak¡ fyd|hs wms tfia kï ;j;a jevigykla fj;
fhduq fjuq¡ fuh b;du;a ir< jevigykls¡ hï mqoa.,fhl=f.A uQ,sl jegqm
,ndÿkamiq Y=oaO jegqm fyj;A Net Salary tl .Kkh l, jevigykls¡ fï i|yd
f,An,A lkafg%da,A 6 la" nÜka lkafg%da,A tlla iy fglaiaÜ fndlaia lkafg%da,A 6 la
wjYH fjhs¡ oeka my; oelafjk mßos f*daï tl äihska lr.kak¡
fyd|hs fuys Enter first value bosßfhys we;s fglaiaÜ fndlaia tl ;=, lsishï
w.hla ,ndoS Enter second value bosßfhys we;s fglaiaÜ fndlaia tl ;=, ;j;a
w.hla ,ndoS + ,l=K iys; nÜka tl la,sla l,úg tu w.hka foflys tl;=j
fuh gQ,A fndlaia tflys Common Controls leg.ßh hgf;ys my,skau ToolTip
f,i olakg ,efnk w;r th u; vn,a la,sla lrkak¡ fuúg th f*daï tlg
my,ska fjku ToolTip1 jYfhka tl;=ùu isÿfjhs¡ fuh f*daï tflys miqìfuka
Odjkhjk lkafg%da,A tlla jYfhkao ye|skaúh yel'
fyd|hs Tng + ,l=K iys; nÜka tl fj; ujqia fmdhskag¾ tl f.k.shúg thska
isÿjkafka l=ulao hkak gQ,Aáma tllska fmkaùug wjYHjQjdhehs is;kak¡ fyd|hs
m,uqj + ,l=K iys; nÜka tl f;dardf.k fm%dm¾àia úkafvda tflys my,skau
ToolTip on ToolTip1 f,i fjku w¿;A fm%dmá tlla tl;=ù we;s wdldrh olakg
,efnhs¡ + ,l=K iys; nÜka tl fj;g ujqia fmdhskag¾ tl f.kwdúg osiaúhhq;=
úia;rh ,ndfokq ,nkafka fuu fm%dmá tl ;=, fjhs¡
InitialDelay
fuhska woyia jkqfha lsishï lkafg%da,A tlla u;g ujqia fmdhskag¾ tl f.k .shúg
fl;rï fõ,djlg miqj o gQ,Aáma tl fmkaúh hq;=o hkak fjhs¡ fuys w.hka ilia
lrkq ,nkafka ñ,s;;Amr j,ska nj isys;nd.; hq;=fjhs¡ ;;Amrhlg ñ,s;;Amr
1000 ls¡ fuys iïu; w.h f,i olakg ,efnkafka 500 ls¡ tkï wod, lkafg%da,a
tl fj;g ujqia fmdhskag¾ tl f.k.shúg ;;Amr Nd.hla blauhkjd;A iu`.u
gQ,Aáma tl fmkajkq ,nhs¡
ToolTipTitle
gQ,A áma tflys úia;rhg by,ska .e,fmk l=uk fyda ud;Dldjla ,ndosh yel' fuh
gQ,Aáma tflys idudkH wl=rej,g jvd ;rula ;o meyefhka fmkajkq ,nhs¡
ToolTipIcon
fuho gQ,Aáma tl i|yd tl;= l,yels ;rula wdl¾IKSh ieliqula fjhs¡ tkï
uefiaÊ tflys iaNdjh wkqj thg l=vd whslka tl;= lsÍfï yelshdj we;'
WodyrKhla f,i lsishï úia;rhla kï Info whslka tlo wjjdod;Aul mKsúvhla
kï Warning whslka tlo jeroSula j,lajd.ekSuloS Error whslka tlo Ndú;d
lsÍfï yelshdj we;'
UseFading
idudkHfhka gQ,Aáma tlla fmkajkq ,nk wjia:dfõoS th áflkaál fnd|fjñka
fmkajk w;r wod, lkafg%da,A tflka bj;g .ksoaoS fnd| fjñka ke;sùhkq
,nhs¡ fuh False f,i ilial,úg fl,skau ToolTip tl fmkaùu iy bj;Aùu
isÿfjhs¡
IsBallon
fuho gQ,Aáma lkafg%da,A tl ;=, olakg ,efnk losu fm%dmá tlla fjhs¡ fuh
idudkHfhka False f,i olakg ,efnk w;r fuh True f,i ilia l,úg gQ,Aáma
tl neÆkhla wdldrfhka olakg ,efnhs¡
AutoPopDelay
fuhska woyia jkqfha lsishï lkafg%da,A tlla fj;g ujqia fmdhskag¾ tl f.k.sh
miq th ;srfha fldmuK fõ,djla mj;skjdo hkak fjhs¡ fuho ilia lrkq
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
,nkafka ñ,s ;;Amr j,ska fjhs¡ WodyrKhla f,ig 5000 f,i ,ndÿkaúg
yßhgu gQ,Aáma tl osiaù ;;Amr 5 lska bj;Aùhhs¡
fyd|hs wms oeka kej;;A wms ks¾udKh lrñka ;snQ jevigyk fj; fhduqfjuq¡
fuu jevigyfkys nÜka y;r i|yd .e,fmk WÑ; gQ,Aáma tl i|yd leu;s
úia;rhla ,ndfokak¡ ta i|yd tla tla nÜka isf,laÜ lrñka ToolTip on
ToolTip1 fm%dmá tl bosßfhys wjYH úia;rh ,ndfokak¡ wms oeka fuu
jevigyfkys + ,l=K iys; nÜka tl la,sla l,úg w.hka foflys tl;=j
fmkaúh hq;=ksid fuu nÜka tl vn,A la,sla lr fldaâ úkafvda tl ,nd.kak¡
oeka my; oelafjk mßos fla;kh isÿlrkak¡
kuq;A úIqj,a fíisla fvdÜ fkÜ mß.Kl NdIdj ;=,oS * ,l=K / ,l=K iy - ,l=K
fjk;A lsisÿ lghq;A;lg fhdodfkd.kakd neúka tjeks wjia:dj,oS Val *kalaIka
tl Ndú;d lsÍug wjYHh ke;' kuq;A Ndú;d l,o .eg¿jla fkdue;'
fyd|hs oeka jevigyk Odjkh lr n,kak¡ wms oeka ;j;a jevigykla fj;
fhduqfjuq¡ fuu jevigyfkaoS Tng úIqj,a fíisla fvdÜ fkÜ mß.Kl NdIdj
;=,oS Ndú;djqk idudkH j¾K fjkqjg RGB fyj;A Red, Green iy Blue hk
j¾K ;=fkka iEfok j¾K Ndú;d lrk wkaou ms,sn|j mQ¾K wjfndaOhla
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
,nd.; yel¡ fyd|hs fuh w;Ayodne,Su i|yd w¿;A jHdmD;shla wdrïN lrkak'
fï i|yd f,An,A lkafg%da,A ;=kla" fglaiaÜ fndlaia ;=kla iy nÜka lkafg%da,A
tlla muKla iEfyhs¡ fuu f,An,A lkafg%da,A ;=fkys iy fglaiaÜ fndlaia
lkafg%da,A ;=fkys wl=re j, m%udKh Font fm%dmá tl yryd 14 f,i ilia lr
we;' fuu rEm igyk ;=, wod, fjkia lrk,o fglaiaÜ fndlaia lkafg%da,A j,
kïo i|yka lr we;'
fyd|hs RGB j¾K hkq Red, Green iy Blue hk Y=oaO j¾K ;=fkys 0 isg 255
olajdjQ lsishï w.hla ñY%ùfuka iEfok j¾Khla fjhs¡ WodyrKhla f,i r;=
j¾Khg wod, RGB w.hka jkqfha 255,0,0 fjhs¡ ta wkqj fld, j¾Kh iEfokafka
0,255,0 f,ig fjhs¡ ly j¾Kh iEfokafka 255,255,0 f,ig fjhs¡ fyd|hs fuu
jevigyfkaoS Red bosßfha we;s fglaiaÜ fndlaia tl ;=, 0 isg 255 olajdjQ lsishï
w.hlao Green bosßfha we;s fglaiaÜ fndlaia tl ;=, 0 isg 255 olajdjQ lsishï
w.hlao Blue bosßfha we;s fglaiaÜ fndlaia tl ;=, 0 isg 255 olajdjQ lsishï
w.hla igyka lr Show Color nÜka tl la,sla l,úg tu w.hka ;=fkka iEfok
j¾Kh f*daï tflys miqìu i|yd wdfoaYúh hq;=h' fyd|hs ta i|yd nÜka tl
vn,A la,sla lr fldaâ úkafvda tl ,nd.kak¡ fuf,i RGB j¾K Ndú;d lsÍu
i|yd Color la,dia tl ;=, we;s FromArgb fu;â tl Ndú;d lrkq ,nhs¡ fuys
jrykla ;=, ms,sfj,ska , ,l=K fhdoñka Red, Green iy Blue hk j¾K ;=fkys 0
isg 255 olajdjQ lsishï w.hla ,ndosh hq;=fjhs¡ kuq;A wms w.hka igyka lrkq
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
,nkafka fglaiaÜ fndlaia ;=, neúka fglaiaÜ fndlaia tflys ghsma lr we;s
fohla Text fm%dmá tl u.ska ,nd.; yels neúka my; mßos fla;kh isÿl,
yel'
fuysoS isÿúh hq;Af;A fglaiaÜ fndlaia tl ;=, lsishï k.rhl kula i|ykalr
Add Town nÜka tl la,sla l,úg th ,siaÜ fndlaia tlg we;=,;Aúh hq;=h'
tfukau Clear All nÜka tl la,sla l,úg ,siaÜ fndlaia tl ;=, we;s ish¿u
k.rj, kï bj;Aúh hq;=h' tfukau ,siaÜ fndlaia tflka lsishï k.rhla
f;dard Clear Selected Town nÜka tl la,sla l,úg th muKla bj;Aùu isÿúh
hq;=h' fyd|hs fuysoS Tng ,siaÜ fndlaia tlla Ndú;d lrk wkaou b;du;a ir<j
bf.k .; yel' fyd|hs Add Town nÜka tl vn,A la,sla lr fglaiaÜ fndlaia
tflys ghsma lrk,o k.rhl kula ,siaÜ fndlaia tlg we;=,;Aùu i|yd
fla;kh lsÍug fldaâ úkafvda tl ,nd.kak¡ fyd|hs oeka my; mßos fla;kh
lrkak¡
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
ListBox1.Items.Add(TextBox1.Text)
End Sub
Clear All nÜka tl la,sla l,úg ,siaÜ fndlaia tlg we;=,;Aù we;s ish¿u whs;u
bj;Aùu isÿúh hq;=h' fï i|yd Items hgf;ys we;s Clear fu;â tl Ndú;d lrkq
,nhs¡
fuys Clear Selected Town nÜka tl la,sla l,úg ,siaÜ fndlaia tl ;=, f;dard we;s
whs;uhla fyj;A k.rhla ,siaÜ fndlaia tflka bj;Aùu isÿúh hq;=h' ,siaÜ fndlaia
tllska lsishï whs;uhla bj;A lsÍu i|yd Items hgf;ys Remove fu;â tl
Ndú;d lrkq ,nhs¡ fuys jryk ;=, bj;Aúh hq;Af;A l=ulao hkak i|yka l, hq;=h'
,siaÜ fndlaia tll lsishï whs;uhla f;ArEúg th l=ulao hkak SelectedItem
fm%dmá tl yryd ,nd.; yel' fyd|hs ta i|yd fuu nÜka tl vn,A la,sla lr
fldaâ úkafvda tl ;=, my; oelafjk mßos fla;kh lrkak¡
fuysoS ksh;fhys ku conpie f,i;A tys w.h jkqfha 22/7 f,ig fla;kh lr
we;' fuh fl,skau la,dia tl ;=, Ndú;d lr we;s neúka fuu la,dia tl fyj;A
f*daï tl ;=, Ndú;d lrkq ,nk iEu lkafg%da,a tllu m%fhdackhg .; yel'
Circle f¾äfhda nÜka tl vn,A la,sla lr my; oelafjk mßos fla;kh isÿlrkak¡
fuys 22/7 fjkqjg conpie hkak fl,skau Ndú;d lr we;' fuu iQ;%fhys r hkq
wrh fjhs¡ th i|yka lrkq ,nkafka TextBox1 lkafg%da,a tl ;=, neúka
TextBox1.Text * TextBox1.Text f,ig fla;kh lr we;' fgliaÜ fndlaia tll
hï fohla ,ndÿka miq th Text fm%dmá tl yryd ,nd.; yels fjhs¡ fyd|hs ta
wkqj RadioButton2 ;=, my; mßos fla;kh isÿlrkak¡
fuys conpie j,g bosßfhka ½ f,i i|yka lr we;Af;A fuu f¾äfhda nÜka tflka
fidhkq ,nkafka w¾O jD;A;hl j¾.M,h neúks¡ tfukau RadioButton3 ;=,
my; mßos fla;kh isÿlrkak¡
fuysoS fuu f¾äfhda nÜka tl la,sla lsÍug fmr Equation Type 1 f¾äfhda nÜka
tl la,sla lr we;s wjia:djl Equation Type 2 f¾äfhda nÜka tl hgf;A ;snQ
;djld,slj wl%shj ;snQ lkafg%da,Aia kej; il%sh lsÍu i|ydo fla;kh lr we;'
fyd|hs fuys Equation Type 1 hgf;ys we;s Answer nÜka tl la,sla l,úg
txtansw1 fglaiaÜ fndlaia tl ;=, iólrKfhys x ys w.h l=ulao hkak fmkaúh
hq;=fjhs¡ fuysoS x fidhkúg isÿúhhq;Af;A TextBox2 ys ,ndoS we;s w.h TextBox3 ys
we;s w.fhka wvqù bkamiqj TextBox1 ys w.fhka tu w.h fnÿkqmiq x ys ms,s;=r
,nd.; yel' fyd|hs ta i|yd ta hgf;ys we;s Answer nÜka tl vn,A la,sla lr
my; mßos fla;kh lrkak¡
fuysoS m,uqj isÿúh hq;Af;A TextBox3 ys we;s w.fhka TextBox2 ys we;s w.h wvqù
tu ,efnk w.h TextBox1 ys we;s w.fhka fnoSfuks¡ tu ksid m,uqj TextBox3 ys
we;s w.fhka TextBox2 ys we;s w.h wvqjk fla;khg wod, fldgi jryka lr
we;' ukao .Ks;fhaoS tlu iq¿ lsÍfïoS .Ks; l¾u lsysmhla tlg Ndú;djk
wjia:dj,oS tu .Ks; l¾u j,g m%uqL;d ms,sfj,la olakg ,efnhs¡ fuh
j ka fn .= o ß f,i isxy, lgjyf¾oS y÷kajkq ,nhs¡ iuyrúg Tn oekgu;A
fuh wid we;=jdg iel ke;' .Ks; l¾u lsysmhla we;s wjia:djloS m,uqj
jrykla ;=, we;s oE iq¿ lrk w;r Bg miqj m%uqL;djh ,efnkafka fnoSu
,l=K we;s wjia:djg fjhs¡ bkamiqj .=K lsÍug;A Bg miqj OK ,l=Kg;A
wjidkfha iDK ,l=Kg;A m%uqL;djh ysñùu isÿfjhs¡ fuysoS by; fla;kfhys
jryka fkdl,fyd;A isÿjkafka iDK ,l=Kg m%:ufhka fnoSug m%uqL;djh
ysñjk neúka TextBox2 ys w.h TextBox1 ys w.fhka fnod bkamiqj tu ,efnk
w.h TextBox3 ys we;s w.fhka wvqùu isÿfjhs¡ tu ksid m<uqj isÿúh hq;Af;A
TextBox3 ys w.h TextBox2 ys w.fhka wvqúhhq;= neúka th jryka lr we;' tu
ksid fnoSug l,ska jrykg m%uqL;djh ysñjk neúka th m<uqj iq¿ùu isÿfjhs¡
Equation Type 2 hgf;A we;s Answer nÜka tl la,sla l,úg txtansw2 fglaiaÜ
fndlaia tl ;=, x ys w.h jYfhka fmkaúh hq;Af;A TextBox7 ys w.h m,uqj
TextBox6 ys w.hg tl;=ù tu ,efnk iïmQ¾K w.h TextBox8 ys we;s w.fhka
fnoSfuks¡ fyd|hs tu nÜka tl ;=, my; mßos fla;kh lrkak¡
fuysoS TextBox6 ys w.hg TextBox7 ys w.h m,uqj tl;=úhhq;= neúka tajd jryka
lr we;' kuq;A úIqj,A fíisla fvdÜfkÜ mß.Kl NdIdj ;=,oS + ,l=fKys
m%uqL;djh m,uqj ysñjkqfha fglaiaÜ fldgia folla tlg wE|Sug neúka tu
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
fglaiaÜ fndlaia j, we;s w.hka Val *kalaIka tl u.ska tl;= l,yels w.hka
njg m;Alr we;' fuúg fuu w.hka tl;= l,yels w.hka njg m;AjQúg +
,l=fKys fojk m%uqL;djh fyj;A wod, w.hka fol tlg tl;=ùu isÿlrkq ,nhs¡
fuu w.hka fol tl;=ùfuka ,efnk w.h TextBox8 ys w.fhka fnod we;' oeka
jevigyk w;Ayod n,kak'
fyd|hs wms wjidk jYfhka ;j;A tla jevigykla muKla ks¾udKh lruq¡
fuysoS Tng gQ,A fndlaia tl ;=, olakg ,efnk ;j;a jeo.;A lkafg%da,A tlla
Ndú;d lrk wdldrh bf.k .; yel' tkï NumericUpDown lkafg%da,A tl
Ndú;d lrk wdldrh bf.k .; yel' fyd|hs fuu jevigyk i|yd f,An,A
lkafg%da,A ;=kla iy NumericUpDown lkafg%da,A ;=kla wjYHùu isÿfjhs¡ tajd
my; oelafjk mßos f*daï tl ;=, äihska lr.kak¡ fuysoS NumericUpDown
lkafg%da,A ;=fkys kïo rEm igyk ;=, olajd we;'
Tng u;lo wms l,ska jevigykla ks¾udKh l,d RGB j¾K Ndú;d lrk wdldrh
ms,sn|j' RGB wdldrhg j¾K iEfokafka r;= j¾Kfhys 0 isg 255 olajd jQ w.h
mrdifhys hï w.hl=;A" fld, j¾Kfhys 0 isg 255 olajd jQ w.h mrdifhys hï
w.hl=;A" ks,A j¾Kfhys 0 isg 255 olajd jQ w.h mrdifhys hï w.hl=;A
ixfhdackh ùfuks¡ kuq;A wms l,ska ks¾udKh l, jevigyfkaoS fuu w.hka
;=ku ,ndoSu i|yd Ndú;d lrk ,oafoa fglaiaÜ fndlaia ;=kls¡ kuq;A jevigyk
Ndú;d lrkakdg wjYH kï iDK w.hla fyda 255 g jvd jeäjQ w.hkao
,ndoSfï yelshdj we;' fï fya;=j ksid jevigyk fodaI iys; ùugo neß ke;'
tfia kï tu jevigyfkaoS fodaI meñKsúg tajd ksrdlrKh lsÍugo fla;
fjku ,sùug isÿfjhs¡ tfukau jevigyk Ndú;d lrkakdyg w.hka fjkqjg
fglaiaÜ tlla jqjo ,ndoSfï yelshdj we;' kuq;A fujeks wjia:dj,oS Ndú;d
l,yels úYañ; lkafg%da,A tlla úIqj,A fíisla fvdÜfkÜ mß.Kl NdIdj ;=,
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
olakg ,efnhs¡ th NumericUpDown lkafg%da,A tl jYfhka y÷kajkq ,nhs¡
lsishï w.hl isg ;j;a w.hla olajd w.h ms,sfj,ska fjkia lsÍug fuu
úYañ; lkafg%da,A tlg yelshdj we;'
Maximum
wod, w.h mrdifhys fjkia l,yels jeäu w.h fuu fm%dmá tl bosßfhys
i|yka lrkq ,nhs¡ WodyrKhla f,i 0 isg 20 olajdjQ w.hka mrdihl w.hla
fjkia lsÍug fuu lkafg%da,A tl Ndú;d lrk wjia:djloS 20 ,ndoSu
isÿlrkqfha fuu fm%dmá tl ;=, fjhs¡
Value
Tn lsishï w.h mrdihla ,ndÿkaúg tys wdrïNl wjia:dfõoS fuu lkafg%da,A
tflys olakg ,efnk tkï mj;sk w.h l=ulao hkak ,ndosh yel'
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
Increment
fuu lkafg%da,A tl Ndú;d lrñka tu w.hka fjkiajkúg tu w.hka fldmuK
ixLHdjlska fjkiaúhhq;=o hk w.h fuys ,ndosh hq;=fjhs¡ WodyrKhla f,i fuys
5 f,i ,ndÿkaúg fuu lkafg%da,A tflys nÜka fol la,sla lrkúg w.h udre
ùu isÿjkqfha 5 ka 5 g fjhs¡
ReadOnly
fuysoS j¾Kh fjkia lrkq ,nkafka wod, lkafg%da,Aia msysá f*daï tl fyj;A la,dia
tl ;=, neúka Me f,i wrUñka fla;kh isÿlr we;' f*daï tflys miqìï j¾Kh
fjkia lsÍu i|yd Ndú;d lrkq ,nkafka Backcolor fm%dmá tl fjhs¡
NumericUpDown lkafg%da,A tflys we;s nÜka Ndú;d lrñka lsishï w.hla fjkia
lrkúg th Value fm%dmá tl yryd ,nd.ekSfï yelshdj we;' fyd|hs by;
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
wdldrhgu wfkl=;A NumericUpDown lkafg%da,A ;=, my; mßos fla;kh
lrkak¡
fuu jevigyfkys l%shdldÍ;Ajh f;Areï .ksuq¡ fuys Choose a color bosßfhys we;s
lïfnd fndlaia tflka Red hk j¾Kh f;dard Show Color nÜka tl la,sla l,úg
tu j¾Kh f*daï tflys miqìu i|yd wdfoaYùu isÿúh hq;=h' tfukau Green hk
j¾Kh f;ArEúg fld, j¾Kh;A Blue hk j¾Kh f;ArEúg ks,a j¾Kh;A wdfoaYùu
isÿúh hq;=h' fyd|hs tfia kï f*daï tl Odjkh jk wjia:dfõoS lïfnd
fndlaia tflka tu wjYH j¾Khla f;AÍug yelsúh hq;=h' tfia ùugkï
jevigyk äihska lrk wjia:dfõoS tu j¾K whs;u jYfhka lïfnd fndlaia
tlg ,ndoSug isÿfjhs¡ ta i|yd f*daï tl ;=, we;s lïfnd fndlaia tl isf,laÜ
lr tys by, l¿ mdg ;%sfldaKhlska ksfhdackhjk nÜka tl la,sla lr olakg
,efnk fukq tflka Edit Items fukq úOdkh wkq.ukh lrkak¡
fuúg String Collection Editor kñka vhf,d.A fndlaia tlla olakg ,efnk w;r
fuys wjYH wdldrhg Enter lS tl Tnñka whs;u ,ndoSfï yelshdj we;' tu
,ndÿka whs;u lïfnd fndlaia tlg tl;=ùu i|yd fuys we;s OK nÜka tl la,sla
lrkak¡ oeka f*daï tl Odjkh lr neÆ miq wod, whs;u tl;=ù we;s wdldrh
n,d.; yel' kuq;A fuysoS lïfnd fndlaia tl ;=, we;s whs;u uld oeóu
fjkia lsÍu fukau fuys fkdue;s whs;u ghsmalr ne,Sfï yelshdj we;' kuq;A
tfia fkdlr jevigyk äihska lrk wjia:dfõoS mj;sk whs;u muKla
f;AÍug yelsjk mßos ilia lsÍu i|yd kej;;A jevigyk äihska lrk
wjia:djg msúiS lïfnd fndlaia tl isf,laÜ lr fm%dm¾àia úkafvda tflka
DropDownStyle fm%dmá tl bosßfhys we;s my,g fhduqjQ ;%sfldaKhlska
ksfhdackhjk nÜka tl la,sla lr olakg ,efnk fukq tflka DropDownList
hk wdldrh f;dard.kak¡
fuu b*A iafÜÜukaÜ tflaoS iEu úgu If iy Then w;r ,shkq ,nkafka mÍlaIdlr
n,kq ,nk fldkafoaish fjhs¡ fuysoS nÜka tl la,sla lrkúgoS fldkafoaish
úhhq;Af;A lïfnd fndlaia tflka f;dardf.k we;Af;A Red o Green o
fkdtfiakï Blue o hkak fjhs¡ lïfnd fndlaia tflka lsishï whs;uhla f;ArEmiq
th Text fm%dmá tl yryd ,nd.; yel' m,uq If iafÜÜukaÜ tl u.ska lïfnd
fndlaia tflka f;dardf.k we;Af;A Red hk whs;uho hkak fidhd n,k
f,ig fla;kh lr we;' th tfia kï tkï hï fyhlska Red hk whs;uh
jevigyk Ndú;d lrkakd úiska f;dardf.k ;snqfkakï Then g my,ska wod,
ld¾hhg .e,fmk fla;kh isÿlr we;' tkï ;u f*daï tflysu miqìï j¾Kh
r;=mdg ùug fla;kh lr we;' fojk b*A iafÜÜukaÜ tl u.ska f;dardf.k
we;Af;A Green hk whs;uho hkak i,lk f,ig fla;kh lr we;' tfia
f;dardf.k ;snqKfyd;A Then g miqj we;s fla;kh u.ska f*daï tflys miqìï
j¾Kh fld, mdg jk f,ig fla;kh lr we;' ;=kajk b*A iafÜÜukaÜ tl u.ska
lïfnd fndlaia tflka f;dardf.k we;Af;A Blue hk whs;uh kï f*daï tflys
miqìu ks,Amdg jk f,ig fla;kh lr we;' fuysoS wms Tng jeo.;A lreKla u;la
lroSug leue;Af;uq¡ WodyrKhla f,i by; jevigyfkys j¾Kh f,i
lïfnd fndlaia tflka Red whs;uh f;dard nÜka tl la,sla l,úgoS úIqj,a fíisla
fvdÜfkÜ mß.Kl NdIdj u.ska fla;kh by, isg my,g mÍlaId lrf.k
hdfïoS m,uq b*A iafÜÜukaÜ tl u.ska lshd we;Af;A whs;uh jYfhka Red hkak
f;dard ;snqKfyd;A f*daï tflys miqìug r;= j¾Kh wdfoaYjk f,igh' fuysoS r;=
j¾Kh f;dard ;snqKfyd;A fldkafoaish i;H jk w;r wmg wjYH foa isÿjk neúka
Bg miqj ,shd we;s wfkl=;A iafÜÜukaÜ l%shd;Aulùfï wjYH;djhla mekfkdk.S'
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
kuq;A by; wdldrhg ;ks ;ks iafÜÜukaÜ ,shd we;s úgloS Bg by,ska ,shd we;s
lsishï fldkafoaishlg wod, b*A iafÜÜukaÜ tlla i;H jqjo Bg my,ska tu
wjia:dfõoS wi;Hjk b*A iafÜÜukaÜ o mÍlaId lrkq ,nhs¡ úYd, b*A
iafÜÜukaÜ m%udKhla ,shd we;s wjia:djloS fuh ;on, wjdishla jknj
jegysh hq;=h' ukao ,shd we;s by,u iafÜÜukaÜ tlla i;Hjqjo Bg my,ska ,shd
we;s iafÜÜukaÜ o l%shd;Aul lr n,kq ,nhs¡ tu ksid fuu b*A iafÜÜukaÜ
j,g;A my,ska ,shd we;s fla;khla l%shd;Aul lrkúgoS isoaOdka;uh jYfhka
tu ld¾hhg wod, fla;kh l%shd;Aulùug mudjk neúka jevigyk ;rula
ukao.dó úhhq;= nj ;¾l l, yel'
fyd|hs wm by; meyeos,s lrÿka b*A iafÜÜukaÜ tl Ndú;d lrñka ;j;a
b;dud;a ir< jevigykla ks¾udKh lruq¡ fuh lsishï w.hla ,ndÿkaúg th
T;Af;A ixLHdjlao fkdtfiakï brÜfÜ ixLHdjlao hkak ks.ukh l,yels
jevigykls¡ fuysoS Tng úIqj,A fíisla fvdÜfkÜ mß.Kl NdIdj ;=, olakg
,efnk w¿;A *kalaIka tlla Ndú;d lrk wdldrho bf.k .; yel' fuh
w;Ayodne,Su i|yd w¿;A jHdmD;shla wdrïN lrkak' fï i|yd f,An,A lkafg%da,A
folla" fglaiaÜ fndlaia lkafg%da,A tlla iy nÜka lkafg%da,A tlla wjYH fjhs¡
tfia kï my; oelafjk mßos f*daï tl äihska lr.kak¡ fuysoS f,An,A foflys
iy fglaiaÜ fndlaia tflys we;s wl=rej, m%udKh Font fm%dmá tl Ndú;d
lrñka 16 f,i ilia lr we;' fla;kfhaoS wjYHjk Label2 lkafg%da,A tflys ku
rEm igyfkysu olajd we;'
fuysoS m,uq b*A iafÜÜukaÜ tl u.ska fglaiaÜ fndlaia tflys i|yka lr we;s w.h
2 ka fn¥ miq 1 la b;sßjkafka o hkak n,k f,ig fla;kh lr we;' tfia kï
fglaiaÜ fndlaia tflys mj;sk w.h iu`. is an odd number f,i fojk
f,an,h ;=, fmkaùug fla;kh lr we;' fuys TextBox1.Text + “ “ + “is an odd
number” w;r we;s + “ “ + fla;kh u.ska fglaiaÜ fndlaia tflys mj;sk w.h
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
iy is an odd number w;r jpk tl f.dfâ fmkaùu je,elaùug ta jpk fol
w;r ysia ;ekla ;nd we;' fï wdldrhg fojkshg ,shd we;s b*A iafÜÜukaÜ tl
u.ska fglaiaÜ fndlaia tflys we;s w.h 2 ka fn¥ miq 0 la b;sßfõ kï fojk
f,An,h ;=, tu i|yka lrk,o w.h iu`. is an even number f,i fmkaùug
fla;kh lr we;' oekau mud fkdù jevhgyk Odjkh lr n,kak
fyd|hs Tng by; i|yka lrk,o jevigyka u.ska b*A iafÜÜukaÜ tl ms,sn|j
o, jegySula ,efnkakg we;ehs lshd wms wfmalaId lruq¡ fuu iafÜÜukaÜ tl
;jÿrg;A meyeos,sùu i|yd wms ;j;a jevigykla w;Ayod n,uq¡ fuh fi,aishia
WIAK;Ajh *erkayhsÜ njg;A *erkayhsÜ WIAK;Ajh kej;;A fi,aishia njg;A
yerúh yels ir< jevigykls¡ fuu jevigyfkaoS Tng f¾äfhda nÜka Ndú;d
lrk wdldrh o wjfndaOhla ,nd.; yel' fï i|yd f,An,A lkafg%da,A ;=kla"
fglaiaÜ fndlaia lkafg%da,A tlla" nÜkA lkafg%da,a tlla iy f¾äfhda nÜka
lkafg%da,A follao wjYH fjhs¡ oeka fuu lkafg%da,aia Ndú;d lrñka my;
oelafjk mßos f*daï tflys w;=reuqyqK; ks¾udKh lr.kak¡ fuysoS wod,
lkafg%da,aia j, Ndú;d lr we;s kï o rEm igyk iu`. olajd we;'
fi,Aishia j,ska WIAK;Aj w.hla ,ndÿka miq tu w.h 9 ka .=K lr miqj 5 ka fnod
thg 32 la tl;= l,úg tu fi,Aishia w.hg wkqrEm *erkayhsÜ w.h fidhd.;
yel' tfukau *erkayhsÜ j,ska WIAK;Aj w.hla ,ndÿka miq tu w.fhka 32 la
wvq lr tu wvq lsÍfuka ,efnk w.h 5 ka .=K lr 9 ka fn¥ miq Bg wkqrEm
fi,Aishia w.h fidhd.; yel' ta i|yd Convert nÜka tl vn,A la,sla lr olakg
,efnk fldaâ úkafvda tl ;=, my; mßos fla;kh lrkak¡
fyd|hs fuh Tng ;j;A ys;g ldjeoSug my, oS we;s WodyrKh fj; wjOdkh
fhduq lrkak¡
5 X 5 -5 / 5 +5
fuh by; i|yka lrk,o .Ks; l¾u ish,A, tlg yuqjk iq¿ lsÍuls¡ fuysoS
jryk fkdue;s jqj;A B,`.g m%uqL;djh ysñjkq ,nkafka fnoSug neúka 5/ 5
fn¥ miq 1 hk w.h ,efnhs¡ Bg miqj m%uqL;djh ysñjkqfha .=K lsÍu i|yd
fjhs¡ 5 X 5 .=K l,úg 25 hk w.h ,efnhs¡ oeka ,eî we;s iq¿ lsÍu jkqfha
25-1+5 fjhs¡ oeka B,`.g m%uqL;djh ysñjkq ,nkafka + ,l=Kg neúka -1 iy +5 iq¿
l,úg +4 hk w.h ,efnk w;r 25 g oeka iq¿ lsÍfuka ,enqk +4 iq¿ l,úg
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
wjidk w.h jYfhka 29 hk w.h ,efnhs¡ fyd|hs Tng oeka fuu m%uqL;d ms,sfj,
ukdj jegfykakg we;ehs lshd is;uq¡ fuu fla;kfhaoS fglaiaÜ fndlaia tflys
we;s w.fhka m,uqj 32 la wvqúh hq;= neúka th jryka lr we;' tfia
fkdjqkfyd;A isÿjkqfha 5 hk w.h 9 ka fnod tu w.hg 32 la tl;=ùu fjhs¡ tu
ksid jryka lr we;' Tng by; jevigyfkys fla;kh ukdj jegfykakg
we;ehs lshd wfmalaId lruq¡ oeka fkdmudj jevigyk Odjkh lr n,kak¡
fyd|hs wms oeka b*A iafÜÜukaÜ tflys B,`. wjia:dj .ek i,ld n,uq¡
tlsfklg iïnkaOhla we;s fldkafoais mÍlaId lrk wjia:d j,oS fldákau
lsjfyd;A ixlS¾K jevigyka ks¾udKfhaoS Tn Ndú;d l,hq;= jkafkao fuu b*A
iafÜÜukaÜ wdlD;sh fjhs¡ fuh wmg my; oelafjk mßos ú.%y l, yel'
tllg tlla iïnkaOhla we;s fldkafoais mÍlaId lsÍu i|yd fuu wdlD;sh Ndú;d
lrknj Tn wksjd¾fhkau isys;nd.; hq;=fjhs¡ fuysoS fmr mßosu If iy Then
w;r wod, fldkafoaish i|yka lrkq ,nhs¡ Then g miqj fma,shla lvd tu
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
fldkafoaishg tl`.jQ úg isÿjk l%shdjg wod, fla;kh isÿlrkq ,nhs¡ by;
fldkafoaishg tl`. fkdjqfha kï Else f,i i|yka lrñka kej;;A fma,shla
lvd fmr mßosu b*A iafÜÜukaÜ tlla wdrïN lrñka tA w;r B,`. fldkafoaish
i|yka lrkq ,nhs¡ Then g miqj fmr mßosu fma,shla lvd fldkafoaishg
tl`.jQúg isÿjk l%shdjg wod, fla;kh isÿlrkq ,nhs¡ fï wdldrhg i,ld
n,kq ,nk ish¿u fldkafoais j,g by; mßos b*A iafÜÜukaÜ ,sùu isÿl, yel'
ish¿u fldkafoais j,g miqj Else f,i i|yka lr fma,shla lvd fla;kh lrkq
,nkafka by; ish¿u fldkafoais j,g tl`. fkdjQúg isÿjk l%shdjg wod,
fla;kh fjhs¡ bkamiqj wjidkfha wrUk,o b*A iafÜÜukaÜ m%udKhg
.e,fmk f,i End If f,i wjika l,hq;= fjhs¡ WodyrKhla f,i b*A
iafÜÜukaÜ ;=kla wdrïNlf,a kï wjidkfha End If f,i ;=kla wjika l,hq;=
fjhs¡ fyd|hs fuh uekúka f;Areï.ekSu i|yd wms jevigykla ks¾udKh lruq¡
fuysoS Tng gQ,A fndlaia tl ;=, olakg ,efnk ;j;a w¿;A lkafg%da,A tlla
m%dfhda.slj Ndú;d lrk wdldrh bf.k .; yel' fï i|yd f,An,A lkafg%da,A
folla" fglaiaÜ fndlaia tlla iy nÜka tlla wjYHh fjhs¡ fuysoS wms Ndú;d
lrkq ,nk w¿;A lkafg%da,A tl jkqfha HscrollBar lkafg%da,A tl fjhs¡ fuh gQ,A
fndlaia tflys All Windows Forms hk leg.ßfhys ueo yßfhys olakg ,efnhs¡
Value
iafl%d,a nd¾ tflys iafl%d,a lrkúgoS tu iafl%d,A lrk kj;u w.h fuhska
ksfhdackh lrkq ,nhs¡
LargeChange
fuu iafl%d,a nd¾ lkafg%da,A tflys ueo fldfya fyda ;ekl la,sla lrkúgoS
iafl%d,Ajk w.h fldmuK ixLHdjlao hkak ,ndosh yel' tkï fldmuK
m%udKhlskao w.h fjkiaúhhq;=o hkak ,ndosh yel' WodyrKhla f,i fuys 10
f,i ,ndÿkaúg iafl%d,a nd¾ lkafg%da,A tflys ueo fldfya fyda ;ekl la,sla
l,úg w.h 10 ne.ska fjkiaùu isÿfjhs¡
SmallChange
iafl%d,a nd¾ lkafg%da,A tflys fomi we;s ;%sfldaKhlska ksfhdackhjk nÜka
la,sla lrkúgoS iafl%d,a úhhq;= m%udKh i|yka l,hq;= fjhs¡ WodyrKhla f,i
fuys 5 hk w.h i|yka l,úg fuu sfldaKhlska ksfhdackhjk nÜka tlla
la,sla lrk jdrhla mdidu w.h 5lska wvqùu fyda jeäùu isÿfjhs¡
fyd|hs wms oeka fuu jevigyfkys l%shdldÍ;Ajh f;Areï .ksuq¡ fuh Wmkaoskh
i|yka l,miq j;Auka wjqreoafoka jhi .Kkh lr.;Amiq ;ud isák jhia
iSudj ;SrKh l, yels jevigykls¡ fuys iafl%d,A nd¾ tl iafl%d,A lrkúgoS
fglaiaÜ fndlaia tl ;=, ;ud bmÿk wjqreoao ilia lsÍug yelsúh hq;=h' fuys
1900 isg 2050 olajd jQ wjqreÿ mrdihla iafl%d,A lsÍug yelsúh hq;=h' tu ksid
fuu lkafg%da,A tl f;dard fm%dm¾àia úkafvda tflys Minimum bosßfhys w.h
f,i 1900;A Maximum bosßfhys w.h f,i 2050 ;A i|yka lrkak¡ fuúg fuu
iafl%d,And¾ tflys Wmßu jYfhka w.h fjkia l,yelafla 2050 olajd muKs¡
tfukau wju jYfhka w.h fjkia l,yelafla 1900 olajd muKs¡ fuf,i
j;Auka wjqreoafoka bmÿkq wjqreoao wvql,úg jhi 10 g jvd wvqkï fojk
f,An,h ;=, You are baby f,i fmkaúh hq;=fjhs¡ tfukau jhi 10 fyda Bg jvd
jeäkï You are teenager f,i;A fmkaúh hq;=fjhs¡ tfukau jhi 20 fyda 20 g
jeäjQúg You are Young f,i;A tu jhi 40 fyda 40 g jvd jeäjQúg You are Old
f,i;A fmkaúh hq;=fjhs¡ fyd|hs fuysoS ,efnk jhi l=uk mrdihlg we;Aoehs
jevigykg ;ksj ;SrKh l,hq;= neúka fï i|yd b*A iafÜÜukaÜ tlla Ndú;d
l,hq;= nj Tng jegysh hq;=h' m,uqj fuu iafl%d,a nd¾ tl iafl%d,a lrkúgoS
Bg wkqrEm wjqreoao fglaiaÜ fndlaia lkafg%da,A tl ;=, fmkaúh hq;=h' fuh
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
isÿúhhq;Af;A iafl%d,a nd¾ tl iafl%d,a lrkúgoS neúka tu lkafg%da,A tl vn,A
la,sla lr ,efnk fldaâ úkafvda tl ;=, my; oelafjk wdldrhg fla;kh
lrkak¡
fuys Now.Year fm%dmá tl Ndú;d lrñka wo oskhg wod, wjqreoao .Kkh lr.;
yel' fglaiaÜ fndlaia tflys i|yka jkafka ;ukaf.A Wmkaoskhg wod, j¾Ih
fjhs¡ fï wkqj wo oskg wod, wjqreoafoka fuu Wmka wjqreoao wvql,úg wo oskg
wod, jhi o, jYfhka .Kkh lr.; yel' hï fyhlska fuu .Kkh lr.;A
jhi 40 fyda 40 g jeä oehs i,ld n,k f,ig m,uq b*A iafÜÜukaÜ tl u.ska
fla;kh lr we;' thg tl`.jQúg tkï .Kkh lr.;A jhi 40 fyda 40 g jvd
jeäkï Label2 lkafg%da,A tflys You are Old f,i fmkaùug fla;kh lr we;'
tfukau fojkshg ,shd we;s b*A iafÜÜukaÜ tl u.ska tu .Kkh lr.;A jhi
20 fyda 20 g jvd jeäjQúg You are younger f,i fmkaùug fla;kh lr we;'
.Kkh lr.;A jhi 10 fyda 10 g jvd jeäjQúg you are Teenager f,i;A
fmkaùug fla;kh lr we;' Else g miqj ,shkq ,nkafka by; i|yka lrk,o lsisÿ
fldkafoaishlg tl`. fkdjQúg isÿjk l%shdjg wod, fla;kh fjhs¡ fuysoS by;
i|yka lrk,o lsisÿ fldkafoaishlg tl`. fkdùuhkq .Kkh lr.;A jhi 10
g jvd wvqùu fjhs¡ fuúg wod, f,an,h ;=, You are baby f,i fmkaùu i|yd
fla;kh lr we;' b*A iafÜÜukaÜ ;=kla wrUd we;s neúka tu iafÜÜukaÜ ;=ku
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
jeiSu i|yd End If f,i ;=klska wjika lr we;' fyd|hs oeka jevigyk Odjkh
lrn,kak¡ fuu tlg ne÷k b*A iafÜÜukaÜ l%shd;Auljk wdldrh uekúka
wjfndaO lr.ekSu i|yd wm ó,`. jevigyk fj; fhduq fjuq¡
fuh lsishï úIhhka y;rlg wod, ,l=Kq ,ndÿka miq tu ,l=Kqj, idudkH
w.hg wkqj Grade tl ,nd.; yels jevigykla fjhs¡ fyd|hs fuu jevigyk
ks¾udKh lsÍu i|yd w¿;A jHdmD;shla wdrïN lrkak' fï i|yd f,An,A
lkafg%da,A 7la" fglaiaÜ fndlaia lkafg%da,A 7 la iy nÜka lkafg%da,A tlla
wjYHùu isÿfjhs¡ oeka fuu lkafg%da,Aia my; rEmigyfkys fmkajk wdldrhg
f*daï tl ;=, äihska lr.kak¡ fuysoS fla;khg jeo.;Ajk lkafg%da,Aia j,
kï rEmigyfkysu fmkajd we;'
oeka wms fuu jevigyfkys l%shdldÍ;Ajh f;Areï .ksuq¡ fuys isxy, ,l=Kq" .Ks;h
i|yd ,l=Kq" bx.%Sis j,g wod, ,l=Kq iy úoHdjg wod, ,l=Kq i|yka lr Get
Grade nÜka tl la,sla l,úg Average bosßfhys we;s fglaiaÜ fndlaia tl ;=, fuu
úIhhka j, ,l=Kq tl;=j .Kkhù tys ,l=Kqj, idudkH w.h fmkaúh
hq;=fjhs¡ tfukau tu ,l=Kqj,g wkqrEm Star Points m%udKho fmkaúh hq;=fjhs¡
fuu ,nd.;A ,l=Kqj, idudkH w.h 75 fyda 75 g jvd jeäkï Grade tl
jYfhka A fmkaúh hq;= w;r Star Points hgf;ys ;re i,l=Kq 5 la fmkaúh hq;=
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
w;r tu ;re ish,A,u r;= j¾Kfhka fmkaúh hq;=fjhs¡ tu ,nd.;A ,l=Kqj,
idudkH w.h 65 la fyda 65 lg jvd jeäjQúg Grade tl B úhhq;= w;r fld,
meyefhka hq;= ;re y;rla Star Points hgf;ys fmkaúh hq;=h' ,l=Kq 50 fyda 50 g
jvd jeäjQ úgoS idud¾:h C f,i;A ks,A meyefhka ;re ;=kla fmkaúh hq;=h'
,l=Kq 35 fyda 35 g jvd jeäjQ úgoS idud¾:h S o ly meyefhka ;re folla
fmkaúh hq;= fjhs¡ ,l=Kq 35 lg jvd wvqjQ úg l¿ meyefhka hq;= tl ;rejla
fmkaúh hq;= w;r idud¾:h jYfhka F f,i fmkaúh hq;=h' fyd|hs oeka Tng fuu
jevigyfkys l%shdldÍ;Ajh f;Areï hkakg we;ehs lshd wfmalaId lruq¡ Grade tl
iy Star Points fmkaùug m%:ufhka m,uqj tu úIhhka j,g wod, ,l=Kqj,
idudkH w.h .Kkh lr.; hq;=fjhs¡ ta i|yd Get Grade nÜka tl vn,A la,sla
lr fldaâ úkafvda tl ;=, my; mßos fla;kh lrkak¡
fyd|hs wms oeka ,l=Kqj, idudkH w.h .Kkh lrf.k wjidkh' oeka
isÿlsÍug we;Af;A fuu ,efnk idudkH ,l=Kqj,g wod, Grade tl iy Star
Points m%udKh fmkaùug wod, fla;kh isÿlsÍug fjhs¡ fyd|hs nÜka tl ;=,
by;ska i|yka lrk,o fla;khg my,ska my; mßos fla;kh lrkak¡
fuysoS .Kkh lr.;A ,l=Kq 75 fyda 75 g jvd jeäoehs i,ld n,k f,ig fla;kh
lr we;' hï fyhlska tfiajQfha kï tkï .Kkh lr.;A ,l=Kq 75 fyda 75 g
jvd jeäjQfhakï Grade tl fmkajk fglaiaÜ fndlaia tl ;=, idud¾:h jYfhka
A fmkajk f,ig fla;kh lr we;' tfukau Star Points f,i ;re i,l=Kq 5 la o
fmkajk f,ig fla;kh lr we;' ;re ish,a,lau r;= meyefhka fmkaùu i|yd
fglaiaÜ fndlaia tflys wl=rej, j¾Kh r;= mdáka fmkaùug fla;kh lr we;'
ForeColor fm%dmá tl Ndú;d lsÍfuka lsishï fglaiaÜ fndlaia tll fmkajk
wl=re j, j¾Kh fjkia lsÍfï yelshdj we;' fyd|hs fï wdldrhgu wksl=;A
fla;khkao isÿlr.kak¡ fuysoS óg wod, iïmQ¾K fla;khu i|yka lr we;'
fyd|hs by; fla;kh Tng ukdj jegfykakg we;ehs lshd wms wfmalaId lruq¡
oeka fuu tla tla fldkafoaishg wfkl=;A fldkafoais ine|s b*A iafÜÜukaÜ
wdldrfhys l%shdldÍ;Ajh f;Areï .ksuq¡ by; jevigyfkys ,ndÿka ,l=Kq j,g
wkqj idudkH ,l=Kq m%udKh 68 la ,enqfõhehs is;kak¡ fuúg fuu b*A
iafÜÜukaÜ tlg wod, fla;kh l%shd;aulùfïoS m,uq b*A iafÜÜukaÜ tflysoS
wms uq,skau n,uq fm%da.%ia nd¾ lkafg%da,A tl l=ulao hkak iy tys Ndú;h' lsishï
uDÿldx.hla mß.Klhg bkaiafgda,A lsÍfïoS th fl;rï m%udKhlg bkaiafgda,A
ù we;Aoehs hk m%.;sh fmkaùug" lsishï *hs,A tlla msgm;A lsÍfïoS tys msgm;A
ù we;s m%udKh jeks lsishï ld¾hhla isÿlrk úgoS tys m%.;sh fmkaùu i|yd
fm%da.%iand¾ lkafg%da,A tl Ndú;d lrkq ,nhs¡ tu ksid fuu lkafg%da,A tl
uDÿldx. ks¾udKfhaoS b;d jeo.;A fufyhla bgq lrkq ,nhs¡
ghsu¾ lkafg%da,A tl .;Aúg th wfkla lkafg%da,A j,g jvd úiañ; lkafg%da,A tlla
fjhs¡ lsishï wdj¾; ld,hlg jrla ksrka;rfhka hula isÿlsÍug wjYHjQúg ta
i|yd ghsu¾ lkafg%da,A tl Ndú;d lrkq ,nhs¡ f;ArefKA keoao@ WodyrKhla f,i
Tn lsishï nÜka tlla la,sla l,úg mß.Klfhys fõ,dj fmkaùug
jevigykla ks¾udKh lf,Ahehs is;kak' fuúg nÜka tl la,sla l,úgoS
muKla tu fudfydf;A mß.Klfhys igykaj we;s fõ,dj fmkajkq ,nhs¡
fuysoS ksrka;rfhkau iajhxl%Shju fõ,dj ,nd.ekSugkï ;;Amrhla ;;Amrhla
mdidu tu nÜka tl la,sla l,hq;= fjhs¡ kuq;A ghsu¾ lkafg%da,A tl ;=, wdj¾;
ld,h f,i ;;Amr 1 la ilialr th ;=, fõ,dj fmkaùu i|yd fla;kh
l,úg iEu ;;AmrhloSu th ;=, fla;kh uqodyßkq ,nhs¡ fuúg ;;Amrhla
;;Amrhla mdidu ghsu¾ lkafg%d,A tflys bfjkaÜ tl uq,isg l%shd;Auljk
neúka ksrka;rfhkau ;;Amrfhka ;;Amrh fjkiajk j;Auka fõ,dj fmkajkq
,nhs¡ fuh wms ir< WodyrKhlska f;Areï.ksuq¡ fuu újD; lrf.k we;s
jHdmD;sh tf,iu mj;soaoS w¿f;kau iagd¾Ü fukq tl Ndú;d lrñka w¿;A
jHdmD;shla wdrïNlr tys we;s f*daï tlg ghsu¾ lkafg%da,A tlla iy f,An,A
lkafg%da,A tlla we;=,;A lr.kak¡ oeka f*daï tlg my,ska olakg ,efnk
ghsu¾ lkafg%da,A tl isf,lAÜ lr fm%dm¾àia úkafvda tflys Interval fm%dmá tl
bosßfhys 1000 f,i w.h fjkia lrkak¡ fuysoS wdj¾;ld,h ilia lrkq ,nkafka
Interval fm%dmá tl Ndú;d lsÍfuks¡ fuh ilia lrkq ,nkafka ñ,s;;Amr j,sks¡
tkï ñ,s;;Amr 1000 la ;;Amr tlla nj isys;nd.kak¡ fuh 1000 f,i ilia
l,úg iEu ñ,s;;Amr 1000 la fyj;A iEu ;;Amrlg jrla fuys ,shd we;s
fla;kh uqodyßkq ,nhs¡ fyd|hs ghsu¾ lkafg%da,A tl vn,A la,sla lr fldaâ
úkafvda tflys Tick bfjkaÜ tl ;=, my; mßos fla;kh lrkak¡
Timer1.Start ()
fyd|hs Tnj mqÿuhg m;Alrjñka fõ,dj os.gu fmkaùu isÿlrkq ,nhs¡ fuysoS
mqÿuùug fohla fkdue;' wms fla;kh isÿlf,A ghsu¾ lkafg%da,A tflys Tick
bfjkaÜ tl ;=,h' fuúg ,ndoS we;s wdj¾;ld,hlg wkqj ksrka;rfhka tys
fla;kh uqodyßkq ,nhs¡ WodyrKhla f,i fuu ghsu¾ lkafg%da,A tl ;=, Beep
() fu;â tl i|yka lr jevigyk Odjkh lrn,kak¡ úkafvdaia fufyhqï
moaO;sfhys olakg ,efnk îma y`v ,nd.ekSu i|yd Beep () fu;â tl Ndú;d
lrkq ,nhs¡ fuúg iEu ;;Amrhla mdidu îma y`v kdoùu isÿfjhs' fyd|hs Tng
ghsu¾ lkafg%da,A tl ms,sn|j o, jegySula ,efnkakg we;ehs lshd wm úYajdi
lruq' wms oeka kej;;A wfma jevigyk fj; fhduqfjuq¡ fuu jevigyfkys
Enter User Name bosßfhys we;s fglaiaÜ fndlaia tl ;=, ksjerosu hQi¾ fkaï tl
iy Enter Password bosßfhys we;s fglaiaÜ fndlaia tl ;=, ksjerosu mdiaj¾â
tl ,ndoS OK nÜka tl la,sla l,úg fjku f*daï tll we;s jeo.;A o;A;
n,d.ekSug yelsúh hq;=h' fuysoS ksjerosu hQi¾ fkaï tl admin jk w;r
mdiaj¾â tl fyj;A wjir moh jkqfha 1234 fjhs¡ yenehs fuf,i hQi¾ fkaï tl
iy mdiaj¾â tl fjk;A mqoa.,hl=g w;Ayodne,Sug ld,h ,ndfokqfha fm%da.%iand¾
tl iïmQ¾Kfhkau msÍ wjidk fjk f;la muKs¡ tu msfrk ld,h we;=,;
fjk;A mqoa.,hl=g hQi¾ fkaï tl iy mdiaj¾â tl yßhgu admin iy 1234
,ndfok f;la w;ayodne,sh yel' tu ld,h we;=,; ksjeros hQi¾ fkaï tl iy
mdiaj¾â tl ,ndoSug fkdyelsjqjfyd;A fm%da.%iand¾ tl msÍ wjika jkjd;A
iu`.u iïmQ¾Kfhkau jevigyk Odjkhùfuka bj;Aúh hq;=h' fyd|hs fuu
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
jevigyfkys jeo.;A f;dr;=re fmkaùu i|yd ;j;a f*daï tlla wjYHùu
isÿfjhs¡ idudkHfhka úIqj,A fíisla mß.Kl NdIdj ;=<oS fm%dfclaÜ tlla
wdrïNl,miq jevigykla ks¾udKh lsÍu i|yd ,efnkafka tla f*daï tlla
muKs¡ ;j;a w¿;A f*daï tlla ,nd.ekSu i|yd úIqj,a iagqäfhda úkafvda tflys
ol=Kqmi by, fl,jfrys we;s Solution Explorer úkafvda tflys fm%dfclaÜ fkaï
tl u; rhsÜ la,sla lr olakg ,efnk fukq tflka Add úOdkh f;dard olakg
,efnk fukq tflka New Items fukq úOdkh wkq.ukh lrkak¡
fuúg Add New Items vhf,d.A fndlaia tl olakg ,efnhs¡ fuys jïmi we;s
,ehsia;=fjka Windows Form hkak f;dard Bg bosßfhka we;s Windows Form hk
wdldrh f;dard Add nÜka tl la,sla lrkak¡
fyd|hs wms oeka fuu jevigyfkys l%shdldÍ;Ajh f;Areï .ksuq¡ fuysoS Number 1
hgf;A we;s fglaiaÜ fndlaia tl" Number 2 hgf;A we;s fglaiaÜ fndlaia tl
iy Number 3 hgf;A we;s fglaiaÜ fndlaia tl ;=, úúO fõ.j,ska hq;=j wyUq
f,i 0 isg 9 olajd jQ w.hka fmkaúh hq;=h' fuu wyUq f,i fmkajk iEu
w.hlau mQ¾K w.hka úhhq;=h' fuf,i w.hka fmkaúh hq;Af;A Start nÜka tl
la,sla l,úgoSh' fuf,i úúO fõ.j,ska hq;=j w.hka fmkaùug wm ghsu¾
lkafg%da,A tl Ndú;d lrkq ,nhs¡ fyd|hs fuf,i úúO fõ.j,ska hq;=j wyUq w.hka
fmkajk úgoS Stop nÜka tl la,sla l,úg tu fmkajk w.hka k;rùu isÿúh
hq;=h' w.hka fmkaùu k;rjQúg hï f,ilska fglaiaÜ fndlaia ;=fkysu w.h
jYfhka 7 ,eî ;snqKfyd;A Marks bosßfhys fglaiaÜ fndlaia tl ;=, ,l=Kq
jYfhka TextBox4 ys oekg ;sfnk ,l=Kq j,g 500 la tl;=ùu isÿúh hq;=h'
tfukau by; fglaiaÜ fndlaia ;=fkka l=uk fyda fglaiaÜ fndlaia tlla ;=, 7
,eî ;snqKfyd;A oekg ;sfnk ,l=Kq j,g 50 la tl;=ùu isÿúh hq;=h' tfukau
TextBox1 ys yd TextBox2 ys muKla 7 ,eî ;snqKfyd;A oekg ;sfnk ,l=Kq j,g
fuu w.hka fmkaúh hq;Af;A Start nÜka tl la,sla l,úgoS neúka Load bfjkaÜ
tl ;=, we;s Timer1.Start () hk fla; fldgi bj;Alr Start nÜka tl vn,A la,sla
lr tys la,sla bfjkaÜ tl ;=, Timer1.Start () f,i fla;kh lr jevigyk
Odjkh lr Start nÜka tl la,sla lr n,kak¡ Tnj mqÿuhg m;Alrjñka
jevigyfkys wyUq w.hka TextBox1 lkafg%da,A tl ;=< fmkajkq ,nhs¡ kuq;A Tn
fjk;A fm%dfclaÜ tlla wdrïNlr tys f*daï tlg nÜka lkafg%da,A tlla
,ndf.k thg Timer1 lkafg%da,A tl ;=, ,shk,o fla;kh ,shd jevigyk
Odjkh lr nÜka tl la,sla lr n,kak¡ fuysoS ie,ls,af,ka ne¨jfyd;A
jevigyk Odjkh lr nÜka tl la,sla lrk iEu wjia:djloSu wyUq w.hka
fmkajqjo th fmkajkq ,nkafka tlu rgdjlg fjhs¡ tu ksid fuu fmkajk
w.hka tlu rgdjlg fkdj tu rgdjo wyUq f,i iliaùu i|yd úIqj,a fíisla
fvdÜfkÜ mß.Kl NdIdj ;=, Randomize () fu;â tl Ndú;d lrkq ,nhs¡
fyd|hs tfiakï wmf.A jevigyfkys ghsu¾ lkafg%da,A ;=kgu wod, fla;kh
my;ska bosßm;A lr we;' Timer2 lkafg%da,A tflys Interval tl 100 f,io" Timer3
lkafg%da,A tflys Interval tl 50 f,i ilia lsÍug wu;l fkdlrkak¡
fuu ghsu¾ lkafg%da,A ;=fkysu wyUq f,i fmkaùug wod, fla;kh l%shd;Aulúh
hq;af;a Start nÜka tl la,sla l,úgoS neúka fuu nÜka tl vn,a la,sla lr la,sla
bfjkaÜ tl ;=, my; mßos fla;kh lrkak¡ fuysoS Start nÜka tl la,sla lrkúg
Stop nÜka tl la,sla lsÍfï wjYH;djhla mek fkdk.sk neúka jevigyk
Odjkhjkúg th la,sla lsÍug fkdyelsjk f,i ;djld,slj wl%shlr .ekSu
i|yd f*daï tflka Stop nÜka tl f;dard fm%dm¾àia úkafvda tflka Enabled
fm%dmá tl False lr ;nkak¡ fuu Start nÜka tl la,sla l,úg wyUq w.hka
fmkajkúg hï wjia:djloS th k;r lsÍug isÿjk neúka kej;;A Stop nÜka
tl il%sh lr.ekSu i|yd thgo fla;kh l,hq;Af;A Start nÜka tl ;=, fjhs¡
fyd|hs fuf,i wyUq w.hka fmkajk úgoS Stop nÜka tl la,sla l,úgoS tu wyUq
w.hka fmkaùu k;rùu isÿúh hq;=h' tfukau ,eî we;s wyTq w.hka wkqj ,l=Kq
ysñùu isÿfjhs¡ fuf,i wyUq w.hka f,i fglaiaÜ fndlaia ;=fkysu 7 hk w.hka
;=kla olakg ,efnkúg mj;sk ,l=Kq j,g 500 la ysñùu isÿfjhs¡ fuysoS
fglaiaÜ fndlaia ;=fkysu w.h 7 ùu hkq wksjd¾fhkau fglaiaÜ fndlaia
;=fkysu w.hka 7 ùu wksjd¾h úhhq;=h' tkï fglaiaÜ fndlaia ;=kgu tljr 7
,eîu hkq fldkafoais ;=ku 7 ùu fyj;A i;Hùu ksid Ndú;d l,hq;Af;A And
Tmf¾g¾ tl fjhs¡ fyd|hs ta i|yd Stop nÜka tl ;=, my; mßos fla;kh lrkak¡
ghsu¾ lkafg%da,Aia ish,A, l%shd;Aulùu k;r lsÍu i|yd Stop fu;â tl Ndú;d
lrñka ta i|ydo fla;kh fuys ,shd we;'
fuu Stop nÜka tl la,sla lrkjd;A iu`.u kej;;A Stop nÜka tl la,sla lsÍug
fkdyelsjk f,ig wl%sh lr.ekSu i|yd Button2.Enabled = False f,ig
fla;kh lr we;' kuq;A fuu fla;kfhys wka;sug ,shd we;s b*A iafÜÜukaÜ
;=ku wmg ;ks b*A iafÜÜukaÜ mÍlaId l, yel' ta wkqj th my; oelafjk
mßos fla;kh l, yel'
idudkHfhka f*daï tlla ;=,oS tla wjia:djloS f¾äfhda nÜka j,ska f;dard.ekSfï
yelshdj mj;skafka bka tlla muKs¡ kuq;A Tng fjka fjka jYfhka tljr
f¾äfhda nÜka folla f;dard.ekSug wjYHjQjdhehs is;kak¡ fuúg tajd
wksjd¾fhkau fjk fjku .ArEma fndlaia ;=, fjka fjka jYfhka msysgqjd .;
hq;=fjhs¡ fyd|hs jevigyfkys w;=reuqyqK; my; rEmfha oelafjk wdldrhg
ks¾udKh lr.kak¡ fuysoS wm jevigyk ks¾udKh lsÍfï myiqj i|yd
fla;khg jeo.;Ajk lkafg%da,Aia kïlr we;' th fï rEmigyk iu`. olajd
we;'
fuys fldgq lr we;s fla;kh foig muKla wjOdkh fhduq lrkak¡ lsishï
f¾äfhda nÜka tlla f;dard we;ao ke;ao hk j. fidhd .ekSug Checked fm%dmá
tl Ndú;d lrkq ,nhs¡ lsishï f¾äfhda nÜka tlla la,sla lr we;s úg fuh True
ùuo tfia fkdue;súg False f,io iliaùu isÿfjhs¡ fuysoS b*A iafÜÜukaÜ tlla
u.ska HR j,g wod, f¾äfhda nÜka tl iu`. EPF/ETF hgf;A we;s RadioButton5
hk lkafg%da,A tl la,sla lr we;Aoehs úuid n,d we;' tfia f;dard we;akï Basic
Salary tlg tu jegqfmka 20% l Allowance tlla tl;=ùugo" tfukau thgu
Meal Allowance tl;=ùug fla;kh lr we;' fuu ,enqK iïmQ¾K tl;=fjka"
Basic Salary tflka 10% l m%udKhla EPF/ETF tl jYfhka .Kkhù wvqjk
f,ig fla;kh lr we;' fyd|hs fuu radhr f¾äfhda nÜka tl iu`.
RadioButton6 iy RadioButton7 hk f¾äfhda nÜka la,sla l, ;sìh yelsoehs
;¾l lrñka ta i|yd fla;kh l,hq;= fjhs¡ fyd|hs tu radhr f¾äfhda nÜka
tlg wod, iïmQ¾K b*A iafÜÜukaÜ iy wksl=;A f¾äfhda nÜka j,g wod,
iïmQ¾K fla;kh my;ska bosßm;A lr we;'
fyd|hs by; fla;kh Tng ukdj jegfykakg we;ehs lshd wms wfmalaId lruq¡
fuu bfjkaÜ tlla ;=, fla;kh lsÍu yßhg weúosñka" ksod.ksñka" ÿjñka" mksñka
hï ld¾hhla isÿlsÍulg iudkl, yel' fuu bfjkaÜia Ndú;d lrñka b;du;a
wdl¾IKSh wkaoñka jevigyka ks¾udKh lsÍfï yelshdj we;' fyd|hs wms oeka
Disapamok Online IT Academy
jevigyka ks¾udKh lsÍfïoS nyq,j Ndú;d lrkq ,nk bfjkaÜia lsysmhla
y÷kd.ksuq¡
MouseMove
fuh f*daï tl iy f*daï tlg ,nd.kq ,nk fndfyduhla lkafg%da,Aia ;=, olakg
,efnk bfjkaÜ tlla fjhs¡ lsishï lkafg%da,A tlla fj;g ujqia fmdhskag¾ tl
f.k tk wjia:dj fukau tu lkafg%da,A tl u; ujqia fmdhskag¾ tl yiqrjk
wjia:dj fuu MouseMove bfjkaÜ tl jYfhka y÷kajkq ,nhs¡ Tn iuyrla
jevigyka ;=, lsishï fglaiaÜ tlla u;g ujqia fmdhskag¾ tl f.k wd úg tys
meyeh fjkiajk wjia:d fldf;l=;A oel we;' b;ska úIqj,A fíisla fvdÜfkÜ
mß.Kl NdIdj ;=, kï ta i|yd fla;kh l,hq;Af;A MouseMove bfjkaÜ tl
;=, fjhs¡ fyd|hs fuh f;Areï.ekSu i|yd wms ir< jevigykla ks¾udKh lr
n,uq¡ fuh w;Ayodne,Su i|yd w¿;A fm%dfclaÜ tlla wdrïN lrkak' fï i|yd
f,An,A lkafg%da,A ;=kla muKla iEySu isÿfjhs¡ oeka fuh my; rEmigyfkys
oelafjk mßos f*daï tl ks¾udKh lr.kak¡ fuysoS f,An,A lkafg%da,A ;=fkys Font
fm%dmá tl Ndú;d lrñka wl=rej, m%udKh f,i 24 hk w.h ,ndoS we;'
fuys Red f,An,h u;g ujqia fmdhskag¾ tl f.k wd úg f*daï tflys miqìu
r;=mdg úhhq;= w;r Green f,An,h u;g ujqia fmdhskag¾ tl f.k wd úg f*daï
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
tflys miqìu fld, mdg úhhq;=h' tfukau Blue f,an,h u;g ujqia fmdhskag¾
tl f.k wd úg f*daï tflys miqìu ks,amdg úhhq;=h' iEu f,an,hlskau ujqia
fmdhskag¾ tl bj;g .;Amiq f*daï tflys miqìï j¾Kh uq,ska ;snQ j¾Kh njg
m;Aúh hq;=h' fyd|hs tfia kï fï i|yd fla;kh l,hq;Af;A tla tla f,An,A
lkafg%da,Aj, MouseMove bfjkaÜ tl ;=, nj Tng meyeos,súh hq;=h' ta i|yd Red
f,An,h u; vn,A la,sla lr fldaâ úkafvda tl ,nd.kak¡ fuysoS iEu lkafg%da,A
tllau .;Aúg fldaâ úkafvda tl ;=, olakg ,efnkafka tu lkafg%da,a tl ;=,
fla;kfhaoS jeä jYfhka Ndú;d lrkq ,nk bfjkaÜ tl fjhs¡ fuys f,An,A tflys
olakg ,efnkafka Click bfjkaÜ tl fjhs¡ kuq;A wmg wjYH MouseMove bfjkaÜ
tl neúka fldaâ úkafvda tflys ol=Kqmi by, fl,jfrys olakg ,efnk bfjkaÜia
,ehsia;=fjka MouseMove bfjkaÜ tl f;dard.;Aúg fla;kh lsÍu i|yd Bg wod,
bfjkaÜ tl fldaâ úkafvda tl ;=, olakg ,efnhs¡
fuysoS f*daï tl fyj;A la,dia tlla ;=, we;s lkafg%da,A tll tu la,dia tflysu
lsishï fjkilg wod,j fla;kh isÿlrk úgoS la,dia tflys ku wrUkqfha Me
f,i i,lñka fjhs¡ fyd|hs fuu f,An,A j,ska ujqia fmdhskag¾ tl bj;g .;Aúg
f*daï tflys l,ska mej;s j¾Khu mej;sh hq;=h' f,An,A j,ska ujqia fmdhskag¾
tl bj;g .ekSu hkq f*daï tl u;g ujqia fmdhskag¾ tl f.k tk wjia:dj
fjhs¡ fyd|hs Bg wod, fla;kh isÿlsÍu i|yd f*daï tl u; vn,A la,sla lr
fldaâ úkafvda tl ,nd.kak¡ fuúg f*daï tflys iïu; bfjkaÜ tl jYfhka
olakg ,efnkafka Load bfjkaÜ tl fjhs¡ l¾i¾ tl tfia mj;soaoSu ol=Kqmi by,
,ehsia;=fjka MouseMove bfjkaÜ tl f;dardf.k my; mßos fla;kh lrkak¡
tu ksid wm l,ska iq/l=ï lr.;A mska;+r iys; f*da,Av¾ tl fuu debug f*da,Av¾
tl ;=,g fldms lr.kak¡ ukao iEu lïmhs,A ùuloSu tu Application *hs,A tl ilia
jkafka fuu debug f*da,Av¾ tl ;=< ùuh' fuúg fuu Application *hs,A tl mj;sk
f*da,Av¾ tl ;=,u images f*da,av¾ tl ;=< wod, mska;+r we;s neúka fla;kfhaoS
mska;+rfhys md;A tl ,ndfokúg tu md;A tflys fuu mska;+r wvx.= v%hsõ tl
wdosh i|yka lsÍu wkjYH fjhs¡ fuu tla tla f,An,A u;g ujqia fmdhskag¾ tl
f.k .shúg mslap¾ fndlaia tl ;=, wod, mska;+r fmkaúh hq;=neúka fla;kh
l,hq;Af;A tla tla f,An,A j, MouseMove bfjkaÜ tl ;=< fjhs¡ fyd|hs ta i|yd
Sigiriya f,i i|yka f,an,h u; vn,A la,sla lr fldaâ úkafvda tl ,nd.kak¡
fuúg f,An,A lkafg%da,A tflys iïu; bfjkaÜ tl jYfhka olakg ,efnkafka
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
Click bfjkaÜ tl fjhs¡ kuq;A wmg wjYH MouseMove bfjkaÜ tl ksid ol=Kqmi
by, ,ehsia;=fjka MouseMove bfjkaÜ tl f;dard.kak¡ fuúg Bg wod, bfjkaÜ
tl fldaâ úkafvda tl ;=, olakg ,efnhs¡ PictureBox tl ;=, lsishï mska;+rhla
fmkaùu i|yd Image fm%dmá tl Ndú;d lrkq ,nhs¡ fuf,i mslap¾ fndlaia
tllg mß.Klfhys lsishï ia:dkhl olakg ,efnk mska;+rhla fmkaùu i|yd
Image la,dia tflys FromFile fu;â tl Ndú;d lrkq ,nhs¡ fyd|hs ta wkqj my;
mßos fla;kh lrkak¡
oeka jevigyk Odjkh lr neÆúg Tnj mqÿuhg m;Alrjñka wod, mska;+rh olakg
,efnhs¡ fyd|hs fï wdldrhg wksla f,An,A j,o MouseMove bfjkaÜ tl ;=,
my; mßos fla;kh lrkak¡
Tng oeka fuu bfjkaÜ tl ms,sn|j ukd jegySula ,efnkakg we;ehs lshd wms
wfmalaId lruq¡
TextChanged
fuh fndfydaúg fglaiaÜ fndlaia lkafg%da,A tlg wdfõKsl bfjkaÜ tlla jYfhka
ye|skajQjdg jrola ke;' lsishï fglaiaÜ fndlaia tll wl=re ,ndfok wjia:dj
fyda ;sfnk wl=re fjkia lrk wjia:dj fuu bfjkaÜ tl jYfhka y÷kajkq
,nhs¡ fuu bfjkaÜ tl ukdj f;Areï .;yels ;j;a l=vd jevigykla
w;Ayodn,uq¡ fyd|hs fï i|yd f,An,A lkafg%da,A ;=kla" fglaiaÜ fndlaia lkafg%da,A
;=kla muKla iEfyhs¡ fyd|hs oeka my; oelafjk wdldrhg f*daï tl äihska
lr.kak¡
fuys First Name bosßfhys we;s fglaiaÜ fndlaia tl ;=, kfï m,uq fldgi i|yka
lrkúg Full Name bosßfhys we;s fglaiaÜ fndlaia tl ;=, kfï m,uq fldgi
fmkaúhhq;= w;r Last Name bosßfhys we;s fglaiaÜ fndlaia tl ;=, kfuys w.
fldgi ,ndfokúg th Full Name bosßfhys we;s fglaiaÜ fndlaia tl ;=, ysia
;ekla iys;j kfuys b;sß fldgi fmkaúh hq;=h' fuysoS fglaiaÜ fndlaia j,
ghsma lrk úgoSu iïmQ¾K ku fmkaúh hq;= neúka fla;kh l,hq;Af;A
TextChanged bfjkaÜ tl ;=, fjhs¡ fuysoS kfï m<uq fldgi iy wjidk fldgi
ghsma lrkúgoS Bg wkqrEmj iïmQ¾K ku fmkaúh hq;= neúka fla;kh l,hq;Af;A
TextBox1 yd TextBox2 lkafg%da,Aj, TextChanged bfjkaÜ tl ;=, fjhs¡ fyd|hs ta
i|yd TextBox1 lkafg%da,A tl vn,A la,sla lr fldaâ úkafvda tl ,nd.kak¡ fglaiaÜ
fndlaia lkafg%da,Aj, iïu; bfjkaÜ tl jYfhka olakg ,efnkafkao
TextChanged bfjkaÜ tl fjhs¡ fyd|hs th ;=, oeka my; oelafjk mßos fla;kh
lrkak¡
fuh Form tlla ;=, olakg ,efnk bfjkaÜ tlla jYfhka ye|skaúh yel' f*daï
tll fl<jrlg ujqia fmdhskag¾ tl f.kf.dia la,sla lr v%e.A lrñka f*daï
tflys m%udKh fjkia lrk wjia:dj Resize bfjkaÜ tl jYfhka y÷kajkq ,nhs¡
fuh fndfyduhla jevigyka j, m%dfhda.slju Ndú;d lrkq ,nk bfjkaÜ tlla
jYfhka ye|skaúh yel' WodyrKhla f,i úkafvdaia fufyhqï moaO;sh ;=, olakg
,efnk NotePad jevigyk i,luq¡ fuysoS fkdaÜmEâ úkafvda tl m%;sm%udKh tkï
os. m<, fjkia lrkúg thg wkqrEmj tu m%udKhgu tys we;s iqÿ meye;s fglaiaÜ
fndlaia tflys m%udKho fjkiaùu isÿfjhs¡ Tn ks¾udKh jevigyklgo fujeks
wdldrhg ilia lr.ekSu i|yd wmg Resize bfjkaÜ tl Ndú;d l,yel' fyd|hs
wms tjeks wdldrhlg fla;kh lrkq ,nkafka flfiao lshd n,uq¡ fï i|yd
fglaiaÜ fndlaia lkafg%da,A tlla muKla iEfyhs¡ fuu fglaiaÜ fndlaia lkafg%da,A
tl f;dardf.k fm%dm¾àia úkafvda tflka Multiline fm%dmá tl True lr ScrollBar
fm%dmá tl Both wdldrfhka ilialr fglaiaÜ fndlaia tl i|yd iafl%d,And¾ia
we;=,;A lr.kak¡ oeka f*daï tl u; vn,A la,sla lrkak¡ fuúg f*daï tflys
iïu; bfjkaÜ tl jYfhka olakg ,efnkafka Load bfjkaÜ tl fjhs¡ kuq;A wmg
wjYH Resize bfjkaÜ tl ksid fldaâ úkafvda tflys ol=Kqmi by, ,ehsia;=fjka
Resize bfjkaÜ tl f;dard my; mßos fla;kh isÿlrkak¡
fuho iEu lkafg%da,A tllu mdfya olakg ,efnk bfjkaÜ tlls¡ fuh MouseMove
bfjkaÜ tflys úreoaO bfjkaÜ tl jYfhkao ye|skajQjdg jrola ke;' lsishï
lkafg%da,A tllska ujqia fmdhskag¾ tl bj;g .kakd wjia:dj fuu bfjkaÜ tl
jYfhka ye|skaúh yel' WodyrKhla f,i f*daï tl u; ;snQ ujqia fmdhskag¾ tl
f*daï tflka bj;g .kakjd;A iu`.u uq¿ jevigyku Odjkfhka bj;Aùug
wjYHkï ta i|yd fuu bfjkaÜ tl Ndú;d l,yel' fyd|hs ta i|yd f*daï tl
u; vn,A la,sla lr MouseLeave bfjkaÜ tl f;dard my; mßos fla;kh lrkak¡
GotFocus
fuho iEu lkafg%da,A tllu mdfya olakg ,efnk bfjkaÜ tlla jYfhka ye|skaúh
yel' f*daï tlla ;=, lkafg%da,Aia lsysmhla olakg ,efnkúg h;=remqjrefjys we;s
Tab lS tl Ndú;d lrñka lsishï lkafg%da,A tlla il%sh lrk wjia:dj GotFocus
bfjkaÜ tl jYfhka y÷kajkq ,nhs¡ ;jÿrg;A meyeos,s l,fyd;A f*daï tlla ;=,
fglaiaÜ fndlaia lsysmhla olakg ,efnkúg lsishï fglaiaÜ fndlaia tlla fj;g
l¾i¾ tl ,nd.kakd wjia:dj tu fglaiaÜ fndlaia tflys GotFocus bfjkaÜ tl
jYfhka y÷kajkq ,nhs¡ fuho fndfyduhla jevigyka ;=, m%dfhda.slju Ndú;d
lrkq ,nk bfjkaÜ tlls¡ fuh wm ir< WodyrKhlskau f;Areï.ksuq¡
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
fuys Label4 lkafg%da,A tflys we;s fglaiaÜ tl bj;Alr f*daï tflys my,skau
msysgqjd we;' oeka fuu jevigyfkys l%shdldÍ;Ajh f;Areï.ksuq¡ fuysoS Enter
Password bosßfhys we;s fglaiaÜ fndlaia tl ;=, lsishï mdiaj¾â tlla i|yka
l,miq Re Enter Password bosßfhys thuo kej; jrla ghsma l,hq;= fjhs¡ hï
fyhlska fuu ,ndÿka mdiaj¾â fkd.e,fmkúg y;rjk f,an,h ;=, Password
Mismatch. Try Again f,i fmkaúh hq;=h' ,ndoS we;s mdiaj¾â tl fglaiaÜ fndlaia
foflysu iudkjQúg Password Correct f,i tu f,An,h ;=, fmkaúh hq;=h' by;
wdldrhg fmkaúh hq;Af;A User Name bosßfha we;s fglaiaÜ fndlaia tl ;=,g l¾i¾
tl ,nd.kakd úgoSh' tfiakï ta i|yd fla;kh l,hq;Af;A GotFocus bfjkaÜ tl
;=, nj Tng meyeos,súh hq;=h' fyd|hs ta i|yd TextBox3 lkafg%da,A tl vn,A la,sla
lr fldaâ úkafvda tl ,nd.kak¡ oeka bfjkaÜ tl jYfhka GotFocus bfjkaÜ tl
f;dard my; mßos fla;kh lrkak¡
fyd|hs fuys Enter Address bosßfhys olakg ,efnk fglaiaÜ fndlaia tl ;=, l¾i¾
tl msysgqjk úgu Enter Name bosßfhys olakg ,efnk fglaiaÜ fndlaia tl ;=,
i|yka lrk,o kfuys ish¿u wl=re lemsg,A úhhq;= w;r tfukau tu kfuys
bosßfhka iy msgqmiska ;nd we;s wkjYH bv m%udKhka bj;Aùu isÿúh hq;=h' tfia
kï fla;kh l,hq;Af;A fojk fglaiaÜ fndlaia tflys GotFocus bfjkaÜ tl ;=,
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
nj Tng jegysh hq;=h' isïm,A wdldrfhka ghsma lr we;s wl=re lemsg,A wl=re njg
m;Alr.ekSu i|yd UCase kue;s *kalaIka tl Ndú;d lrkq ,nhs¡ tfukau
fglaiaÜ fndlaia tll lsishï fglaiaÜ tlla ,ndoS we;s wjia:djl tys bosßfhka
iy wjidkfhys ;nd we;s wkjYH ysia bv m%udKhka bj;A lr.ekSu i|yd Trim
hk fu;â tl Ndú;d lrkq ,nhs¡ fyd|hs ta i|yd my; mßos fla;kh lrkak¡
LostFocus
fuysoS tl;=l, yels w.hka folla ,ndoS we;súg ;=kajk fglaiaÜ fndlaia tl ;=,
l¾i¾ tl msysgqjkjd;A iu`.u w.hka foflys tl;=j fmkaùug fla;kh lr
we;' fyd|hs fuu LostFocus bfjkaÜ tl ;jÿrg;A m%dfhda.slj Ndú;d lrk wdldrh
ms,sn|j wjfndaO lr.ekSu i|yd ;j;a l=vd jevigykla ks¾udKh lruq¡ fï
i|yd w¿;A fm%dfclaÜ tlla újD; lr.kak¡ f,An,A lkafg%da,A ;=kla iy fglaiaÜ
fndlaia lkafg%da,A ;=kla muKla fï i|yd iEfyhs¡ oeka my; oelafjk wdldrhg
f*daï tl äihska lr.kak¡
fglaiaÜ fndlaia tll mdiaj¾â tlla we;=,;A lsÍug Ndú;d lrk wjia:dj,oS tu
mdiaj¾â tflys wl=re fjkqjg fjk;A i,l=Kla fmkaùu i|yd PasswordChar
fm%dmá tl Ndú;d lrkq ,nhs¡ fuysoS m<uq fglaiaÜ fndlaia tflka l¾i¾ tl
bj;Ajkjd;A iu`.u tys wl=re fjkqjg PasswordChar fm%dmá tl yryd ;re
i,l=Kq fmkaùug fla;kh lr we;' fï wdldrhgu fojk fglaiaÜ fndlaia
tflys LostFocus bfjkaÜ tl ;=, my; mßos fla;kh lrkak¡
fuysoS PasswordChar fm%dmá tflys ,ndoS ;snQ ;re i,l=K bj;A l,úg iqmqreÿ mßos
tys ghsma lr we;s foa ta wdldrfhka n,d.ekSfï yelshdj we;' fuu GotFocus iy
LostFocus bfjkaÜ fol Ndú;d lrk wdldrh wjfndaO lr.ekSug wms ;j;a
jevigykla ks¾udKh lruq¡ fï i|yd w¿;A fm%dfclaÜ tlla wdrïNlr f,An,A
lkafg%da,A 4 la iy fglaiaÜ fndlaia 4 la ,ndf.k my; oelafjk wdldrhg f*daï
tl äihska lr.kak¡
fuu jevigyfkys tla tla fglaiaÜ fndlaia lkafg%da,A ;=,g l¾i¾ tl f.k wdúg
oeka fuu l¾i¾ tl we;Af;A fuu fglaiaÜ fndlaia tl ;=, nj ye`.ùug fglaiaÜ
fndlaia tl lymdg úhhq;=h' kj;;A l¾i¾ tl bj;g .;Aúg l¾i¾ tl bj;Aù
we;s nj ye`.ùug l,ska j¾Khu jk iqÿmdg úhhq;=h' lsishï fglaiaÜ fndlaia
lkafg%da,A tlla u;g ujqia fmdhskag¾ tl f.k wdúg tys miqìu ly meye;s
úhhq;= kï fla;kh l,hq;Af;A GotFocus bfjkaÜ tl ;=, nj Tng jegysh hq;=h'
fyd|hs ta i|yd GotFocus bfjkaÜ tl ;=, my; mßos fla;kh lrkak¡ fuysoS
ish¿u fglaiaÜ fndlaia j, fla;khka bosßm;A lr we;'
fglaiaÜ fndlaia j,ska l¾i¾ tl bj;g .;AúgoS kej;;A fglaiaÜ fndlaia ;=,
mej;s j¾Kh fyj;A iqÿ meyeùug LostFocus bfjkaÜ tl ;=, my; mßos fla;kh
lrkak¡ ish¿u fglaiaÜ fndlaia j,g wod, fla;khka bosßm;A lr we;'
oeka fuu jevigyfkys l%shdldÍ;Ajh f;Areï .ksuq¡ fuysoS Full Name bosßfha we;s
fglaiaÜ fndlaia tl ;=, lsishï kula i|yka lr Enter lS tl tnQúg Address tl
i|yka lsÍug iajhxl%Shju TextBox2 lkafg%da,A tl fj; l¾i¾ tl meñKsh
hq;=fjhs¡ Address tl i|yka lr Enter lS tl tnQúg ID Number tl i|yka lsÍu
i|yd ;=kajk fglaiaÜ fndlaia tl fj; l¾i¾ tl meñKsh hq;= fjhs¡ fujeks
myiqlï we;s jevigyka Tn idudkHh Ôú;fhaoS oel we;=jdg iel ke;' fyd|hs
tla tla fglaiaÜ fndlaia j, hula ghsma l,miq Enter lS tl tnQúg l¾i¾ tl
wfkla fglaiaÜ fndlaia tl fj; .uka lsÍugkï fla;kh l,hq;Af;A ta ta fglaiaÜ
fndlaia j, KeyPress bfjkaÜ tl ;=, nj Tng oeka jegysh hq;=h' ta i|yd TextBox1
lkafg%da,A tl vn,A la,sla lr olakg ,efnk fldaâ úkafvda tflka ol=Kqmi by,
,ehsia;=fjka KeyPress bfjkaÜ tl f;dard.kak¡
fyd|hs oeka lS tlla Tnk úgoS ta Tnkafka Enter lS tlo hk j. ;yjre lr.;
hq;=fjhs¡ tfia kï Enter lS tflys ASCII w.h oek.; hq;=fjhs¡ Enter lS tlg wod,
ASCII w.h 13 fjhs¡ fyd|hs tfia kï TextBox1 ys KeyPress bfjkaÜ tl ;=, my; mßos
fla;kh lrkak¡
fuys fldgq lr we;s fla;kh foig muKla wjOdkh fhduq lrkak¡ fuys e hkq
l%shd;Auljk bfjkaÜ tl fufyhqï moaO;sh iu`. iïnkaO lrkq ,nk TífclaÜ tl
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
jYfhka ye|skaúh yel' fuys KeyChar bosßfhys we;s w.h lsishï ASCII w.hla njg
m;Alr.ekSug Asc fu;â tl Ndú;d lr we;' fuh 13 kï tkï Tnd we;Af;A Enter
lS tl neúka TextBox2 lkafg%da,A tl fj;g l¾i¾ tl f.k hk f,ig fla;kh
lr we;' fyd|hs wfkla fglaiaÜ fndlaia ;=,o fla;kh l,hq;Af;A by; lkafg%da,A
tlg wkqrEmj fjhs¡ my;ska óg wod, iïmQ¾K fla;kh bosßm;A lr we;'
Backspace lS tlg wod, ASCII w.h 8 fjhs¡ fyd|hs tfia kï fuu fglaiaÜ fndlaia
tl vn,A la,sla lr fldaâ úkafvda tl ,ndf.k tys KeyPress bfjkaÜ tl ;=,
my; mßos fla;kh lrkak¡
fuysoS Ndú;d l,hq;Af;A ASCII w.h 48 fyda 57 fyda ke;fyd;A ta w;r mj;sk ASCII
w.hkag wod, lS fjhs¡ tfia kï If Asc(e.KeyChar)>= 48 and Asc(e.KeyChar)<=57 hk
fyd|hs fuys Full Name bosßfha we;s fglaiaÜ fndlaia tl ;=, iïmQ¾K ku i|yka
lr Enter lS tl tnQúg fojk fglaiaÜ fndlaia tl fj;g l¾i¾ tl .uka l,hq;=
fjhs¡ fojk fglaiaÜ fndlaia tl ;=, Address tl i|yka lr Enter lS tl tnQúg ID
Number bosßfha we;s fglaiaÜ fndlaia tl ;=,g l¾i¾ tl .uka l,hq;= fjhs¡ fuu
fglaiaÜ fndlaia tflys l¾i¾ tl we;súg h;=remqjrefjys Esc lS tl tnQúg
kej;;A l¾i¾ tl Address bosßfha we;s fglaiaÜ fndlaia tl ;=,g .uka l,hq;=
fyd|hs wms fjkia j¾.fha jevigykla ks¾udKh lruq¡ fuu jevigyk i|yd
fm%dfclaÜ tflys wdrïNfhys olakg ,efnk f*daï tlg wu;rj ;j;a f*daï
tlla wjYHùu isÿfjhs¡ th ,nd.ekSu i|yd Project fukq tflys we;s Add
Windows Forms fukq úOdkh f;dard.kak¡ fuúg olakg ,efnk vhf,d.A fndlaia
tflka Windows Forms hk fgïmaf,AÜ tl f;AÍ we;s neúka Add nÜka tl la,sla
lrkak¡
oeka fid,shqIka tlaiamaf,dar¾ úkafvda tl foi neÆmiq Form2 kñka ;j;a w¿;A f*daï
tlla olakg ,efnhs¡ fm%dfclaÜ tl wdrïNfhys ,enqk Form1 ;=,g f,An,A
lkafg%da,A ;=kla iy fglaiaÜ fndlaia lkafg%da,A ;=kla ,ndf.k my; oelafjk mßos
f*daï tl äihska lrkak¡
fyd|hs oeka fojkshg ,nd.;A f*daï tlg nÜka lkafg%da,Aia y;rla ,ndf.k my;
rEmigyfkys olakg ,efnk wdldrhg tu f*daï tl äihska lr.kak¡
wms oeka fuu jevigyfkys l%shdldÍ;Ajh f;Areï.ksuq¡ fuys m<uq f*daï tflys
TextBox1 ys lsishï w.hla i|yka lr Enter lS tl tnQ miq TextBox2 fj; l¾i¾ tl
.uka l,hq;= w;r tyso lsishï w.hla i|yka lr Enter lS tl tnQ miq fojkshg
,nd.;A f*daï tl fmkaúh hq;=h' fuys + ,l=K iys; nÜka tl la,sla l,úg tu
,ndÿka w.hka foflys tl;=j m,uq f*daï tflys TextBox3 lkafg%da,A tl ;=,
fmkaúh hq;=h' fï wdldrhg - ,l=K iys; nÜka tl la,sla l,úg w.hka foflys
wka;rh;A / ,l=K iys; nÜka tl la,sla l,úg w.hka fol fnoSfuka ,efnk
m%;sM,h;A * ,l=K iys; nÜka tl la,sla l,úg w.hka foflys .=Ks;h;A TextBox3
lkafg%da,A tl ;=, fmkaúh hq;=h' fyd|hs TextBox1 ys lsishï w.hla i|yka lr Enter
h;=r ;o l,úg fojk fglaiaÜ fndlaia tl ;=,g l¾i¾ tl .uka lsÍug tys
KeyPress bfjkaÜ tl ;=, my; mßos fla;kh lrkak¡
fuysoS fglaiaÜ fndlaia ;=ku olakg ,efnkafka m,uq f*daï tl ;=, neúka
fla;kfhaoS tu lkafg%da,Aia fjk;A f*daï tlla ;=, Ndú;d lrkúgoS tu lkafg%da,Aia
j, kï ,ndoSug m%:ufhka tu lkafg%da,Aia mj;sk f*daï tflys ku i|yka
l,hq;= fjhs¡ Tng by; fla;kh ukdj wjfndaO jkakg we;ehs lshd wms wfmalaId
lruq¡ oeka jevigyk Odjkh lr n,kak¡
Tick
fuh b;du;a wdYAjdockl fukau úYauh okjk iq¿ bfjkaÜ tlla jYfhka
ye|skajQjdg jrola ke;' fuh ghsu¾ lkafg%da,A tl ;=, muKla olakg ,efnk
bfjkaÜ tlls¡ ghsu¾ lkafg%da,A tl ;=, Interval fm%dmá tl Ndú;d lrñka lsishï
ld,fõ,djla i|yka l,miq fuu bfjkaÜ tl iajhxl%Shju tu ld,hg jrla kej;
kej; l%shd;Aulùu isÿfjhs¡ fuh ir<j f;Areï .ekSug fuu l=vd jevigyk
w;Ayod n,uq¡ fï i|yd f*daï tlg f,An,A lkafg%da,A tlla tl;= lr tys we;s
jpkh Text fm%dmá tl Ndú;d lrñka bj;A lr.kak¡ oeka gQ,A fndlaia tflys
Components leg.ßfhys olakg ,efnk Timer lkafg%da,A tl u; vn,A la,sla lr
th f*daï tlg tl;= lr.kak¡ oeka fuu lkafg%da,A tl f;dard fm%dm¾àia úkafvda
tflka Interval tl jYfhka 1000 f,i ilia lrkak¡ oeka ghsu¾ lkafg%da,A tl vn,A
la,sla lr olakg ,efnk fldaâ úkafvda tflys Tick bfjkaÜ tl ;=, my; mßos
fla;kh lrkak¡
Label1.Text = Date.Now.ToLongTimeString ()
oeka fuu Tick bfjkaÜ tl fok,o ld,hlg jrla l%shd;Aulùu i|yd f*daï tl
vn,A la,sla lr tys Load bfjkaÜ tl ;=, my; mßos fla;kh lrkak'
Timer1.Start ()
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
fyd|hs jevigyk Odjkh l,úg Tnj mqÿuhg m;Alrjñka wLKAvj ;;Amrhla mdid
fõ,dj olakg ,efnhs¡ fuh isÿjkafka flfiao@ fuysoS wms Tick bfjkaÜ tl kej;
kej; ls%hd;Aulùu i|yd fõ,dj ilikq ,enqfõ ñ,s;;Amr 1000 la fyj;A ;;Amr
tlla jYfhks¡ fuysoS iEu ;;Amrhlgu jrlau Tick bfjkaÜ tl uq, isgu kej;
kej; l%shd;Aulùu isÿfjhs¡ fõ,djo ;;Amrhla mdidu fjkia jk neúka iEu
;;AmrhloSu fuu bfjkaÜ tlo kej; kej; l%shd;Auljk neúka os.gu fõ,dj
olakg ,efnhs¡ fuu bfjkaÜ tl l%shd;Aul jk wdldrh wjfndaO lr.ekSug ;j;a
jevigykla ks¾udKh lruq¡
fï i|yd ghsu¾ lkafg%da,A tlla muKla iEfyhs¡ fuys Interval tl 1000 jYfhka
ilia lrkak' fuúg Tick bfjkaÜ tl iEu ;;AmrhloSu kej; kej; uqod yßkq
,nhs¡ túg ta ;=, fla;kh l, we;súg iEu ;;AmrhloSu tu ld¾hh isÿlrkq
,nhs¡ fuu jevigyfkaoS isÿúh hq;Af;A iEu ;;AmrhloSu wyUq f,i f*daï tflys
miqìï j¾Kh fjkiaùu fjhs¡ fuysoS RGB wdldrhg wkqj j¾K fjkiaùu isÿúh
hq;=h' RGB wdldrfhaoS j¾K ks¾udKhùu isÿjkafka tla tla j¾Kfhys 0 isg 255
olajd jQ lsishï w.hla tl;=ùfuks¡ tfia kï 0 isg 255 olajd jQ wyUq w.hka
;=kla ,ndoSfuka fuh b;du;a myiqfjka fla;kh isÿl, yel' fyd|hs ghsu¾
lkafg%da,A tflys Tick bfjkaÜ tl ;=, my; mßos fla;kh lrkak¡
fuys fldgq lr we;s fla;kh tla fma,shla jYfhka ,sùug j.n,d.kak¡ fuysoS
fmdf;ys bv m%udKh wvq neúka by; mßos olajd we;' fuys Color.FromArgb ;=,
,ndfokqfha j¾K ;=fkys 0 isg 255 olajd jQ l=uk fyda w.hka ;=kls¡ kuq;A wm tu
w.hka ;=k fjkqjg 0 isg 255 olajd jQ wyUq wdldrhlska iliajk w.hla ,ndoSug
fla;kh lr we;' Int(Rnd () *255) fla;kh u.ska 0 isg 255 olajd jQ mQ¾K wyUq
w.hla ,nd.ekSfï yelshdj we;' oeka fuu ghsu¾ lkafg%da,A tl l%shd;Aulùug
f*daï tflys Load bfjkaÜ tl ;=, Timer1.Start () f,i fla;kh lrkak' tfukau
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
Timer lkafg%da,A tflys Tick bfjkaÜ tl ;=, ,efnk wyUq w.hka rgdjo wyUq f,i
iliaùug Randomize () hk fla;kh ,ndoSug wu;l fkdlrkak¡ oeka fkdmudj
jevigyk Odjkh lr n,kak¡
fyd|hs wms fuu Tick bfjkaÜ tl ;jÿrg;A wjfndaO lr.ekSug ;j;a jevigykla
ks¾udKh lruq¡ fuh b;du;a ir< úrdu >áldjla fyj;A Stop Watch tlls¡ fï
i|yd Group Box lkafg%da,A tlla" f,An,A lkafg%da,A 5 la iy nÜka lkafg%da,A ;=kla
wjYHùu isÿfjhs¡ oeka f*daï tl my; oelafjk mßos äihska lr.kak¡ wod,
lkafg%da,aia j, kïo rEm igyk iu`. bosßm;A lr we;'
óg wu;rj gQ,A fndlaia tflka ghsu¾ lkafg%da,A tlla ,ndf.k tys Interval tl
1000 f,i ilia lr.kak¡ fuys Start nÜka tl la,sla l,úg úrdu >áldj
l%shd;Aulùu isÿúh hq;=h' Stop nÜka tl la,sla l,úg úrdu >áldj iïmQ¾Kfhkau
k;rù uq,oS ;snQ wdldrfhkau ilia úhhq;=h' Pause nÜka tl la,sla l,úg úrdu
>áldj w;ru. k;r lsÍug yelsúh hq;=h' úrdu >áldj l%shd;Aulùug
mgka.;Aúg fuys ol=Kqmiskau ;;Amr .Kkhùu isÿfjhs¡ fuf,i .Kkhù 60
Created By : S.Wajira Madushanka
Disapamok Online IT Academy
jkjd;A iu`.u úkdä 1 ne.ska tl;=ùu isÿù kej;;A ;;Amr 0 ys isg 60 olajd
.Kkhùu isÿúh hq;=h' fï wdldrhg u úkdä 1 ne.ska tl;=ù th o 60 la jkjd;A
iu`.u meh j,g 1 la tl;=fjñka kej;;A úkdä 0 ys isg 60 olajd .Kkhùu isÿúh
hq;=h' fuysoS ;;Amrhla mdidu úrdu >áldfjys fõ,dj .Kkh jk neúka
fla;kh l,hq;Af;A ghsu¾ lkafg%da,A tl ;=, fjhs¡ ghsu¾ lkafg%da,a tl vn,a
la,sla lr Tick bfjkaÜ tl ;=, my; mßos fla;kh lrkak¡
.Kkh jkq ,nk ;;Amr fmkajkq ,nkafka Label5 lkafg%da,A tl ;=, fjhs¡ fuysoS
Start nÜka tl la,sla lrkjd;A iu`.u m<uqj ;;Amr .Kkhùu wdrïNúh hq;=h'
fuysoS m,uqj f,An,h ;=, 0 olakg ,efnk w;r
DoubleClick
fuho f*daï tl we;=¿j fndfyduhla lkafg%da,Aia ;=, olakg ,efnk bfjkaÜ tlls¡
lsishï lkafg%da,A tlla u;g ujqia fmdhskag¾ tl f.k f.dia ujqia tflys f,*AÜ
nÜka tl b;d laIKsl fõ,djla ;=, fojrla Tnk wjia:dj fuu bfjkaÜ tl
jYfhka y÷kajkq ,nhs¡ fyd|hs fuh w;Ayodne,Su i|yd jevigykla ks¾udKh
lruq¡ fï i|yd w¿;A fm%dfclaÜ tlla újD;lr olakg ,efnk f*daï tlg f,an,a
lkafg%da,A 5 la ,ndf.k my; rEmfha oelafjk mßos äihska lr.kak¡
fuysoS tlsfklg fjkia Data Type úYd, m%udKhla olakg ,efnkafka ukao lshd
iuyrúg Tng;A mekhla kef.kakg mq¿jk' úfYAIfhkau .Kkhlg iyNd.S
lrjd.kakd o;A; ;ekam;A lr.ekSug Ndú;d lrkq ,nk fâgd ghsma ie,l+úg
tajdfhys u;l ;nd.kq ,nk w.h mrdih wkqj u;lfhka fjka lr.kq ,nk bv
m%udKh fjkia fjhs¡ Tn ks¾udKh lrkq ,nk fõßhn,h ;=, .nvd lrkq
,nkafka iEuúgu l=vd m%udKfha w.hka kï ta i|yd u;lfhka jeä Odß;djhla
,nd.kakd jeä w.hka m%udKhla u;l ;nd.; yels fâgd ghsma tlla fjkqjg Bg
jvd l=vd w.hka m%udKhla u;l ;nd.; yels fâgd ghsma tlla Ndú;d l,yel'
fuúg mß.Klfha u;lfhka ta i|yd jehjk bv m%udKho l=vd fjhs¡ iEu úgu
.Kkhlg iyNd.S lrjd.kakd o;A; ;ekam;A lr.ekSug fõßhn,hla ks¾udKh
lsÍfïoS u;l ;nd.kq ,nk w.hka mrdihg wkqj iqÿiq fâgd ghsma tlla Ndú;d
l,hq;= fjhs¡ tfiau mQ¾K ixLHd muKla u;lfha ;nd.kakd wjia:dj,oS ta i|yd
.e,fmk fâgd ghsma o Ndú;d lsÍfï yelshdj we;' fyd|hs fï ms,sn|j
wjfndaOhla ,nd.ekSug ir< jevigyklskau jevmgka.uq¡ Tng u;lo l,ska wm
w.hka folla tl;= l,yels l=vd .Kl hka;%hla ks¾udKh l,d¡ fyd|hs oeka wm
th fõßhn,Aia Ndú;d lrñka isÿlrkafka flfiao lshd n,uq¡ fï i|yd w¿;A
fm%dfclaÜ tlla újD; lr.kak' fuysoS wmf.A jevigykg .e,fmk wdldrhg
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
fla;kh i|yd jeo.;Ajk lkafg%da,Aia kï lr we;s w;r tajdo rEmigyk iu`.
bosßm;Alr we;'
fuys m,uq fglaiaÜ fndlaia tl ;=, iy fojk fglaiaÜ fndlaia tl ;=, we;s w.hka
foflys tl;=j Answer bosßfhys we;s fglaiaÜ fndlaia tl ;=, fmkaúh hq;=fjhs¡
fuysoS wmg tu fglaiaÜ fndlaia ;=, we;s w.hka u;l ;nd.ekSug fjku
fõßhn,A folla ks¾udKh lr miqj tajdg fglaiaÜ fndlaia ;=, we;s w.hka mjrd
tu fõßhn,A fol tl;= lsÍfuka fuu .Kl hka;%h b;du;a myiqfjka ks¾udKh
l,yel' fuysoS tl;= lsÍfïoS fmr mßos val *kalaIka tl Ndú;d lsÍug wjYH ke;'
ukao fâgd ghsma tl u.ska wod, fõßhn,h ;=, .nvdlr ;nd.kq ,nkafka l=uk
wdldrfha o;A;o hkak l,skau ;SrKh l, neúks¡ fyd|hs Add nÜka tl vn,A la,sla
lr my; mßos fla;kh lrkak¡
sval=txtsval.Text
by; fla;kh u.ska fuu w.hka fõßhn,hg mjrd we;' fuysoS tu w.hka olakg
,efnkafka fglaiaÜ fndlaia ;=, neúka mjrdoSfïoS tajd iudk ,l=fKka ol=Kqmi;A
mjrd.kq ,nkafka ysia fõßhn,a neúka tajd iudk ,l=fKka jïmi;A i|yka lr
we;' ,nd.kakd ju ,ndfokakd ol=K f,i fuh ir,j isys;nd.kak¡
fyd|hs wms l,ska ks¾udKh lrk,o w.hka folla tl;= l,yels" wvq l,yels"
.=K l,yels iy fnosh yels .Kl hka;%h fõßhn,Aia Ndú;d lsÍfuka ks¾udKh
lruq¡ fuysoS Tng wod, ld¾hhg wkqj fõßhn,A ks¾udKh lrk ia:dkh ms,n|j
wjfndaOhla ,nd.; yel' fï i|yd w¿;A fm%dfclaÜ tlla ,ndf.k f*daï tlg
f,an,a lkafg%d,a ;=kla" fglaiaÜ fndlaia lkafg%da,A ;=kla iy nÜka lkafg%d,a
y;rla ,ndf.k my; oelafjk mßos f*daï tl äihska lr.kak¡
fuu jevigyfkys tla tla nÜka la,sla lrkúgoS Bg wod, .Kkhùu isÿúh hq;=h'
fuysoS tla tla nÜka tl la,sla lrkúgoS .Kkh isÿjk neúka wmg wjYH kï
nÜka tflys la,sla bfjkaÜ tl ;=< wod, fõßhn,A fol ks¾udKh l, yel'
l,ska jevigyfkaoS fuka kuq;A fuysoS nÜka tl la,sla lrkjd;A iu`.u fõßhn,A
fol ks¾udKh jk w;r thg fglaiaÜ fndlaiaj, w.hka ,nd.kakd w;r wod,
.Kkh tkï tl;=ùu" wvqùu" fnoSu fyda .=Kkh ùfuka miq th Answer fglaiaÜ
fndlaia tl ;=, fmkaùfuka miqjo tu fõßhn,A folu u;lfhka bj;Aùhhs¡ fuhg
fya;=j jkqfha wms wod, fõßhn,A folu ks¾udKh lrk ,oafoa bfjkaÜ tlla ;=,
ùuh' bfjkaÜ tlla ;=, ks¾udKh lrkq ,nk fõßhn,hla wod, ld¾hh
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
isÿùfuka miqj bfjkaÜ tl wjidk jkjd;A iu`.u u;lfhka bj;Aùhhs¡ fuf,i
+ nÜka tflys la,sla bfjkaÜ tl ;=, l,ska jevigyfkys wdldrhg fõßhn,A
fol ks¾udKh l,miq bfjkaÜ tl l%shd;Aulù wjidk jkjd;A iu`.u u;lfhka
bj;Aùhk neúka – nÜka tl ;=,o kej; jrla tu fõßhn,A folu ta wdldrfhka
ks¾udKh lsÍug isÿfjhs¡ ukao + nÜka tl la,sla lr wjika ùfuka miqj – nÜka tl
la,sla lrk neúks¡ tu ksid nÜkaia y;f¾oSu kej; kej; fõßhn,Aia ks¾udKh
lsÍug isÿfjhs¡ kuq;A Tng f*daï tl fyj;A la,dia tl ;=, oS lsishï fõßhn,hla
ks¾udKh l,miq th tu la,dia tl ;=, ks¾udKh lr.kakd iEu TífclaÜ
tllu Ndú;d lsÍfï yelshdj we;' tkï tjeks wdldrfha fõßhn,hla u;lfhka
bj;Aùu isÿjkq ,nkafka jevigyk Odjkfhka bj;Ajk úgoSh' fyd|hs la,dia tl
;=, fõßhn,a fol ks¾udKh lsÍu i|yd + nÜka tl vn,A la,sla lr fldaâ úkafvda
tl ,ndf.k fuys by,skau olakg ,efnk Public Class Form1 hkakg jydu
my,ska l¾i¾ tl msysgqjd wod, fõßhn,A fol ks¾udKh lr.kak¡
oeka wod, nÜka ;=,oS isÿl,hq;Af;A fuu ks¾udKh lr.;A fõßhn,A folg fglaiaÜ
fndlaia j, we;s w.hka mjrd Bg wod, .Kkhg wod, fla;kh ,sùu muKs¡
fyd|hs fuu fla;kh ms,sn|j Tng oekgu;A wjfndaOhla ,eî we;s neúka
kej;;A ta ms,sn|j meyeos,s lsÍula isÿlr ke;' nÜka y;rgu wod, fla;kh my;
bosßm;A lr we;'
fyd|hs oeka oS¾> yqiaula wrf.k wms úkafvdaia tlaiamS fufyhqï moaO;sh ;=, olakg
,efnk wdldrfha le,alshqf,agrhla ks¾udKh lruq¡ fï i|yd w¿;A fm%dfclaÜ tlla
wdrïN lrkak' oeka fuu ks¾udKh lrkq ,nk le,alshqf,agrh i|yd nÜka
fyd|hs wms oeka fuu le,Alshqf,Agrh mshjfrka mshjr ks¾udKh lruq¡ fuys b,lalï
i|yka lsÍug we;s nÜka la,sla lrkúgoS tu w.hka fglaiaÜ fndlaia tl ;=,
fmkaúh hq;=h' WodyrKhla f,i 150 hk w.h i|yka lsÍug wjYHjQúg ta i|yd
1 5 iy 0 hk nÜka la,sla lrkúg w.h 150 f,i fglaiaÜ fndlaia tl ;=,
fmkaúh hq;=h' fyd|hs wm tu fla;kh 0 b,lalu iys; nÜka tflka wdrïN
oeka jevigyk Odjkh lr neÆúg 0 nÜka tl Tnk úg th os.gu fmkaùu úkd iEu
úgu olakg ,efnkafka tlu 0 muKs¡ by; mßos fla;kh l,úg isÿjkafka Click
bfjkaÜ tl uqod yßk iEu wjia:djloSu fglaiaÜ fndlaia tl ;=, 0 hk w.hu
muKla fmkajkq ,nhs¡ kuq;A fuysoS isÿúh hq;Af;A fglaiaÜ fndlaia tflys oekg
ghsma lr we;s b,lalï tfia mj;soaoS fuu 0 o ghsmaùu fjhs¡ tu ksid my; mßos
fla;kh lrkak¡
TextBox1.Text = TextBox1.Text & 0
fï wdldrhg fla;kh l,úg isÿjkafka fglaiaÜ fndlaia tflys ;sfnk fglaiaÜ
fldgi;A iu`.u 0 o fmkaùu isÿlrkq ,nhs¡ 0 isg 9 olajd jQ b,lalï ish,a,gu
wod, fla;kh wm my;ska bosßm;A lr we;'
fyd|hs fuu nÜkaia Ndú;d lrñka fglaiaÜ fndlaia tl ;=, w.hla i|yka lr
tl;= lsÍfï nÜka tl la,sla l,dhehs is;kak¡ fuúg B,`. w.h ,ndoSug fglaiaÜ
fndlaia tl ysiaùu isÿúh hq;=h' B,`. w.h ,ndoS = ,l=K iys; nÜka tl tnQúg
l,ska bj;AjQ w.h;A oeka fglaiaÜ fndlaia tl ;=, we;s w.hka foflys tl;=j
fuu fglaiaÜ fndlaia tl ;=,u fmkaúh hq;=h' tfia kï tu bj;Ajk w.h miqj
.Kkhg iyNd.S jk neúka = ,l=K nÜka tl Tnk f;lau th u;lfha ;nd.;
hq;=fjhs¡ tfia kï ta i|yd fõßhn,Aia Ndú;d l,hq;= nj Tng wuq;=fjka lsjhq;=
ke;' kuq;A + ,l=K iys; nÜka tl muKla fkdj * ,l=K iys;" - ,l=K iys;
fuu le,alshqf,agrh Ndú;d lrñka oYu iys; w.hkao iq¿ l, yels neúka
fglaiaÜ fndlaia tl ;=, ,ndfok oYuia:dk iys; w.hkao u;l ;nd.; yelsjk
mßos Double wdldrfha fâgd ghsma tl Ndú;d lr we;' fyd|hs oeka fufyu ys;uq¡ Tn
lsishï w.hla ,ndoS + ,l=K iys; nÜka tl Tnd kej; jrla w.hla ,ndoS = ,l=K
iys; nÜka tl la,sla lsÍfïoS Tn yßhgu ;SrKh lrkafka fldfyduo Bg l,ska
la,sla lr ;snqfka + ,l=K iys; nÜka tl o ke;skï fjk;A nÜka tllao lshd¡ fuh
wmg myiqfjka y÷kd.ekSfï l%uhla Ndú;d l, yel' tkï lsishï fõßhn,hla
ks¾udKh lr fuu + nÜka" - nÜka" * nÜka iy / nÜka la,sla lrkúg tu
fõßhn,hg tlsfklg fjkia fglaiaÜ tlla mjrd = ,l=K iys; nÜka tl
Tnkúg tu mjrd.;A fglaiaÜ tl l=ulao hkak ;¾l lrñka wod, .Kkh lsÍu
isÿlr.; yel' fuu tla tla nÜka y÷kd.ekSu i|yd tu fõßhn,hg hjkq
,nkafka fglaiaÜ tlla neúka wm String fâgd ghsma tflys fõßhn,hla Class tl
;=, ks¾udKh lr we;'
fyd|hs fuys we;s b,lalï iys; nÜka Ndú;d lrñka fglaiaÜ fndlaia tl ;=,
w.hla ,ndoS + nÜka" - nÜka" * nÜka iy / nÜka la,sla l,úg tu fglaiaÜ fndlaia
tflys w.h ks¾udKh lr.;A Passval fõßhn,hg;A tu nÜka tl muKla fjku
y÷kd.ekSug str fõßhn,hg fglaiaÜ tllao heúh hq;= w;r B,`. w.h i|yka
lsÍug fglaiaÜ fndlaia tl ysiaùuo isÿúh hq;=h' ta i|yd + nÜka tl ;=, my; mßos
fla;kh lrkak¡
fuu nÜka tl la,sla l,úgoS muKla str fõßhn,h ;=, .nvdjkq ,nkafka plus hk
fglaiaÜ fldgi fjhs¡ fyd|hs fï wdldrhg wksl=;A - nÜka" * nÜka iy / nÜka ;=k
i|yd my; mßos fla;kh lrkak¡
fuysoS hï fyhlska wvq lsÍfï ,l=K iys; nÜka tl la,sla l,úgoS muKla str
fõßhn,h ;=, minus hk fglaiaÜ tl muKla .nvdùu isÿfjhs¡ tfukau fnoSfï
,l=K iys; nÜka tl la,sla l,úgoS division hk fglaiaÜ tl;A .=K lsÍfï ,l=K
iys; nÜka tl la,sla l,úgoS str fõßhn,h ;=, multiply hk jpkh muKla
.nvdùu isÿfjhs¡ fyd|hs oeka = ,l=K iys; nÜka tl la,sla l,úgoS fuu str
fõßhn,h ;=, .nvdù we;s fglaiaÜ tlg wkqj Bg wod, .Kkh ùu isÿúh hq;=h'
fuys fldgqlr we;s fla;kh foig muKla wjOdkh fhduq lrkak¡ fuysoS str
fõßhn,h ;=, .nvdù mj;skq ,nkafka plus hk fglaiaÜ tloehs úuid n,d we;'
fuys plus hkak .nvdùu hkq l,ska la,sla lr we;Af;A + ,l=K iys; nÜka tl fjhs¡
tfia kï uq,skau ,ndÿka w.h u;lhg ;nd.;A passval fõßhn,fhys w.hg oeka
fglaiaÜ fndlaia tflys ;sfnk w.ho tl;=ù fglaiaÜ fndlaia tl ;=,u fmkajk
f,ig fla;kh lr we;' fyd|hs fï wdldrhg wksl=;A nÜka i|ydo = ,l=K iys;
nÜka tl ;=, my; mßos fla;kh lrkak¡
Tng by; fla;kh f;Areï hkakg we;ehs lshd wfmalaId lruq¡ wms oYu ;s;g wod,
fla;kh isÿ fkdlf,uq¡ idudkHfhka úhhq;Af;A oYu ;s; iys; nÜka tl la,sla
l,úgoS oYu ;s; ta wdldrfhka fmkaùu fjhs¡ ta i|yd my; mßos fla;kh l,yel'
TextBox1.Text = TextBox1.Text & “. “
kuq;A fuu fla;kfhys we;s fodaIh jkqfha oYu ia:dk tllg jvd ´kE ;rï ;eìh
yels ùuh¡ oYu ia:dk tlla muKla i|yka lsÍug Ndú;d l,yels WÑ; fu;â
tlla Instr kñka úIqj,A fíisla fvdÜfkÜ mß.Kl NdIdj ;=, olakg ,efnhs¡ oYu
;s; iys; nÜka tl ;=, my; mßos fla;kh lrkak¡
fuysoS m,uqj ;s; fldmuK ixLHdjla u;l ;nd.; yelso hkak i|yd place kue;s
Integer fâgd ghsma tflys fõßhn,hla ks¾udKh lr we;' fuhg
InStr(1,TextBox1.Text,”.”)
fla;kh mjrd we;' ñka woyia jkqfha fglaiaÜ fndlaia tl ;=, we;s ;s;a tlla f,ig
.nvd lr.kakd f,igh' fuu .nvd lr.;A w.h 0 jQfha kï hkq ;s;la ;ju;a
fglaiaÜ fndlaia tl ;=, olakg fkd,efnk hkak fjhs¡ fuúg fglaiaÜ fndlaia
tflys oekg mj;sk w.hg ;s;la ghsma jk f,ig fla;kh lr we;' fuysoS wmg
wjYHkï InStr fu;â tl fjkqjg IndexOf fu;â tl jqjo Ndú;d lsÍfï yelshdj
we;' fuu fu;â tl Ndú;d lrñka lsishï fglaiaÜ fndlaia tll we;s lsishï
le/lag¾ tlla mj;skafka l=uk ia:dkhlo hkak fidhd.; yel' WodyrKhla
f,i lsishï fglaiaÜ fndlaia tll ;s;a lsysmhla ;nd we;akï tu m,uqjg we;s
;s; l=uk ia:dkhl ;sfíoehs fidhd.; yel' WodyrKhla f,i 1.5 ys ;s; ;sfnk
ia:dkh 1 ia:dkfha hkak ,nd.; yel' fuys ia:dkh .Kkh ùu isÿjkafka 0 isg
fjhs¡ ta wkqj oYu ;s; iys; nÜka tl ;=, my; mßos fla;kh lrkak¡
fuysoS m,uqj strtxt kñka String fâgd ghsma tflys fõßhn,hla ks¾udKh lr we;'
fuhg TextBox1 ys ghsma lrk foh u;l ;nd.kakd f,ig fla;kh lr we;'
indexOf fu;â tl u.ska hï le/lag¾ tlla ;sfnk ia:dkh l=ulao hkak oek.;
yelsnj wms l,ska Tng lSjd u;l we;s¡ fuu strtxt fõßhn,hg ,nd.;A fglaiaÜ
tflys ;s; ,eî we;s ia:dkh 0 g wvq o hkak úuid n,d we;' fuysoS 0 g wvqùu hkq
w.h -1 úh yels w;r tfia jkafka fldfya fyda ;ekl ;s;la ghsma lr ke;s
wjia:dj fjhs¡ ;s;la fldfya fyda ;ekl ;sfí kï 0 fyda Bg jvd jeä w.hla
,eìh hq;= fjhs¡ túg ;s;la fkdue;s neúka
TextBox1.Text = TextBox1.Text & “.”
fla;kh u.ska ;s;la fmkajk f,ig fla;kh lr we;' oeka fuu ks¾udKh
lr.;A le,Alshqf,Agrh Odjkh lr tys rih w;Aú|skak' Tng le,Alshqf,Agrh
ks¾udKh lrk wkaou iy tysoS Ndú;d lrk,o isoaOdka; fldgia ms,sn|j ukd
wjfndaOhla ,efnkakg we;ehs lshd wfmalaId lruq¡
fyd|hs wms oeka fõßhn,Aia Ndú;d lrñka nexl=jl fg,¾ hka;%hlg ldâ tl
we;=,;A lr hï uqo,la i|yka l,miq th tla tla Ndú;fha mj;sk uqo,A
fld,j,ska ksl=;A lrk wdldrfha jevigykla oeka ks¾udKh lruq¡ fuh Tng
wdYAjdockl jevigykla jkjd fkdwkqudkh' fï i|yd w¿;A fm%dfclaÜ tlla
wdrïN lrkak' fï i|yd f,An,A lkafg%da,A 7 la" fglaiaÜ fndlaia lkafg%da,A 7 la
iy nÜka lkafg%da,A 12 la wjYHùu isÿfjhs¡ fuu lkafg%da,Aia Ndú;d lrñka my;
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
oelafjk wdldrhg f*daï tl äihska lr.kak¡ fuysoS fla;kfhys jeo.;Ajk
lkafg%da,Aia j, kïo rEm igyk iu`. bosßm;A lr we;'
fuys we;s Accept nÜka tl la,sla l,úgoS ms,sfj,ska tu uqo, ,nd.; yels fkdaÜgq
.Kk fmkaúh hq;=h' WodyrKhla f,i remsh,a 3550 l uqo,la i|yka lf,a hehs
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
is;kak¡ fuúg m,uqj fuu remsh,a 3550 uqo,g 2000 fkdaÜgq fldmuK ixLHdjla
ksl=;A l,hq;=o hkak ;SrKh l,hq;= fjhs¡ bkamiq 3550 uqo,g 2000 fkdaÜgq j,ska
f.jQ miq b;sßh wfkla fkdaÜgq j,ska f.ùug b;sß jk m%udKh fidhd.; hq;=h'
bkamiq tu uqo,g 1000 fkdaÜgq j,ska f.úh yelso hkak fidhd tfia f.jQ miq
b;sß uqo, fidhd.; hq;=h' bkamiq tu b;sßjk uqo, 500 fkdaÜgq j,ska f.úh
yelso hkak fidhd tfia f.jQ miq b;sß uqo, fidhd.; hq;=h' bkamiq tu b;sß jk
uqo, 100 fkdaÜgq j,ska f.úh yelso hkak fidhd tfia f.jQ miq b;sß uqo,
fidhd.; hq;=h' fï wdldrhg Bg miqj b;sß jk uqo, 50 fkdaÜgq j,ska f.úh
yelso hkak fidhd tfia f.jQ miq b;sß uqo, fjku fmkaùu isÿúh hq;=h' fyd|hs
fuf,i 2000 fld,j,ska f.jQmiq B,`. fld,j,ska f.ùug b;srjk uqo, ms,sfj,ska
B,`. fld,j,ska fnok f;la .nvd lr ;nd.ekSug wjYHfjhs¡ wod, ld¾hh fjk
f;la tkï b;srjk uqo, u;lfha .nvd lr ;nd.; hq;= neúka tfia kï
wksjd¾fhkau ta i|yd fõßhn,Aia Ndú;d l,hq;= fjhs¡ ta i|yd Accept nÜka tl
vn,A la,sla lr olakg ,efnk fldaâ úkafvda tflys nÜka tflys Click bfjkaÜ
tl ;=, my; mßos fla;kh lrkak¡
Dim fval As Integer
fuysoS wod, uqo, i|yka lrkq ,nkafka fglaiaÜ fndlaia tl ;=, neúka m,uqj tu
i|yka lrk,o uqo, 2000 fkdaÜgq j,ska f.jQmiq b;srjk uqo, .nvd lr ;nd.ekSu
i|yd fval kue;s Integer fâgd ghsma tflys fõßhn,hla ks¾udKh lr we;'
3890 hk w.h 2000 ka fnÿmiq b;srjk w.h oekgu;A fval fõßhn,hg ,ndf.k
wjidkh' oeka fuu fval fõßhn,hg ,ndf.k we;s w.h 1000 ka fn¥ miq b;sßjk
w.h sval fõßhn,hg .nvdlr.; hq;=fjhs¡ fyd|hs ta i|yd my; mßos fla;kh
lrkak¡
sval = fval Mod 1000
TextBox3 lkafg%da,A tl ;=, fuu fval fõßhn,hg ,ndf.k we;s w.h 1000 ka
fn¥miq b;sßjk mQ¾K w.h fidhd.; hq;=fjhs¡ ta i|yd fmr mßosu Bg wkql+,j my;
mßos fla;kh lrkak¡
TextBox3.Text =int(fval /1000)
fuúg 1000 fkdaÜgq ixLHdj fldmuKoehs ;SrKh lr.; yel' fuu b;sßjQ 1890
w.h 1000 ka fn¥ miq b;sßjk uqo, fyj;A 890 hk w.h sval fõßhn,hg
,ndf.k wjidkh' oeka fuu w.h 500 ka fn¥ miq b;sßjk w.h fidhd.; hq;=fjhs¡
oeka fuu tval fõßhn,h ;=, sval ys b;sßjQ w.h 500 ka fn¥ miq b;sßjk w.h jk
390 hk w.h .nvd lr ;nd.kq ,nhs¡
TextBox4.Text = int(sval / 500)
fuúg 890 g mj;sk 500 ys mQ¾K ixLHd fldmuK ixLHdjla ;sfío hkak fidhd.;
yel' oekA tval ys b;sßjQ 390 hk w.h 100 ka fn¥miq b;sßjk w.h fidhd.; hq;=
neúka th .nvdlr ;nd.; hq;= neúka ;j;a fõßhn,hla ks¾udKh lr.; hq;=fjhs¡
fyd|hs ta i|yd rval f,i ;j;a fõßhn,hla ks¾udKh lr.kak¡
oeka fuu b;sßjQ tval w.h 100 ka fn¥miq b;sßjk w.h fyj;A 90 hk w.h .nvd lr
;nd.ekSu i|yd my; mßos fla;kh lrkak¡
rval = tval Mod 100
oeka fuu b;sßjQ tval ys w.hg 100 ys mj;sk mQ¾K ixLHd fyj;A 100 fkdaÜgq .Kk
,nd.ekSug my; mßos fla;kh lrkak¡
TextBox5.Text = int( tval / 100)
oeka fuu rval fõßhn,h ;=, b;sßjQ 90 hk w.h .nvdù we;s w;r oeka tu w.h
50 ka fn¥ miqo b;sßjk w.h fidhd tho .nvd lr ;nd.; hq;= neúka kej;;A
mval f,i fõßhn,hla ks¾udKh lr.kak¡
fuys fla;kfha myiqj i|yd nÜkaia ish,A, kej; kï lr we;s w;r tajd rEm igyk
;=< olajd we;' fuys Add, Minus, Division iy Multiply nÜka la,sla l,úgoS Bg wod,
.Kkh lsÍï isÿlsÍu i|yd fjk fjku f*daïia 4 la fmkaùu isÿúh hq;=h' fyd|hs
wu;r f*daï 4 ,nd.ekSu i|yd úIqj,A fíisla fvdÜfkÜ úkafvda tflys
fid,shqIka tlaiamaf,dar¾ úkafvda tflys fm%dfclaÜ fkaï tl u; rhsÜ la,sla lr
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
olakg ,efnk fukq tflka Add hkak f;dard bkamiqj Windows Forms fukq
úOdkh wkq.ukh lrñka wu;r f*daïia 4 la fm%dfclaÜ tlg ,nd.kak'
fyd|hs fuu Form1 j,g wu;r jYfhka ,nd.;A f*daïia y;ru my; rEmfha
oelafjk mßos f,An,A lkafg%da,A ;=kla iy fglaiaÜ fndlaia lkafg%da,A ;=kla
,nd.ksñka my; oelafjk mßos äihska lr.kak¡
lsishï f*daï tll isg ;j;a f*daï tlla fmkaùu i|yd Show fu;â tl Ndú;d lrkq
,nhs¡ fuu m,uq f*daï tflys olakg ,efnk Add nÜka tl la,sla l,úg ,nd.;A
fojk f*daï tl fmkaúh hq;= w;r fuysoS tys Enter First Value bosßfhys we;s
fglaiaÜ fndlaia tl ;=, lsishï w.hla i|yka lr Enter Second Value bosßfhys we;s
fglaiaÜ fndlaia tl ;=, wfkla w.h i|yka lr fuys we;s Calculate nÜka tl la,sla
l,úg Answer bosßfhys we;s fglaiaÜ fndlaia tl ;=, tu w.hka foflys tl;=j
fmkaúh hq;=fjhs¡ fuu jevigyk iïmQ¾Kfhkau fõßhn,Aia Ndú;d lrñka
ks¾udKh lsÍfïoS fuu tla tla f*daï ;=, olakg ,efnk Enter First Value
bosßfhys ,ndfok w.h;A Enter Second Value bosßfhys ,ndfok w.h;A fõßhn,aia
End Module
w;r iEu f*daï tlloSu Ndú;d l,yels fõßhn,A fol ks¾udKh l,hq;= fjhs¡
idudkHfhka úIqj,A fíisla fvdÜfkÜ mß.Kl NdIdj ;=,oS fõßhn,hla
ks¾udKh lsÍu wrUkqfha Dim f,igh' kuq;A fudähq,A tl ;=,oS muKla wod,
fõßhn,A ks¾udKh lrkq ,nkafka Public f,i wrUñkah¡
Add nÜka tl la,sla l,úg olakg ,efnk f*daï tflys Calculate nÜka tl la,sla
l,úg olakg ,efnk fldaâ úkafvda tu nÜka tlg wod, la,sla bfjkaÜ tl ;=,
my; mßos fla;kh lrkak¡
fuysoS uq¿ fm%dfclaÜ tflysu iEu f*daï tlla ;=,u Ndú;d lsÍug yelsjk mßos
Module tl ;=, ks¾udKh lr.;A fval fõßhn,hg fuu f*daï tflys TextBox1 ys
,ndfok w.h;A sval fõßhn,hg TextBox2 ys ,ndfok w.h;A mjrd.kakd f,ig
fla;kh lr we;' miqj w.hka foflys tl;=j ,nd.kakd TextBox3 lkafg%da,a
tlg fuu fõßhn,a foflys tl;=j fmkajk f,ig fla;kh lr we;' fï
wdldrhgu wfkl=;A f*daï ;=, olakg ,efnk Calculate nÜka tl ;=, by; mßos tu
.Kkhg .e,fmk wdldrhg fla;kh lrkak¡ tajdfhys fõßhn,A foflys tl;=j
fjkqjg wka;rh" .=Ks;h yd fnoSfuka ,efnk w.hg .e,fmk wdldrhg
fla;kh lrkak¡ Tng fuu jevigyk ukdj jegfykakg we;ehs lshd wms
wfmalaId lruq¡
f*daï tlg ,nd.;A f,an,A lkafg%da,A tl f;dard fm%dm¾àia úkafvda tflka Font
fm%dmá tl f;dard th bosßfha olakg ,efnk ;s;a ;=klska ksfhdackh jk nÜka tl
la,sla lr olakg ,efnk Font vhf,d.A fndlaia tflka f*dkaÜ tl jYfhka Times
New Roman f*dkaÜ tl;A" f*dkaÜ iaghs,A tl jYfhka Bold wdldrh;A fukau
f*dkaÜ ihsia tl jYfhka 48 hk w.h;A ,ndfokak¡
oeka ghsu¾ lkafg%da,A tflys we;s Tick bfjkaÜ tl iEu ;;Amr Nd.hlg jrlau
l%shd;Aulùu isÿjk neúka th ;=, fuu ks¾udKh lr.;A fõßhn,hg tl ne.ska
tl;= jk f,ig fla;kh lr tys tla tla w.hka we;s úgoS Bg wod, wl=re fmkajk
f,ig fla;kh l, yel' fyd|hs ta i|yd ghsu¾ lkafg%da,A tl vn,A la,sla lr my;
mßos fla;kh lrkak¡
Tn oekgu;A okakjd RGB wdldrhg j¾K ilia jkafka flfiao lshd' r;= j¾Kfhka
0 isg 255 olajd jQ w.hl=;A fld, j¾Kfhka 0 isg 255 olajd jQ w.hl=;A iy ks,A
j¾Kfhys 0 isg 255 olajd jQ w.hl=;A tl;= ùfuks¡ fuu wyUq f,i iliajk j¾K
;=kg wod, w.hka .nvdùu i|yd fuu fõßhn,A ;=k ks¾udKh lr we;'
fuysoS ks¾udKh lr.;A Red, Green iy Blue hk fõßhn,A ;=kg 0 isg 255 olajd jQ
wyUq f,ig ilia jk w.hka u;lfha ;nd.kakd f,ig fla;kh lr we;'
Color.FromArgb(red,green,blue)
fuysoS Argb () ;=, ,ndfokq ,nkafka tu j¾K ;=,g wod, 0 isg 255 olajdjQ l=uk
fyda w.hla fjhs¡ tu w.hka jkqfha red,green iy blue hk fõßhn,A ;=kg ,ndf.k
we;s wyUq w.hka fjhs¡ tu ksid fl,skau fõßhn,a ;=fkys kï i|yka lr we;'
oeka jevigyk Odjkh lr n,kak¡ fï wdldrhg Tn fkdis;+ fkdúre
weksfïIka ks¾udKh lsÍfï yelshdj mj;S' my;ska ;j;a tjeks weksfïIka tlla
i|yd fla;khka bosßm;A lr we;'
fuysoSo fmr mßosu Class tl ;=, Count f,i fõßhn,A tlla ks¾udKh lr thg Tick
bfjkaÜ tl l%shd;Auljk úg oS tl ne.ska tl;=ùug fla;kh lr we;' 1 jQ úg
lsishï fglaiaÜ tlla fkdfmkaùug;A" 2 jQ úg ASHIRWADA f,i fmkaùug;A 3 jQ
úg tu wl=re wE;Aj fmkaùug;A 4 jQ úg fmr mßos ASHIRWADA f,i fmkaùug;A
Minus
Division
Multiply
fuu jevigyfkys b,lalï iys; nÜka la,sla lrkúgoS idudkH le,Alshqf,Agrhl
fuka tu w.hka fglaiaÜ fndlaia tl ;=, fmkaúh hq;=h' fuu nÜka u.ska lsishï
w.hla ,ndoS lïfnd fndlaia tflka Add hk wdldrh f;ArEúg fglaiaÜ fndlaia tl
ysiaù B,`. w.h we;=,;A lsÍu i|yd l¾i¾ tl ta ;=, fmkaúh hq;=h' oeka kej;;A
fjk;A w.hla ,ndoS = ,l=K iys; nÜka tl la,sla l,úg tu l,ska w.h;A oeka
fglaiaÜ fndlaia tflys mj;sk w.fhys;A tl;=j fuu fglaiaÜ fndlaia tl ;=,u
fmkaúh hq;=h' fï wdldrhg Minus wdldrh f;ArEúg w.hka foflys wka;rh;A
Division wdldrh f;ArEúg fnoSfuka ,efnk w.h;A Multiply wdldrh f;ArEúg
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
w.hka foflys .=Ks;h;a fmkaúh hq;=h' fuys 0 ys isg 9 olajd jQ nÜkaj,
fla;kh isÿlrk wdldrh Tn oekgu;A okakd ksid th fuysoS wm kej;;A bosßm;A
fkdlruq¡ m,uqj lsishï w.hla ,ndoS lïfnd fndlaia tflka Add fyda Multiply,
Minus, Division hk wdldrj,ska tlla f;ArEúg oekg fglaiaÜ fndlaia tflys mj;sk
w.h bj;Aùu isÿúh hq;=h' kuq;A tu bj;Ajk w.h miqj tkï = ,l=K iys; nÜka tl
la,sla lrk úgoS .Kkhg wjYHjk neúka fuu w.h bj;A lsÍug m%:ufhka th
u;lfha ;nd.; hq;=fjhs¡ th iudk ,l=K iys; nÜka tl Tnk f;lau u;lfha
mej;sh hq;= neúka fï i|yd Ndú;d lrkq ,nk fõßhn,h fl,skau Class tl ;=,
ks¾udKh l,hq;= fjhs¡
Dim Passval As Integer
fyd|hs fuu lïfnd fndlaia tflka Add hkak fyda wksla whs;uhla f;ArEúg tu
w.h fõßhn,h ;=, .nvd ùug iy fglaiaÜ fndlaia tl ysiaùu isÿúh hq;=h'
fuh isÿúh hq;Af;A lïfnd fndlaia tflka Add hkak fyda wksla whs;uhla
f;ArEúgoS neúka ta i|yd fla;kh l,hq;Af;A SelectedIndexChanged bfjkaÜ tl
;=, fjhs¡
fuysoS lïfnd fndlaia tflka l=uk whs;uhla f;Arej;A by; fla;kh l%shd;Aulùu
isÿfjhs¡ oeka = ,l=K iys; nÜka tl la,sla l, úgoS Bg wod, .Kkh isÿùug my;
mßos fla;kh lrkak¡ l,ska ks¾udKh lrk,o úkafvdaia le,Alshqf,AgrfhaoS fuu
tl;= lsÍu wdoS .Ks; l¾u i|yd Ndú;d lf,Ao nÜkaia neúka th y÷kd.ekSug
wu;r fõßhn,hla Ndú;d l,kuq;A lïfnd fndlaia tflka whs;uhla f;ArEmiq
th = ,l=K iys; nÜka tl la,sla lrk úgoSo olakg ,efnk neúka wu;r
fõßhn,hla ks¾udKh lsÍu wkjYH fjhs¡
lïfnd fndlaia tflka f;dard we;Af;A Add o hkak m,uq b*A iafÜÜukaÜ tflka
i,ldn,d we;' th tfia kï tkï f;dard we;Af;A Add kï fglaiaÜ fndlaia tl
;=,u l,ska u;lhg .;A w.h;A oeka fglaiaÜ fndlaia tflys ;sfnk w.h;A
tl;=ùug fla;kh lr we;' lïfnd fndlaia tflys Text fm%dmá tl u.ska oekg
lïfnd fndlaia tflka f;dard we;s whs;uh l=ulao hkak ;SrKh l, yel' fï
wdldrhg wksl=;A fla;khkao f;Areï .ekSug W;Aidy.kak¡ fõßhn,Aia j,g wod,
isoaOdka; fldgia fu;kska wjika lruq¡ fõßhn,Aia Ndú;d lrñka ilia lrkq
,nk ixlS¾K jevigyka fuu .%ka:fhys fojk fldgfiys we;=,;A lr we;'
wfkla l%uh jkqfha fl,skau MsgBox fu;â tl Ndú;d lrñka uefiaÊ fndlaia
ks¾udKh lsÍuhs¡ ta i|ydo ms,s.;A fmdÿ l%ufõohla olakg ,efnhs¡
Msgbox (“uefiaÊ fndlaia tflys fmkajkq ,nk mKsúvh”, uefiaÊ fndlaia tflys
fmkajkq ,nk whslka tl + uefiaÊ tflys fmkajkq ,nk nÜkaia, “uefiaÊ
fndlaia tflys ud;Dldj”)
fuu fldgqlr we;s fla;kh o tl fm,g ,súh hq;= nj u;l ;nd.kak¡ fuúg
fmr wdldrhgu uefiaÊ fndlaia tl ta wdldrfhkau olakg ,efnhs¡ fyd|hs
by; i|yka lrk,o l%u folu Ndú;d lrñka uefiaÊ fndlaia iys;
jevigyka ks¾udKh lrk wdldrh fu;eka isg idlÉPd lruq¡
fyd|hs wm uefiaÊ fndlaia Ndú;d lrñka b;du;a ir< jevigykla ks¾udKh
lruq¡ fï i|yd w¿;A fm%dfclaÜ tlla újD; lr.kak¡ fï i|yd f,An,A
lkafg%da,A folla" fglaiaÜ fndlaia lkafg%da,A folla iy nÜka lkafg%da,A folla
wjYHjk w;r tajd my; mßos f*daï tl ;=, äihska lr.kak¡
fuys Enter User Name bosßfhys olakg ,efnk fglaiaÜ fndlaia tl ;=,
hQi¾fkaï tl jYfhka admin f,i;A Enter Password bosßfhys we;s fglaiaÜ
fndlaia tl ;=, mdiaj¾â tl jYfhka 1234 ,ndoS OK nÜka tl la,sla l,úgoS
Username and Password are correct f,i uefiaÊ tlla fmkaúh hq;= w;r fjk;A
´kEu hQi¾fkaï tlla iy mdiaj¾â tlla ,ndoS we;súgoS Username or Password
Incorrect f,i uefiaÊ tlla fmkaúh hq;= fjhs¡ tfukau fglaiaÜ fndlaia folu
ysiaùu isÿúh hq;=h' fuysoS kshñ; mdiaj¾â tl 1234 o kshñ; hQi¾fkaï tl
admin o hkak fglaiaÜ fndlaia tflys mÍlaIdlr we;Aoehs fidhd ne,Sug wjYH
ksid b*A iafÜÜukaÜ tlla Ndú;d l,hq;= fjhs¡ fuysoS wm m,uqj fl,skau Class tl
;=, mdiaj¾â tl iy hQi¾fkaï tl .nvd lr;nd.ekSu i|yd fõßhn,A folla
ks¾udKh lr we;' f*daï tl l%shd;Aul jkjd;A iu`.u tkï f*daï tflys Load
bfjkaÜ tl ;=, fuu fõßhn,a folg wod, mdiaj¾â tl jk 1234 iy hQi¾fkaï
tl jk admin mjrd.kakd f,ig fla;kh lrkak¡
u.ska uefiaÊ fndlaia tflys Yes nÜka tl Tnd we;Aoehs fidhd n,k w;r tfia
jqjfyd;A e.Cancel = False fla;h u.ska jevigyk Odjkfhka bj;A lsÍu
isÿlrkq ,nhs¡ Else hkq Yes nÜka tl Tnk wjia:dj fkdj fjk;A nÜka tlla
Tnk wjia:dj jYfhka i,lkq ,nhs¡ tkï Yes nÜka tlg wu;rj fuu uefiaÊ
tflys we;Af;A No nÜka tl neúka No nÜka tl Tnd we;s wjia:dj fjhs¡ fuúg
e.Cancel = True fla;h u.ska jevigykg bj;Afkdùug úOdk imhd we;' oeka
jevigyk Odjkh lr n,kak¡
fyd|hs uefiaÊ fndlaia ;=, olakg ,efnk nÜkaia Ndú;d lrk wdldrh
ms,sn|j wjfndaOh mq¿,a lr.ekSug wms ;j;a jevigykla ks¾udKh lruq¡
fuho fmr wjia:djloS ks¾udKh lrk,o w.hka folla tl;= l,yels" wvql,
yels" .=Kl, yels" fnosh yels .Kl hka;%hu fjhs¡ kuq;A fuhg wm uefiaÊ
fndlaia Ndú;d lrñka tys ñ;%YS,S Ndjh jeäoshqKq lr we;' fuysoS m,uq
fglaiaÜ fndlaia tl ;=, iy fojk fglaiaÜ fndlaia tl ;=, lsisÿ w.hla
i|yka fkdlr my,ska olakg ,efnk l=uk fyda nÜka tlla la,sla lf,ahehs
is;kak¡ fuúg wod, w.hka ,ndfok f,ig uefiaÊ tlla fmkaúh hq;= fjhs¡
wod, w.hka ,ndoS fuu l=uk fyda nÜka tlla la,sla l,úgoS uefiaÊ tlla
fmkaúhhq;= w;r tysoS Tng i;H jYfhkau fuu w.hka foflys tl;=j" wka;rh"
fnoSu" .=Ks;h hk .Kkh isÿúh hq;=o hkak úuid ne,sh hq;=h' fuys Yes nÜka tl
la,sla l,úg + ,l=K iys; nÜka tflaoS kï w.hka foflys tl;=j Answer
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
bosßfhys we;s fglaiaÜ fndlaia tl ;=, fmkaúh hq;=h' No nÜka tl la,sla l,úgoS
,ndoS we;s w.hka fol ysiaúh hq;=h' Cancel nÜka tl la,sla l,úgoS jevigyk
iïmQ¾Kfhkau bj;Aùu isÿúh hq;=h' fuu jevigyk ks¾udKh lsÍu i|yd
f,An,A lkafg%da,A ;==kla" fglaiaÜ fndlaia lkafg%da,A ;==kla iy nÜka lkafg%da,A
y;rla wjYH fjhs¡ my; rEmfhys oelafjk wdldrhg jevigyfkys
w;=reuqyqK; ks¾udKh lr.kak¡
fyd|hs wms fuys tl;= lsÍfï nÜka tlg wod, .Kkh meyeos,s lr.ksuq¡ fuu
uefiaÊ tflys nÜka ;=kla olakg ,efnk neúka fmr jevigyfkys fuka
fuu uefiaÊ tl .nvd lsÍu i|yd fõßhn,hla ks¾udKh l,hq;= fjhs¡ fuu
jevigyko fõßhn,Aia Ndú;d lrñka isÿlrk neúkA fglaiaÜ fndlaia foflys
w.hka u;l ;nd.ekSu i|yd Class tl ;=, fõßhn,a folla ks¾udKh lr we;'
fyd|hs oeka tl;= lsÍfï nÜka tl vn,A la,sla lr tys Click bfjkaÜ tl ;=, my;
oelafjk mßos fla;kh lrkak¡
fyd|hs oeka jevigyk Odjkh lr n,kak¡ uefiaÊ fndlaia Ndú;d lrñka wms
;j;a jevigykla ks¾udKh lruq¡ fuysoS wm uefiaÊ fndlaia Class tl Ndú;d
lrñka uefiaÊ fndlaia ks¾udKh lrk wdldrh meyeos,s lr we;' fuu jevigyk
ks¾udKh lsÍu i|yd w¿;A fm%dfclaÜ tlla wdrïN lrkak' fï i|yd f,An,A
lkafg%da,A y;rla" fglaiaÜ fndlaia lkafg%da,A folla iy nÜka lkafg%da,A folla
muKla m%udKj;A fjhs¡ oeka my; oelafjk mßos f*daï tl äihska lr.kak¡
fla;kh i|yd jeo.;Ajk lkafg%da,Aia j, kï o rEm igyk iu`. fmkajd we;'
pwd=”1234”
oeka File fukqfjys olakg ,efnk New Project fukq úOdkh wkq.ukh lrkak¡
fuúg w¿;A jevigykla ks¾udKh lsÍug wod, New Project vhf,d.A fndlaia
tl olakg ,efnhs¡
fyd|hs wms oeka fuu jevigyfkys l%shdldÍ;Ajh f;Areï .ksuq¡ fuu f*daï tl
wdrïNfhysu f,An,A lkafg%da,A tl fglaiaÜ fndlaia tl iy Next f,i i|yka
nÜka tl fkdfmkaúh hq;= w;r tkï jevigyk Ndú;d lrkakdyg
fkdfmfkk mßos ie`.ù ;sìh hq;=h' fuys Hi Start f,i i|yka nÜka tl la,sla
l,úg fkdfmfkk ;;Ajfha ;snQ ish¿u lkafg%da,Aia Ndú;d lrkakdg fmfkk
mßos ilia úhhq;=h' fuys Enter your first name bosßfhys we;s fglaiaÜ fndlaia
tl ;=, Tfí kfuys uq,A fldgi i|yka lr Next nÜka tl la,la l,miq
f,An,h Enter your last name f,i fjkiaúh hq;=h' tfukau kfuys b;sß fldgi
i|yka lsÍug fglaiaÜ fndlaia tl ysiaù mej;sh hq;=h' tu ku i|yka lsÍug
myiqùug l¾i¾ tlo tys msysgúh hq;=h¡ oeka kfuys b;sß fldgi i|yka lr
Next nÜka tl la,sla l,úg f,An,h Full Name f,i fjkiaù fglaiaÜ fndlaia
tl ;=, wjia:d folloS ,ndÿka kï fol tl;= lrñka iïmQ¾K kula jYfhka
fmkaúh hq;=h' oeka kej;;A Next nÜka tl la,sla l,úg Do you want to start
again f,i uefiaÊ tlla fmkaúh hq;=h' fuys Yes nÜka tl la,sla l,úg kej;;A
uq,isgu kfuys uq,A fldgi muKla we;=,;A lsÍug f,An,h Enter your first
name f,i kej;;A uq,isgu kfuys uq,A fldgi we;=,;A lsÍug fglaiaÜ fndlaia
tl ysiaù l¾i¾ tl tys msysgúh hq;=h' fuys No nÜka tl la,sla l,úg
creted By: S.Wajira Madushanka
Disapamok Online IT Academy
jevigyk Odjkfhka bj;Aùu isÿúh hq;=h' Tng fuu jevigyfkys
l%shdldÍ;Ajh ukdj f;Areï hkakg we;ehs lshd wms wfmalaId lruq¡ oeka wms
fla;kh lsÍug mgka.ksuq¡ fuysoS wm kfuys uq,A fldgi we;=,;A l,nj
y÷kd.kafka flfiao@ tfukau kfuys fojk fldgi i|yka l,miq iïmQ¾K
ku fmkaúhhq;= nj hk wjia:d y÷kd.kafka flfiao@ fuysoS wmg lsishï
fõßhn,hla ks¾udKh lr thg tl ne.ska tl;=ùug i,iajd tys w.h wyj,a
w.hkï fï foa isÿùug;A f,ig fla;kh isÿlrñka wmg fuu jevigyk
myiqfjka ks¾udKh lsÍfï yelshdj we;' tfukau kfuys m,uq fldgi i|yka
lr Next nÜka tl la,sla l,úg th bj;Aùhk neúka miqj kfuys iïmQ¾K ku
fmkajk úgoS tu bj;Aù.sh ku wjYHjk neúka tho u;lfha ;nd.ekSug
fõßhn,hla ks¾udKh l,hq;=h' fyd|hs wmg tfia kï fõßhn,A folla
ks¾udKh lsÍug isÿfjhs¡ kuq;A Next nÜka tl la,sla lrkúgoS fuu tl ne.ska
tl;=jk fõßhn,a tflys w.h os.gu u;l ;nd.; hq;= neúka th ks¾udKh
l,hq;Af;A fl,skau Class tl ;=, fjhs¡ tfukau iïmQ¾K ku fmkajk f;la
kfuys m,uq fldgi .nvdlr ;nd.;hq;= neúka tho fl,skau Class tl ;=,
ks¾udKh l,hq;= fjhs¡ fyd|hs ta i|yd f*daï tl u; vn,A la,sla lr fldaâ úkafvda
tl ,nd.kak¡ oeka Public Class Form1 bosßfhys l¾i¾ tl msysgqjd Enter lS tl
Tnd l¾i¾ tl my,g f.k my; oelafjk mßos fõßhn,A fol ks¾udKh
lr.kak¡
hk fla;h u.ska fuu m,uqjrg Next nÜka tl la,sla lrkúgoS tkï tys w.h 1
jk úgoS l,skau ,ndoS ;snQ kfuys uq,A fldgi rest1 fõßhn,h ;=, r|jd
;nd.kakd f,ig fla;kh lr we;' tfia jQ miq fglaiaÜ fndlaia tl ysiaùug;A
tysu l¾i¾ tl msysgqùug;A fla;kh lr we;' Count ys w.h 2 jk úg tkï
Next nÜka tl fojk jrg la,sla lrkúg f,an,h Full Name is f,i fjkiaùug;A
fla;kh lr we;' tfukau oeka fglaiaÜ fndlaia tflys we;s kfuys wjidk
fldgi;A fõßhn,h ;=, .nvd lr.;A kfuys m,uq fldgi;A iïmQ¾K kula
f,i fuu fglaiaÜ fndlaia tl ;=,u fmkaùug fla;kh lr we;' fyd|hs
fuf,i iïmQ¾K ku fmkajd we;s wjia:djl kej; jrla Next nÜka tl la,sla
l,úg tkï Count ys w.h 3 jQ úg uefiaÊ tlla fmkaúh hq;= neúka ta i|yd my;
mßos fla;kh lrkak¡
fyd|hs wms kej;;A wfma jevigyk fj; fhduqfjuq¡ fuys Count ys w.h 3 jQ úg
Strmsg f,i ks¾udKh lr.;A fõßhn,hg uefiaÊ tl mjrd we;' If strmsg=
DialogResult.Yes Then fla;kh u.ska hï fyhlska la,sla lr we;Af;A uefiaÊ
fndlaia tflys Yes nÜka tloehs úuid n,d we;' fuúg kfuys uq,A fldgi i|yka
lsÍug yelsjk mßos f,An,h Enter Your First Name f,i fmkaùug;A kfuys uq,A
fldgi ,ndoSug yelsjk mßos fglaiaÜ fndlaia tl ysialr we;' tfukau tys l¾i¾
tl msysgqùug;A fla;kh lr we;' fuys Count fõßhn,fhys w.h 0 ùug
fla;kh lr we;' fuúg kej;;A Next nÜka tl la,sla l,úg Count
fõßhn,fhys mj;sk 0 hk w.hg tlla tl;=ù Count ys w.h 1 jk neúka
kej;;A Count ys 1 w.hg wod, fla;kh l%shd;Aulùu isÿfjhs¡ Else hkq by;
fldkafoaishg wod, fkdjk wjia:dj fjhs¡ If strmsg= DialogResult.No Then
by; jevigyk ;=,ska Tng fõßhn,aia ms,sn|j jegySula fyda l,ska .%ka:h
wOHhkh l, flfkla kï fõßhn,aia iïnkaOj hï .eg¿u ;;Ajhla ;snqfKA
kï tho myj hkakg we;ehs lshd wfmalaId lruq¡
fyd|hs Tng u;lo l,ska .%ka:h ;=,ska wm úkafvdaia fufyhqï moaO;sh ;=,
olakg ,enqK wdldrfha le,Alshqf,Agrhla ks¾udKh l,d¡ fyd|hs wms
fõßhn,aia Ndú;d lrñka tkï Boolean fâgdghsma tl Ndú;d lrñka fjkiau
l%ufõohla hgf;A kej;;A úkafvdaia fufyhqï moaO;sh ;=, ;snqK wdldrfha
le,Alshqf,Agrhla ks¾udKh lruq¡ fõßhn,Aia Ndú;d lrñka úúO isoaOdka;
fldgia Tiafia úúO wdldrhg le,Alshqf,Ag¾h ks¾udKh l,yels nj Tn fuh
ks¾udKh l,miqj f;Areï.kq we;ehs lshd wms n,dfmdfrd;A;= fjuq¡ fï i|yd
w¿;A fm%dfclaÜ tlla újD; lr.kak¡ iqmqreÿ mßos fï i|yd fglaiaÜ fndlaia
lkafg%da,A tlla" nÜka lkafg%da,Aia 16 la muK wjYHùu isÿfjhs¡ oeka my;
oelafjk wdldrhg f*daï tl äihska lr.kak¡
creted By: S.Wajira Madushanka
Disapamok Online IT Academy
oeka 0 ys isg 9 olajd we;s nÜka la,sla lrk úgoS tu w.hka fglaiaÜ fndlaia ;=,
fmkaùu i|yd my; oelafjk wdldrhg fla;kh isÿlrkak¡ fuysoS ish¿u
nÜkaia j,g wod, fla;kh bosßm;a lr we;'
oeka fuys tl;= lsÍfï nÜka tl la,sla l,úg fglaiaÜ fndlaia tl ;=, ,ndoS we;s
w.h u;lhg ,nd.; hq;= w;r bkamiq fglaiaÜ fndlaia tl ysiaù B,`. w.h
i|yka lsÍug l¾i¾ tl tys fmkaúh hq;=h' tfukau fuu nÜka tl tnQ nj
ye`.ùug fuu nÜka tl y÷kd.ekSug ks¾udKh lrk,o fõßhn,h o True
;;Ajhg m;Al, hq;=fjhs¡ fuysoS wksjd¾fhkau wfkla nÜkaia ;=k y÷kd.ekSug
Ndú;d lrkq ,nk fõßhn,A 3 False ;;Ajhg m;Alr .; hq;= fjhs¡ ukao fuu nÜka
tl la,sla lsÍug fmr wfkla nÜka ;=fkka tlla la,sla lr ;snqKfyd;A Bg wod,
fuysoS fglaiaÜ fndlaia tflys we;s w.h passval fõßhn,hg mjrd.kakd f,ig
fla;kh lr we;' Bg miqj fglaiaÜ fndlaia tl ysia lsÍug;A l¾i¾ tl tys
fmkaùug;A fla;kh lr we;' tfukau tl;= lsÍfï nÜka tl y÷kd.ekSug
Ndú;d lrkq ,nk plus hk fõßhn,h muKla True ;;Ajhg m;Alr wfkla
ish¿u fõßhn,Aia False ;;Ajhg m;Alr we;' fï wdldrhg wfkla nÜkaia 3 i|ydo
my; mßos fla;kh lrkak¡
- nÜka tl i|yd
-
- nÜka tl y÷kd.ekSu i|yd Ndú;d lrkq ,nkafka minus fõßhn,h neúka
th muKla Ture ;;Ajhg m;Alr we;'
* nÜka tl i|yd
If plus= True Then fuysoS jevigykg ;ksj ;SrK .;hq;= neúka by;
fmla;kh u.ska = ,l=K iys; nÜka tl Tnk úgoS plus fõßhn,h True ù
we;Aoehs fidhk f,ig fla;kh lr we;' hï f,ilska tfiajqjfyd;A passval
fõßhn,hg ,nd.;A w.h;A oekg fglaiaÜ fndlaia tl ;=, we;s w.h;A
folu tl;=ù fglaiaÜ fndlaia tflys fmkaùug fla;kh lr we;' fï
wdldrhg minus fõßhn,h True ;;Ajhg m;Aù we;Akï passval fõßhn,fhys
we;s w.fhka fglaiaÜ fndlaia tflys we;s w.h wvqùug;A" division fõßhn,h
True ;;Ajfha we;Akï passval fõßhn,h ;=, we;s w.fhka fglaiaÜ fndlaia
tflys we;s w.h fnok f,ig fla;kh lr we;' mul fõßhn,h True ;;Ajfha
mj;Skï passval fõßhn,h ;=, we;s w.fhka fglaiaÜ fndlaia tflys we;s w.h
.=Kùu i|yd fla;kh lr we;' fyd|hs oeka jevigyk Odjkh lr n,kak'
Tnj mqÿuhg m;Alrjñka jevigyk l%shd;Aulùu isÿfjhs¡ fyd|hs wms
fõßhn,Aia Ndú;d lrñka ;j;a jevigykla ks¾udKh lruq¡ fuysoS Tng gQ,A
fndlaia tflys ;j;a jeo.;A lkafg%da,A tlla Ndú;d lrk wdldrh bf.k
.; yel' fï i|yd w¿;A fm%dfclaÜ tlla újD; lr.kak¡ fuh tla;rd
wdldrhl mß.Kl l%Svdjla jYfhka ye|skajQjdg jrola fkdue;' fï i|yd
f¾äfhda nÜka lkafg%da,A 4 la" .ArEma fndlaia lkafg%da,A 1 la" nÜka lkafg%da,Aia
4 la" fglaiaÜ fndlaia lkafg%da,A tlla" f,An,A lkafg%da,Aia 5 la iy
creted By: S.Wajira Madushanka
Disapamok Online IT Academy
fm%da.%iand¾ lkafg%da,A tlla fukau ghsu¾ lkafg%da,A tlla o wjYHh fjhs¡ Bg
wu;rj gQ,Afndlaia tflys olakg ,efnk TrackBar lkafg%da,A tl o wjYH
fjhs¡ fuh gQ,Afndlaia tflys All Windows Forms leg.ßh ;=, my,skau
olakg ,efnhs¡
fuh Tnf.A iq¿ lsÍfï yelshdj j¾Okh lr.; yels l=vd mß.Kl l%Svdjla
jYfhka ye|skajQjdg jrola fkdue;' fyd|hs wms fuu jevigyfkys
l%shdldÍ;Ajh f;Areï.ksuq¡ jevigyk wdrïNjk úgoS fm%da.%iand¾ tl áflka
ál msÍu wdrïNúh hq;=h' th msÍu wdrïN úhhq;Af;A fuys we;s Start nÜka
tl la,sla l,úgoSh' fuys Label1 ys iy Label2 ys wyUq mQ¾K ixLHd folla tu
creted By: S.Wajira Madushanka
Disapamok Online IT Academy
nÜka tl la,sla lrk úgoSu fmkaúh hq;=h' fuys Start nÜka tl la,sla
lrkúgoS f;dardf.k ;snqfka Adding f¾äfhda nÜka tl kï fuu fm%da.%iand¾
tl iïmQ¾Kfhka msÍug m%:ufhka tu f,An,A j, mj;sk w.hka foflys
tl;=j fglaiaÜ fndlaia tl ;=, ,ndosh hq;=fjhs¡ fuf,i Minus f¾äfhda
nÜka tl f;dard ;snqfkakï Label1 ys w.h Label2 ys w.fhka wvqù tk w.h
fglaiaÜ fndlaia tl ;=, ,ndosh hq;=fjhs¡ Multiplying f¾äfhda nÜka tl
f;dard ;snqfkakï w.hka foflys .=K lsÍfuka ,efnk w.h fglaiaÜ
fndlaia tl ;=, ,ndosh hq;=fjhs¡ tfukau Division f¾äfhda nÜka tl f;dard
;snqfkakï Label1 ys w.h Label2 ys w.fhka fnÿmiq ,efnk w.h fglaiaÜ
fndlaia tl ;=, ,ndosh hq;=fjhs¡ fuf,i fm%da.%iand¾ tl iïmQ¾Kfhka msÍug
m%:ufhka wod, .KKhg wod, ms,s;=r ,ndoSug j.n,d.; hq;=h' fuf,i
ksjeros ms,s;=r ,ndÿka miq Label5 ys fmkajk iïmQ¾K ,l=Kq m%udKhg 500 la
tl;=ùu isÿúh hq;=h' hï fyhlska jeros ms,s;=rla ,ndÿkafka kï Label5 ys
fmkajk ,l=Kq j,ska 100 la wvqùu isÿúh hq;=h' os.ska os.gu jeros ms,s;=re ,ndoS
fuu ,l=Kq m%udKh 0 fyda 0 g jvd wvqjQ úgoS Game Over f,i uefiaÊ tlla
fmkajñka jevigyk Odjkfhka bj;Aùu isÿúh hq;=h' fuf,i ksjeros
ms,s;=rla ,ndoS Check nÜka tl la,sla l,úgoS Correct Answer f,i uefiaÊ
tlla fmkaúh hq;= w;r fm%da.%iand¾ tl kej; uq,isgu msÍu wdrïNúh hq;=h'
tfukau fglaiaÜ fndlaia tflys w.h 0 f,i fmkaúh hq;=h' Next Chance
nÜka tl la,sla l,úg kej;;A úi|Su i|yd wyUq f,i w.hka folla Label1
ys yd Label2 ys fmkaúh hq;=h' fï wdldrhgu kej;;A ms,s;=re ,ndfoñka Check
nÜka tl la,sla lrñka tajdfhys ksjeros nj mÍlaId lrñka kej;;A Next
Chance nÜka tl la,sla lrñka mß.Kl l%Svdjla fuka os.gu iq¿ lrf.k hd
yel' fuys Stop nÜka tl la,sla l,úgoS Label1 ys iy Label2 ys w.h 0 ù
kej;;A uq,isg fjk;A .Kkh lsÍula f;dardf.k uq, isgu kej;;A ms,s;=re
iemhSu isÿl, yel' tfukau fm%da.%iand¾ tflys msÍu k;rùu isÿúh hq;=h' fuys
Check nÜka tlg my,ska olakg ,efnkafka TrackBar lkafg%da,A tl fjhs¡
fuys we;s ueo fldgi iSre udre l, yels w;r tysoS fjkiajk w.hg wkqj
lsishï ld¾hhla isÿlr.ekSu i|yd fuu lkafg%da,A tl Ndú;d lrkq ,nhs¡
fuys ueo fldgi jï me;A;g iSreudre lrkúgoS fm%da.%iand¾ tflys msfrk
fõ.h wvqúhhq;= w;r ol=Kqmig iSreudre lrkúgoS msÍfï fõ.h jeäúh
hq;=h' úkafvdaia mdßißlh ;=,oS fuu lkafg%da,a tl Tn fndfydaúg oel
we;=jdg iel ke;'
fyd|hs wms oeka fuu lkafg%da,A tflys w;HjYH fm%dm¾àia lsysmhla y÷kdf.k
isáuq¡
Minimum – fuu g%eland¾ lkafg%da,A tflys ueo we;s fldgi iSreudre l,yels
wju w.h fldmuKo hkak ,ndosh yel'
Maximum - fuu g%eland¾ lkafg%da,A tflys ueo we;s fldgi iSreudre l,yels
Wmßu w.h fldmuKo hkak ,ndosh yel'
Orientation – fuys Vertical wdldrh f;dard.;A úg fuu lkafg%da,A tl fl,ska
w;g;a Horizontal wdldrh f;dard.;Aúg idudkH ;sria wdldrfhka olakg
,efnhs¡
Value – fuu g%eland¾ tflys ueo we;s fldgi iSreudre ù ;sìhhq;= w.h l=ulao
hkak i|yka l, yel' WodyrKhla f,i Tn fuu lkafg%da,A tflys Wmßu w.h
creted By: S.Wajira Madushanka
Disapamok Online IT Academy
100 ;A wju w.h 0 f,i ilid we;súgoS kuq;A jevigyk wdrïN jk úgu fuys
ueo we;s fldgi iSreureù we;s w.h 20 úhhq;= kï tu w.h ,ndfokafka fuu
fm%dmá tl yryd fjhs¡
SmallChange – fuu g%eland¾ lkafg%da,A tl f;dard we;s úgloS h;=remqjrefjys
we;s Left Arrow Key tl fyda Right Arrow Key lS tl Tnk úgoS fuu ueo we;s
fldgi iSreudre úhhq;= w.h ,ndosh yel' WodyrKhla f,i fuys 20 hk
w.h ,ndÿka fyd;A fuu ueo we;s fldgi iSreudre jkafka w.h 20 ka 20 g
fjhs¡
LargeChange – fuu g%eland¾ tl u; la,sla lrkúg ueo we;s fldgi iSreudre
jk w.h fldmuKo hkak ,ndosh yel'
wmf.A jevigykg Ndú;d lsÍug m%:ufhka fuu lkafg%da,A tl m%dfhda.slj
Ndú;d lrk wdldrh jgyd .ekSug l=vd jevigykla ks¾udKh lruq¡ l,ska
jHdmD;sh tf,iu mj;soaoS fjk;A jHdmD;shla wdrïN lrkak' fï i|yd
g%eland¾ lkafg%da,A ;=kla iy f,An,A lkafg%da,A ;=kla muKla iEfyhs¡ oeka
my; oelafjk wdldrhg f*daï tl äihska lr.kak¡
oeka fuu jevigyfkys l%shdldÍ;Ajh f;Areï .ksuq¡ fuys g%eland¾ ;=fkys ueo
we;s fldgi iSreudre lrkúgoS f*daï tflys miqìï j¾Kh RGB j¾K
;=fkka iEfok j¾Khlska wdfoaYùu isÿúh hq;=h' Tn oekgu;A okakjd
úIqj,A fíisla fvdÜfkÜ mß.Kl NdIdj ;=,oS RGB j¾K iEfokafka flfiao
creted By: S.Wajira Madushanka
Disapamok Online IT Academy
lshd¡ Red j¾Kfhys 0 isg 255 olajd jQ lsishï w.hla" Green j¾Kfhys 0 isg
255 olajd jQ lsishï w.hla iy Blue j¾Kfhys 0 isg 255 olajd jQ lsishï
w.hla hk w.hka ;=ku tl;=ùfuka RGB l%uhg j¾K iEoSu isÿfjhs¡ fuu
,nd.;A g%eland¾ ;=fkysu iSreudre l,yels wju w.h 0 f,ig;A Wmßu w.h
255 f,ig;A ilia l,hq;= fjhs¡ fyd|hs ta i|yd h;=remqjrefjys Ctrl lS tl
Ndú;d lrñka fuu lkafg%da,Aia ;=ku f;dardf.k Minimum fm%dmá tl
bosßfhys 0 ;A Maximum fm%dmá tl bosßfhys 255 f,i;A ,ndfokak¡ fuf,i
Red j,g wod," Green j,g wod, iy Blue j,g wod, g%eland¾ tflys ueo we;s
fldgi iSreudre lrk úgoS tu w.hkag wkqj tu fudfydf;Au tu iEfok
j¾Kh f*daï tflys miqìug wdfoaYúhhq;= neúka fla;kh l,hq;Af;A tla tla
g%eland¾ tflys Scroll bfjkaÜ tl ;=, fjhs¡ ta i|yd m,uqj m,uq g%eland¾
lkafg%d,A tl u; vn,A la,sla lr fldaâ úkafvda tl ,nd.kak¡ fuu g%eland¾
lkafg%d,A tflys ueo we;s fldgi iSreudre lrk wjia:dj Scroll bfjkaÜ tl
jYfhka y÷kajkq ,nhs¡ tfia kï ta i|yd fla;kh l,hq;Af;A fuu bfjkaÜ tl
;=, fjhs¡ fyd|hs ta i|yd my; wdldrhg fla;kh lrkak¡
by; ish¿u lkafg%da,Aia j,g wod, fla;kh bosßm;A lr we;' fyd|hs oeka Tng
g%eland¾ lkafg%da,A tl Ndú;d lrk wdldrh jegfykakg we;ehs lshd wfmalaId
lruq¡ fyd|hs wms kej;;A wfma jevigyk fj; fhduqfjuq¡ wmf.A
jevigyfkys g%eland¾ lkafg%da,A tl Ndú;d lr we;Af;A fuu fm%da.%iand¾ tl
áflka ál msfrk fõ.h fjkia lsÍu i|yd fjhs¡ fuh jï me;A;g iSreudre
lrkúg fõ.h jeä lsÍug;A ol=Kq me;A;g iSreudre lrkúg fõ.h
wvqlsÍu;A isÿl, yel' wms m,uqj fm%da.%iand¾ tl áflka ál msÍug wod,
fla;kh isÿlruq¡ fï i|yd f*daï tflys my,skau olakg ,efnk ghsu¾
lkafg%da,A tl f;dard fm%dm¾àia úkafvda tflka Interval fm%dmá tl f;dard
bkagj¾,A tl jYfhka 1000 f,i ilia lr.kak¡ ghsu¾ lkafg%da,A tl iy
tys l%shdldÍ;Ajh Tn oekgu;A okS¡ lsishï ld¾hhla hï fõ,djlg wkqj
kej; kej; isÿlr.ekSu i|yd ghsu¾ lkafg%da,A tl Ndú;d lrkq ,nhs¡
WodyrKhla f,i Tn bkag¾j,a tl 1000 f,i ilialr ghsu¾ lkafg%da,a tl
;=, fla;kh l,úg iEu ;;Amrhlg jrlau tu fla;kh os.gu uqodyßkq
,nhs¡ Tng iEu ;;Amrhg jrlau fõ,dj ,nd.ekSug wjYHkï ta i|yd
creted By: S.Wajira Madushanka
Disapamok Online IT Academy
bkag¾j,A tl 1000 jYfhka ilialr Bg wod, fla;kh ghsu¾ lkafg%da,a tl
;=, ,ndosh hq;=fjhs¡ fyd|hs wmf.A jevigyfkys ghsu¾ lkafg%da,A tl ;=,
my; mßos fla;kh lrkak¡
hk fla;h u.ska fuu fm%da.%iand¾ tl áflka ál msÍ 100 olajd meñK we;Aoehs
úuid n,hs¡ fuu fm%da.%iand¾ tl áflka ál msÍug fla;kh ,shd we;Af;A
ghsu¾ lkafg%da,A tlu ;=, neúka ghsu¾ lkafg%da,A tl wl%shl,úg ;jÿrg;A
msÍu isÿfkdjkq we;' ta i|yd Timer1.Stop () fla;h Ndú;d lr we;' tfukau
Game Over f,i uefiaÊ tlla fmkaùug fla;kh lr we;' tfukau
Application.Exit () fla;h u.ska iïmQ¾K jevigyku Odjkfhka bj;Aùug
fla;kh lr we;' fuys Else hkq by; fldkafoaishg tl`. fkdjk wjia:dj
fjhs¡ tkï áflka ál msÍ 100 olajd fkdmeñKs wjia:dj fjhs¡
ProgressBar1.Value=ProgressBar1.Value + 2
Button1.Enabled = True
oeka fuys tla tla f¾äfhda nÜka f;dard we;súgoS fuu Label1 ys iy Label2 ys
wyUq f,i fmkajk w.hka j, mrdih fjkiajk neúka ta i|yd my; mßos
fla;kh lrkak¡ fuysoS wm ta i|yd fõßhn,Aia Ndú;d lr we;' m,uqj wm
fl,skau Class tl ;=, fâgdghsma tl Integer jk fõßhn,A folla ks¾udKh
lr thg wyUq w.hka mjrd.kakd f,ig fla;kh lr we;' ta i|yd my;
wdldrhg fõßhn,A fol ks¾udKh lr.kak¡
Dim val1 As Integer
Start nÜka tl ;=, l,ska fla;hg my,ska my; mßos fla;kh lrkak¡
fuys Multiply f¾äfhda nÜka tl f;dard we;s úgoS tkï RadioButton3 lkafg%da,A
tl f;dard we;s úgoS m,uq f,An,h ;=, iy fojk f,An,h ;=, wyUq w.hka
fmkajkq ,nkafka 0 ys isg 50 olajd jQ mQ¾K w.hka muKs¡ ukao úYd, w.hka .=K
lsÍu i|yd úYd, ld,hla .;jk neúks¡ Division f¾äfhda nÜka tl f;dard we;s
úgoS tkï RadioButton4 lkafg%da,A tl f;dard we;s úgoS m,uq f,An,h ;=, 0 ys isg
500 olajd jQ mQ¾K w.hkq;A fnoSu myiqùu i|yd fojk f,An,h ;=, fmkajkq
,nkafka 0 ys isg 10 olajd jQ mQ¾K w.hka fjhs¡ fuu jevigyfkys Calculation
Type hgf;ys lsishï f¾äfhda nÜka tlla f;dard Start nÜka tl la,sla lr f,an,a
foflys fmkajk w.hkag wkql+,j ksjeros ms,s;=r ,ndoS Check nÜka tl la,sla
l,úg th ksjeros kï ;j;a .Kkhla ,nd.ekSug Next Chance nÜka tl
Ndú;d lrkq ,nhs¡ fuysoS isÿúh hq;Af;A Start nÜka tflys fuka f,An,A foflys
wyUq w.hka fmkaùu fjhs¡ fyd|hs ta i|yd Next Chance nÜka tl vn,A la,sla
lr my; mßos fla;kh lrkak¡
oeka isÿlsÍug we;Af;A ne?rEï fla;kh fjhs¡ tkï Check nÜka tlg wod,
fla;kh fjhs¡ fuysoS f;dardf.k we;s f¾äfhda nÜka tlg wkqj tu .Kkhg
creted By: S.Wajira Madushanka
Disapamok Online IT Academy
wod, ms,s;=r ,ndoS we;Akï kshñ; ,l=Kq m%udKh ysñùug;A jerÿKq wjia:djloS
,l=Kq wvqùug;A os.ska os.g ,l=Kq wvqùfïoS 0 iy 0 g jvd wvqjQ wjia:djloS
jevigyk iïmQ¾Kfhkau Odjkfhka bj;Aùu isÿúh hq;=h¡ fï i|yd mshjfrka
mshjr fla;kh isÿlruq¡ fyd|hs wms m,uqj RadioButton1 lkafg%da,a tlg wod,
fla;kh mshjfrka mshjr meyeos,s lr.ksuq¡ ta i|yd Check nÜka tl vn,A la,sla
lr Click bfjkaÜ tl ;=, my; mßos fla;kh lrkak¡
Tng by; rEmh wOHhkh lsÍfuka b*A iafÜÜukaÜ tlla End If f,i wjika
lrk wdldrh ukdj meyeos,s jkakg we;ehs lshd wfmalaId lruq¡ fuysoS b*A
iafÜÜukaÜ lsysmhla tlg ,shd we;s úgoS we;=f,kau ,shd we;s b*A iafÜÜukaÜ
tlg my,ska ,`.skau msysá End If tl wh;A fjhs¡ bkamiqj Bg by,ska ,shd we;s b*A
iafÜÜukaÜ tl i|yd Bg miqj wjika lrk,o End If tl wh;A fjhs¡ fï
wdldrhg by,g hk b*A iafÜÜukaÜ j,g ms,sfj,ska Bg my,ska ,shd we;s End If
wh;A fjhs¡ fuh Tn ukdj f;Areï.; hq;=fjhs¡ fyd|hs Check nÜka tlg wod,
iïmQ¾K fla;kh wm my;ska bosßm;A lr we;'
fuúg kej;;A uq,isgu jevigyk mgka.; hq;= neúka ;djld,slj wl%shj ;snQ
Start nÜka tl il%shùug fla;kh lr we;' tfukau Stop nÜka tl la,sla l,miq
kej;;A th la,sla lsÍug fkdyelsjk f,ig tho ;djld,slj wl%sh lsÍug
fla;kh lr we;' tfukau Label1 ys Label2 ys yd TextBox1 ys hk tajdfha w.hka
0 f,i ilia lr we;' tfukau fm%da.%iand¾ tflys áflka ál msÍug wod, fla;kh
l%shd;Aul fkdùug Timer1.Stop () fla;h u.ska ghsu¾ lkafg%da,A tl l%shd;Aulùu
k;r lr we;' ProgressBar1.Value = 0 u.ska fm%da.%iand¾ tflys msfrk w.h 0
njg m;Alr we;' tfukau ;djld,slj wl%shj ;snQ f¾äfhda nÜka iys; .ArEma
fndlaia tflka w¿;A .Kkh lsÍula f;dard.ekSu i|yd tho il%sh lr we;'
fyd|hs fuys TrackBar lkafg%da,A tl iSreudre lrkúgoS Bg wkql+,j fm%da.%iand¾
tflys msfrk fõ.h fjkiaúh hq;=h' fyd|hs fuu lkafg%da,A tl f;dardf.k
Minimum w.h 300 f,i;A Maximum w.h 5000 f,i ilia lr we;' fuysoS wms
fuf,i ,ndfokafka ghsu¾ lkafg%da,A tflys ld,h ilia lrkq ,nkafka
ñ,s;;Amr j,skaùu ksidfjks¡ tfukau TrackBar tflys mj;sk w.h 1000 f,i
mej;Sug Value bosßfhys 1000 f,i ,ndoS we;' fuu msfrk fõ.h wvq jeä lsÍug
fuu TrackBar lkafg%da,A tl vn,A la,sla lr my; mßos fla;kh lrkak¡
fuysoS TrackBar tflys fjkia lrkq ,nk w.h Value fm%dmá tl yryd ,nd.;
yels neúka th ghsu¾ lkafg%da,A tflys Interval w.h jYfhka ,nd.kakd f,ig
fla;kh lr we;' fyd|hs oeka jevigyk Odjkh lr tys rih ú|.kak¡
fyd|hs wms oeka fõßhn,Aia Ndú;d lrñka w,xldr f*dfgda ia,hsâfIda tlla
ks¾udKh lrkafka flfiao lshd n,uq¡ fuysoS Tng ;j;a jeo.;A isoaOdka;
fldgilao bf.kSfï yelshdj we;' fï i|yd w¿;A fm%dfclaÜ tlla újD;
lr.kak¡ fuu jevigyk Tng ;rula l=;=y,h iys; úfkdaockl
jevigykla jkjd fkdwkqudkhs¡ jeä l;d fudlgo wms oekau jev mgka.ksuq¡
fï i|yd PictureBox lkafg%da,A tlla" .ArEma fndlaia lkafg%da,A tlla" f¾äfhda
fuúg Import nÜka tlg by,ska we;s ,ehsia;=j ;=, tu tl;= lr.;A ish¿u mska;+r
j, kï olakg ,efnhs¡ fyd|hs oeka fuys OK nÜka tl la,sla lrkak¡ oeka fuu
f*daï tflys mslap¾ fndlaia tl we| we;s m%udKhgu ,nd.;A mska;+ro
m%;sm%udKh ùu isÿúh hq;=h' ta i|yd kej;;A mslap¾ fndlaia tflys ol=Kqmi
by, fl,jfrys olakg ,efnk l¿mdg ;%sfldaKhlska ksfhdackh jk nÜka
tl la,sla lr Size Mode bosßfhys olakg ,efnk fndlaia tflka Stretch Image
hk wdldrh f;dard.kak¡ fuf,i mska;+r f;dard.;A miq thska lsishï mska;+rhla
oekgu;A mslap¾ fndlaia tl ;=, olakg ,efíkï fuu jevigyfkys wdrïNfhys
lsisÿ mska;+rhla fkdfmkaúh hq;= neúka kej;;A mslap¾ fndlaia lkafg%da,A tl
f;dard Select Resource vhf,d.A fndlaia tflka Import nÜka tlg by,ska we;s
mska;+r ,ehsia;=fjka mska;+rhla fjkqjg None hk wdldrh f;dard.kak¡
fyd|hs oeka úIqj,A iagqäfhda úkAfvda tflys Solution Explorer úkAfvda tl foi
neÆúg Resources f,i fjku äfrlagßhla olakg ,efnk w;r th vn,a la,sla
l,úg we;=,;A lrk,o ish¿u mska;+rj, kï olakg ,efnk w;r fuysoS wm
i;H jYfhkau mska;+r ,nd.kafka fm%dfclaÜ tflys we;s fuu Resource j,sks¡
fyd|hs fuu Next nÜka tlg wod, iïmQ¾K fla;khu my;ska bosßm;A lr we;'
fuys Slide Show f,i i|yka fpla fndlaia tl u; la,sla lr yß ,l=K oeuQ úg
fuu ks¾udKh lr.;A ia,hsâ fIda tflys mska;+r hï ld,hlg jrla iajhxl%Shj
udre ùu isÿúh hq;=h' lsishï ld¾hhla wmf.A wkqoekSulska f;drj isÿlsÍug
kï ta i|yd ghsu¾ lkafg%da,A tl Ndú;d lrknj Tn oekgu;A okS¡ fyd|hs
ghsu¾ lkafg%da,A tlla gQ,A fndlaia tflka ,ndf.k Interval tl 1000 f,i
ilialr ghsu¾ lkafg%da,A tl vn,A la,sla lr fldaâ úkafvda tl ,nd.kak¡ fuf,i
creted By: S.Wajira Madushanka
Disapamok Online IT Academy
mska;+r tlsfkl udreùu i|yd Next nÜka tl ;=, fla;kh l,d u;l we;s¡ tu
ksid kej;;A ghsu¾ lkafg%da,A tl ;=, tu fla;kh ,sùu wkjYH jk w;r tu
Next nÜka tflys fla;kh ,shd we;s bfjkaÜ tl l%shd;Aul jk f,ig fla;kh
l, yel' fyd|hs ta i|yd ghsu¾ lkafg%da,A tflys Tick bfjkaÜ tl ;=, my;
mßos fla;kh lrkak¡
tu ,shd we;s bfjkaÜ tl l%shd;Aulùu i|yd Call f,i Ndú;d l,hq;= fjhs¡ fuys
Click bfjkaÜ tl l%shd;Aul jk f,ig fla;kh lr we;' fuu mska;+r tlsfkl
iajhxl%Shj udreùu isÿúh hq;Af;A Slide Show fplafndlaia tflys bosßfhys yß
,l=K oeuQ úgoS neúka fuh vn,A la,sla lr my; mßos fla;kh lrkak¡
fuys If CheckBox1.Cheked = True Then u.ska fpla fndlaia tl ;=, yß ,l=K oud
we;Aoehs úuid n,k w;r fuúg Timer1.Start () u.ska ghsu¾ lkafg%da,A tl
l%shd;Aul jk f,ig fla;kh lr we;' Else hkq Bg tl`. fkdjk wjia:dj fjhs¡
tkï yß ,l=K oud fkdue;s wjia:dj fjhs¡ fuúg Timer1.Stop () fla;h u.ska
ghsu¾ lkafg%da,A tl l%shdúrys; jk f,ig fla;kh lr we;' oeka b;ska
jevigyk Odjkh lr tys rih ú|skak¡ fõßhn,Aia iïnkaOfhka Tn i;=j
mj;sk oekqu ;jÿrg;A mq¿,A lr.ekSu i|yd wms ;j;a jevigykla ks¾udKh
lruq¡ fuh Tng fl;rï úfkdaockl jevigykla jkjdo hkak ks¾udKh
wjika l,du isf;Aú' úIqj,a fíisla fvdÜfkÜ mß.Kl NdIdj Ndú;d lrñka
wms g%e*sla ,hsÜ isiagï tlla ks¾udKh lrkafka flfiao lshd wms oeka n,uq¡
fuu vhf,d.A fndlaia tflys Location bosßfhys olakg ,efnk Browse nÜka
tl la,sla lsÍfuka fuu jHdmD;s iq/l=ï jk m%Odk f*da,Av¾ tlla f;dard osh
yel' oeka fuys OK nÜka tl la,sla l,úg jevigyk ks¾udKh lsÍu i|yd
iqmqreÿ f,i Form tlla olakg ,efnhs¡ fyd|hs wm ks¾udKh lrkq ,nkafka i;H
f,dalfhys olakg ,efnk l,¾ ,hsÜ isiagï tll wdlD;shla fjhs¡ fuh mosl
fõosldjl .uka lrkq ,nk moslhkag mdr yryd udreùu i|yd i;H f,dalh
;=, olakg ,efnk l,¾ ,hsÜ isiagï tll wdlD;shla fjhs¡ fujeks isiagï Tn
fndfyda úg fld<U fyda fjk;A w.k.rhlg f.dia ;sfnkjdkï fndfyda úg
oel we;s¡ fuu jevigyk i|yd f,An,A lkafg%da,A 3 la" mslap¾ fndlaia lkafg%da,A
tlla" nÜka lkafg%da,A tlla iy ghsu¾ lkafg%da,A folla wjYH fjhs¡ tfukau
Tn óg fmr Ndú;d fkdlrk ,o lkafg%da,a folla wjYH fjhs¡ fuysoS wmg
w¿f;ka óg fmr Ndú;d fkdlrk ,o Ovel Shape lkafg%da,a tl iy Rectangle
Shape hk lkafg%da,a tl wjYH fjhs¡ fuh jïmi msysá gQ,A fndlaia tflys my,skau
Visual Basic Power Pack leg.ßh ;=, olakg ,efnhs¡
fuu jevigyk ks¾udKh lsÍu i|yd fuu Ovel Shape lkafg%da,A 3 la" Rectangle
Shape lkafg%da,A 2 la o wjYHùu isÿfjhs¡ fyd|hs wms m,uqj fuu lkafg%da,a fol
creted By: S.Wajira Madushanka
Disapamok Online IT Academy
y÷kdf.k isáuq¡ fuu Ovel Shape lkafg%da,A tl f;dardf.k la,sla lr f*daï tl
u; v%e.A lsÍfuka th wjYH m%udKhg we| .ekSfï yelshdj mj;S' wms oeka fuu
lkafg%da,A tflys w;HjYH fm%dm¾àia lsysmhla y÷kdf.k isáuq¡
FillStyle
fuys Solid fjkqjg úúO rgdj,ska hq;A ;j;A ú,dis;d úYd, m%udKhla fuys olakg
,efnhs¡
FillColor
*s,a iaghs,a tl jYfhka Solid wdldrh f;dard.;A miq idudkH msrjqï j¾Kh
jYfhka olakg ,efnkafka l¿ meyeh fjhs¡ Tng ta fjkqjg fjk;A j¾Khla
,ndoSug wjYHkï FillColor bosßfhys we;s my,g fhduqjQ ;%sfldaKhlska
ksfhdackh jk nÜka tl la,sla lr wjYH j¾Khla f;dardfokak¡
BorderWidth
fuu ´j,A fYAma tl jgd olakg ,efnk udhsu fyj;A iSudfjys >Klu fl;rï o
hkak ,ndosh yel' fuys w.h jeäjk úg tu fndav¾ tflys m%udKho jeäùu
isÿfjhs¡
BorderColor
creted By: S.Wajira Madushanka
Disapamok Online IT Academy
fuu fndav¾ tflys iïu; j¾Kh jYfhka olakg ,efnk l¿ j¾Kh fjkqjg
fjk;A j¾Khla f;dard osh yel'
BorderStyle
fuysoS msrjqug iaghs,A tlla ,ndÿka wdldrhgu fIAma tl jgd mj;sk udhsu
i|ydo iaghs,A tlla ,ndosh yel' fuys Solid wdldrh f;dard.;A úg udhsu ;ks
j¾Khlska mqrjd.; yel' Bg wu;rj fuys Dash wdldrh f;dard.;A úg jfgys
iSudj lv bß wdldrfhka olakg ,efnhs¡
FillGradientStyle
fuh ;rula úYAuhckl fm%dmá tlla jkjd fkdwkqudkhs¡ fuu fm%dmá tl
Ndú;d lsÍfuka ´j,A fIAma tflys msrjjqu i|yd ;ks j¾Khla fjkqjg w,xldr
f.%AähkaÜ tlla ,ndosh yel' fuys idudkHfhka None f,i olakg ,efnhs¡
fuúg FillColor tflys ;ks j¾Khla olakg ,efnhs¡ fuu FillGradientStyle
hgf;ys Central, Vertical, Horizontal wdoS f,ig w,xldr f.%AähkaÜ wdlD;s
lsysmhlau olakg ,efnhs¡ fuf,i lsishï f.%AähkaÜ wdlD;shla f;dard.;A miq
FillGradientColor fm%dmá tl yryd f.%AähkaÜ tflys wkql%ñlj fjkiajk
j¾Khla f;dardosh yel'
BackgroundImage
fuho ;j;a úYAuhckl fm%dmá tlla fjhs¡ fuh Ndú;d lrñka ´j,A fIAma tflys
msrjqu i|yd leu;s mska;+rhla f;dardosh yel'
Rectangle Shape gQ,A tl ;=,o olakg ,efnkafka by; fm%dmáu fjhs¡ fyd|hs wms
oeka kej;;A wfma jevigyk fj; fhduq fjuq¡ fuu jevigyk i|yd
wjYHjk lkafg%da,Aia fudkjdo hkak l,ska i|yka l,d Tng u;l we;s¡ fuu
lkafg%da,Aia Ndú;d lrñka my; oelafjk wdldrhg f*daï tl äihska lr.kak¡
fuysoS fla;kh i|yd jeo.;Ajk lkafg%da,Aia j, kïo rEm igyk iu`. bosßm;A
lr we;'
fuu mslap¾ fndlaia tl yryd ,nd.;A mska;+r jevigyk äihska lrk wjia:dfõoS
fmkaùu wkjYH neúka fuf,i mska;+r we;=,;A l, miq fuu Select Resource
creted By: S.Wajira Madushanka
Disapamok Online IT Academy
vhf,d.A fndlaia tflys we;s None hk wdldrh f;dard.kak¡ oeka OK nÜka tl
la,sla lrkak' fyd|hs jevigyk wdrïNjkjd;A iu`.u jïmi msysá l,¾ ,hsÜ
wdlD;sfhys hákau msysá n,Anh fyj;A ´j,A fIama tl fld, mdg ùu isÿúh
hq;=h' ta;A iu`.u ol=Kqmi msysá l,¾ ,hsÜ wdlD;sfhys by,u msysá ´j,A fIama
tl r;= mdg úh hq;= w;r mslap¾ fndlaia tl ;=, mdr udre úh fkdyels nj
y`.jk mska;+rho fmkaúh hq;=h'
Label2 ys w.h 0 ùu hkq moslhskag mdr udreùug bv ,ndoS we;s wjia:dj fjhs¡ ukao
;;Amr 60 la wjidk jkjd;A iu`.u moslhskag mdr udre ùu i|yd bv m%ia:dj
,efnk neúks¡ fuúg jïmi iy ol=Kqmi l,¾ ,hsÜ wdlD;sj, Oval Shape j,
j¾K .ekaùu isÿúhhq;= neúka tys fla;kh ,shd we;Af;A Timer2 lkafg%da,A
tflys neúka Timer2.Start () fla;h u.ska ghsu¾ lkafg%da,A tl l%shd;Aulùug
fla;kh lr we;' fuu ;;Amr 0 g meñKs miq ;jÿrg;a .Kkh ùula wkjYH
neúka th isÿ lrk Timer1 lkafg%da,A tl Timer1.Stop () fla;h u.ska wl%sh lr
we;' fuúg ;;Amr .Kkh ùu isÿjk f,An,A fmkaùu wkjYH neúka tajd Visible
fm%dmá tl Ndú;d lrñka ;djld,slj i`.jd we;' Else hkq by; fldkafoaishg
tl`. fkdjk wjia:dj fjhs¡ tkï Label2 ys tl ne.ska wvqjk w.h 0 fkdjk
wjia:dj fjhs¡ fuúg Label2 ys we;s j;Auka w.fhka 1 ne.ska wvqùu i|yd fla;kh
lr we;' fuúg Label2 ys w.h 0 jk f;lau iEu ;;Amrhlg jrlau tl ne.ska
wvqùu isÿfjhs¡ óg fmr wjia:djloS Label2 ys w.h 0 ù we;s wjia:djloS i`.jd
;snQ Label1, Label2 iy Label3 lkafg%da,Aia ;=ku fmkaùu i|yd fla;kh lr we;'
tfukau óg fmr wjia:djloS Label2 ys w.h 0 ù we;s wjia:djloS wl%sh lr ;snQ
fuu Timer1 lkafg%da,A tlu il%sh lr.ekSug fla;kh lr we;' fuys count=0
f,ig fla;khla isÿ lr we;' fuhska isÿjkafka l=ulao@ Timer2 lkafg%da,A tl
creted By: S.Wajira Madushanka
Disapamok Online IT Academy
;=, fuf,i Oval Shape kshñ; ld,hlg jrla j¾K .ekaùu i|yd Ndú;d lr
we;Af;A count f,i fl,skau la,dia tl ;=, fõßhn,hla ks¾udKh lr thg tl
ne.ska tl;=ùug i,iajd tys w.h wyj,a w.hg meñKs miq fï fï foa isÿjk
wdldrhg fjhs¡ fuu Label2 ys w.h 0 jQ úg tu Timer2 lkafg%da,A tl l%shd;Aul
jk neúka tys fla;khg wkqj moslhskag mdr udre ùug bv oS kej; jdyk
.ukd.ukhg bv ie,iQúg fojk ghsu¾ lkafg%da,A tl l%shdúrys; l,o
fõßhn,hg ,nd.;A w.h tf,iu mj;skq ,nhs¡ ukao count fõßhn,h
fl,skau la,dia tl ;=, ks¾udKh l, neúks¡ tu ksid kej; jrla PUSH nÜka tl
la,sla l,úg count ys w.h 0 fkdj l,ska wjia:dfõ ;snQ w.h .kakd neúka Timer2
lkafg%da,A tl l%shd;Aul jk úg fla;kh l%shd;Aul fkdjk neúka Label2 ys
wvqjk w.h 0 g meñfKk f;la tu count ys w.h 0 jk f,ig fla;kh lr we;'
fuúg Label2 ys w.h 0 jQ úg count ys w.h 0 ys mj;sk ksid iEu wjia:djloSu
fla;kh uq, isgu l%shd;Aulùu isÿfjhs¡ (Timer2 ys Oval Shape j¾K .ekaùug
wod, fla;kh&
fyd|hs Timer2 ys Oval Shape j¾K .ekaùug wod, fla;kh my; mßos isÿlrkak¡
óg m%:ufhka Tn fl,skau la,dia tl ;=, count f,i Integer fâgd ghsma tflys
fõßhn,hla ks¾udKh lrf.k isáh hq;= fjhs¡
fuh LED n,Aí wdlD;shla f,i i,ld fla;kh lsÍug mgka .ksuq¡ fuysoS wms
tlsfklg fjkia n,Aí rgd wdlD;s ;=kla ks¾udKh lrkq ,nhs¡ fuu rgd tlsfkl
iajhxl%Shj udre ùug wod, fla;kh wm wjidkhg ;nd tu rgd uefjk
wdldrhg .e,fmk fla;kh m,uqj isÿlruq¡ m,uq rgdj ks¾udKh lsÍug
,nd.;A ghsu¾ lkafg%da,A 4 ka m,uq ghsu¾ lkafg%da,A tl Ndú;d lr we;' by;
f*daï tl ;=, äihska lr.;A ish¿u ´j,A fIAma lkafg%da,A j, *s,aiaghs,a tl
jYfhka Solid wdldrh f;dard we;' *s,Al,¾ tl jYfhka iïu; j¾Kh jk
l¿mdg ;sîug bv yer we;' fyd|hs wmf.A m<uq rgdj jkqfha b;du;a laIKsl
fõ,djla ;=, ish¿u ´j,A fIAma lkafg%da,A lymdg jk w;r kej;;A iq¿
fufyd;lg miq l¿mdg ùu isÿfjhs¡ fuh b;du;a laIKsl fõ,djla ;=, tkï
;;Amrhlg;A jvd wvq ld,hloS isÿjk neúka th b;du;a w,xldr rgdjla f,i
olakg ,efnhs¡ fuh b;du;a laIKsl fõ,djla ;=, isÿjk neúka fojk ghsu¾
creted By: S.Wajira Madushanka
Disapamok Online IT Academy
lkafg%da,A tflys Interval fm%dmá tl 100 f,i ilia lrkak¡ fuúg fuu ghsu¾
lkafg%da,A tl ;=, fla;kh l,úg iEu ñ,s;;Amr 100 lg jrlau tu fla;kh
uqodyeÍu isÿlrkq ,nhs¡ fuysoS tla wjia:djl ish¿u ´j,A fIAma lymdg ùu;A
B,`. wjia:dfõoS lymdg ùu;A fla;kh lrkq ,nkafka fõßhn,hla ks¾udKh
lr thg tl ne.ska tl;=ùug i,iajd tu w.h wyj,a w.h jk úg fï foa jk
f,ig fla;kh lsÍfuks¡ fï i|yd wod, fõßhn,h ks¾udKh l,hq;Af;A
ghsu¾ lkafg%da,A tl ;=, fkdj fl,skau Class tl ;=, fjhs¡ WodyrKhla f,i
Tn ta i|yd wod, fõßhn,h ghsu¾ lkafg%da,a tl ;=, ks¾udKh lf,ahehs
is;kak¡ fuúg thg tlla tl;=jQ úg lsishï fohla isÿùug fla;khla ,shd
;snqfkahehs is;kak¡ fuúg wod, ld¾hh isÿù fuu Tick bfjkaÜ tl wjikaùu;A
iu`.u fõßhn,fhys w.h tkï fõßhn,h u;lfhka bj;Aùu isÿfjhs'
kej;;A B,`. ñ,s;;Amr 100 oS Tick bfjkaÜ tl kej;;A l%shd;Aul jkúgoS
fõßhn,ho kej; w¿f;ka ks¾udKhù tys w.h kej; 1 ùu isÿfjhs¡ ukao
Tick bfjkaÜ tl wjika jkjd;A iu`.u fõßhn,ho u;lfhka bj;Aùhk
neúks¡ kuq;A Class tl ;=, fl,skau fõßhn,h ks¾udKh l,úg th u;lfhka
bj;Aù hkafka jevigyk Odjkfhka bj;Aùhk úgoS fjhs¡ tuksid thg hï
w.hla mejrEúg th B,`. w.h;A tl;=fjñka jevigyk wjika jkf;lau
u;lfhka bj;Aù fkdhhs¡ ta i|yd fl,skau Class tl ;=,
Dim Y As Integer
f,i fõßhn,hla ks¾udKh lr.kak¡ oeka fuu rgdj ks¾udKhùu i|yd Timer2
lkafg%da,A tflys Tick bfjkaÜ tl ;=, my; mßos fla;kh lrkak¡
fyd|hs Timer1 lkafg%da,A tflys Tick bfjkaÜ tl ;=, my; oelafjk wdldrhg
fla;kh lrkak¡
fyd|hs wms oeka wfkla rgdj ks¾udKh lruq¡ óg wod, fla;kh wm Timer4
lkafg%da,A tl ;=, isÿlr we;' fuu rgdj ie,l+úg fuu ´j,A fIAma fma,s 5 ys
jïmi msysá my,u fma,sfhys isg ol=Kqmi msysá my,u fma,sfhys msg;skau
olakg ,efnk ´j,A fIAma ms,sfj,ska tl ne.ska lymdg ùu isÿúh hq;=h'
fuf,i tu msg;u msysá ´j,A fIAma fma,sh lymdgù ol=Kqmi msysá my,u
fma,shg meñKsmiq kej;;A tys msg; isg we;s fojk fma,sfhys we;s ´j,A fIAma
ms,sfj,ska jïmi my,u msysá my,u fma,sh olajd lymdg ùu isÿúh hq;=h'
fuf,i jïmi my,u msysá my,u fma,sh olajd ´j,A fIAma lymdg jQ miq Bg
we;=,;ska msysá ´j,A fIAma tflys isg ms,sfj,ska wfkla fma,sj, ´j,A fIAma
lymdg ùu isÿúh hq;=h' fï wdldrhg w¾O ljdldrj ish¿u fma,sj, ´j,A
fIAma lymdg jQ miq ish¿u ´j,A fIAma j, j¾Kh l¿mdg ù kej;;A fmr mßosu
fuu rgdj l%shd;Aulùu isÿúh hq;=h' fyd|hs fï i|yd Timer4 lkafg%da,A tflys
Tick bfjkaÜ tl ;=, my; mßos fla;kh lrkak¡
fuu rgdj i|ydo m,uqj fl,skau Class tl ;=, Z f,i fõßhn,A tlla ks¾udKh
lrf.k isáh hq;=fjhs¡ fuu Tick bfjkaÜ tl l%shd;Auljk iEu jdrhla mdidu z
fõßhn,hg 1 ne.ska tl;=ùu i|yd fla;kh lr we;' fuys w.h 1 jk jd;A
iu`.u fuu ´j,A fIAma fma,sj, jïmi my,u msysá fma,sfhys isg ol=Kqmi
my,u fma,sfhys msg;skau we;s ish¿u ´j,A fIAma tl ne.ska w.h 1 2 3 4 5 jk
úg lymdg ùu i|yd fla;kh lr we;' bkamiq z ys w.h 6 7 8 9 10 jk úg
ms,sfj,ska ol=Kqmi my,u fma,sfhys we;s msg; isg we;=,;ska fojkshg msysá ´j,A
fIAma tflys isg wfkl=;A fma,sj, o ta wdldrfhkau jïmi msysá my,u fma,sh
olajd ish¿u ´j,A fIAma ly mdg ùu isÿfjhs¡
oeka ish¿u ´j,A fIAma l¿mdg jQ úg kej;;A by; rgdju uq, isg l%shd;Aulùu
isÿúh hq;=h' fyd|hs ta i|yd z fõßhn,fhys mj;sk w.h 23 jQ úg w.h 0 ùu
i|yd fla;kh lr we;' fuúg ghsu¾ lkafg%da,A tl l%shd;Aul jk úg 1 2 3 4 hk
w.hka yuqjk neúka by; rgdj kej; kej; l%shd;Aulùu isÿfjhs¡ fuu rgd
hï ld,hlg jrla iajhxl%Shju tlsfkl udre fjñka l%shd;Aulùu md,kh
lsÍug wod, fla;kh isÿlsÍug Timer3 lkafg%da,a tl Ndú;d lr we;' fuysoSo wm
isÿlrkq ,nkafka lsishï fõßhn,hla ks¾udKh lr thg w.h tl ne.ska
tl;=ùug i,iajd th wyj,a w.h jQ úg wod, rgd iys; ghsu¾ lkafg%da,Aia il%sh
creted By: S.Wajira Madushanka
Disapamok Online IT Academy
ùug fla;kh ,sùfuks¡ fyd|hs tfia kï fuysoSo fõßhn,h ks¾udKh l,
hq;Af;A fl,skau Class tl ;=, fjhs¡ kuq;A wm fuysoS th
f,i Timer3 lkafg%da,a tflys Tick bfjkaÜ tl ;=, ks¾udKh lr we;' fuúg
wod, fõßhn,h Dim f,i fkdj Static f,i werUQ úg tho u;lfhka bj;Ajkq
,nkafka wod, jevigyk Odjkfhka bj;Ajk úgoS fjhs¡ fuu ghsu¾ lkafg%da,A
tflys Interval w.h ñ,s;;Amr 1000 f,i ilia lr Tick bfjkaÜ tl ;=, my;
mßos fla;kh lrkak¡
tla tla rgd hïlsis ld,hlg jrla iajhxl%Shj udre lsÍu isÿlrkq ,nkafka
tkï Bg wod, fla;kh isÿlrkq ,nkafka Timer3 lkafg%da,A tflys neúka
creted By: S.Wajira Madushanka
Disapamok Online IT Academy
jevigyk wdrïNjk úgoSu l%shd;Aul úhhq;Af;A fuu ghsu¾ lkafg%da,A tl
fjhs¡ fyd|hs jevigyk wdrïNjk úgu fuu ghsu¾ lkafg%da,A tl iajhxl%Shj
l%shd;Aulùug f*daï tflys Load bfjkaÜ tl ;=, my; mßos fla;kh lrkak¡
fyd|hs fuh wm f;Areï .ekSu i|yd ir< jevigykla ks¾udKh lruq¡ fuu
jevigyk wm úIqj,A fíisla fvdÜfkÜ mß.Kl NdIdfjys 2010 ixialrKh
Ndú;d lrñka isÿlrk wdldrh meyeos,s lruq¡ fï i|yd w¿;A jHdmD;shla
wdrïN lrkak' fï i|yd f,An,A lkafg%da,Aia 6 la iy fglaiaÜ fndlaia
lkafg%da,Aia folla muKla m%udKj;A fjhs¡ fuu lkafg%da,Aia my; oelafjk
wdldrhg f*daï tl ;=, äihska lr.kak¡
by; jevigyfkys Enter First Value bosßfhys we;s fglaiaÜ fndlaia tl ;=,
lsishï w.hla ,ndoS Enter Second Value bosßfhys we;s fglaiaÜ fndlaia tl ;=,
;j;a w.hla ,ndoS Add f,an,h u;g ujqia fmdhskag¾ tl f.k wd úg fuu
w.hka fol tl;= l,hq;=o hkak úuiñka uefiaÊ tlla fmkaúh hq;= w;r tys
Yes nÜka tl la,sla l,úg fuu w.hka foflys tl;=jo uefiaÊ tllska
creted By: S.Wajira Madushanka
Disapamok Online IT Academy
fmkaúh hq;=h' fuys No nÜka tl la,sla l,úg w¿;A w.hla ,ndoSu i|yd oekg
fglaiaÜ fndlaia foflys w.hka bj;Aù kej;;A w¿;A w.hla ,ndoSu i|yd m,uq
fglaiaÜ fndlaia tl ;=, l¾i¾ tl msysgqúh hq;=fjhs¡ fuys Subtract f,An,h
u;g ujqia fmdhskag¾ tl f.k .shúg fmr mßosu uefiaÊ tlla fmkaúh hq;=
w;r tys Yes nÜka tl la,sla l, úgoS m,uq w.h fojk w.fhka wvqù uefiaÊ
tlla ;=,u ms,s;=r fmkaúh hq;=fjhs¡ fï wdldrhgu w.hka folla ,ndoS Division
f,an,h u;g ujqia fmdhskag¾ tl f.k .shúg olakg ,efnk uefiaÊ tflys Yes
nÜka tl la,sla l, úgoS m,uq w.h fojk w.fhka fnoSfuka ,efnk w.h uefiaÊ
tlla ;=, fmkaúh hq;=fjhs¡ fuf,i w.hka ,ndoS Multiply f,an,h u;g ujqia
fmdhskag¾ tl f.k .sh úg fmr mßosu uefiaÊ tlla fmkaúh hq;= w;r tys
Yes nÜka tl la,sla l, úgoS tu w.hka foflys .=Ks;h uefiaÊ fndlaia tlla
;=, fmkaúh hq;=h' fuysoS Yes No iys; nÜka we;s uefiaÊ tl i|yd fõßhn,hla
ks¾udKh l,hq;= fjhs¡ fuysoS wm Dim f,i fõßhn,hla m%ldY fkdlrk w;r
wjYH wjia:dfõoS ku muKla i|yka lr mejÍug n,dfmdfrd;A;= fjuq¡ fï i|yd
Option Explicit ;;Ajh m,uqj wl%sh ;;Ajhg m;Alr.; hq;= fjhs¡ fï i|yd f*daï
tl u; vn,A laa,sla lr olakg ,efnk fldaâ úkafvda tflys Public Class
Form1 ys by,ska l¾i¾ tl msysgqjd Option Explicit Off f,i fla;kh lrkak¡
fuúg fmkajkq ,nk uefiaÊ tflys You Clicked Add Label hkak tl fma,shl;A
Do you want to add this first value and second value f,i fjku fma,shl;A
f,i fma,s foll fmkaúh hq;=h' idudkHfhka fuf,i uefiaÊ fndlaia tlla
;=, fma,s tllg jvd jeä .KkloS mKsúvhla i|yka lrk úgoS tu fma,s
leãu i|yd vbCrlf fla;h Ndú;d lrkq ,nhs¡
kuq;A fujka wjia:djloS Tng wrdjka fyj;AA Array tlla ks¾udKh lsÍu isÿl,
yel' fuh wm fuf,i meyeos,s lr.ksuq¡ idudkH mßos fõßhn,A ;=kla ks¾udKh
lsÍu tlsfklg fjkia f.j,A 3 la ks¾udKh lsÍulg iudk l, yel' fï i|yd
wrdjka fyj;A Array tlla ks¾udKh lsÍu hkq tlsfklg iïnkaO lr tkï
f.j,A ;=k fma,shlg ieoSulg iudk l, yel' tlu wdldrfha fõßhn,A ;=kla
ks¾udKh lsÍfïoS tajd tlsfklg fjkia kï ;=klska ks¾udKh lrk neúka
tajd mß.Kl u;lfhys úúO ia:dkj, ks¾udKh lrk w;r wrdjloS tajd fiÜ
tlla jYfhka mß.Kl u;lfhys tlu ;ekloS ks¾udKh neúka
ffioaOdka;slj wrdjlska o;A; mjrdf.k l%shd;AulùfïoS jevigyfkys
fõ.hla n,dfmdfrd;A;= úh yel' fõßhn,A ;=kla ks¾udKh lrkúgoS tajd
tlu fâgd ghsma tflys jqjo kï ;=klska i|yka l,hq;= fjhs¡ kuq;A fõßhn,A
;=klg .e,fmk f,i Array tlla ks¾udKh lrkúgoS tlu kulska jrykla
;=, tu m%udKh i|yka lrkq ,nhs¡ fuysoS Array tlloS tu fldgia y÷kd.kq
,nkafka 0 1 2 3 wdoS f,ig fjhs¡
lsishï ld¾hhla i|yd fõßhn,A ;=kla ks¾udKh lsÍu hkq yßhg lsishï tlu
ia:dkhlg nvq /f.k hdug ÿïßh tkaðka ;=klg fmÜáhla wuqKd tu ÿïßh
;=ku .uka lsÍulg iudkl, yel' ta i|yd Array tlla Ndú;d lsÍu hkq tlu
ÿïßh tkaðulg fmÜá ;=kla wuqKd nvq f.khdulg iudk l, yel'
fyd|hs fuu wrdjka fyj;A Arrays f;Areï .ekSu i|yd wm l,ska fõßhn,aia
Ndú;d lrñka ks¾udKh lrk,o w.hka folla tl;=l, yels jevigyk wrdjka
Ndú;d lrñka ks¾udKh lrkafka flfiao lshd n,uq¡ fï i|yd wm úIqj,A
fíisla fvdÜfkÜ ys 2008 ixialrKh Ndú;d lr we;' fï i|yd w¿;A
jHdmD;shl`a wdrïNlr f,An,A ;=kla iy fglaiaÜ fndlaia ;=kla iy nÜka
lkafg%da,A tlla ,nd.ksñkA my; oelafjk wdldrhg f*daï tl äihska
lr.kak¡
Values(1) = TextBox2.Text
fuys lsishï w.hla ,ndoS tl;= lsÍfï nÜka tl tnqfõhehs is;kak¡ fuúg w¿;A
w.hla ,ndoSug l,ska ;snQ w.h bj;Aúh hq;=h' bkamiq kj w.hla i|yka lr =
,l=K iys; nÜka tl tnQ úgoS oeka fuu kj w.h;A l,ska bj;AjQ w.h;A hk
w.hka foflys tl;=j fuu fglaiaÜ fndlaia tl ;=,u fmkaúh hq;=h' tfia kï
fuu fojk w.h ,ndoSfïoS l,ska bj;AjQ w.h u;l ;nd.ekSug fõßhn,hla
ks¾udKh l,hq;= w;r tfukau fuu = ,l=K iys; nÜka tl Tnk úgoS Bg l,ska
la,sla lr ;snqfka + nÜka tlo" – nÜka tlo" / nÜka tlo" * nÜka tlo hk nj
y÷kd.ekSu i|yd Boolean fâgd ghsma tflys fõßhn,Aia y;rla ks¾udKh l,hq;=
creted By: S.Wajira Madushanka
Disapamok Online IT Academy
fjhs¡ kuq;A wm fuysoS ta i|yd ks¾udKh lrkq ,nkafka fldgia fyj;A t,sukaÜ
y;rl wef¾ tlls¡ fyd|hs ta i|yd f*daï tl u; vn,A la,sla lr fl,skau
Class tl ;=, my; mßos fõßhn,A tl iy wef¾ tl ks¾udKh lr.kak¡
fuysoS t,sukaÜ 4 la jqjo tajd .Kkh lrkq ,nkafka 0 ys isg neúka 3 la f,i
i|yka lr we;' f*daï tl Odjkh jkjd;A iu`.u fuu Array tflys ish¿u
t,sukaÜia False ;;Ajfhys mej;Su i|yd my; mßos fla;kh lrkak¡ fuu wef¾
tflys jryk ;=, i|yka lrkq ,nkafka fuu Array tflys t,sukaÜ tflys
y÷kd.kq ,nk Index tl fjhs¡
oeka fuu + ,l=K iys; nÜka tl la,sla l,úgoS fglaiaÜ fndlaia tl ;=, we;s
w.h u;lhg f.k fglaiaÜ fndlaia tl ysiaù B,`. w.h i|yka lsÍug l¾i¾
tl mej;sh hq;= fjhs¡ tfukau wef¾ tflys 0 hk t,sukaÜ tl + nÜka tl
y÷kd.ekSu i|yd Ndú;d lrk neúka th muKla True ;;Ajfha mej;sh
hq;=fjhs¡ ta i|yd my; mßos fla;kh lrkak¡
* nÜka tl i|yd
/ nÜka tl i|yd
fyd|hs oeka = ,l=K iys; nÜka tl la,sla lrkúgoS Bg wod, .Kkh isÿùu i|yd
my; mßos fla;kh lrkak¡
,l=K iys; nÜka tlg wod, fla;kh Tn fuu .%ka: ud,dfjys l,ska .%k:h
u.ska wOHhkh l,d kï Tng th ukdj jegfykakg we;s¡ fyd|hs ta i|yd
my; mßos fla;kh lrkak¡
tkï Rows iy Columns wdldrhg fldgq rE,AA fuka wef¾ ks¾udKh l, yel'
fuys wef¾ j, t,sukaÜ tlla y÷kd.kq ,nkafka Rows j, b,lalfuka iy ,
fhdoñka Column tflys b,lalfuka fjhs¡ fyd|hs fuh f;Areï.ekSu i|yd wms
jevigykla ks¾udKh lruq¡ fï i|yd w¿;A fm%dfclaÜ tlla újD;lr f,An,A
lkafg%da,A folla" fglaiaÜ fndlaia folla" nÜka lkafg%da,A tlla iy ,siaÜ
fndlaia lkafg%da,A tlla ,nd.ksñka my; oelafjk wdldrhg f*daï tl äihska
lr.kak¡
fuysoS fld,ï foll 2D Array tlla ks¾udKh lr we;' fuúg (0,0) f,i tla
t,sukaÜ tll=;A (0,1) f,i tla t,sukaÜ tll=;A ks¾udKh lsÍug isÿfjhs¡ ukao
2D Array tllo fld,ï iy frda mgka.kq ,nkafka 0 ka ùuhs¡ oeka fuu
ks¾udKh lr.;A wef¾ tflys t,sukaÜ folg fglaiaÜ fndlaia tl ;=, we;s
ku iy ÿrl:k wxl mjrd miqj tajd ,siaÜfndlaia tl ;=,g we;=,;A lr.;
hq;=fjhs¡ ta i|yd Add nÜka tl ;=, my; mßos fla;kh lrkak¡ óg wod, iïmQ¾K
fla;kh my;ska bosßm;A lr we;'
ks¾udKh lr.;A 2D Array tflys (0,0) t,sukaÜ tflys m,uq fglaiaÜ fndlaia
tflys ghsma lr we;s fglaiaÜ tl;A (0,1) ys fojk fglaiaÜ fndlaia tflys ghsma
lr we;s fglaiaÜ tl;A mjrd miqj tajd ,siaÜ fndlaia tl ;=,g whs;uhla
jYfhka ku iy ÿrl:k wxlh ysia;ekla iys;j wE|d.ksñka fmkaùug
fla;kh lr we;' oeka jevigyk Odjkh lr n,kak¡
fuu 2D Array Ndú;d lrk wdldrh ;jÿrg;A wjfndaO lr.ekSu i|yd ;j;a
jevigykla ks¾udKh lruq¡ fï i|yd w¿;A jHdmD;shla wdrïN lrkak¡ fuu
,efnk f*daï tlg f,An,A lkafg%da,A ;=kla" fglaiaÜ fndlaia ;=kla" nÜka
lkafg%da,A folla iy ,siaÜ fndlaia lkafg%da,A tlla wjYH fjhs¡ oeka tajd my;
oelafjk wdldrhg f*daï tl ;=, äihska lr.kak¡
fuysoS 2D Array tlloS my,g úysoS we;s t,sukaÜ ie,l+úg th wmg fldmuK
ixLHdjlao hkak l,skau ;SrKh l, fkdyel' ukao th ;SrKh jkafka m,uq
fglaiaÜ fndlaia tl ;=, ,ndfok w.hg wkqj fjhs¡ fuys 10 la i|yka l,úg
my,g t,sukaÜ 10 la iliaúh hq;=h' 2 la f,i ,ndÿkaúg t,sukaÜ 2 la
iliaúh hq;=h' kuq;A yria w;g mj;sk t,sukaÜ ;sfnkafka wksjd¾fhkau 2 la
muKs¡ ukao wm iEu mqoa.,hl=f.Au we;=,;A lrkq ,nkafka ku iy ÿrl:k
wxlh muKs¡ fyd|hs ta i|yd f*daï tl vn,A la,sla lr fldaâ úkafvda tl
,ndf.k fl,skau la,dia tl ;=, my; oelafjk wdldrhg wef¾ tlla iy
Count f,i Integer fâgd ghsma tflys fõßhn,hla ks¾udKh lr.kak¡
Redim iafÜÜukaÜ tl u.ska rkaghsï tflaoS wef¾ tll t,sukaÜ .Kk ;SrKh
l, yel' fuys members wef¾ tflys frda .Kk fyj;A my,g úysfok t,sukaÜ
.Kk ;SrKh lrkq ,nkafka m,uq fglaiaÜ fndlaia tl ;=, ,ndfok w.hg wkqj
neúka Val(TextBox1.Text-1),1 f,i i|yka lr we;' kuq;A t,sukaÜ ;SrKh lrkq
,nkafka 0 ys isg neúka jeämqr 1 la .Kkh jk neúka tlla wvqlr we;' kuq;A
;sriaj úysfokafka t,sukaÜ folla neúka 1 f,i i|yka lr we;' ukao iEu
mqoa.,hl=f.Au we;=,;A lrkq ,nkafka ku iy ÿrl:k wxlh muKla ùuh¡
fyd|hs oeka Add nÜka tl vn,A la,sla lr fldaâ úkafvda tl ,ndf.k tys Click
bfjkaÜ tl ;=, my; mßos fla;kh lrkak¡
fuu Count fõßhn,h ks¾udKh lrk,oafoa fl,skau la,dia tl ;=, fjhs¡ fuhg
úfYAI w.hla mjrd fkdue;s neúka 0 ys isg wdrïNùu isÿfjhs'
members(count,0) = TextBox2.Text
members(Count,1) = TextBox3.Text
fuu members 2D Array tflys count ys w.h mj;skq ,nkafka 0 ys neúka m,uqj
fuu nÜka tl la,sla lrkúgoS (0,0) t,sukaÜ tlg TextBox2 ys fglaiaÜ tl
fyj;A tkï ku;A (0,1) t,sukaÜ tlg TextBox3 ys fglaiaÜ tl fyj;A ÿrl:k
wxlh mjrd.kakd f,ig fla;kh lr we;'
ListBox1.Items.Add(members(count,0) & “ “ & members(count,1))
creted By: S.Wajira Madushanka
Disapamok Online IT Academy
fla;h u.ska fuu wef¾ tflys t,sukaÜ folg mjrd.;A ku iy ÿrl:k wxl
,siaÜ fndlaia tl ;=,g whs;uhla jYfhka we;=,;A lr.kakd f,ig fla;kh
lr we;'
count= count+1
u.ska fuu count fõßhn,hg 1 la tl;= lr.kakd f,ig fla;kh lr we;' ta;A
iu`.u mjrd.;A o;A; ,siaÜ fndlaia tlg we;=,;A lr.;Amiq B,`. ku iy
ÿrl:k wxlh i|yka lsÍug fglaiaÜ fndlaia fol ysiaùug fla;kh lr we;'
fuúg kej;;A nÜka tl la,sla l, úgoS count ys w.h 1 jk neúka ks¾udKh
lr.;A wef¾ tflys (1,0) g kej;;A kula" (1,1) g ÿrl:k wxlhla .nvdlr fmr
mßosu ,siaÜ fndlaia tlg we;=,;A lr.kq ,nhs¡
hï fyhlska fuu tl;=jk Count w.h m,uq fglaiaÜ fndlaia tflys i|yka l,
w.hg iudkoehs úuidn,hs¡ ukao ku iy ÿrl:k wxl we;=,;A l,hq;Af;A tu
m%udKhg ùuh' fuúg Number of members over f,i uefiaÊ tlla fmkajd
fglaiaÜ fndlaia" f,An,A iy nÜka ;djld,slj wl%shjk f,ig fla;kh lr we;'
óg wod, ish¿u fla;kh my;ska bosßm;A lr we;'
fuysoS If iy Then w;r iEu úgloSu mÍlaId lrkq ,nk fldkafoaish ,shkq ,nhs¡
Then g miqj my,ska tu fldkafoaishg tl`.kï isÿjk l%shdjg wod, fla;kh
l,hq;= fjhs¡ by; fldkafoaishg tl`. fkdjk úgoS Else g miqj ;j;a
fldkafoaishla i,ldne,sh yel' Bg miqj ;j;a b*A iafÜÜukaÜ tllska fmr
mßosu ;j;a fldkafoaishla mÍlaIdlr ne,sh yel' fï wdldrhg Else g miqj
wjYH fldkafoais m%udKhg .e,fmk f,ig b*A iafÜÜukaÜ wdrïN lrñka
fldkafoais ,súh yel' ish¿u fldkafoais j,g miqj Else f,i i|yka lr Bg
my,ska fla;kh l,úg by; i|yka lrk,o ish¿u fldkafoais j,g tl`.
fkdjQúg tu fla;kh l%shd;Aulùu isÿfjhs¡ wjidkfhys wdrïN lrk,o b*A
iafÜÜukaÜ m%udKhg .e,fmk f,ig End If f,ig wjika l,hq;= fjhs¡ fuu
,shk,o lsishï b*A iafÜÜukaÜ tlla i;HjQ úgloS fï yd ine|s Bg my,ska
,shk,o lsisÿ b*A iafÜÜukaÜ tlla i,ld n,kq fkd,nhs¡ ukao wjYH
fldkafoaish i;HjQ neúks' fyd|hs fuu jevigyfkys Calculate nÜka tl vn,A
la,sla lr tys la,sla bfjkaÜ tl ;=, my; mßos fla;kh lrkak¡
by; fla;kh Tng ukdj jegfykakg we;ehs lshd wfmalaId lruq¡ oeka ;j;a
n,d bkafka l=ulgo@ oekau jevigyk Odjkh lr tys id¾:l;Ajh w;A
ú|skak¡ oeka wms fuu b*A iafÜÜukaÜ tflys ;j;a m%fNAohla y÷kd.ksuq¡ fuho
fla;kfhys fjkila isÿjqjo l%shd;Aulùfuys meyeos,s fjkila olakg
fkd,efnhs¡
fyd|hs by; i|yka lrk,o lkafg%da,aia Ndú;d lrñka my; oelafjk wdldrhg
f*daï tl äihska lr.kak¡ fuysoS fla;kh i|yd jeo.;Ajk lkafg%da,Aia j,
kïo rEm igyk iu`. bosßm;A lr we;'
fyd|hs wms fuu jevigyfkys l%shdldÍ;Ajh f;Areï .ksuq¡ l,ska mejiQ mßos fuh
mhs;.ria m%fïhg wkqj iDcqfldaKsl ;%sfldaKhl mdo foll os. ,ndÿka miq
wfkla mdofhys os. fidhd.; yels jevigykla fjhs¡ fuys mdo ;=fkysu wdldr
;=klloS mdohkays os. fiùfï yelshdj we;' fuys Type 1 f¾äfhda nÜka tl
f;ArEúg iDcqfldaKsl ;%sfldaKhl wfkla mdo foflys os. ,ndÿka miq l¾Kfhys
os. fidhd.ekSfï yelshdj we;'
tkï l¾Kfhys os. iy noaO mdofhys os. ,ndÿka miq x fyj;A iïuqL mdofhys os.
fidhd.ekSug yelsúh hq;=h' fuys Type 3 hk f¾äfhda nÜka tl f;dard.;A úgoS
l¾Kfhys iy iïuqL mdofhys os. ,ndÿka úgoS noaO mdofhys os. fidhd.ekSug
yelsúh hq;=h'
tkï l¾Kfhys os. 5 f,i iy iïuqL mdofhys os. 4f,i ,ndÿka úgoS x fyj;A
noaO mdofhys os. fidhd.ekSug yelsúh hq;=h'
wms m,uqj n,uq mhs;.ria m%fïhh hkq l=ulao lshd¡ iDcqfldaKsl ;%sfldaKhl noaO
mdofhys w|skq ,nk iup;=ri%hl j¾.M,fhys tl;=j iy iïuqL mdofhys w|skq
,nk iup;=ri%hl j¾.M,fhys iïmQ¾K tl;=j l¾Kfhys w|skq ,nk
iup;=ri%hl j¾.M,hg iudkùu isÿfjhs¡
tkï iïuqL mdofhys we| we;s iup;=ri%fhys j¾.M,h a kï noaO mdofhys we|
we;s iup;=ri%fhys j¾.M,h b kï fuu j¾.M,hka foflys tl;=j tkï
l¾Kfhys we| we;s iup;=ri%fhys j¾.M,h jk c g iudkùu isÿfjhs¡ tu ksid
iup;=ri%hl mdo iudk neúka iup;=ri%hl j¾.M,h iEfokafka o mdo
foflys os. jeä lsÍfuka neúka Bg wkqrEmj fkdokakd mdohl os. fï
weiqfrka fidhd.ekSfï yelshdj we;' fuys Type 1 f¾äfhda nÜka tl f;dard we;s
úgoS noaO mdofhys iy iïuqL mdofhys os. ,ndÿka úgoS l¾Kfhys os.
fidhd.ekSug yelsúh hq;=h' tfia kï w.hka ,ndoSug yelsúh hq;Af;A iïuqL
mdofhys iy noaO mdofhys muKla neúka l¾Kh bosßfhys we;s fglaiaÜ fndlaia
tl ;=, w.hka ,ndoSug fkdyelsúh hq;= w;r th fiùug we;s ksid x f,i
i|yka úhhq;=h' tfia kï Type 1 f¾äfhda nÜka tl la,sla l,úgoS fuh isÿúh
hq;= neúka tys CheckedChanged bfjkaÜ tl ;=, my; mßos fla;kh lrkak¡
fuu f¾äfhda nÜka tl la,sla l, úgoS l¾Kfhys os. iy iïuqL mdofhys os.
,ndÿka úgoS noaO mdofhys os. fidhd.ekSug yelsúh hq;=h' noaO mdofhys bosßfhys
olakg ,efnkafka TextBox3 lkafg%da,A tl neúka tys x hkak fmkaùug;A w.hka
,ndoSug fkdyelsjk mßos ReadOnly fm%dmá tl True f,i ilia lr we;' óg fmr
fjk;A f¾äfhda nÜka tlla Tnd ;snqfkakï tajdfha x mej;=kfyd;A w.hka
,ndoSug th bj;Ajk f,ig;A ReadOnly fm%dmá tl True ù mej;=fkakï th
False ùug;A fla;kh lr we;' fuu jevigyk m,uqj Odjkh l,úg lsisÿ
f¾äfhda nÜka tlla f;AÍ ;sfnkq olakg fkd,efnhs¡ tfia mej;=kfyd;A
jevigyk fodaI iys; fjhs¡ tkï fuúg w.hka ;=ku ,ndoSfï yelshdj mj;S'
fuh j,lajd.ekSu i|yd m,uq f¾äfhda nÜka tl f;dard fm%dm¾àia úkafvda
tflka Checked fm%dmá tl True f,i ilialr we;' oeka jevigyk Odjkh lr
n,kak¡
9 + 16 = x2
25 = x2
x=5
x2 + 9 =25
x2 = 25 – 9
x2 = 16
x=4
tkï fuysoS TextBox1 ys we;s w.fhys j¾.fhka TextBox3 ys j¾. w.fhka wvqù tys
uQ,h fmkajkq ,nhs¡ fuúg ks¾udKh jk valstore fõßhn,hg tu TextBox1 ys
j¾. w.fhka TextBox3 ys ,efnk j¾. w.h wvql,úg ,efnk w.h mjrd.kq
,nhs¡ bkamiq fuys uQ,h mdofhys os.jk neúka th answ fõßhn,hg mjrdf.k
we;' bkamiq fmr mßosu fuh ms,s;=rla f,i uefiaÊ tll fmkajk f,ig fla;kh
lr we;' fyd|hs RadioButton3 lkafg%da,A tl la,sla l,úgoS isÿjk .Kkhg
wod,j my; mßos fla;kh lrkak¡
x2 + 16 = 25
x2 = 25 – 16
x=3
fuysoS valstore fõßhn,h ;=, .nvdjkq ,nkafka TextBox1 ys ,ndoS we;s w.fhys
j¾. w.h fyj;A l¾Kfhys osf.ys j¾. w.fhka TextBox2 ys ,ndoS we;s w.fhys
j¾. w.h fyj;A iïuqL mdofhys j¾. w.fhka wvqù ,efnk w.h fjhs¡ miqj
fuys uQ,h answ fõßhn,hg mjrd fmr mßosu th uefiaÊ tll fmkaùug
fla;kh isÿlr we;' óg wod, iïmQ¾K fla;kh my;ska bosßm;A lr we;'
oeka jevigyk Odjkh lr tys id¾:l;Ajh w;Aú¢kak¡ fyd|hs wms oeka fuu
bf.k.;A w¿;A b*A iafÜÜukaÜ m%fNAoh Ndú;d lrk wdldrh bf.kSu i|yd
;j;a m%dfhda.sl jevigykla ks¾udKh lruq¡ fuh úIqj,A fíisla fvdÜfkÜ
mß.Kl NdIdjg Tnf.A is; we| ne| ;nd.kakd ;j;a tla jevigykla jkjd
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
fkdwkqudkhs¡ fuh wxl wyUq f,i ,ndÿkaúgoS tajd ms,sfj,g ilia lrkq
,nk l=vd mß.Kl l%Svdjla f,ig ye|skajQjdg jrola fkdue;' fuu
jevigyk id¾:lj f;Areï .ksñkA ksul,miq Tng rEm fldgia tl;= lrñka
iïmQ¾K mska;+rhla ilia lrkq ,nk jevigykla jqjo ks¾udKh lsÍfï
l=i,;djh ,nd.; yel'
fyd|hs jeä l;d l=ulgo wms oekau jev mgka .ksuq¡ fyd|hs fï i|yd úIqj,A
iagqäfhda 2008 ixialrKh Ndú;d lrñka úIqj,A fíisla fvdÜfkÜ mß.Kl
NdIdjg wod,j w¿;A jHdmD;shla wdrïN lrkak' fyd|hs fuu jevigyk i|yd
nÜka lkafg%da,Aia 18 la" f,An,A lkafg%da,Aia 6 la iy ghsu¾ lkafg%da,A tlla
wjYH fjhs¡ fuu lkafg%da,Aia Ndú;d lrñka my; oelafjk wdldrhg f*daï tl
äihska lr.kak¡
fuysoS fla;kh i|yd jeo.;Ajk lkafg%da,Aia j, kïo rEm igyk iu`. olajd we;'
by; wdldrhg nÜkaia j, b,lalï olakg ,enqfkahehs is;kak¡ fuúg ysia nÜka
tl ;sfnk ;ekg 14 f,i i|yka nÜka tl fukau 15 hk nÜka tlo heùu
isÿl, yel' fuúg 15 hk nÜka tl la,sla l,úg th ysia nÜka tl ;sfnk
;ekg .uka lrúh yelsúh hq;=h' tfukau 14 hk nÜka tl la,sla l,úgoS tho
ysia nÜka tl ;sfnk ;ekg heùug yelsúh hq;=h' kuq;A wm fuysoS i;H
jYfhkau nÜka tl ysia;ekg heùula isÿlrkafka ke;' WodyrKhla f,i 15
hk nÜka tl .ek is;kak¡ fuh la,sla l,úg wm lrkafka tys wxlh muKla
ysia nÜka tl ;=, fmkaùu fjhs¡ kuq;A fuu nÜka tl udre ù we;s nj fmkaùu
i|yd 15 wxlh ;sfnk nÜka tl ysia lrkq ,nhs¡ 14 f,i i|yka nÜka tlg
isÿlrkq ,nkafkao thu fjhs¡ tkï 14 f,i i|yka nÜka tl la,sla l,úgoS
tu wxlh ysia ;ek ;snQ nÜka tl ;=, fmkajkq ,nk w;r nÜka tl tu
ia:dkhg .shnj ye`.ùug 14 wxlh l,ska mej;s nÜka tl ysia lrkq ,nhs¡ wm
fuu jevigyfkys ish¿u nÜka j,g isÿlrkq ,nkafkao by; i|yka lrk,o
l%shdju fjhs¡ fyd|hs Tng oeka jevigyfkys l%shdldÍ;Ajh ukdj
f;Areïhkakg we;ehs lshd wfmalaId lruq¡ wms oeka fla;kh lsÍug mgka.ksuq¡
fuys wms m,uqj 14 f,i i|yka nÜka tlg wod, fla;kh ms,sn|j i,luq¡
fuf,i b,lalï iys; nÜka tyd fuyd lrkúgoS 14 f,i i|yka nÜka tl
jgd hdnoj ysia nÜka ;=kla ;sfíhehs ;¾l l,yel' tkï 14 hk nÜka tl 13
fukau 5 iy oekg ysia ;ekla iys; nÜka tlg udre lsÍu isÿl, yel'
fuu wxl ms,sfj,g ilia lsÍu i|yd Tng hïlsis ld,hla ,ndfokjd lSjd
Tng u;l we;s¡ fuu .Kkh lsÍu isÿlrkq ,nkafka ghsu¾ lkafg%da,A tl ;=,
fjhs¡ fuysoS fudkhï fyda nÜka tlla la,sla lsÍug mgka.kakdúg fuu ghsu¾
lkafg%da,A tl l%shd;Aulúh hq;= neúka ta i|yd Timer1.Start () fla;h Ndú;d lr
we;' fuf,i wxl ms,sfj,g ilia lrkúgoS w;ru`. fudkhï fyda ld¾hhla
i|yd fõ,dj .Kkh lsÍu k;r lsÍug wm Pause nÜka tl Ndú;d lrkq ,nhs¡
wdrïNfhys fuh ;djld,slj wl%shjk mßos ilia lr we;s w;r m%fya,sldfjys
wxl ms,sfj,g ilia lsÍug l=uk fyda nÜka tlla la,sla l, úgoS ld,h
.Kkhùu wdrïNjk neúka oeka fuu nÜka tl w;ru. k;r lsÍug il%sh
lr.;hq;= neúka ta i|yd Button17.Enabled = True hk fla;h ,shd we;' fuu
jevigyfkaoS by; i|yka l, wdldrhg l=uk nÜka tl ysiaj mj;skafkao
hkak ;¾l lrñka fidhd.; hq;= neúka jevigykg ;ksj ;SrKhla .ekSug
isÿjk neúka wksjd¾fhkau b*A iafÜÜukaÜ tlla Ndú;d lsÍug isÿfjhs¡ fï
i|yd wm oeka fuu .%ka:fhka meyeos,s lrk,o b*A iafÜÜukaÜ m%fNAoh Ndú;d
lr we;'
fuu 14 hk nÜka tl la,sla l,úgoS Button13 fyj;A oekg ysiaj mj;sk nÜka
tl i;H jYfhka ysiaj mj;skafkao hkak fidhd n,k w;r th tfia kï oekg 14
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
wxlh i|yka iys; nÜka tl oekg ysiaj mj;sk nÜka tl fyj;A Button13 g tu
w.h ,nd.kakd f,ig fla;kh lr we;' fuysoS ,nd.kakd ju ,ndfokakd ol=K
hk kS;sh u;l ;nd.kak¡ ^fuh wm l,ska .%ka:fhys fï ms,sn|j ieflúka
bosßm;A lr we;'& oeka fuu 14 hk wxlh ysianÜka tlg ,nd.;A miq tu
ia:dkh fj; 14 f,i i|yka nÜka tl udrejQ nj fmkaùug fuys ;snQ wxlh
bj;A lsÍug fla;kh lr we;' fï wdldrhgu Button15 fyj;A oekg 13 hk
wxlh iys; nÜka tl ysiajqjfyd;A fmr mßosu thg 14 hk wxlh mjrdf.k oekg
14 f,i i|ykaa nÜka tl ysialrk f,ig fla;kh lr we;' tfukau Button10
fyj;A oekg 5 hk wxlh iys; nÜka tl ysiaj mej;sh fyd;a fuu 14 hk wxlh
mjrd oekg 14 f,i i|ykaa nÜka tl ysialrk f,ig fla;kh lr we;'
fyd|hs wms oeka oekg 13 hk wxlh iys; nÜka tl fyj;A Button15 hk
lkafg%da,A tl i,ld n,uq¡
fuysoS 13 f,i i|yka nÜka tl ie,l+úg fuf,i wxl ms,sfj,g ilia lrkúgoS
oekg 12" 7 iy 14 hk nÜka ysiaj mj;skafka hehs ;¾l l,yel' fyd|hs ta
i|yd Button15 hk lkafg%da,A tl vn,A la,sla lr tys Click bfjkaÜ tl ;=, my;
mßos fla;kh lrkak¡
fuysoS Button16 fyj;A oekg 12 wxlh mj;sk nÜka tl ysiaj mj;skafkao hkak
fidhd n,d we;s w;r th tfia kï Button16 lkafg%da,A tlg Button15 ys wxlh
fyj;A 13 hk w.h mjrd Button15 ys wxlh ysia lsÍug fla;kh lr we;' tfukau
7 ys b,lalu iys; nÜka tl jk Button11 hk lkafg%da,A tl ysiaj mej;=kfyd;A
thg fuu 13 hk w.h mjrd fuu oekg 13 w.h mj;sk nÜka tl ysia lsÍug
fla;kh lr we;' tfukau 14 wxlh i|yka nÜka tl ysiaj we;Akï fuu 13 w.h
mjrd iqmqreÿ f,i oekg 13 w.h mj;sk nÜka tl ysia lrkq ,nhs¡ fuys 12 hk
wxlh iys; nÜka tl ie,l+úg th wxl ms,sfj,g ilia lrk úgoS 6 iy 13
hk nÜka ysiaj mj;skafkahehs ;¾l l, yel'
fyd|hs fuu 12 f,i i|yka nÜka tl vn,a la,sla lr my; mßos fla;kh lrkak¡
fyd|hs taa i|yd 15 f,i i|yka nÜka tl vn,a la,sla lr tys la,sla bfjkaÜ tl
;=, my; mßos fla;kh lrkak¡
fuys oekg ysiaj mj;sk Button13 ys w.h ysiaj mej;=kfyd;A thg fuu
Button9 ys w.h mjrd Button9 ys fglaiaÜ tl ysialr.kakd f,ig fla;kh lr
we;' tfukau oekg 5 hk w.h mj;sk Button10 lkafg%da,A tl ysiaj mj;Skï thg
fuu w.h mjrd 15 hk w.h ysialr.kakd f,ig fla;kh lr we;' tfujkau
fuu nÜka tlg by,ska msysgd we;s Button5 hk lkafg%da,A tl ysiaj mj;Skï
thg Button9 ys w.h fyj;A 15 hk w.h mjrd th ysialr.kakd f,ig fla;kh
lr we;' fuys 5 hk w.h mj;sk nÜka tl ie,l+úg ta jgd ysia nÜka 4 la
mj;skafkahehs ;¾l l,yel'
m,uqj fuys Button14 fyj;A 14 f,i i|yka nÜka tl ysiaj mj;skafka kï thg
fuu Button10 ys wxlh fyj;A 5 hkak mjrdf.k fuu 5 hk w.h ysia lsÍu i|yd
fla;kh isÿlr we;' bkamiq ElseIf iafÜÜukaÜ tlla Ndú;d lr Button11 fyj;A 7
wxlh mj;sk nÜka tl ysiaj mj;Skï fuu 5 hk w.h thg mjrd wxlh ysia
lr.kakd f,ig fla;kh lr we;' fï wdldrhg Button9 iy Button6 i|yd
by; wdldrhg wkql+,j fla;kh isÿlr we;' oeka 7 hk w.h iys; nÜka tl
ie,l+úg tys my; mßos 4, 13, 6 iy 5 hk nÜka ysiaj mj;sk nj ;¾l l,
yel'
fuys wxl udre lrk úgoS Button15 nÜka tl" Button12, Button7 iy Button10
hk lkafg%da,Aia ysiaj mj;skafka hehs is;d tajdg wod, w.h fyj;A Button11 ys
mj;sk 7 hk w.h mjrd oekg 7 hk w.h mj;sk nÜka tl ysialr.kakd f,ig
fla;kh lr we;' fuys 6 f,i i|yka nÜka tl ie,l+úg tys my; mßos 12 iy 2
hk nÜka ysiaj mj;skafka hehs ;¾l l, yel'
fyd|hs fuu 6 f,i i|yka nÜka tl vn,A la,slA lr my; mßos fla;kh
isÿlrkak¡
fuu 11 hk w.h iys; nÜka tl vn,A la,sla lr my; mßos fla;kh lrkak'
fuu jevigyfkys wms uq,skau ysiaj mej;=kq nÜka tl i|yd fla;kh isÿlf,A
fkdue;' th fla;kh l,hq;Af;A wxl ms,sfj,g ilia lrkúgoS fuys wxlhla
mej;=fkahehs ;¾l lrñka fjhs¡ fuúg thg jï miska iy by,ska wxlhla
mej;=fkahehs ;¾l l, yel'
fuysoS wms tlsfklg fjkia wxl rgd y;rla bosßm;A lrk neúka fmr
wdldrhgu numbstyle2, numbstyle3 iy numbstyle4 f,i fjku bfjkaÜ
fm%diSðh¾ ks¾udKh lrñka ta ;=, my; oelafjk wdldrhg fla;kh lrkak¡
oeka fuys we;s Styles nÜka tl la,sla lrkúgoS fuu bfjkaÜ fm%diSðh¾ ;=,
ks¾udKh lr.;A wxl rgd tlska tl fmkAúh hq;=fjhs¡ fuysoS o wms lrkq
,nkafka lsishï fõßhn,A tlla fl,skau la,dia tl ;=, ks¾udKh lr thg
tl ne.ska tl;=ùug i,iajd tajd wyj,A w.h kï Bg wod, bfjkaÜ fm%diSðh¾
tl Odjkh ùug ie,eiaùfuks¡ fyd|hs ta i|yd fl,skau la,dia tl ;=,
Dim mem As Integer
f,i fõßhn,hla ks¾udKh lr.kak¡ oeka fuu Styles nÜka tl ;=, my;
oelafjk wdldrhg isÿlr.kak¡
fuysoS ;;Amr .Kkhùu isÿjkafka Label3 lkafg%da,A tl ;=, fjhs¡ fuys oekg
mj;sk w.fhka 1 la wvqùu i|yd fla;kh lr we;' ghsu¾ lkafg%da,A tl ;=,
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
Interval tl 1000 f,i ilia l, neúka iEu ;;Amrhlg jrlau Tick bfjkaÜ tl
l%shd;Auljk úgoS Label3 ys mj;sk w.fhka 1 ne.ska wvqùu isÿfjhs¡ fuf,i
w.h wvqfjñka fuys w.h 0 ùu hkq yßhgu ñks;A;=jla f.ù wjidk ùu fjhs¡
fuúg ñks;A;=jla wvqúh hq;= neúka ñks;A;= .Kkhùu isÿjkafka Label1 ys
neúka bka 1 la wvqùu i|yd fla;kh lr we;' kej;;A ;;Amr 59, 58 f,i
wdrïNùu i|yd Label3 ys w.h 59 ùug fla;kh isÿlr we;' fuu Label1 ys w.h
0 iy Label3 ys w.h 1 jkjd;A iu`.u ld,h wjika jk neúka túg ;jÿrg;A
.Kkhùu k;r lsÍu i|yd ghsu¾ lkafg%da,A tl wl%sh lr we;s w;r wod,
uefiaÊ tl fmkajd jevigyk Odjkfhka bj;Aùug fla;kh lr we;' oeka
fkdmudj jevigyk Odjkh lr tys rih w;Aú|skak¡
fyd|hs Tng b*A iafÜÜukaÜ tflys wm oeka meyeos,s lrÿka m%fNAoh ukdj
jegfykakg we;ehs lshd wfmalaId lruq¡ rEm fldgia tl;= lrñka isÿlrk
fujeksu wdldrfha jevigyka ks¾udKh lsÍu Tn i;=h'
;ksj ;SrK .ekSfï jevigyka ks¾udKfhaoS úIqj,A fíisla fvdÜfkÜ mß.Kl
NdIdj ;=, Ndú;d lrkq ,nk fuu b*A iafÜÜukaÜ tl l%shd;Aul jk wdldrh
ukdj meyeos,sj ;jÿrg;A wjfndaO lr.ekSu i|yd wms ;j;a l=;=y,hla okjk
jevigykla ks¾udKh lruq¡ fuh Tng úfkdaockl fukau wdYAp¾hu;A
jevigykla jkjd fkdwkqudkhs¡ fuysoS Tng gQ,A fndlaia tflys olakg
,efnk ;j;a jeo.;A lkafg%da,A tlla m%dfhda.slj Ndú;d lrk wdldrh bf.k
.; yel' fuh hï mqoa.,hl=f.A cd;sl ye÷kqïm;A wxlh ,ndÿkA úg Tyqf.A ia;%S
mqreI Ndjh iy Wmkaoskh fiùfï jevigykla fjhs¡ jeä l;d fudlgo wms
oekau jev mgka .ksuq¡ fï i|yd f,An,A lkfg%da,A 5 la" .ArEma fndlaia lkafg%da,A
tlla iy nÜka lkafg%da,A tlla wjYH fjhs¡ Bg wu;rj gQ,A fndlaia tflys
olakg ,efnk Common Controls leg.ßfhys olakg ,efnk MaskedTextBox
lkafg%da,A tl wjYHh fjhs¡
oeka fuu lkafg%da,Aia f*daï tl ;=, my; oelafjk wdldrhg äihska lr.kak¡
fyd|hs oeka fuu jevigyfkys l%shdldÍ;Ajh f;Areï .ksuq¡ fuys Enter your ID
Number bosßfhys wod, cd;sl ye÷kqïm;A wxlh i|yka lr Find Birth Day nÜka
tl la,sla l,úg tu cd;sl ye÷kqïm;A wxlhg wkqj Tyqf.A fyda wehf.A ia;%S
mqreINdjh iy Wmkaoskh fmkaúh hq;=fjhs¡ fyd|hs wms oeka m,uqj n,uq cd;sl
ye÷kqïm;A wxlh ,ndÿka miq hdka;%slj Wmkaoskh iy ia;%S mqreI Ndjh
,nd.kafka flfiao lshd¡ fï i|yd wm my; ye÷kqïm;A wxlh ie,ls,a,g
.ksuq¡
873403349v
fuys jïmi isg m,uq b,lalï foflka ksrEmkh jkq ,nkafka Tyq Wmka j¾Ih
fjhs¡ tkï fuys uq,A b,lalï fol jkqfha 87 fjhs¡ tkï fudyq bmso we;Af;A
1987 j¾Ifhys fjhs¡ fuysoS 2000 jirg miqj bmsÿk lsisu flfkl=yg
ye÷kqïm;la fkd,eî we;s f,ig Wml,Amkh lr we;' fuys 87 g miqj we;s
b,lalï ;=fkka tkï fuys kï 340 fjhs¡ fuu w.h hï mqoa.,hl=f.A 500 g
jeäkï tu mqoa.,hd .eyeKshla jk w;r 500 g wvqkï tu mqoa.,hd msßñ
flfkl= fjhs¡ fuysoS Tyq fyda weh Wmka udih iy oskh ;SrKh lrkq
,nkafka o fuu w.h i,lñka fjhs' msßñ flfkl=kï m,uqj fuu ,eî we;s
w.h 31 g wvqkï fl,skau tu mqoa.,hd ckjdß udifhys bmÿk flfkl= jk
w;r WodyrKhla f,i fuu w.h 5 jQfhakï fl,skau Tyq ckjdß ui 5 jk
osk Wmka wfhl= fjhs¡ WodyrKhla f,i fuu w.h 31 g jvd jeä jQfha hehs
is;kak¡ by; 340 hk w.h ie,l+úg th 31 g jvd úYd, w.hla fjhs¡ fuúg
ckjdß udih i|yd iEu wjqreoaoloSu osk 31 la we;s neúka fuh 340 hk
w.fhka m,uqj wvql, hq;=fjhs¡ fuúg ,efnk w.h 309 fjhs¡ hï fyhlska
fuu ,enqk w.h 31 g jvd wvqjQfha kï Tyq tu oskg fmnrjdß udifhys Wmka
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
wfhl= fjhs¡ oeka fuu ,enqk 309 w.h 31 l g jvd kej;;A jeä ksid wêl
wjqqreoaola f,i i,ld fmrjdß udihg we;s osk 29 ka wvq l,hq;= fjhs¡ fuúg
,efnk w.h 280 fjhs¡ fuu ,enqk w.h 31 g jvd wvqjQfha kï Tyq tu oskg
ud¾;= udifhys Wmka wfhl= fjhs¡ fuu 280 hk w.h kej;;A 31 g jvd jeä
neúka ud¾;= uig osk 31 la we;s neúka 280 ka kej;;A 31 la wvq l, hq;= fjhs¡
fuúg ,efnk w.h 249 fjhs¡ hïfyhlska fuu w.h 31 g jvd wvq jQfha kï
Tyq tu oskg wfm%A,A ui Wmka wfhl= fjhs¡ fuu ,enqk 249 hk w.h 31 g jvd
jeä jk neúka wfm%A,A uig osk 30 la we;s neúka kej;;A 249 ka 30 la wvql,
hq;= fjhs¡ fuúg ,efnk w.h 219 fjhs¡ fuh 31 g jvd wvq jQfha kï Tyq tu
oskg uehs ui Wmka wfhl= fjhs¡ fuu ,enqk 219 hk w.h 31 g jvd jeä neúka
uehs uig osk 31 la we;s neúka kej;;A 31 ka wvql, hq;= fjhs¡ fuúg ,efnk
w.h 188 fjhs¡ fuh 31 g jvd wvqjQfha kï Tyq tu oskg cQks ui Wmka wfhl=
fjhs¡ fuu 188 hk w.h 31 g jvd jeä neúka cQks uig osk 30 la we;s neúka
kej;;A 30 la wvq l, hq;=fjhs¡ fuúg ,efnk w.h 158 fjhs¡ hï fyhlska fuh
31 g jvd wvqjQfha kï Tyq tu oskg cQ,s ui Wmka wfhl= fjhs¡ fuu w.h 31 g
jvd jeä neúka cQ,s uig osk 31 la we;s neúka 158 ka 31 la wvq l, hq;= fjhs¡
fuúg ,efnk w.h 127 fjhs¡ hï fyhlska fuh 31 g jvd wvqjQfha kï Tyq tu
oskg wf.daia;= ui Wmka wfhl= fjhs¡ fuu ,efnk 127 w.h 31 g jvd jeä
ksid wf.daia;= uig osk 31 la we;s neúka kej;;A 127 ka 31 la wvql, hq;=fjhs¡
fuúg ,efnk w.h 96 fjhs¡ hï fyhlska fuh 31 g jvd wvqjQfha kï Tyq tu
oskg iema;eïn¾ ui Wmka wfhl= fjhs¡ 96 hk w.h 31 g jvd jeä neúka
iema;eïn¾ uig osk 30 la we;s neúka 96 ka 30 la wvql, hq;= fjhs¡ fuúg
,efnk w.h 66 fjhs¡ fuu w.h 31 g jvd wvqjQfha kï Tyq tu oskg
Tlaf;daïn¾ ui Wmka wfhl= fjhs¡ fuu 66 ka Tlaf;daïn¾ uig osk 31 la we;s
neúka 31 la wvql, hq;= fjhs¡ fuúg ,efnk w.h 35 fjhs¡ hï fyhlska fuh 31
g jvd wvqjQfha kï Tyq fkdjeïn¾ ui tu oskg Wmka wfhl= fjhs¡ 35 hk
w.h 31 g jvd jeä neúka fkdjeïn¾ uig osk 30 la we;s neúka 30 la
wvql,úg w.h jYfhka 5 ,efnhs¡ fuh wksjd¾fhkau 31 g jvd wvqjk w;r
Tyq bmso we;Af;A foieïn¾ ui 5 jk osk fjhs¡
fuu ye÷kqïm;A wxlfhys 87 g miqj we;s b,lalï ;=fkys jákdlu 500 g jvd
jeäjQ úgoS tkï ia;%S wfhl=f.A kï tu w.fhka 500 la wvqlr by; mßos 31 g
jvd wvq w.hla ,efnk f;la ms,sfj,ska udi j,g we;s osk j,ska wvql, hq;=
fjhs¡ WodyrKhla f,i 687 la jQfha kï thska 500 la wvqlr ,efnk w.h jk
187 by; ms,sfj,g wvqlrf.k hdhq;= fjhs¡ fuu ish,A, isÿjkqfha Find Birth
Day nÜka tl la,sla l, úgoS fjhs¡ tu ksid fla;kh l,hq;Af;A fuu nÜka tflys
Click bfjkaÜ tl ;=, fjhs¡ fuysoS m,uqj fuu udialâ fglaiaÜ fndlaia tl ;=,
,ndfok cd;sl ye÷kqïm;A wxlfhys m,uq b,lalï folg miqj we;s b,lalï
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
;=k fjkalr.; hq;=fjhs¡ bkamiq th 500 g jvd jeäkï 500 la wvqlr tu
,efnk w.h .nvdlr ;nd.; hq;=fjhs¡ ukao udi ms,sfj,g we;s osk .Kk wvq
lrkq ,nkafka tu w.fhka ùuh' fyd|hs fuu w.h .nvdlr ;nd.ekSu i|yd
Dim valpart As Integer
f,i fl,skau Class tl ;=, fõßhn,hla ks¾udKh lr.kak¡ oeka nÜka tflys
Click bfjkaÜ tl ;=, my; mßos fla;kh lrkak¡
sex = Mid(MaskedTextBox1.Text,3,3)
f,i fõßhn,hla ks¾udKh lr.kak¡ If sex > 500 Then fuu sex fõßhn,hg
fjkalr ;nd.;A w.h 500 g jvd jeä oehs úuid n,d we;' fuúg tu w.fhka 500
wvq lr tu ,efnk w.h valpart fõßhn,hg mjrd.kakd f,ig fla;kh lr
we;' tfukau fuúg .eyeKq flfkl= neúka Label4 lkafg%da,A tl ;=, Female
f,i fmkaùug fla;kh lr we;' tfia fkdjk úgoS tkï 500 g wvq w.hla neúka
th fl,skau valpart fõßhn,hg ,nd.kakd f,ig fla;kh lr we;' Label4
lkafg%da,a tl ;=, Male f,i fmkaùug fla;kh lr we;' oeka fuu cd;sl
ye÷kqïm;A wxlfhka bmÿk wjqreoao fjkalr.; hq;= fjhs¡ fuysoS wmg Mid
*kalaIka tl fjkqjg Substring fu;â tlo Ndú;d l, yel' fuho miqj wms
wjqreoao fmkaùfïoS m%fhdackhg .kakd neúka fõßhn,hla ;=, .nvdlr ;nd.;
hq;=fjhs¡ ta i|yd fl,skau la,dia tl ;=,
Dim str As String
f,i fjku fõßhn,hla ks¾udKh lr.kak¡ fuysoS
str= MaskedTextBox1.Text.Substring(0,2)
udialâ fglaiaÜ fndlaia tflys we;s fglaiaÜ tflka le/lag¾ia fjka lrkq
,nk msysgk ia:dkh f,i i|yka lr we;' tkï fglaiaÜ tflys le/lag¾ia
.Kka .kq ,nkafka jï me;Af;ys isg ms,sfj,ska ol=Kq me;A;g 0 ys isg fjhs¡
bkamiq fjkalr.kq ,nk b,lalï m%udKh , fhdoñka i|yka l,hq;= fjhs¡ fuu
fjkalr.kq ,nk le/lag¾ia m%udKh str fõßhn,hg mjrd.kakd f,ig
fla;kh lr we;'
fyd|hs oeka isÿlsÍug we;Af;A fuu jevigyfkys jeo.;Au fla;kh fjhs¡ tkï
fuu fjkalr.;A w.h tkï valpart fõßhn,hg ,nd.;A w.h 31 fyda 31 g jvd
wvqjk f;la ms,sfj,ska udij, osk .Kkska wvql, hq;=fjhs¡ tfia kï
mshjfrka mshjr udi j, osk .Kkg wkqj wvqlsÍug we;s neúka tla udihl
osk .Kkla wvql, miq tho 31 g jvd jeä jQ úg tu l,ska wvqjQ w.fhka
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
kej; udifhys osk .Kkla wvqlrk úgoS tu w.hka u;l ;nd.; hq;= neúka
ta i|yd fõßhn,Aia ks¾udKh l,hq;= fjhs¡ kuq;A wmg fuysoS ta fjkqjg
t,sukaÜ 11 lska hq;A wef¾ tlla ks¾udKh lr tu wjia:dkql+,j wvqjk osk
.Kk u;l ;nd.ekSu i|yd tu tla tla t,sukaÜ Ndú;d lr we;' ta i|yd
my; oelafjk wdldrhg xmonth f,i t,sukaÜ 11 lska hq;A wef¾ tlla
ks¾udKh lr.kak¡
fuys fldgq lrk,o fla;kh muKla ;ks fm,lg ,sùug j. n,d.kak' oeka
fuu ye÷kqïm;A wxlfhys fjkalr.;A b,lalï ;=kg wod, w.h 500 g jvd
jeäjQfha kï thska 500 la wvq l, fyda ke;fyd;A 500 g wvq fl,skau ,efnk
w.h fl,skau valpart fõßhn,hg ,ndf.k wjidkh' If valpart >val(31) Then
fuysoS fuu fjkalr.;A w.h 31 g jvd jeä oehs úuid n,hs¡ ukao tfia jQ úg Tyq
ckjdß ui Wmka wfhl= fkdjk neúks¡ tfia jqjfyd;A
xmonth(0) = valpart -31
fuu valpart fõßhn,h ;=, ;ekam;A jQ w.fhka ckjdß uig osk 31 we;s neúka 31
la wvqlr we;s w;r hï fyhlska tho 31 g jvd jeä kï B,`. udifhka wvq
lrk f;la fuu w.h u;lfha ;nd.; hq;=fjhs¡ ta i|yd fuu 31 wvqlr
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
,efnk w.h ks¾udKh lr.;A wef¾ tflys xmonth(0) t,sukaÜ tlg mjrdf.k
we;' Else hkq by; fldkafoaishg tl`. fkdjk wjia:dj fjhs¡ tkï fuu valpart
ys ;snQ w.h fl,skau 31 fyda 31 g jvd wvq w.hla ùuh' fuúg meyeos,sju tu
mqoa.,hd ckjdß ui Wmka mqoa.,fhl= jk w;r valpart j,ska 31 la wvq jQ miq
,efnk w.hg Tyq Wmka oji wkql+, fjhs¡ fuúg Wmka oskh fmkajkq ,nk
Label2 lkafg%da,a tl ;=, str fõßhn,hg fjkalr.;A wjqreoaog 1900 la tl;= lr
we;s w;r fuúg fjka lr.;A wjqreoao 88 kï thg thg 1900 la tl;= jQ miq
1988 f,i Wmka j¾Ih ,nd.; yel' fuf,i 1900 la tl;= lr we;Af;A ;ju;A
2000 j¾Ifha Wmka wfhl=g fyda Bg miqj Wmka wfhl=g ye÷kqïm;la ksl=;A lr
fkdue;s njg Wml,Amkh lrñka fjhs¡ fuúg bmso we;Af;A meyeos,sju ckjdß
ui neúka thg January hkak wE`od we;s w;r valpart ys w.h 31 g wvq ksid
fl,skau th oskh jYfhka fmkajk f,ig fla;kh lr we;' by; fldgq lr
olajd ;snqfka Wmkaoskhg wod, iïmQ¾K fla;kh fjhs¡ fuysoS Bg miqj Return
f,i fla;kh lr we;' fuúg hï fyhlska Else g miqj ,shd we;s fla;kh
l%shd;Aul jQ úg tkï Label2 ;=, Wmkaoskh fmkajQmiq Return fla;kh u.ska Bg
my,ska ,shd we;s lsisÿ fla;khla l%shd;Aul fkdlrñkA iïmQ¾Kfhkau bfjkaÜ
tl l%shd;Aulùu k;r lr oukq ,nhs¡ fuysoS Wmkaoskh ,enqKq miq ;j;a fohla
lsÍug wjYH ke;s ksid Bg my,ska ,shd we;s lsisÿ fla;khla l%shd;Aul lsÍug
wjYH fkdfjhs¡ ukao fufia Return f,i ,sùug wjYHù we;Af;A fuys ,shkq
,nkafka wm tlsfklg iïnkaO ke;s ;ks ;ks b*A iafÜÜukaÜ fjhs' fuúg
uq,ska ,shd we;s b*A iafÜÜukaÜ tl i;H jqjo wi;H jqjo Bg my,ska ,shd we;s
ish¿u ;ks ;ks b*A iafÜÜukaÜ o uqodyßkq ,nhs¡ fuh je,elaùu i|yd Return
f,i fla;kh lr we;' fuh fhdod ;snqfka wehs o hkak Tng wjidkfha fla;kh
isÿl, miq f;Areï .ekSfï yelshdj mj;S'
oeka fuu xmonth(1) t,sukaÜ tlg mjrd.;A w.ho 31 g jvd jeä kï th ud¾;=
uig we;s osk .Kk fyj;A 31 la wvqlr tu ,efnk w.h xmonth(2) t,sukaÜ tlg
mjrdf.k we;' fufia fkdùu hkq xmonth(1) ys w.h 31 fyda 31 g wvqùu fjhs¡
fuúg Tyq fyda weh ud¾;= ui Wmka wfhl= fjhs¡ túg Wmkaoskhg wod,
fla;kh fmr mßosu Bg wkql+, jk mßos Else g miqj ,shd we;'
fuu xmonth(2) t,sukaÜ tlg ,nd.;A w.h 31 g jvd jeäkï Tyq ud¾;= ui Wmka
wfhl= fkdjk neúka wfm%A,A udihg we;s osk .Kk fyj;A 30 lska wvqlr tu
,efnk w.h xmonth(3) t,sukaÜ tlg mjrdf.k we;' tfia fkdùu hkq Tyq
wfm%A,A ui Wmka wfhl= fjhs¡
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
fuu xmonth(3) j,g ,nd.;A w.h 31 g jvd jeäkï Tyq uehs ui o Wmka wfhl=
fkdjk neúka tys uehs uig wod, osk 31 la wvqlr xmonth(4) t,sukaÜ tlg
mjrdf.k we;' fuu xmonth(3) w.h 31 fyda 31 g jvd wvqjQ úg Tyq uehs ui
Wmka wfhl= fjhs¡
fuu xmonth(4) g ,nd.;A w.ho 31 g jvd jeä kï kej;;A cQks uig we;s osk
.Kk jk 30 lska wvqlr xmonth(5) t,sukaÜ tlg tu w.h mjrdf.k we;'
xmonth(4) ys w.h 31 g jvd wvqjQ úg Tyq cQks ui Wmka wfhl= fjhs¡
fuu xmonth(5) t,sukaÜ tl i|yd ,nd.;A w.ho osk 31 g jvd jeäkï cQ,s uig
we;s osk .Kk jk 31 wvq lr tu ,efnk w.h xmonth(6) t,sukaÜ tlg
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
mjrdf.k we;' fuu xmonth(5) g ,enqk w.h 31 fyda 31 g wvqkï Tyq meyeos,sju
cQ,s ui Wmka wfhl= fjhs¡
fuu xmonth(8) t,sukaÜ tflys we;s w.ho 31 g jvd jeä jQ úg Tlaf;dan¾ uig
we;s osk 31 lska wvqlr tu ,efnk w.h xmonth(9) t,sukaÜ tlg mjrdf.k
we;' fuu w.h tkï xmonth(8) t,sukaÜ tflys w.h 31 fyda 31 g jvd wvqjQ úg
Tyq Tlaf;dan¾ ui Wmka wfhl= fjhs¡
fuu xmonth(9) t,sukaÜ tlg mjrd.;A w.h 31 g jvd jeä kï fkdjeïn¾ uig
we;s osk .Kk jk 30 lska wvqlr tu ,efnk w.h xmonth(10) t,sukaÜ tlg
mjrdf.k we;' fuu xmonth(9) ys w.h 31 fyda 31 wvqùu hkq meyeos,sju Tyq
fkdjeïn¾ ui Wmka wfhl= fjhs¡
oeka udi 11 la u f.ù we;s neúka wksjd¾fhkau fuu xmonth(10) ys we;s w.h 31
g jvd wvq w.hla fjhs¡ fuúg ,efnk w.h Wmkaoskh jk w;r udih foieïn¾
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
fjhs¡ fyd|hs jevigyk Odjkh lr n,kak¡ Tnj mqÿuhg m;Alrjñka
jevigyk l%shd;Aulùu isÿfjhs¡ fyd|hs fuu jevigyfkys tla tla b*A
iafÜÜukaÜ j, Else g miqj oskh fmkaùug wod, fla;khg miqj Return f,i
fla;kh fkdlf,ahehs is;kak¡ fyd|hs fuu nÜka tflys uq,skau ,shd we;s b*A
iafÜÜukaÜ tlg wod, fla;kh i,ld n,uq¡
fuysoS valpart fõßhn,fhys we;s w.h 31 g jvd wvqjQfhahehs is;kak¡ fuúg Else g
miqj ,shd we;s fla;kh l%shd;Aulùu isÿfjhs¡ kuq;A Return f,i fla;kh lr
fkdue;s ksid ,shd we;Af;A ;ks ;ks b*A iafÜÜukaÜ neúka Bg my,ska ,shd we;s
b*A iafÜÜukaÜ o l%shd;Aulùu isÿfjhs¡ fuúg If valpart > val(31) Then fla;kh
wi;Hjk neúka Bg my,ska ,shd we;s ish¿u b*A iafÜÜukaÜ j, Else g miqj ,shd
we;s fla;kh muKla l%shd;Aulùu isÿfjhs¡
fuysoS m,uqj Select Case f,i wrUñka fldkafoais mÍlaIdlrkq ,nk TífclaÜ
tl wod, fm%dmá tl iu`.ska y÷kajdosh hq;=fjhs¡ WodyrKhla f,i lsishï lïfnd
fndlaia tllska hï whs;uhla f;ArEmiq hï l%shdj,shla isÿfõkï" whs;uh
f;ArEmiq th l=ulao hkak Text fm%dmá tl Ndú;d l, yels neúka tjka
wjia:djloS Select Case ComboBox1.Text f,i fuu iafÜÜukaÜ tlg wod,
fldkafoais mÍlaIdlrkq ,nk TífclaÜ tl y÷kajdosh yel' bkamiq Case f,i
wrUñka fldkafoaish muKla ,súhhq;= w;r kej; kej; fldkafoaish iu`.
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
fldkafoais mÍlaId lrkq ,nk TífclaaÜ tl y÷kajdoshhq;= fkdue;' fï fya;=j
ksid fuu iafÜÜukaÜ tl b*A iafÜÜukaÜ tlg jvd ffioaOdka;slj fõ.fhka
l%shd;Auljk njg ;¾l l,yel' Case Else hkq by; ish¿u fldkafoais j,g
tl`. fkdjk wjia:dj fjhs¡ fyd|hs fuu Select Case iafÜÜukaÜ wdldrh
m%dfhda.slj Ndú;d lrk wdldrh jgyd.ekSu i|yd l=vd jevigykla ks¾udKh
lrn,uq¡ fuysoS Tng úIqj,A fíisla fvdÜfkÜ mdßißlh ;=,oS úkafvdaia
fufyhqï moaO;sh ;=, olakg ,efnk InputBox Ndú;d lrk wdldrh bf.k .;
yel'
fyd|hs fuu jevigyk ks¾udKh lsÍu i|yd úIqj,A fíisla fvdÜfkÜ 2008
ixialrKfhys w¿;A jHdmD;shla wdrïN lrkak' fï i|yd .ArEma fndlaia tlla"
mslap¾ fndlaia lkafg%da,A tlla" f¾äfhda nÜka lkafg%da,A ;=kla iy nÜka
lkafg%da,A tlla wjYHh fjhs¡ fuu jevigyk ;=,oS wdldr ;=kl is,skavr j,
j¾.M,h fiùfï yelshdj mj;S' tkï mshka folu mj;sk is,skavrhl" ;ks
mshkla muKla mj;sk is,skavrhl iy mshka lsisjla fkdue;s is,skavrhl
fjhs¡ fuu ,nd.;A f¾äfhda nÜka ;=fkka tla tla tajd f;ArEúg by; wdldr
;=fkysu is,skavrhl j¾.M,h fiùug yelsúh hq;=h' fuu tla tla f¾äfhda
nÜka la,sla lrkúgoS tu tla tla is,skavr l=uk wdldrfha tllaoehs hkak wm
my; oelafjk wdldrhg bfïÊ ;=kla fmkaÜ jevigyk Ndú;d lrñka
ks¾udKh lr we;' fuu jevigyk ks¾udKh lsÍug m%:ufhka tu wdldrhg
mska;+r ;=kla mßoafoka iq/l=ï lr.kak¡
fuys Both f,i kï lr we;Af;A mshka fol iys; is,skavrh ksrEmkh lsÍug wod,
bfïÊ tl fjhs¡ none f,i kï lr we;Af;A mshka lsisjla fkdue;s is,skavrh
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
ksrEmkh lsÍu i|yd fjhs¡ one f,i kï lr we;Af;A tla mshkla muKla we;s
is,skavrh ksrEmkh lsÍu i|yd fjhs¡ oeka my; oelafjk wdldrhg f*daï tl
äihska lr.kak¡
fuysoS wms wod, bfïÊ ;=ku fm%dfclaÜ tlg Resource *hs,A tlla wdldrhg
,ndf.k jevigyk ks¾udKh lsÍug n,dfmdfrd;A;= fjuq¡ tu l%uhg fuu bfïÊ
;=k fm%dfclaÜ tlg ,nd.ekSu i|yd jevigyk äihska lrk wjia:dfõoS
mslap¾ fndlaia lkafg%da,A tl f;dard tys ol=Kqmi by, fl,jfrys olakg
,efnk l=vd l¿ mdg ;%sfldaKhlska ksfhdackh jk nÜka tl la,sla lr olakg
,efnk fukq tflka Choose Image hk wdldrh f;dard.kak¡ fuúg olakg
,efnk vhf,d.A fndlaia tflys Project Resource File hk TmaIka tl f;dard
my,ska olakg ,efnk Import nÜka tl la,sla lrñka ks¾udKh lr.;A bfïÊ 3
f;dard oS ,nd.;A bfïÊ ;=fkka Both bfïÊ tl f;dard OK nÜka tl la,sla lrkak¡
fuu jevigyk äihska lrk wjia:dfõoSu wm Both Side Cylinder f¾äfhda nÜka
tl f;AÍ we;s mßos ilia lrkq ,nhs¡ tu ksid th f;AÍ we;s neúka mslap¾
fndlaia tflys m,uqj fmkaùug Both bfïÊ tl f;dard.kakd ,oS' ukao fuu
Both Side Cylinder f¾äfhda nÜka tl f;ArEúg fmkaúh hq;Af;A Both bfïÊ tl
ùuh' fuf,i Resource *hs,a tlla f,ig mska;+r we;=,;A l,miq th Solution
Explorer úkafvda tl ;=, my; mßos olakg ,efnhs¡
f,i fõßhn,hla ks¾udKh lrk w;r bkamiqj Both Side Cylinder f;ArEúg both
f,i fglaiaÜ tll=;A" One Side Cylinder f¾äfhda nÜka tl la,sla l,úg tu
fõßhn,hg one f,i;A None Side Cylinder f¾äfhda nÜka tl f;ArEúgoS none
f,i fglaiaÜ tll=;A fõßhn,h ;=, .nvd lrkq ,nhs¡ miqj Area of Cylinder
nÜka tl la,sla lrk úgoS fuu mem fõßhn,h ;=, we;af;a l=uk fglaiaÜ tl
oehs i,lñka fla;kh lrkq ,nhs¡ fuu wjia:dfõ oS wmg isf,laÜ flaia
iafÜÜukaÜ tl Ndú;d l, yel' fyd|hs fuu f¾äfhda nÜka 3 g wod,
fla;kh my; mßos isÿlrkak¡
fuf,i Resource tl i|yd tl;= lr.;A bfïÊ ,nd.ekSu i|yd My. f,i
;s;la ;nd Resource f,i ghsma lr ;s;la ;enQ úg tu tl;= lr.;A mska;+r j, kï
olakg ,efnhs¡ tfukau mem fõßhn,hg both hk fglaiaÜ tl mjrd .kakd
f,ig fla;kh lr we;'
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
fuf,i úIqj,A fíisla fvdÜfkÜ mß.Kl NdIdj ;=,oS bkamqÜ fndlaia Ndú;d
lsÍu i|yd fmdÿ l%ufõohla olakg ,efnhs¡
InputBox (—bkamqÜ fndlaia tl ;=," —ud;Dldj˜, tys iqÿ mdg fldgqj ;=, )
fmkajkq ,nk fglaiaÜ tl˜ fmkajkq ,nk w.h
fuysoS is,skavrfhys wrh i|yka lsÍug tla bkamqÜ fndlaia tll=;A bkamiqj
is,skavrfhys Wi i|yka lsÍug ;j bkamqÜ fndlaia tlla fmkaúh hq;= w;r
tajd ;=, ,ndfok w.hka miqj .Kkh lsÍfïoS wjYHjk neúka tajd fjku rad
iy hig f,i fõßhn,A folla ks¾udKh lr thg mjrd.kakd f,ig fla;kh
lrkq ,nhs¡ fyd|hs ta i|yd Area of Cylinder nÜka tl vn,a la,sla lr tys Click
bfjkaÜ tl ;=, my; mßos fla;kh lrkak¡
fuys Try j,g my,ska l%shd;Aul úhhq;= fla;kh ,súh hq;=fjhs¡ fuu fla;kh
uqodyßk úgoS th ksjerosj l%shd;Auljk úgoS Catch hk fldgi u`. yßkq ,nhs¡
kuq;A fuu fla;kh uqodyßk úgoS hï wkfmalaIs; je/oaola yuqjQ úgoS fl,skau
Catch fldgig mkskq ,nhs¡ fuúg Catch lr.;A fyj;A w,A,d.;A je/oao
mKsúvhla f,i fmkaùu i|yd MessageBox.Show(ex.Message) f,i fla;kh
lrkq ,nhs¡
fuysoS Try ;=, wod, fla;kh ,shd we;s w;r je/oaola isÿjQ úgoS ex f,i TífclaÜ
fõßhn,A tlla ks¾udKh lrñka ta i;= fm%dm¾àia iy fu;â Ndú;d lrñka
je/oao l=ulao hkak fidhdn,d Bg iqÿiq uefiaÊ tllska fmkajkq ,nhs¡ fuysoS
jevigyk wl¾uKH ù w;ru`. k;rùu isÿfkdfjhs¡ fyd|hs wmf.A
jevigyfkaoS kï fuu bkamqÜ fndlaia ks¾udKh lsÍu iy tla tla f¾äfhda
nÜka f;ArEúg isÿjk .Kkhg wod, fla;kh Try ;=, ,súh hq;=fjhs¡ fuysoS
nÜka tl la,sla lrkúgoS fuu tla tla f¾äfhda nÜka la,sla lr we;s úgoS fuu
mem fõßhn,hg hejQ fglaiaÜ tl l=ulao hkak ;SrKhla .ekSug isÿfjhs¡ ukao
fuu is,skavr wdldr ;=fkys j¾.M,h fiùfïoS tlsfklg fjkia .Kkh lsÍï
isÿjk neúks¡ fyd|hs mshka fkdue;s is,skavrhl j¾.M,h fiùu i|yd 2∏rh
iQ;%ho" tla mshkla we;s is,skavrhl j¾.M,h fiùu i|yd ∏r2 + 2∏rh iQ;%ho
iy mshka folla we;s is,skavrhl j¾.M,h fiùu i|yd 2∏r2 + 2∏rh iQ;%h
Ndú;d lrkq ,nhs¡
fuys fldgq lr we;s fla;kh tl fm,g ,sùug n,d.kak¡ Select Case mem fuysoS
fldkafoais i,ld n,kqfha mem fõßhn,h ;=, .nvd lr we;s fglaiaÜ tl l=ulao
hkak i,lñka fjhs¡ tkï f¾äfhda nÜka la,sla lrk úgoS fuu fõßhn,h ;=,
tlsfklg fjkia fglaiaÜ ;=kla .nvdjk neúks¡
Case “none” fuysoS mem fõßhn,h ;=, .nvdù we;Af;A none hk fglaiaÜ tl
kï f;dardf.k we;Af;A None Side Cylinder hk f¾äfhda nÜka tl fjhs¡ fuúg
uefiaÊ fndlaia tl ;=, tu .Kkhg wod, iQ;%fhka ,efnk ms,s;=r The Area of
the Cylinder is hk fglaiaÜ tl iu`. fmkajkq ,nhs¡ Case “one” hkq f;dardf.k
we;Af;A One Side Cylinder hk f¾äfhda nÜka tl fjhs¡ tfukau Case “both” hkq
f;dardf.k we;Af;A Both Side Cylinder hk f¾äfhda nÜka tl fjhs¡ fuúg Bg
wod, .Kkh isÿù uefiaÊ fndlaia tl ;=, fmkaùug fla;kh lr we;' fuu
.Kkh lsÍï Tng fuu fmd;A ud,dfõ ;=kajekak wOHhkh lf,Akï f;AÍï
.ekSfï .eg¿jla fldfy;Au ke;ehs wms úYajdi lruq' fuysoS je/oaola isÿjQ úgoS
jevigyk w;ru`. kj;ñka wl¾uKH ùu j,lajd we;' fyd|hs oeka
jevigyk Odjkhlr bkamqÜ fndlaia tflys laf,daia nÜka tl fyda Cancel
nÜka tl la,sla l,úgoS isÿjk je/oao Catch j,oS w,a,df.k jevigyk wl¾uKH
ùu j,lajk neúka lsisÿ wdldrhlska je/oaola olakg fkd,efnhs¡ oeka jevigyk
Odjkh lr n,kak¡
End Class
fuysoS *kalaIka tl uq¿ jHdmD;sh ;=,u Ndú;d lsÍug yelsjk mßos ks¾udKh
lrk neúka Public Function f,i werôh hq;=fjhs¡ ;jo fuys fldgqlr we;s
fla;kh tl fm,g ,súh hq;= nj u;l ;nd.kak¡ bkamiq fuu *kalaIka tl
fla;kfhaoS y÷kd.ekSu i|yd kula ,ndosh hq;=fjhs¡ fuysoS wm ku jYfhka
GetTotal f,i i|yka lr we;' bkamiq jrykla wdrïNlr merdóg¾ia i|yka
l,hq;= fjhs¡ fuysoS wms úIhhka y;rl ,l=Kqj, tl;=j ,nd.kakd neúka fuu
*kalaIka tl Ndú;d lrk iEu wjia:djloSu tu úIhhka y;frys ,l=Kq
,ndoSug yelsúh hq;=h' tkï Bg wkql+,j wm fuu *kalaIka tl ;=,
merdóg¾ia y;rla Ndú;d l,hq;= fjhs¡ tkï fuu *kalaIka tl Ndú;d
lrkúgoS fuu úIhhka j, ,l=Kq i|yka lsÍug fglaiaÜ fndlaia y;r fuu
*kalaIka tlg we;=,;A lsÍug yelsúh hq;=h' fuf,i ta i|yd merdóg¾ia
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
,ndoSug wm ByVal Maths As Integer f,i .Ks; úIfhys ,l=Kq ,ndoSu i|yd
merdóg¾ tlla ,ndoS we;' fuysoS fuu ,l=Kq tl;= lsÍulg Ndckh lrk
neúka As Integer f,i i|yka lr we;' tfukau isxy, úIfhys ,l=Kq we;=,;A
lsÍu i|yd ByVal Sinhala As Integer f,i merdóg¾ tll=;A bx.%Sis úIfhys ,l=Kq
,ndoSu i|yd ByVal English As Integer f,i;A úoHd úIfhys ,l=Kq we;=,;A lsÍu
i|yd ByVal As Science As Integer f,i merdóg¾ tlla ,ndoS jryk jid we;' oeka
fuu merdóg¾ia 4 ka tl;=j ,efnkafkao tl;= l, yels w.hla neúka hï fyhlska
oYuia:dk iys;j tl;=j meñKshfyd;A As Double f,i i|yka lr we;' oeka
fuu merdóg¾ia y;frys tl;=j ,nd.ekSug tot f,i fõßhn,hla ,ndf.k thg
merdóg¾ia y;frys tl;=j ,nd.kakd f,ig fla;kh lr we;' fuu *kalaIka
tflka ,efnk m%;sM,h jkqfha úIhhka y;frys ,l=Kqj, tl;=j neúka Return
tot f,i *kalaIka tlg oekqïosh hq;=fjhs¡ bkamiqj End Function f,i *kalaIka
tl wjika l, hq;=fjhs¡ oeka fuu la,dia tflys ks¾udKh lr.;A *kalaIka tl
Ndú;d lrk úgoS m,uqj f*daï la,dia tflys Class tl TífclaÜ tlla jYfhka
ks¾udKh lr.; hq;=fjhs¡ fyd|hs ta i|yd my; mßos fla;kh lrkak¡
fuys objrest hkq la,dia TífclaÜ tflys ku jk w;r MyMaths hkq wm oeka
ks¾udKh lr.;A la,dia tl fjhs¡ oeka Total nÜka tl ;=, my; oelafjk wdldrhg
fla;kh lrkak¡
fyd|hs wms oeka ,l=Kqj, idudkH w.h ,nd.ekSu i|yd ;j;a *kalaIka tlla
la,dia tl ;=, ks¾udKh lr.ksuq¡ fyd|hs ta i|yd la,dia tflys fldaâ úkafvda
tl ,ndf.k l,ska ks¾udKh lrk,o End Function tlg my,ska l¾i¾ tl
msysgqjdf.k my; wdldrhg *kalaIka tl ks¾udKh lr.kak¡
fuu la,dia tl ;=, *kalaIka tl Ndú;d lrk iEu wjia:djloSu Form la,dia tl
;=, TífclaÜ tlla f,i w¿;A la,dia tlla jYfhka ks¾udKh l,hq;= fjhs¡
fuys fldgq lr we;s fla;kh tl fm,lg ,sùug j.n,d.kak¡ fuysoSo
GetAverage ;=, merdóg¾ia 4 g wod, tu úIhhkA j, ,l=Kq ,ndfok lkafg%da,Aia
j, kï i|yka l,hq;= fjhs¡ fuf,i lkafg%da,Aia i|yka l,miq *kalaIka tl
;=, úhhq;Af;A l=ulao hkak l,skau fla;kh lr we;s neúka kej; kej; iQ;%
,sùu wkjYH fjhs¡ bkamiq TextBox6 ys ,efnk idudkH ,l=Kq j, w.h
fm%da.%iand¾ tflys msfrk w.h jYfhka i,lk f,igo fla;kh lr we;' fuysoS
wmf.A jevigyfkys Grade tl fmkaùu i|ydo fjku *kalaIka tlla ks¾udKh
lr we;' fyd|hs kej;;A la,dia tflys fldaâ úkafvda tl ;=, l,ska ks¾udKh
lrk,o *kalaIka tflys End Function tlg my,ska my; oelafjk wdldrhg
*kalaIka tl ks¾udKh lr.kak¡
úIqj,A fíisla fvdÜfkÜ mß.Kl NdIdj ;=,oS lsishï wdldrhlg wyUq f,i
w.hka ,nd.ekSu i|yd Rnd *kalaIka tl Ndú;d lrknj Tn oekgu;A okS'
Rnd () * 10 f,i ,ndÿkaúg 0 ys isg 10 olajd we;s ish¿u oYuia:dk iys; w.hka
jqjo wyUq f,i fmkajkq ,nhs¡ kuq;A wmg wjYH mQ¾K w.hka muKla ksid
fuu ,efnk wyUq w.h Int *kalaIka tl u.ska mQ¾K w.hla njg m;Alr we;'
idudkHfhka fuu Rnd *kalaIka tl Ndú;d lrñka wyUq w.hka fmkajk úgoS th
iEu úglu jevigyk Odjkh lrk úgoS fmkajkq ,nkafka tlu wyUq rgdjla
fjhs¡ fuu rgdjo wyUq f,i ilia lsÍu i|yd Randomize () fu;â tl Ndú;d
lr we;' oeka fuu Start f,i i|yka nÜka tlg wod, fla;kh isÿlruq¡ fuys
Start f,i nÜka tl la,sla l,úg nÜka tl Stop f,i fmkaùug;A kej; Stop
f,i we;s úgoS la,sla l,úg kej;;A Start f,i fmkaùug;A Bg wkql+,j ghsu¾
lkafg%da,a tl l%shd;Aul lsÍug iy l%shdúrys; lsÍug wod, fla;kh isÿlsÍug
nÜka tl vn,A la,sla lr my; mßos fla;kh lrkak¡ fuysoS fuu nÜka tl
la,sla lrkúgoS nÜka tflys fglaiaÜ tl jYfhka mj;skafka Start o
fkdtfiakï Stop o hkak fiúh hq;= neúka tysoS jevigykg ;ksj ;SrK.;hq;=
neúka ta i|yd isf,laÜ flaia iafÜÜukaÜ tl Ndú;d l, yel' ta wkqj my;
oelafjk wdldrhg fla;kh lrkak¡
fyd|hs fuys m,uqj fldgqlr we;s fla;khg muKla wjOdkh fhduq lrkak¡ Bg
miqj ,shd we;s fla;kh miqj meyeos,s lr.ksuq¡ fuysoS nÜka tl la,sla lrkúgoS
fldkafoais mÍlaId lrkq ,nkqfha tkï nÜka tflys ,shd we;Af;A Start o
ke;fyd;A Stop o hkak neúka fldkafoais mÍlaIdlrkq ,nk TífclaÜ tl nÜka
lkafg%da,A tl jk w;r tys fm%dmá tl jYfhka Text fm%dmá tl i|yka lr we;'
Case “Start” nÜka tflys fglaiaÜ tl jYfhka olakg ,efnkafka Start o hkak
úuidn,d we;' fuúg wyUq f,i w.hka fmkaúhhq;= neúka tf,i wyUq w.hka
fmkaùug fla;kh lr we;s ghsu¾ lkafg%da,A tl l%shd;Aulùu i|yd fla;kh
lr we;' oeka fuu nÜka tflys fglaiaÜ tl Stop f,i fmkaùug fla;kh lr
we;' ukao ghsu¾ lkafg%da,A tl k;r lsÍug Ndú;d lrkq ,nkafka o fuu nÜka tl
ùuh¡ Case “Stop” tkï nÜka tl ;=, olakg ,efnkafka Stop hk fglaiaÜ tl
kï oeka ghsu¾ lkafg%da,A tl l%shd;Aulùu k;rúhhq;= neúkA ta i|yd fla;kh
lr we;' tfukau kej;;A ghsu¾ lkafg%da,A tl l%shd;Aul lsÍug isÿjkqfha
fuu nÜka tl la,sla lrñka neúka nÜka tflys fglaiaÜ tl Start f,i
iliaùug fla;kh lr we;' fyd|hs fuf,i Stop f,i we;s úgoS nÜka tl la,sla
l,úgoS tu ,eî we;s wyUq w.h i,ld n,ñka ,l=Kq ysñjk neúka tfia kï ta
i|ydo fla;kh l,hq;Af;A Stop f,i fldkafoaish ;=, neúka fuu wdrïN
lrk,o isf,laÜ flaia iafÜÜukaÜ tl End Select f,i wjika l, fkdyel'
fuysoS Case “Stop” hk fldkafoaish i;H jQ úgoS muKla ,l=Kq ysñùug wod, ta
;=, ,shd we;s isf,laÜ flaia iafÜÜukaÜ tl l%shd;Aulùu isÿfjhs¡ ukao ,l=Kq
,eîu isÿúh hq;Af;A nÜka tl Stop f,i we;s úgoS neúka tu iafÜÜukaÜ tl
fuu jevigyfkaoS wyUq f,i 1,3,5 fyda 7 ,enqKfyd;A isÿúhhq;Af;Ao tlu l%shdj
neúka tkï mj;sk ,l=Kqj,g 20 la tl;=jk neúka wmg ta i|yd isf,laÜ
flaia iafÜÜukaÜ tflys by; i|yka lr we;s m%fNaoh Ndú;d l,yel' fuh
wmg my; oelafjk wdldrhg bosßm;A l,yel'
fuu fglaiaÜ fndlaia tl ;=, red f,i i|yka lr Apply nÜka tl la,sla
l,úgoS f*daï tflys miqìï j¾Kh r;=mdg ùuo" Green f,i i|yka lr nÜka tl
la,sla l,úg f*daï tflys miqìï j¾Kh fld,mdg iy Blue hk jpkh i|yka
lr Apply nÜka tl la,sla l,úg f*daï tflys miqìu ks,Amdg úhhq;=h' fuysoS Tn
fla;kfhaoS red f,i i|yka lr fla;kh l,fyd;A r;=mdgùu isÿjkafka red
f,iu i|yka l,úgoS muKs¡ RED f,i i|yka lr nÜka tl tnqjo r;=mdgùu
isÿfkdfjhs¡ fujeks úgloS wmg by; isf,laÜ flaia iafÜÜukaÜ m%fNaoh Ndú;d
lrñka my; mßos fla;kh lsÍu isÿl, yel'
fuysoS RED f,i" Red f,i" red f,i hk ´kEu wdldrhlg fglaiaÜ fndlaia tl
;=, ghsma l,o r;=mdgùu isÿfjhs¡ tfukau ta wdldrhgu GREEN, Green iy green
hk wdldrhg fla;kh l,o isÿúh hq;Af;Ao f*daï tflys j¾Kh fld,mdg ùu
fjhs¡ fï wdldrhgu fglaiaÜ fndlaia tl ;=, BLUE, Blue iy blue hk l=uk
wdldrhlg ghsma l,o f*daï tflys miqìu ks,Amdgùu isÿfjhs¡ fyd|hs wms kej;;A
wfma jevigyk fj; fhduqfjuq¡
fuys Stop nÜka tl la,sla l,úgoS tu wyUq f,i ,eî we;s w.h i,lñka ,l=Kq
,ndoSu isÿjk neúka tu m,uqj wdrïN lrk,o isf,laÜ flaia iafÜÜukaÜ tl
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
End Select f,i wjika lsÍug fmr tu wyUq w.h wkqj ,l=Kq ysñùug ,shd we;s
isf,laÜ flaia iafÜÜukaÜ tl wdrïN lr we;' fuysoS wyUq w.h fmkajkq
,nkafka Label1 lkafg%da,a tl ;=, neúka tys mj;sk w.h ie,ls,a,g .ksñka
,l=Kq ysñjk neúka isf,laÜ flaia iafÜÜukaÜ tflys fldkafoais mÍlaId lrkq
,nk TífclaÜ tl iy fm%dmá tl jYfhka Label1.Text jYfhka i|yka lr
we;' fuys 1,3,5 fyda 7 hk w.hka y;frka l=uk fyda tlla ,enqkfyd;A Label4 ys
fmkajk ,l=Kq j,g 20 la tl;=ùu isÿfjhs¡ tkï fldkafoaish úúO jqj;A ,efnk
m%;sM,h tlukï by; mßos " ,l=K fhdoñka ish¿u fldkafoais ,sùug fuu
m%fNaoh Ndú;d l, yel' tfukau fuu ,efnk wyUq w.h 2,4,6 fyda 8 jqjfyd;A
,efnkafka tlu ,l=Kq m%udKhla fyj;A ,l=Kq 40 la neúka tu fldkafoais
ish,A,gu " fhdoñka ,shd we;' i;H jYfhkau fuys fldkafoaish jkqfha ,eî
we;s wyUq w.h fjhs¡ fuysoS Case 0 u.ska ,eî we;s wyUq w.h 0 o hkak i,ldn,d
we;' fuúg ;jÿrg;A l%Svd lsÍug ysñjk jdr.Kk 1 lska wvqùu isÿfjhs¡ fuu jdr
.Kk fmkajkq ,nkafka Label5 lkafg%da,a tl ;=, neúka fuys wdrïNfhys 4
f,i l%Svd l,yels jdr .Kk 4 la jYfhka fmkajkq ,nhs¡ m,uqj fuf,i jdr
.Kk wvqù 1 f,i mej;shfyd;A ;j;A W;Aidy l,yels jdr.Kkla ysñfkdjk
neúka fuys b*A iafÜÜukaÜ tlla u.ska tu ,eî we;s w.h 1 o hkak úuid n,d
we;' fuúg Game Over f,i uefiaÊ tlla fmkajd jevigyk Odjkfhka
bj;Aùug fla;kh lr we;' Else hkq by; fldkafoaishg tl`. fkdjk wjia:dj
fjhs¡ tkï wjia:d .Kk 1 g jvd jeä w.hla ;sfnk wjia:dj fjhs¡ fuúg
Label5 ys we;s w.fhka 1 la wvqùug fla;kh lr we;' fuu fldkafoaish
wod,jkqfha Case 0 ;=,g muKla neúka B,`. fldkafoaishg m%:ufhka b*A
iafÜÜukaÜ tl End If f,i wjika lr we;'
fuu ,efnk wyUq w.h 9 o hkak B,`.g úuid we;' ukao fuúg ,eî we;s uq¿
,l=Kq m%udKfhka 40 la wvqjk neúks¡ kuq;A tu ,l=Kq 40 la wvqùug fmr mj;sk
,l=Kq 40 la fyda 40 g jvd wvq w.hlaoehs úuid ne,sh hq;=fjhs¡ ukao
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
tfiajqjfyd;A ,l=Kq 0 fyda iDK w.hla ysñjk neúks¡ tu ksid b*A iafÜÜukaÜ
tlla u.ska fuu ,eî we;s ,l=Kq 40 fyda 40 g wvqkï fl,skau Game Over
f,i uefiaÊ tlla fmkajd jevigyk Odjkfhka bj;Aùug fla;kh lr we;'
Else hkq by; fldkafoaishg tl`. fkdjk wjia:dj fjhs¡ tkï ,l=Kq 40 g jvd
jeä wjia:dj fjhs¡ fuúg mj;sk ,l=Kq j,ska 40 la wvqùug fla;kh lr we;'
fyd|hs fuu nÜka tlg wod, iïmQ¾K fla;kh wm my;ska bosßm;A lr we;'
;j;A fudlgo n,d bkafk oekau jevigyk Odjkh lr n,kak¡ fyd|hs ;ksj
;SrK .ksñka jevigyka ks¾udKh lsÍug wod, isoaOdka; fldgia wm fu;kska
wjika lruq¡
fyd|hs fuu vhf,d.A fndlaia tflys Ndú;h y÷kd.ekSu i|yd b;du;a ir<
mska;+r kerôhyels jevigykla ilia lrkafka flfiao lshd wms oeka n,uq¡
fyd|hs fï i|yd ,siaÜ fndlaia tlla" mslap¾ fndlaia lkafg%da,A tlla iy nÜka
Disapamok Online IT Academy
lkafg%da,A tlla wjYHh fjhs¡ fuys Tnf.A mß.Klfhys we;s lsishï *hs,A tlla
újD; lr.ekSu i|yd wjYH ´mka vhf,d.A fndlaia tl ,nd.ekSug wod,
lkafg%da,A tl gQ,A fndlaia tflys Dialog leg.ßh ;=, OpenFileDialog f,i
olakg ,efnhs¡ fuh u; vn,A la,sla lr thska tla lkafg%da,A tlla muKla
f*daï tlg tl;= lr.kak¡
oeka fuu lkafg%da,Aia Ndú;d lrñka my; oelafjk wdldrhg f*daï tl äihska
lr.kak¡
mska;+r *hs,A f*daueÜ ie,l+úg jpg f*daueÜ tlg wu;rj bmp, GIF f,i ;j;a
f*daueÜ .Kkdjla olakg ,efnhs¡ Tn by; mßos jpg f*daueÜ tl muKla Filter
fm%dmá tflys i|yka l,fyd;A Tng fuu jevigyk u.ska újD; l,yels
jkafka jpg wdlD;sfhys we;s mska;+r *hs,Aia muKs¡ kuq;A bmp *hs,Aia újD; lsÍug
yelsjk mßos ilia lsÍug JPG f*daueÜ tlg wu;rj ;j;A f*daueÜ tlla i|yka
lrkúgoS |*.jpg j,g miqj | ,l=K ghsma lr Bitmap Files(*.BMP)|*.bmp f,i
i|yka l,hq;=h' fuys iqmqreÿ f,i Bitmap Files(*.BMP) hkak ´mka vhf,d.A
fndlaia tflys tlaiafgkaIka tl fmkajk fldgqj ;=, fmkajk w;r i;H
jYfhkau tys tlaiafgkaIka tl ,nd.ekSu isÿlrkafka |*.bmp fldgi ;=,ska
fjhs¡ kej;;A GIF wdlD;sfhys *hs,Aia o újD; lsÍug yelsjk mßos ilia lsÍug
kï |*.bmp j,g miqj | ,l=K ghsma lr Gif Files(*.GIF)|*.gif f,i ,ndfokak¡
fuys Gif Files(*.GIF) hkak ´mka vhf,d.A fndlaia tl ;=, fmkajk w;r i;H
jYfhkau wod, mska;+r újD; lsÍug tu tlaiafgkaIka tl ,nd.kqfha |*.gif hk
fldgiska fjhs¡ oeka fuu ´mka vhf,d.A fndlaia tflka újD; l,yels jkafka
*,jpg, *.bmp iy *.gif wdlD;sfhys mska;+r *hs,Aia muKs¡ i;H jYfhkau lsjfyd;A
Tn fuu ´mka *hs,A vhf,d.A fndlaia tl Ndú;d lrñka lsishï f*da,Av¾ tlla
újD; lf,Ahehs is;kak¡ fuúg ta ;=, úúO *hs,aia fldf;l=;A ;snqk;A fuys
fmkajkq ,nkafka *.jpg, *.bmp iy *.gif hk wdlD;sfhys *hs,Aia muKla fjhs¡
fuu jevigyfkys ´mka *hs,A vhf,d.A fndlaia tflka lsishï ;ks mska;+rhla
fukau mska;+r ish,A,u jqjo tljr f;dard.ekSfï yelshdj ;sìh hq;=h' ukao ta
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
ish,A,lau ,siaÜ fndlaia tlg o we;=,;A lrf.k ne,sh yels jk mßosh¡ fyd|hs
ta i|yd my; mßos fla;kh lrkak¡
fuys fldgq lr we;s fla;khka muKla ;ks fm,lg ,sùug j.n,d.kak¡ fuu
´mka vhf,d.A fndlaia tflys mska;+r *hs,Aia ish,A, f;dard tys we;s Open nÜka
tl la,sla l,úgoS fuu f;dard.;A mska;+r ish,A, ,siaÜ fndlaia tlg ,nd.ekSu
i|yd For Each filename In OpenFileDialog1.Filenames
Listbox.Items.Add(filename)
fla;kh Ndú;dlr we;' fuysoS ´mka vhf,d.A fndlaia tflka f;dardf.k we;s
iEu *hs,A tllau ie,ls,A,g f.k tajd tl ne.ska ,siaÜ fndlaia tlg
whs;uhla jYfhka tl;= lr.kakd f,ig fla;kh lr we;'
OpenFileDialog1.Multiselect = True hk fla;h u.ska ´mka vhf,d.A fndlaia
tflka *hs,A tllg jvd f;dard.ekSu i|yd bv i,id we;' If
OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then hk
fla;h u.ska woyia lrkqfha by; ish¿u f;dard.;A *hs,Aia ,siaÜ fndlaia tlg
we;=,;A lr.kq ,nkafka fuu ´mka vhf,d.A fndlaia tflys we;s OK fyj;A
Open nÜka tl la,sla l,úgoS hkak fjhs¡ oeka fuu ,siaÜ fndlaia tlg ,nd.;A
tla tla mska;+r *hs,Aia j, ku u; la,sla l,úg tys wka;¾.;h mslap¾ fndlaia
tl ;=, fmkaúh hq;=h' fyd|hs ta i|yd ,siaÜ fndlaia lkafg%da,A tl vn,A la,sla
lr my; mßos fla;kh lrkak¡
fuúg olakg ,efnk Choose Toolbox Items vhf,d.A fndlaia tflys we;s COM
Components geí tl f;dard.kak¡ fuúg olakg ,efnk lkafg%da,aia ,ehsia;=fjka
my,skau msysá Windows Media Player lkafg%da,A tl bosßfhys we;s fldgqj u;
la,sla lr yß ,l=K oud OK nÜka tl la,sla lrkak¡
oeka fuu lkafg%da,Aia Ndú;d lrñka my; oelafjk wdldrhg f*daï tl äihska
lr.kak¡
tkï JPEG Files f*daueÜ wdldrfha fma,sh f;AreúgoS ´mka vhf,d.A fndlaia
tflys fmkajkq ,nkafka JPEG wdlD;sfhys *hs,Aia muKs¡ *.bmp wdlD;sfhys
*hs,Aia újD; lsÍug kï ´mka vhf,d.A fndlaia tflys Bitmap Files hk fma,sh
f;dard.; hq;=fjhs¡ fuúg ´mka vhf,d.A fndlaia tflys fmkajkq ,nkafka Tfí
mß.Klfhys msysgqjd we;s *.bmp wdlD;sfhys *hs,Aia muKs¡ kuq;A Tn
fuf,i ´mka vhf,d.A fndlaia tflys fmkajkq ,nk *hs,aia fudkjdo hkak
fla;kh l,miq my; oelafjk wdldrhg tu nÜka tl ;=, fla;kh lrkak¡
fuu lkafg%da,A tl vn,A la,sla úg f*daï tflys by,skau Type Here f,i iqÿmdg
fldgqjlska hq;=j fukq nd¾ tflys uQ,sl wjia:dj olakg ,efnhs¡
fuu MenuStrip lkafg%da,A tl weiqre lr.ksñkA fukq nd¾ tlla ie,iqï lsÍu
b;du;a myiq ld¾hhla fjhs¡ th Tn ys;k ;rï fldfy;Au wmyiq ke;' fuu fukq
nd¾ tlla ie,l+úg by; i|yka lrk,o rEmigykg wkqj fuys File Edit
Format View iy Help hk tajd m%Odk fukq whs;u jYfhka y÷kajk w;r tajd
lsishï úOdkhla l%shd;Aul lsÍu i|yd Ndú;d fkdlrk w;r tajd tl tlla
u; la,sla l,úg my,g os.yefrk fukq tl ;=, mj;sk whs;u" Wm fukq
whs;u jYfhka y÷kajkq ,nhs¡ tu Wm fukq whs;u lsishï úOdkhla l%shd;Aul
lsÍu i|yd Ndú;d lrkq ,nhs¡ fyd|hs fuu MenuStrip lkafg%da,A tl f*daï tlg
,nd.;A miqj th f*daï tflys by,skau ia:dk.;ùu isÿfjhs¡ fuys jïmi
fl,jfrysu Type Here f,i iqÿ meye;s fldgqjla olakg ,efnhs¡ fuh fl,skau
by;ska i|yka lrk,o File Edit View jeks m%Odk fukq whs;u ks¾udKh lsÍu
i|yd Ndú;d l, yel' oeka fuh u; la,sla l,úg fukq whs;u kï lsÍu i|yd
l¾i¾ tl olakg ,efnhs¡ fyd|hs fuys File f,i i|yka l,úg B,`. m%Odk fukq
whs;uhla i|yka lsÍug kej;;A Bg bosßfhka Type Here f,i iqÿ meye;s
fldgqjla olakg ,efnhs¡ tfukau fuf,i File m%Odk fukq whs;ufhys hgf;ys
fyd|hs File f,i m%Odk fukq whs;uh ;=, Wm fukq whs;u i|yka lsÍug ,enqKq
Type Here fldgqj ;=, New f,i i|yka lrkak¡ fyd|hs fuúg Bg my,ska ;j;a
Wm fukq whs;u i|yka lsÍug Type Here f,i iqÿ meye;s fldgqj ne.ska olakg
,efnhs¡
fyd|hs fuf,i File fukq whs;uh ;=, by; mßos Wm fukq whs;u i|yka l,miq
File j,g miqj we;s Type Here fldgqj ;=, Edit f,i i|yka lrkak¡ fuúg fmr
mßosu ta ;=, Wm fukq whs;u i|yka lsÍug Type Here f,i iqÿ meye;s fldgqj
ne.ska olakg ,efnhs¡ fuys Repeat Options f,i ,ndfokak¡ fuys ol=Kqmi
fl,jr u; la,sla l,úg l=vd l¿ mdg ;%sfldaKhlska hq;=j Bg bosßfhka Type
Here f,i ;j;a iqÿmdg fldgqjla olakg ,efnhs¡ fuu Repeat Options hgf;ys
;j;a Wm fukq whs;u we;akï tajd ms,sfj,ska ,ndoSfï yelshdj we;'
fyd|hs fuf,i ks¾udKh lr.;A m%Odk fukq whs;uh ;=, we;s Wm fukq whs;u
lsishï úOdk l%shd;Aul lsÍug Ndú;d lrknj lSjd Tng u;l we;s¡ Tng
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
wjYH kï fuu Wm fukq whs;u h;=remqjrej yryd l%shd;Aul lsÍug fIdaÜlÜ
lS tlla ,ndfokafka flfiao lshd n,uq¡ fyd|hs wm ks¾udKh lrk,o File
fukqfjys we;s New Wm fukq whs;uh i|yd fIdaÜlÜ lS tlla ,ndfokafka
flfiao lshd n,uq¡ ta i|yd File u; la,sla l,úg ta ;=, we;s Wm fukq whs;u
fukqjla wdldrfhka olakg ,efnhs¡ oeka fuu New Wm fukq whs;uh u;
tljrla la,sla lr th f;dard.;Aúg fm%dm¾àia úkafvda tl ;=, olakg ,efnkafka
Bg wod, fm%dm¾àia fjhs¡ fuys ShortcutKeys f,i fm%dmá tlla olakg ,efnhs¡
fuh bosßfhys l=vd l¿ meye;s my,g fhduqjQ ;%sfldaKhlska ksfhdackhjk nÜka
tlla olakg ,efnhs¡ fuh u; la,sla l,úg my; wdldrfhka olakg ,efnhs¡
oeka Tng fukq nd¾ tlla ks¾udKh lrk wdldrh ms,sn|j ukd jegySula
,efnkakg we;ehs lshd wfmalaId lruq¡ oeka kej;;A wm ks¾udKh lrkq ,nk
wmf.A jevigyk jk fkdaÜmEâ tl fj; fhduqfjuq¡ fuys MenuStrip lkafg%da,A
tl Ndú;d lrñka my; oelafjk wdldrhg fukq nd¾ tl ks¾udKh lr.kak¡
fuysoS wms ks¾udKh lrkq ,nk fuu Notepad tflys wod, fglaiaÜ fvdlshqukaÜ
tl ilia lsÍu i|yd Ndú;d lrkq ,nkafka idudkH fglaiaÜ fndlaia tlla fkdj
gQ,A fndlaia tflys Common Controls leg.ßh ;=, olakg ,efnk RichTextBox
lkafg%da,A tl fjhs¡
fuu Filter fm%dmá tl ;=, i|yka lrk,o *.RTF f*daueÜ tflys *s,Ag¾ bkafvlaia
tl 0 jk w;r *.txt f*daueÜ tflys *s,Ag¾ bkafvlaia tl 1 fjhs¡ hï fyhlska
*s,Ag¾ bkafvlaia tl 1 jQfha kï tkï f;dardf.k we;Af;A *.txt tlaiafgkaIka
tl fjhs¡ ßÉfglaiaÜ fndlaia tl ;=, ghsma lr we;s lsishï fglaiaÜ tlla fglaiaÜ
*hs,A tlla jYfhka fiaõ lr.ekSu i|yd SaveFile fu;â tl Ndú;d lrkq ,nhs¡
fuh fiaõ úhhq;Af;A fiaõ vhf,d.A fndlaia tflka f;dard oS we;s path tflys
,ndoS we;s kñka fjhs¡ fuh wm óg l,ska fnm fõßhn,hg ,ndf.k we;s neúka
th i|yka lr we;' fuh idudkH fglaiaÜ *hs,A tlla neúka fnm fõßhn,hg
,nd.;A path tl muKla i|yka lr we;' Else hkq tlaiafgkaIka tl jYfhka
f;dardf.k we;Af;A *.RTF tlaiafgkaIka tl fjhs¡ fuúgo fnm fõßhn,hg
,ndf.k we;s md;A tlgu ßÉfglaiaÜ *hs,A tlla jYfhka fiaõ ùug fla;kh
lr we;' RichTextBoxStreamType.PlainText fla;h ta i|yd Ndú;d lr we;' OK
nÜka tl la,sla lr we;Aoehs iy *s,Ag¾ bkafvlaia 1 jQ úg fiùu i|yd wrUk,o
b*A iafÜÜukaÜ folu Endif f,i wjika lr we;' fuysoS fuf,i fiaõ vhf,d.A
fndlaia tl fmkaùug fla;kh lrk ,oafoa strpath fõßhn,h ysiaj we;súgoSh'
Else hkq strpath fõßhn,h ;=, lsishï md;A tlla .nvdù we;s wjia:dj fjhs¡
tkï l,ska fiaõ lr we;s njh¡ fuúg fiaõ vhf,d.A fndlaia tl kej;
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
fmkaùug wkjYH neúka *s,Ag¾ bkafvlaia tl 1 jQ úg iy fkdjQ úg strpath
fõßhn,h ;=, we;s md;a tlg kej; kej; fiaõ jk f,ig fla;kh lr we;'
Tng u;lo ´mka vhf,d.A fndlaia tl ;=,oS o wod, *hs,a tl újD; lrkúgoS
fuu fõßhn,hg tu md;A tl o mjrd .kakd f,ig fla;kh l,d' fuúg tu
´mka lr.;A fvdlshqukaÜ ;jÿrg;A jeäoshqKq lr fiaõ lrkúgoS o tu md;A
tlgu fuysoS o fiaõ ùu isÿfjhs¡ ukao túgo l%shd;Aul jkq ,nkafkao Else
hgf;A ,shd we;s fla;kh fjhs¡
fyd|hs oeka Save As fukq úOdkh Ndú;d lrkq ,nk iEu wjia:djloSu fuu
ghsma lr we;s fglaiaÜ tl w¿;Au *hs,A tlla jYfhka fjku md;A tll fiaõ
lsÍu i|yd fiaõ vhf,d.A fndlaia tl ,nd.ekSug fuu fukq úOdkh vn,A
la,sla lr fldaâ úkafvda tl ;=, my; mßos fla;kh lrkak¡
by; ,shd we;s fla;kh" Tng l,ska fla;kh ukdj wjfndaO lr.;A neúka
wjfndaO lr.kakg we;ehs lshd wfmalaId lruq¡ fyd|hs fuu File fukq tflys
we;s New fukq úOdkh f;ArEúgoS fglaiaÜ fndlaia tl ;=, we;s ish¿u fglaiaÜ
bj;Afjñka ßÉfglaiaÜ fndlaia tl ysiaùu isÿúh hq;=h' fyd|hs ta i|yd New
fukq úOdkh vn,A la,sla lr my; mßos fla;kh lrkak¡
fuu Edit fukqfjys we;s Select All fukq úOdkh wkq.ukh l,úgoS fglaiaÜ
fndlaia tl ;=, we;s ish¿u fglaiaÜ yhs,hsÜùu isÿúh hq;=h' fï i|yd Select
All f,i fjku fu;â tlla olakg ,efnhs¡
fuys Find fukq úOdkh wkq.ukh l,úgoS fglaiaÜ fndlaia tl ;=, fidhd.;
fkdyels lsishï jpkhla fidhd.ekSug bkamqÜ fndlaia tlla fmkaúh hq;=fjhs¡
fuys lsishï jpkhla ghsma lr OK nÜka tl la,sla l,úgoS tu jpkh fglaiaÜ
fndlaia tl ;=, we;Akï th yhs,hsÜ ù fmkaúh hq;= w;r ke;skï tu jpkh
olakg fkd,efí kï Can’t Find f,i uefiaÊ tlla fmkaúh hq;=fjhs¡ fï i|yd
ßÉfglaiaÜ fndlaia tl ;=, Find f,i fjku fu;â tlla olakg ,efnhs¡ fï
fuysoS m,uqj inpt f,i String fâgd ghsma tflys fõßhn,hl=;A fpos kñkA
integer fâgd ghsma tflys fõßhn,hl=;A ks¾udKh lr we;' fuu ks¾udKh
lr.;A inpt fõßhn,hg bkamqÜ fndlaia tl ;=, ghsma lrkq ,nk jpkh u;l
;nd.kakd f,ig fla;kh lr we;' fuf,i Find fukq úOdkh wkq.ukh l,úg
bkamqÜ fndlaia tl ;=, lsisjla i|yka fkdlr fuys OK nÜka tl la,sla l,úgoS
jevigyk fodaI iys; jk neúka If inpt=”” Then fuf,i ghsma fkdlr we;s úgoS
Exit Sub u.ska je/oao fkdi,ld yßk f,ig fla;kh lr we;' fuysoS
ks¾udKh lr.;A fpos fõßhn,hg bkamqÜ fndlaia tl ;=, ghsma lrk,o jpkh
fidhd m,uqj th yuqjk ia:dkh w.hla f,ig u;l ;nd.kakd f,ig fla;kh
lr we;' fuu ,efnk w.h -1 ùu hkq bkamqÜ fndlaia tl ;=, ghsma lrk,o jpkh
yuqfkdùu fjhs¡ fuúg Can’t Find f,i uefiaÊ tlla fmkaùug fla;kh lr we;'
fuu fukq tflys Undo úOdkh f;ArEúgoS isÿlrk,o lsishï ld¾hhla wfydais
lr.ekSug yelsúh hq;=h' tfukau Redo fukq úOdkh wkq.ukh l,úgoS wfydais
lrk,o ld¾hhla kej; isÿlsÍug yelsúh hq;=h' fï i|yd o uq,isgu wuq;=fjka
fla;kh lsÍug wjYH fkdfjhs¡ ta i|yd Undo iy Redo kñka fu;â folla
olakg ,efnhs¡ fyd|hs ta i|yd my; mßos fla;kh lrkak¡
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
fyd|hs fuys Format fukq tflys we;s Font fukq úOdkh wkq.ukh l,úgoS
úkafvdaia fufyhqï moaO;sh ;=, olakg ,efnk idudkH fmdÿ Font vhf,d.A
fndlaia tlla fmkaúh hq;=fjhs¡ bkamiq fuhska lsishï f*dkaÜ tlla" tys m%udKh
wdosh f;ArEúgoS tajd ta wdldrfhkau ßÉfglaiaÜ fndlaia tl ;=, f;dardf.k
we;s jpkhg wdfoaYùu isÿúh hq;=h' fuf,i úkafvdaia fufyhqï moaO;sh ;=,
olakg ,efnk fmdÿ f*dkaÜ vhf,d.A fndlaia tl ,nd.ekSu i|yd gQ,Afndlaia
tflys Dialog leg.ßh ;=, olakg ,efnk Font Dialog lkafg%da,a tl Ndú;d lrkq
,nhs¡
fuu lkafg%da,a tl vn,A la,sla lrñka f*daï tlg tl;= lr.kak¡ fyd|hs oeka
Format fukqfjys we;s Font fukq úOdkh vn,A la,sla lr fldaâ úkafvda tl ;=,
my; oelafjk wdldrhg fla;kh lrkak¡
fuysoS m,uqj b*A iafÜÜukaÜ tlla u.ska fuu f*dkaÜ vhf,d.A fndlaia tflys
OK nÜka tl la,sla lr we;Aoehs úuid n,d we;' tf,i la,sla lr we;Akï
ßÉfglaiaÜ fndlaia tflys f;dardf.k we;s fglaiaÜ tlg FontDialog1.Font
fm%dmá tl tkï f*dkaÜ vhf,d.A fndlaia tflka f;darkq ,nk f*dkaÜ tlla"
wl=rej, m%udKh" f*dkaÜ iaghs,Aia iy bf*laÜia wdfoaYjk f,ig fla;kh
lr we;' fuu jevigyfkys Change Color fukq úOdkh wkq.ukh l,úg ;j;a
Wmfukqjla olakg ,efnk w;r fuys Text color fukq úOdkh wkq.ukh l,úgoS
ßÉfglaiaÜ fndlaia tflys f;dardf.k we;s lsishï jpkhl wl=rej, j¾Kh
fjkia lsÍug yelsúh hq;=h' úkafvdaia fufyhqï moaO;sh ;=,oS lsishï j¾Khl
fjkila isÿlsÍug we;súgl tu j¾Kh fjkia lsÍu i|yd fmdÿ l,¾ vhf,d.A
fndlaia Ndú;d lrkq ,nhs¡
úIqj,A fíisla fvdÜfkÜ mdßißlh ;=,oS fujeks fmdÿ l,¾ vhf,d.A fndlaia
,nd.ekSu i|yd gQ,A fndlaia tflys Dialog leg.ßh ;=, olakg ,efnk
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
ColorDialog lkafg%da,A tl Ndú;d lrkq ,nhs¡ fyd|hs fuu lkafg%da,A tl f*daï
tlg ,ndf.k Format fukqfjys Change Color fukq úOdkfhys Text Color Wm
fukq úOdkh vn,A la,sla lr olakg ,efnk fldaâ úkafvda tl ;=, my; oelafjk
wdldrhg fla;kh lrkak¡
fuys fldgqlr we;s fla;kh muKla tl fm,g ,sùug j.n,d.kak¡ fuysoS m,uqj
b*A iafÜÜukaÜ tlla u.ska fuf,i lsishï j¾Khla l,¾ vhf,d.A fndlaia
tflka f;dard tys OK nÜka tl la,sla lr we;Aoehs úuid n,d we;' fuf,i l,¾
vhf,d.A fndlaia tflka lsishï j¾Khla f;ArEmiq th l=ulao hkak Color
fm%dmá tl yryd ,nd.; yel' ßÉfglaiaÜ fndlaia tll lsishï f;dard.;A fglaiaÜ
tll j¾Kh fjkia lsÍug SelectionColor fm%dmá tl Ndú;d lrkq ,nhs¡ fuúg
l,¾ vhf,d.A fndlaia tflka f;dard we;s j¾Kh ßÉfglaiaÜ fndlaia tflys
f;dard.;A jpkfhys wl=re j,g wdfoaY jk f,ig fla;kh lr we;' fuu
fukq tflysu Highlight Color fukq úOdkh f;ArEúgoS f;dardf.k we;s lsishï
fglaiaÜ tll miqìï j¾Kh fjkia lsÍug yelsúh hq;=h' fuu fukq úOdkh
;=, my; mßos fla;kh lrkak¡
fuysoSo iqmqreÿ f,i lsishï j¾Khla f;dard l,¾ vhf,d.A fndlaia tflys OK
nÜka tl la,sla lr we;Aoehs úuidn,d we;' ßÉfglaiaÜ fndlaia lkafg%da,A tlla
;=, f;dardf.k we;s jpkhl miqìï j¾Kh fjkia lsÍu i|yd
SelectionBackColor fm%dmá tl Ndú;d lrkq ,nhs¡ ;j;a fudlgo n,d bkafka
oekau jevigyk Odjkh lr n,kak¡
fyd|hs oeka wm wjidk jYfhka úkafvdaia fufyhqï moaO;sh ;=,oS olakg
,efnk f*da,av¾ md;A tlla fmkaúh yels vhf,d.A fndlaia tlla m%dfhda.slj
Ndú;d lrkq ,nkafka flfiao lshd jgyd.ksuq¡ fuu vhf,d.A fndlaia tl
weiqrelr.ksñkA Tn úiska ,ndfok ´kEu f*da,Av¾ md;A tllg w¿;A f*da,Av¾
tlla ks¾udKh l,yels jevigykla ks¾udKh lruq¡ fyd|hs fï i|yd w¿;A
jHdmD;shla wdrïN lrkak' fï i|yd m%Odk jYfhka f,An,A lkafg%da,A folla"
fglaiaÜ fndlaia lkafg%da,A tlla iy nÜka lkafg%da,A tlla muKla wjYH fjhs¡
oeka my; oelafjk wdldrhg f*daï tl äihska lr.kak¡
by; olajd we;Af;A f*da,Av¾ vhf,d.A fndlaia tll rEm igykls¡ oeka Tng
u;la fjkakg we;s' fuh fndfyda úg Ndú;d lrkq ,nkafka f*da,av¾ tll
ish¿u *hs,aia újD; lr.ekSug fyda lsishï ld¾hhla i|yd f*da,Av¾ md;A tlla
,nd.ekSu i|yd fjhs¡ wms oeka fuu jevigyfkys l%shdldÍ;Ajh f;Areï.ksuq¡
fuys Folder Name bosßfhys we;s fglaiaÜ fndlaia tl ;=, lsishï kula i|yka lr
Select Path nÜka tl la,sla l,úgoS úkafvdaia fufyhqï moaO;sh ;=, olakg
,efnk fmdÿ f*da,Av¾ vhf,d.A fndlaia tlla fmkaúh hq;= w;r bka lsishï md;A
tlla f;dard OK nÜka tl la,sla l,úgoS tu md;A tl ;=, by; i|yka l,
kñka f*da,av¾ tlla ks¾udKh úhhq;=h' hï fyhlska oekgu;A tu kñkA
f*da,Av¾ tlla mej;=kfyd;A f*da,Av¾ tl ks¾udKh l,fkdyels nj o mjiñka
uefiaÊ tlla fmkaúh hq;=fjhs¡ fuu fmdÿ f*da,Av¾ vhf,d.A fndlaia tl
,nd.ekSu i|yd gQ,A fndlaia tflys olakg ,efnk Dialogs leg.ßfhys olakg
,efnk FolderBrowserDialog lkafg%da,A tl Ndú;d lrkq ,nhs¡
fuu lkafg%da,A tl vn,a la,sla lrñka f*daï tlg ,nd.kak¡ fuf,i úkafvdaia
fufyhqï moaO;sh ;=,oS f*da,av¾ia ks¾udKh lsÍug iïnkaOj Bg wod, la,dia
tl ks¾udKh lrf.k isáhhq;= fjhs¡ fyd|hs ta i|yd l=uk fyda lkafg%da,A
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
tlla u; vn,A la,sla lr fldaâ úkafvda tl ,nd.kak¡ fuys Public Class Form1
fla; fma,sfhys bosßfhka l¾i¾ tl msysgqjd fma,shla my,g f.k Bg by,ska
l¾i¾ tl msysgqjd Imports f,i ysia;ekla ;nd System f,i i|yka lr ;s;la ;nd
IO f,i ,ndfokak¡
fyd|hs oeka fuu f*daï tflys we;s Select Path nÜka tl la,sla l,úgoS fuu
f*da,av¾ vhf,d.A fndlaia tl fmkaúh hq;= w;r bka f;dark f*da,Av¾ md;A tlla
;=, fglaiaÜ fndlaia tflys i|yka kñka f*da,Av¾ tlla ks¾udKh úhhq;=h'
Bg wod, fla;kh ,sùug Select Path nÜka tl vn,a la,sla lr fldaâ úkafvda tl
,nd.kak¡
fÜn,A tll Student ID, Student Name, Sex hk tajd *S,Aâia jYfhka i,lk w;r
fuf,i ish¿u *S,Aâia j, tla wfhl=g wh;A iïmQ¾K o;A; fma,shla frfldaâ
tlla jYfhka y÷kajkq ,nhs¡ fyd|hs fuf,i fÜn,A tflys we;s m,uq frfldaâ
tflys isg wjidk frfldaâ tl olajd we;s ish¿u whf.A kï muKla Tn äihska
lrk,o jevigykl ,siaÜ fndlaia tll ,siaÜ tlla jYfhka ,nd.ekSug
wjYHjQjdhehs is;kak¡ fyd|hs fuh isÿlr.ekSug idudkH wdldrhlg fuka Æma
tlla Ndú;d fkdlrñka fla;kh l,úg nÜka tlloS kï frfldaâ mj;sk
m%udKhg nÜka tl la,sla lsÍug isÿfjhs¡ frfldaâia 10 la mej;sfhakï fuu
Disapamok Online IT Academy
nÜka tl oi jdrhla la,sla lsÍug isÿfjhs¡ kuq;A fï i|yd Æma tlla Ndú;d
lrñka fla;kh isÿlf,A kï nÜka tl la,sla l,hq;Af;A tl jrla muKs¡ tfia
kï Tng Æmaia Ndú;h iy tys jákdlu f;Afrkakg we;ehs lshd wfmalaId
lruq¡ úIqj,A fíisla fvdÜfkÜ mß.Kl NdIdj ;=,oS Æmaia wdldr lsysmhla
olakg ,efnk w;r fyd|hs wms oeka tajd tlska tl m%dfhda.slj bf.k.ksuq¡
jevigyka ks¾udKfhaoS jeä jYfhkau Ndú;d lrkq ,nk For Next Æma wdldrh
wms m,uqfjkau bf.k .ksuq¡ fuysoS Tn oek.;hq;= úfYAIu lreK jkqfha Æmaia
Ndú;djk úgoS wksjd¾fhkau fõßhn,Aiao Ndú;d lsÍug isÿùuh' fyd|hs wms
fuh ir, WodyrKhlskau meyeos,s lr.ksuq¡ fyd|hs w¿;A fm%dfclaÜ tlla
wdrïNlr olakg ,efnk f*daï tl i|yd ,siaÜ fndlaia lkafg%da,A tlla iy
nÜka lkafg%da,A tlla ,ndf.k my; oelafjk wdldrhg f*daï tl äihska
lr.kak¡
oeka fuu fla;kh wms mshjfrka mshjr meyeos,s lr.ksuq¡ For Next Æma wdldrh
my; mßos wmg ,sùu isÿl, yel'
fuu Æma wdldrh Ndú;d lsÍfïoS wksjd¾fhkau fõßhn,hla Ndú;d lsÍug isÿfjhs¡
tkï lsishï fldkafoaishl isg ;j;a fldkafoaishla olajd Æma tl l%shd;Auljk
úgoS tu lrlefjk mshjr u;l ;nd.kq ,nkafka fuu fõßhn,h u.ska fjhs¡
fuf,i lsishï fldkafoaishl isg ;j;a fldkafoaishla olajd fldkafoaish
wi;Hjk ;=reu Æma tl l%shd;Aulùu isÿfjhs¡ Next u.ska fldkafoaish wi;Hjk
;=reu Æma tl nhsisl,A frdaohla fuka kej; kej;;A lrljkq ,nhs¡ fuf,i Æma
tl lrlefjk jdr .KkloS ta ;=, fla;kh l,úg tu lrlefjk jdr.Kkg
wkql+,j lsishï ld¾hhla isÿlr.ekSfï yelshdj we;'
fuysoS Æma tl lrlefjk úgoS tu lrlefjk mshjr .Kk u;l ;nd.ekSu
i|yd Dim x As Integer f,i fõßhn,hla m,uqj ks¾udKh lrf.k we;' fuh
tl ne.ska mshjr .Kkh fjñka u;l ;nd.kakd neúka th Integer fyda ta yd
iudk fâgd ghsma tll fõßhn,hla úhhq;=fjhs¡ fuys 1 ys isg 10 olajd we;s
ixLHd ,siaÜ fndlaia tl ;=, fmkaúh hq;=kï Æma tl oi jrla lrleúh hq;=nj
Tng oeka jegysh hq;=fjhs¡ tu ksid For x =1 To 10 fla;kh u.ska Æma tl 1 ka
mgkaf.k 10 ka wjika jk f,ig fla;kh lr we;' fuf,i Æma tl mshjr
10 la lrlefjk úgoS tu mshjr 10 wjika jk f;lau tu lrlefjk mshjr
u;l ;nd.ekSu i|yd x fõßhn,h Æma tl ;=, Ndú;d lrkq ,nhs¡ fuu Æma
tl 1 ka wdrïNjk w;r tu w.h m,uqj x fõßhn,hg ,nd.kq ,nhs¡ fuu 1 hk
w.h 10 g wvq neúka fldkafoaish i;H jk w;r Æma tl we;=,;g .uka lrkq
,nhs¡ fuysoS l%shd;Aulùug fla;kh lr we;Af;A ListBox1.Items.Add(x) fjhs¡
fuúg ,siaÜfndlaia tlg whs;uhla jYfhka tl;= jkafka x fõßhn,hg ,nd.;A
w.h fjhs¡ tkï oeka fõßhn,hg ,eî we;Af;A 1 neúka tu w.h ,siaÜfndlaia tlg
whs;uhla jYfhka tl;=ùu isÿfjhs¡ Next u.ska Æma tl mshjrla uq,g lrljkq
,nhs¡ fuúg x ys w.h 2 jk w;r th 10 g jvd wvq neúka kej;;A Æma tl we;=,;g
.ukalrkq ,nhs¡ fuúg o yuqjkafka l,ska ,shk,o fla;khu fjhs¡ oeka x ys
w.h 2 ksid tho ,siaÜfndlaia tlg whs;uhla jYfhka tl;= ùu isÿfjhs¡ Next
u.ska Æma tl kej;;A mshjrla uq,g lrljkq ,nhs¡ fuúg x ys w.h 3 jk w;r th
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
10 g jvd l=vd jk neúka kej;;A Æma tl we;=,;g .uka lrkq ,nhs¡ fï
wdldrhg x ys w.h 10 jk f;lau Æma tl l%shd;Aulùu isÿfjhs¡ fuf,i 10 hk
w.h ,siaÜfndlaia tlg we;=,;A jQ miq Next u.ska Æma tl kej; jrla mshjrla
lrljkq ,nhs¡ fuúg x ys w.h 11 jk w;r 11 hk w.h 10 hk w.h blaujd
f.dia we;s neúka fldkafoaish wi;Hjk ksid Æma tl Odjkfhka bj;Aùu
isÿfjhs¡ oeka Tng Æma tl l%shd;Aul jk wdldrh ukdj f;Areï.kakg we;ehs
lshd wfmalaId lruq¡ oeka fuu jevigyk Odjkh lr n,kak¡
fuu Æma tlla l%shd;Auljk wdldrh wjfndaO lr.ekSu i|yd wms ;j;a ir,
jevigykla ks¾udKh lruq¡ fï i|yd w¿;A jHdmD;shla wdrïN lrkak' fï
i|yd f,An,A lkafg%da,A folla" fglaiaÜ fndlaia lkafg%da,A folla" ,siaÜfndlaia
lkafg%da,A tlla iy nÜka lkafg%da,A tlla wjYH fjhs¡ Bg wu;rj fï i|yd
gQ,A fndlaia tflys All Windows Forms leg.ßfhys olakg ,efnk TrackBar
lkafg%da,A folla wjYH fjhs¡ fuu lkafg%da,Aia Ndú;d lrñka my; oelafjk
wdldrhg f*daï tl äihska lr.kak¡ fuysoS fla;kh i|yd jeo.;Ajk
lkafg%da,Aia j, kï rEm igyk iu`. bosßm;A lr we;'
g%eland¾ lkafg%da,A tflys Value fm%dmá tl u.ska tu ueo we;s fldgi p,kh
lrk w.h l=ulao hkak ,nd.; yel' fuysoS tu w.h ,nd.kafka fglaiaÜ
fndlaia lkafg%da,Aia neúka tajd iudk ,l=fKka jïmi i|yka lr we;'
jevigyk wdrïNjk úgoSo fuu g%eland¾ lkafg%da,A tflys äihska lrk
wjia:dfõoS ,ndoS we;s w.hka fmkajkafka ke;' tu ksid jevigyk fodaI
iys; úh yels neúka tu w.hka fmkaùug fmr mßosu f*daï f,daâ bfjkaÜ tl
;=, my; oelafjk wdldrhg fla;kh lrkak¡
fuys Apply Value nÜka tl la,sla l,úgoS fuu m,uq g%eland¾ lkafg%da,A tflys
je,shq tflys isg fojk g%eland¾ lkafg%da,A tflys je,shq tl olajd jQ w.hka
ish,A, fmkaúh hq;= neúka Apply Value nÜka tflys Click bfjkaÜ tl ;=, my;
mßos fla;kh lrkak¡
Dim x As integer fuysoS m,uqj x kñka Integer fâgd ghsma tflys fõßhn,hla
ks¾udKh lr we;' fuh Æma tl lrlefjk úgoS tu mshjr .Kk u;l ;nd.ekSu
i|yd Ndú;d lrkq ,nhs¡ fuysoS i;H jYfhkau isÿúh hq;Af;A m,uq g%eland¾
lkafg%d,A tflys we;s Value tflys isg fojk g%eland¾ lkafg%d,A tflys we;s
Value tl olajd we;s ish¿u w.hka ,siaÜ fndlaia tl ;=, fmkaùu fjhs¡ tu ksid
For x= TrackBar1.Value To TrackBar2.Value f,i fla;kh lr we;' WodyrKhla
f,i m,uq g%eland¾ lkafg%d,A tflys we;s Value w.h 10 f,i ilialr fojk
g%eland¾ lkafg%d,A tflys we;s Value w.h 20 f,i ilialr ;snqkfyd;A Æma tl
10 ys isg 20 olajd l%shd;Aulùu isÿfjhs¡ fuúg m,uqj x fõßhn,hg 10
,nd.kakd w;r th 20 g jvd wvq neúka fldkafoaish i;Hjk ksid Æma tl
we;=,;g .uka lrkq ,nhs¡ fuúg fl,skau tu w.h ,siaÜ fndlaia tl ;=,
whs;uhla jYfhka we;=,;A lrkq ,nhs¡ Next u.ska Æma tl mshjrlska lrlejQmiq
x ys w.h 11 jk w;r tho 20 g jvd wvq neúka tu w.ho ,siaÜ fndlaia tlg
wms oeka fuu jevigyfkys l%shdldÍ;Ajh f;Areï.ksuq¡ fuys Folder Group Name
bosßfhys we;s fglaiaÜ fndlaia tl ;=, f*da,av¾ iuQyh i|yd iqÿiq kula ,ndoS
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
Amount Folders bosßfhys we;s kshqußla wma vjqka lkafg%da,A tl Ndú;d lrñka
tljr ks¾udKh úhhq;= f*da,Av¾ia m%udKh i|yka l,hq;= fjhs¡ bkamiqj
Browse… nÜka tl la,sla l,úgoS fuu f*da,Av¾ia iuQyh ks¾udKh úhhq;= md;A
tl ,ndoSug f*da,Av¾ vhf,d.A fndlaia tlla fmkaúhhq;= fjhs¡ bkamiq Create
Folder Group nÜka tl la,sla l,úgoS tu i|yka l, m%udKhg tu kñka
f*da,Av¾ia ks¾udKh úhhq;= fjhs¡ f*da,Av¾ia tlska tl id¾:lj ks¾udKh jQjdo
hkak ,siaÜ fndlaia tl ;=, whs;uhla jYfhka ks¾udKh jQ nj oekaúh
hq;=fjhs¡ fuysoS f*da,Av¾ia ks¾udKh l,yels wju iSudjla mej;shhq;= fjhs¡
fuf,i ks¾udKh l,yels f*da,Av¾ia m%udKh ;SrKh lrkq ,nkafka kshqußla
wma vjqka lkafg%da,A tl ;=,ska neúka fuu lkafg%da,a tl f;dard Minimum
bosßfhys w.h 1 f,i;A Maximum bosßfhys we;s w.h 20 f,i;A fjkia lr.kak¡
fuúg fuu jevigyk u.ska wjuh f*da,Av¾ia 1 ys isg 20 olajd jQ m%udKhla
ks¾udKh l,yels fjhs¡ fuysoS Æma tl l%shd;aul úhhq;Af;A 1 ys isg kshqußla
wma vjqka lkafg%da,A tflys i|yka lr we;s w.h olajd fjhs¡ ukao tjeks
f*da,Av¾ia m%udKhla ks¾udKh ùu i|yd fjhs¡ fyd|hs fuu jevigyfkys
Browse… nÜka tl vn,A la,sla lr my; oelafjk wdldrhg fla;kh lrkak¡
fuys fldgq lrk,o tla tla fla;khka fjka fjka jYfhka tl fm,lg ,sùug
j.n,d.kak¡ Æma tl lrlefjk úgoS tu mshjr .Kk u;l ;nd.ekSu i|yd Dim
x As Integer f,i m,uqj fõßhn,hla ks¾udKh lr we;' For x= 1 To
NumericUpDown1.Value fuysoS Æma tl 1 ys isg kshqußla wma vjqka lkafg%da,A
tflys i|yka lrk,o w.h olajd fkdlvjd l%shd;Aulùu i|yd fla;kh lr
we;' fuu Æma tl lrlefjk jdr .Kkg wkqj f*da,Av¾ iuQyh ks¾udKh
lr.ekSug kï Æma tl ;=, ta i|yd fla;kh l,hq;= fjhs¡ fuysoS m,uqj wod,
f;dark,o f*da,av¾ md;A tl ;=, f*da,Av¾ia iuQyhla ks¾udKh lrkúgoS tu
tla tla f*da,Avrh ks¾udKh lsÍug fmr tu kñka f*da,Avrhla mj;skafkao
hkak fidhdne,sh hq;=fjhs¡ ukao tlu f*da,Av¾ md;A tll tlu kñkA
f*da,Av¾ folla mej;sh fkdyels neúks¡ WodyrKhla f,i Tn lsishï md;A
tllA f;dard f*da,Av¾ tflys ku jYfhka Apple f,i i|yka lr kshqfußla wma
vjqka lkafg%da,A tflka 5 f,i ,ndÿkaúg tu kñka tu md;A tl ;=, f*da,av¾ 5
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
la ks¾udKhùu isÿúh hq;=h' kuq;A Apple f,i tlu kñkA f*da,Av¾ 5 la
ks¾udKh l, fkdyels neúka fuu Apple hk kug Æma tl lrlefjk úg tu
mshjr .Kk u;l ;nd.kq ,nk fõßhn,h wE|d we;' fuúg Apple1, Apple2,
Apple3 f,i f*da,av¾ 5 la ks¾udKh l,yels fjhs¡ fyd|hs m,uqj Tn Apple1ys
isg Apple5 olajd lsishï ksYAÑ; md;A tll f*da,Av¾ 5 la ks¾udKh lf,Ahehs
is;kak¡ oeka fuhska Apple2 iy Apple3 hk f*da,Av¾ fol muKla ä,SÜ lf,ahehs
is;kak¡ oeka we;Af;A Apple1, Apple4 iy Apple5 hk f*da,Av¾ia muKs¡ oeka
kej;;A Apple f,i i|yka lr by; md;A tflysu f*da,Av¾ia ks¾udKh l,úg
oeka Apple1, Apple4 iy Apple5 hk f*da,Av¾ia ks¾udKhù we;s neúka tajd
u`.yer Apple2 iy Apple3 hk f*da,Av¾ia muKla ks¾udKhùu isÿúh hq;=h'
fuysoS Æma tl miaj;djla lrlefjk úgoS mshjfrka mshjr f*da,Av¾ia tl ne.ska
miaj;djla ks¾udKhùu isÿfjhs¡ fuúg tl ne.ska ks¾udKhjk iEu wjia:djloSu
tu kñka f*da,Av¾ tlla ;sfíoehs úuid ne,sh hq;=fjhs¡ tfia fkdue;s jqjfyd;A
muKla f*da,Avrh ks¾udKhùu isÿfjhs¡ fuysoS Æma tl 1 ys isg 5 olajd
l%shd;Aul jkjdhehs is;kak¡ fuúg x ys w.h 1 jk w;r th 5 g jvd l=vd neúka
fldkafoaish i;H jk ksid Æma tl we;=,;g .uka lrkq ,nhs¡ fuúg If Not
Directory.Exists(FolderBrowserDialog1.SelectedPath&”\”& TextBox1.Text & x
fuysoS f*da,Av¾ md;A tl iu`. fglaiaÜ fndlaia tflys ,ndÿka kñka iy thg
wE|d.;A x fõßhn,fhys w.fhka f*da,Avrhla ;sfnkjdo hkak m,uqj úuidn,d
we;' WodyrKhla Apple f,i i|yka lr ;snqfkakï x j, m,uqj l%shd;Auljk úg
mj;sk w.h 1 neúka md;A tl jYfhka C:\ f,i ,ndoS ;snqfkakï tys Apple1 kñka
f*da,Avrhla we;Aoehs úuid n,d we;' tfia fkdfõ kï
Directory.CreateDirectory(strpath &”\” & TextBox1.Text & x fla;h u.ska
f*da,Av¾ vhf,d.A fndlaia tflys f;dard we;s md;a tflys Apple1 kñka
f*da,Avrhla ks¾udKhùu isÿfjhs¡ tfukau f*da,Avrh ks¾udKh jQ nj ye`.ùu
i|yd ,siaÜ fndlaia tl ;=,g whs;uhla jYfhka tu Apple1 iy Folder
Successfully created f,i tl;=ùu isÿfjhs¡ hï fyhlska tu kñka f*da,Avrhla
mej;=kfyd;A tkï Else g miqj tu Apple1 iy Folder Not Successfully created
f,i whs;uhla ks¾udKhùu isÿfjhs¡ Next u.ska Æma tl kej; mshjrla lrljkq
,nhs¡ fuúg x ys w.h 2 jk w;r th 5 g jvd l=vd neúka Æma tl kej;;A we;=,;g
.uka lrkq ,nhs¡ fuúg kej;;A l,ska fla;khu yuqjk w;r kej;;A Apple2
kñkA f*da,Avrhla we;Aoehs úuidn,d tfia ke;Akï tu md;A tflysu Apple2
kñkA f*da,Avrhla ks¾udKhùu isÿfjhs¡ tfukau th id¾:lj ks¾udKhjQ nj
olajñka mKsúvhla ,siaÜ fndlaia tlg whs;uhla jYfhka tl;=ùu isÿfjhs¡
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
tho l,ska ks¾udKh lr mej;=kfyd;A Else hgf;A we;s fla;kh l%shd;Aulùu
isÿfjhs¡ fï wdldrhg Æma tl miaj;djla lrlefjk úgoS l,ska tu kñka
f*da,av¾ tlla fkdmej;=kfyd;A Apple1, Apple2, Apple3, Apple4 iy Apple5
f,i f*da,Av¾ia 5 la ks¾udKhùu isÿfjhs¡ fuysoSo f*da,Av¾ tflys kula i|yd
kug * ? / \ < > jeks wod, fkdjk wl=re ,ndoS f*da,Av¾ tlla ks¾udKh lsÍug
W;aidy .;Aúg tu we;sjk fodaIh j,lajd.ekSu i|yd Try Catch iafÜÜukaÜ tl
Ndú;d lsÍug isÿfjhs¡ tu ksid by; ish¿u fla;kh Try ;=, ,súh hq;=fjhs¡
kuq;A Tn lsishï md;A tlla fkdf;darñka fuu f*da,Av¾ia ks¾udKh lsÍug
;e;al, úgoSo fodaIhla u;=jk neúka f*da,Av¾ ks¾udKh lsÍug fmr fuu md;A
tl .nvd lr.kq fõßhn,h ysiaj ke;súgoS f*da,Av¾ ks¾udKh ùug fla;kh
lr we;'
fuf,i f*da,av¾ iuQyh i|yd kula ,ndfkdoS f*da,av¾ ks¾udKh lsÍug ;e;a
l,úgoSo tys fodaIhla we;s jk neúka m,uqj Create Folder Group nÜka tl
jevigyk äihska lrk wjia:dfõoSu Enabled fm%dmá tl False lr th
;djld,slj wl%sh lr fglaiaÜ fndlaia tl ;=, kula i|yka lrkúgoS muKla
th il%shjk f,ig fla;kh lr we;' fuf,i fglaiaÜ fndlaia tl ;=, kula
i|yka lrk wjia:dfõ th isÿjk neúka fglaiaÜ fndlaia tflys TextChanged
bfjkaÜ tl ;=, my; mßos fla;kh lrkak¡
oeka wms fuu jevigyfkys l%shdldÍ;Ajh f;Areï.ksuq¡ fuys Red bosßfhys 0 isg
255 olajd jQ l=uk fyda w.hla i|yka lr Green bosßfhys o 0 isg 255 olajd jQ
l=uk fyda w.hla i|yka lr Blue bosßfhys o 0 isg 255 olajd jQ l=uk fyda
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
w.hla i|yka lr fuys olakg ,efnk Add Color Code nÜka tl la,sla l,úgoS
ms,sfj,ska tu w.hka ListBox1 lkafg%da,A tlg;A" ListBox2 lkafg%da,A tlg;A iy
ListBox3 lkafg%da,A tlg;A ms,sfj,ska tu w.hka 0 ys isg tu i|yka lrk,o w.h
olajd whs;uhla jYfhka we;=,;Aùu isÿúh hq;=h' bkamiq fuu ,siaÜ fndlaia tl
;=, we;s w.hka f;dark úgoS tu w.hka ;=kg wkqj mslap¾ fndlaia tl ;=,
RGB j¾K ;=fkka iEfok j¾Kh fmkaúh hq;=fjhs¡ fuysoS Tng Æmaia lsysmhla
tljr Ndú;d lrk wdldrh ms,sn|j oekqula ,nd.; yels fjhs¡ fuys we;s Add
Color Code nÜka tl la,sla l,úgoS tlsfklg fjkia Æma ;=kla l%shd;Aulùu
isÿúh hq;=h' tkï 0 ys isg Red bosßfhys fglaiaÜ fndlaia tl ;=, i|yka lrk,o
w.h olajd tl Æma tlla l%shd;Aulù tu w.hka ListBox1 lkafg%da,A tlg we;=,;A
úh hq;=h' tfukau 0 ys isg Green bosßfhys fglaiaÜ fndlaia tl ;=, i|yka
lrk,o w.h olajd wfkla tlla Æma tl l%shd;Aulù tu w.hka
ListBox2lkafg%da,A tlg we;=,;A ùu isÿúh hq;=h' tfukau wfkla Æma tl
l%shd;Aulúh hq;Af;A 0 ys isg Blue bosßfhys fglaiaÜ fndlaia tl ;=, i|yka
lrk,o w.h olajd fjhs¡ tu w.hka ish,A, ListBox3 lkafg%da,A tlg we;=,;A
úhhq;=h' fyd|hs ta i|yd Add Color Code nÜka tl vn,A la,sla lr tys fldaâ
úkafvda tl ;=, my; oelafjk wdldrhg fla;kh lrkak¡ fuysoS tlsfklg Æma
;=kla l%shd;Aulúh hq;= w;r tu w.hka tla tla ,siaÜ fndlaia ;=,g we;=,;Aùu
isÿúh hq;=h'
fuysoS Æma ;=ku l%shd;Aul jk úgoS tu tla tla Æma lrlefjk úg tu lrlefjk
w.h u;l ;nd.ekSu i|yd x,y iy z f,i Integer fâgd ghsma tflys fõßhn,A
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
;=kla ks¾udKh lr we;' fuf,i m<uq jrg Add Color Code nÜka tl la,sla
l, úgoS ListBox tl ;=,g tu w.hka ms,sfj,ska ,efnk w;r kej; jrla la,sla
l,fyd;A tu ;snQ whs;u ;sfnoaoS w¿;A whs;u m%udKho tl;=ùu isÿfjhs¡ fuu
fodaIh u`.yrjd .ekSu i|yd Æma tl l%shd;Aulùug m%:ufhka ,siaÜ fndlaia tl
;=, hï whs;u m%udKhla ;snqkfyd;A th bj;Aù Æma tl l%shd;AulùfïoS
,efnk w.hka ,siaÜ fndlaia tl ;=,g tl;=jk f,ig fla;kh lr we;'
fuúg Æma tl l%shd;Auljk iEu wjia:djloSu l,ska ,siaÜ fndlaia tl ;=, hï
whs;u m%udKhla we;Akï tajd bj;A lrñka w¿;A w.hka tl;=ùu isÿfjhs¡
fuysoS m,uq Æma tl 0 ys isg TextBox1 ys we;s w.h olajd l%shd;Aul fjñka tajd
ish,A,lau ListBox1 lkafg%da,A tlg we;=,;A jk f,ig fla;kh lr we;' fuu
Æma tl wjika jQ miq Bg miqj ,shd we;s Æma tl l%shd;Aulùu isÿfjhs¡ fuu Æma
tl 0 ys isg TextBox2 lkafg%da,A tflys we;s w.h olajd l%shd;Aul fjñka tu
w.hka Listbox2 lkafg%da,A tlg tl;=jk f,ig fla;kh lr we;'
by; Æma tl l%shd;Aulù wjika jQ miq ,shd we;s wjidk Æma tl l%shd;Aulùu
isÿfjhs¡ fuho 0 ys isg TextBox3 ys ghsma lr we;s w.h olajd l%shd;Aul fjñka tu
w.hka ish,A, ListBox3 lkafg%da,A tlg tl;=jk f,ig fla;kh lr we;'
fuf,i ,siaÜ fndlaia ;=kgu w.hka whs;u jYfhka tl;=jQ miq iajhxl%Shju fuu
tla tla ,siaÜ fndlaia j, m,uq whs;uh muKla f;AÍ mj;sk f,ig fla;kh
lr we;' SelectedIndex fm%dmá tl yryd ,siaÜ fndlaia tll we;s whs;uhla
f;dard.; yels w;r fuu whs;u y÷kd.kq ,nkafka 0 ys isg 1 2 3 wdoS f,ig
neúka m,uq whs;uh muKla f;AÍug
ListBox1.SelectedIndex=0 f,ig fla;kh lr we;' oeka fuu tla tla ,siaÜ
fndlaia ;=fkys f;darkq ,nk w.hka RGB ys tkï Red, Green iy Blue hk
w.hka ;=kla f,i ixúOdkh fjñka fmkajk i;H RGB j¾Kh mslap¾ fndlaia tl
;=, fmkaùu i|yd tla tla ,siaÜ fndlaia lkafg%da,A u; vn,a la,sla lr olakg
fyd|hs oeka jevigyk Odjkh lr n,kak' fuysoS Tn 0 g jvd wvq w.hla tkï
iDK w.hla fyda 255 g jvd jeä w.hla ,ndoS Add Color Code nÜka tl la,sla
lr jevigyk l%shd;Aul lsÍug hk úgoS jevigyk fodaI iys; fjhs¡ ukao RGB
l%uhg j¾K iEfokq ,nkafka Red ys 0 isg 255 olajd jQ w.hl=;A" Green ys ys 0 isg
255 olajd jQ w.hl=;A iy Blue ys 0 isg 255 olajd jQ lsishï w.hl=;A tl;=ùfuks¡
tu ksid 0 g jvd wvq w.hla fyda 255 g jvd jeä w.hla ,ndÿkamiq jevigyk
fodaI iys; fjhs¡ fuh u`.yrjd .ekSug kï fglaiaÜ fndlaia tl ;=, w.hka
,ndfok úgu th 0 g jvd wvq fyda 255 g jvd jeä w.hla ,ndfok úgu
j,lajd.; yel' fyd|hs ta i|yd TextBox1 lkafg%da,A tl vn,A la,sla lr fldaâ
úkafvda tl ,nd.kak¡ fuf,i hïlsis fohla fglaiaÜ fndlaia tl ;=, ghsma
lrk úgu hï ld¾hhla isÿlr.ekSug kï fla;kh l,hq;Af;A TextChanged
bfjkaÜ tl ;=, fjhs¡ ta wkqj my; mßos fla;kh lrkak¡
fuysoS w.hka ;=kla ,ndfkdoS nÜka tl la,sla l,o fodaI iys; jk neúka
jevigyk äihska lrk wjia:dfõoSu fglaiaÜ fndlaia ;=fkysu w.hka
jYfhka 0 hk w.h ,ndfokak¡ w.hka yer fjk;A wl=re i,l=Kq ,ndoSu
je,elaùu i|yd KeyPress bfjkaÜ tl Ndú;d lrñka tìh yels lS iSud lrkak¡
^fuu bfjkaÜia ms,sn|j isoaOdka; fldgia iúia;rd;aulj fuu .%ka: ud,dfõ
m,uq fldgfiys i|yka lr we;'& oeka kej;;A jevigyk Odjkh lr n,kak¡
fyd|hs wms oeka fjkiau j¾.fha jevigykla ks¾udKh lruq¡ fï i|yd w¿;A
jHdmD;shla wdrïN lrkak' fuh lsishï w.hla ,ndÿka miq lsishï w.hla
we;=,; tu ,ndÿka w.fhys .=Kdldr ,nd.; yels jevigykla fjhs¡
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
WodyrKhla f,i 4 iy 20 f,i ,ndÿka úg 20 olajd mj;sk 4 ys .=Kdldr
,nd.; yelsúh hq;=h' tho fmkaúh hq;af;a my; wdlD;shg fjhs¡
oeka fuu jevigyfkys l%shdldÍ;Ajh f;Areï .ksuq¡ fuys Type bosßfhys 3 f,i
igyka lr End bosßfhys 100 f,i igyka lr Calculate nÜka tl la,sla l,úgoS
tys .=Kdldr my; wdldrhg fmkaúh hq;=h'
3X1=3
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
3X2=6
3 X 3 =9
3 X 33 =99
tkï 100 olajd we;s 3 ys .=Kdldr fuu ,siaÜ fndlaia tl ;=, fmkaúh hq;=h'
tkï .=Kdldr 33 la 100 olajd we;s neúka tu .=Kdldr ish,A,u by;
wdlD;sfhka fmkaúh hq;=h' fuysoS 100 olajd we;s 3 ys .=Kdldr 100 olajd
fmkaúhhq;= neúka fï i|yd Æma tlla Ndú;d l,hq;= nj Tng jegysh hq;=h'
fyd|hs fuf,i isÿjkafka Calculate nÜka tl la,sla l, úgoSh' oeka wm fufyu
ys;uq¡ Type bosßfhys 3 ,ndoS End bosßfhys 20 ,ndÿkafkahehs is;kak¡ fuúg 20
olajd we;s 3 ys .=Kdldr fmkaúh hq;=h' tkï by; wdlD;sh fkdi,ldyeßh úg 3 6
9 12 wdoS f,ig fmkaúh hq;=h' kuq;A For Next Æma wdlD;sfhys Æma tl
lrlefjkafka mshjr jYfhks¡ tkï lrlefjk mshjr .Kk u;l ;nd.kakd
fõßhn,h ;=, tu w.h ,efnkafka tl ne.ska jeäjk wdldrhgh' fuf,i 3 6
9 12 f,i hï mshjrlska j¾Okh lsÍug fuu Æma tl ;=, Step hk fla;h
Ndú;d lrkq ,nhs¡ fuh my; WodyrKh u.ska f;Areï.kak¡
fuysoS Æma tl lrlefjk mshjr .Kk u;l ;nd.ekSu i|yd count kue;s Integer
fâgd ghsma tflys fõßhn,hla ks¾udKh lr we;'
For count = 1 To 10 Step 3
fuysoS Æma tl z hk w.fhka wdrïNù y j,ska wjika jk w;r Step bosßfhys ,ndoS
we;Af;Ao z hk w.hu fjhs¡ fuysoS 3 6 9 12 fyda 4 8 12 16 f,i i;H jYfhkau
,efnkafka Step bosßfhys we;s z hk w.fhka fjhs¡ fuúg x w.hg m,uqj 3 mjrd
.kakd w;r th 20 g jvd l=vd neúka Æma tl we;=,;g .uka lrkq ,nhs¡ Next
u.ska uq,g lrlejQ miq Step bosßfhys we;s w.h z neúka 3 g 3 la tl;=lr 6 hk
w.h ysñfjhs¡ fï wdldrhg Æma tl l%shd;Aulùu isÿfjhs¡ fuúg 3 6 9 12 15 18
f,i w.hka ysñ fjhs¡ kuq;A wmg wjYH 3 X 1 = 3, 3 X 2 = 6, 3 X 3 = 9, 3 X 4 = 12
f,ig fjhs¡ fuys x g miqj we;s 1 2 3 4 hkq i;H jYfhkau Æma tl lrlefjk
jdr .Kk fjhs¡ fuu w.h u.ska Æma tl lrlefjk jdr .Kk .Kkh lr.;
yel' i;H jYfhkau lsjfyd;A 20 olajd we;s Æma tl lrlefjk jdr .Kk fyj;A
;=fkys .=Kdldr m%udKh fjhs¡ kuq;A fuh x fõßhn,h ;=,ska .Kkh lr.;
fkdyel' ukao thg Step bosßfhys we;s w.ho tl;=jk neúks¡ tu ksid Æma tl
lrlefjk jdr .Kk u;l ;nd.ekSu i|yd m fõßhn,h Ndú;d lr we;' Æma
tl we;=,;g hk iEu jdrhloSu m fõßhn,hg tl ne.ska tl;=ùu isÿfjhs¡
tkï Æma tl lrlefjk jdr .Kk fuu m fõßhn,fhka .Kkh lr.; yel'
i;H jYfhkau bka ye`.jkqfha 20 olajd we;s 3 ys .=Kdldr m%udKh fjhs¡ fuysoS
,eìh hq;Af;A 3 X 1 = 3, 3 X 2 = 6, 3 X 3 = 9, 3 X 4 = 12wdoS f,ig neúka ,siaÜ
fndlaia tl ;=,g tl;=jk whs;uh m,uqj z hk w.h iy “ “ u.ska ysia;ekla
tl;=lr we;' tkï 3 ,ndoS we;Akï 3 hk w.h iEu whs;uhlu fmkajkq ,nhs¡
bkamiq X i,l=K wjYH neúka “X” hk fldgio wE|d.kq ,nhs¡ oeka wjYH 3 ys
.=Kdldr fyj;A Æma tl lrlefjk jdr .Kk neúka th m fõßhn,h ;=,ska
.Kkh lr.kakd neúka m f,i i|yka lr we;' bkamiqj ysia;ekla ;nñka =
,l=Ko wE|d.kakd f,ig fla;kh lr we;' fyd|hs oekgu;A 3 X 1 = hk wdlD;sh
,eî wjidkh' fuu Step bosßfhys we;s w.h 3 6 9 12 f,i ,efnkafka x
fõßhn,h ;=,ska neúka x f,i i|yka lr we;'
fyd|hs oeka by; fla;kh ukdj jegfykakg we;ehs lshd wfmalaId lruq¡ oeka
jevigyk Odjkhlr tys id¾:l;Ajh w;Aú|skak¡ fyd|hs oeka wms fï yd iudk
;j;a jevigykla ks¾udKh lruq¡ fï i|yd w¿;A jHdmD;shla fmr mßosu
f,An,A lkafg%da,A folla" fglaiaÜ fndlaia lkafg%da,A folla" nÜka lkafg%da,A
tlla iy ,siaÜ fndlaia lkafg%da,A tlla ,ndf.k my; oelafjk wdldrhg
f*daï tl äihska lr.kak¡
For z = 1 To y
fuysoS lrlefjk mshjr .Kk u;l ;nd.kq ,nkafka z fõßhn,h jk w;r Æma
tl 1 ys isg y fyj;A TextBox2 ys ,ndoS we;s w.h olajd fkdlvjd Æma tl
l%shd;Aulùu isÿfjhs¡ fuys Step f,i i|yka fkdlr we;s neúka z fõßhn,h ;=,
yßhgu Æma tl lrlefjk mshjr .Kk u;l ;nd.ekSu isÿl, yel' fuysoS x ys
we;Af;A .=Kdldr ,nd.ekSug fhdod.kq ,nk ixLHdj fjhs¡ fuysoS lrlefjk
mshjr .Kk z fõßhn,fhka ,nd.; yels neúka x u.ska .=Kdldr ,nd.kakd w.h
we;s neúka z hk w.h x j,ska .=K lsÍfuka ms,sfj,ska TextBox2 ys we;s w.h olajd
we;s ixLHdj, .=Kdldrh ,nd.; yels fjhs¡ WodyrKhla f,i TextBox1 ys 3 hk
w.h;A TextBox2 ys 10 hk w.h;A ,ndÿkafka hehs is;kak¡
For z = 1 To 10
3X1=
3X2=
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
3 X 3=
3 X 4=
hk wdlD;sh ,eî we;s w;r z * x u.ska i;H .=Kkh jk w.h ,nd.; yel' oeka
jevigyk Odjkh lr n,kak¡ fyd|hs wms fuu For Next Æma tl Ndú;d lrñka
;j tla jevigykla muKla ks¾udKh lruq¡ fï i|yd w¿;A jHdmD;shla wdrïN
lrkak' fï i|yd f,An,A lkafg%da,A folla" fglaiaÜ fndlaia lkafg%da,A folla"
nÜka lkafg%da,A tlla" f¾äfhda nÜka lkafg%da,A y;rla" .ArEma fndlaia lkafg%da,A
tlla wjYH fjhs¡ oeka fuu lkafg%da,Aia Ndú;d lrñka my; oelafjk wdldrhg
f*daï tl äihska lrkak¡
fuysoS jk jeros wju lsÍu i|yd Try Catch iafÜÜukaÜ tl Ndú;d lr we;' óg
fmr f¾äfhda nÜka tlla Ndú;d lrñka TextBox2 ys ms,s;=rla ,ndf.k we;Akï
m,uqj th bj;Ajk f,ig fla;kh lr we;' Æma tl lrlefjk úgoS tu
lrlefjk mshjr .Kk u;l ;nd.ekSu i|yd Integer fâgd ghsma tflys x
kñka fõßhn,hla ks¾udKh lr we;' fuu bkamqÜ fndlaia ;=, ,ndfok w.hka
;djld,sj ;ekam;A lsÍug iy os.ska os.gu ,ndfok w.hka j,g l,ska mej;s
w.hka u;l ;nd.ekSug wm count iy rest f,i fjku fõßhn,A folla
fl,skau Class tl ;=, ks¾udKh lr we;' tfukau m,uqj ks¾udKh jk
wjia:dfõoS tys value tl jYfhka 0 f,i mjrd we;'
fuysoS fuu Æma tl 1 ys isg Count bosßfhys we;s fglaiaÜ fndlaia tl ;=, we;s w.h
olajd l%shd;Aulùu i|yd fla;kh lr we;' fuf,i Æma tl lrlefjk úgoS
lsishï mshjrloS Æma tl we;=,g .ukal,úg count hk fõßhn,hg bkamqÜ
fndlaia tl ;=, ,ndfok w.h mjrd.kakd f,ig fla;kh lr we;' fuf,i tu
w.h .nvdlr.;A miq b*A iafÜÜukaÜ tlla Ndú;d lrñka f;dardf.k we;Af;A
m,uq f¾äfhda nÜka tlo hkak úuid n,d we;' fuúg rest fõßhn,h wdrïNfhys
0 we;s w;r thg count bosßfhys ,nd oS we;s w.h tl;=jk f,ig fla;kh lr
we;' fï wdldrhg wksl=;A f¾äfhda nÜka f;dard we;Akï ta i|ydo b*A iafÜÜukaÜ
tlla ,súh hq;=fjhs fuysoS fuu b*A iafÜÜukaÜ tl i;H ùu hkq Bg my,ska
,shk,o lsisÿ b*A iafÜÜukaÜ tlla i,ld fkdn,d Next u.ska Æma tl uq,g
lrljkq ,nhs¡ fuúg kej;;A bkamqÜ fndlaia tflys fla;h yuqjk neúka
tysoSo ,ndfok w.h count fõßhn,hg ,nd.ksñkA rest fõßhn,fhys mj;sk
w.hg th tl;= lr we;' fuúg tys we;s w.h tu wjia:dfõoSu ms,s;=rla jYfhka
TextBox2 lkafg%da,A tl ;=, fmkajkq ,nhs¡
fuysoS Æma tl l%shd;Aul jk úgoS tu w.hka u;l ;nd.ekSu i|yd x,y,z iy r f,i
Integer fâgd ghsma tflys fõßhn,a y;rla ks¾udKh lrf.k we;' fuu x
fõßhn,hg TextBox1 ys w.h;A y fõßhn,hg TextBox2 ys ,ndfok w.h;A r
fõßhn,hg TextBox3 ys ,ndfok w.h;A mjrd.kakd f,ig fla;kh lr we;'
Æma tl lrlefjk úgoS tu mshjr u;l ;nd.ekSu i|yd z kue;s fõßhn,h
Ndú;d lr we;' tfia kï fuu Do While Æma wdldrh ys m,uqj fuu z mgka.kakd
w.hla i|yka l,hq;= fjhs¡ tfia kï Æma tl wdrïNúh hq;Af;A TextBox1 ys
,ndfok w.fhka neúka oekgu;A th x fõßhn,hg mjrdf.k we;s neúka z = x
f,i fla;kh lr we;' fuúg TextBox1 ys l=uk w.hla i|yka l,o Æma tl
wdrïN jkqfha tu w.fhka fjhs¡
Do While z <= y
fyd|hs wms oeka fuu jevigyfkys l%shdldÍ;Ajh meyeos,s lr.ksuq¡ fuys Start
bosßfhys olakg ,efnk TextBox1 ys wdrïNl w.hla ,ndoS End bosßfhys olakg
,efnk TextBox2 ys wjidk w.hla i|yka lr Select Type j,ska 5 hk f¾äfhda
nÜka tl f;dard Show Numbers nÜka tl la,sla lf,ahehs is;kak¡ fuúg Start
bosßfhyys we;s w.fhys isg End bosßfhyys we;s w.h olajd we;s ish¿u 5 ys
.=Kdldr ,siaÜ fndlaia tl ;=, fmkaúh hq;=h' 10 hk hk f¾äfhda nÜka tl
f;dard we;s úgoS 10 ys .=Kdldr;A" 3 hk f¾äfhda nÜka tl f;dard we;s úgoS tu
w.hka fol w;r mj;sk ish¿u 3 ys .=Kdldr;A" 4 hk f¾äfhda nÜka tl f;dard
we;s úgoS tu w.hka fol w;r mj;sk ish¿u 4 ys .=Kdldr;a fmkaúh hq;=fjhs¡
fuu ish,A,lau isÿúh hq;Af;A Show Numbers nÜka tl la,sla l, úgoS fjhs¡ tu
ksid fla;kh l, hq;Af;A Click bfjkaÜ tl ;=, fjhs¡ tfia kï Æma tl
l%shd;Auljk úgoS f;dard we;Af;A l=uk f¾äfhda nÜka tl oehs i,ld ne,sh hq;=
neúka b*A iafÜÜukaÜ tlla Ndú;d l,hq;= nj Tng jegysh hq;= fjhs¡ fyd|hs
wms oeka woshrfhka woshrh fla;kh lsÍug mgka .ksuq¡
If z Mod 5 = 0 Then
fuf,i Æma tl lrlefjk úgoS tu mshjr u;l ;nd.kakd fõßhn,fhys w.h 5
ka fnÿmiq 0 b;sßjQúg tu w.h muKla ,siaÜ fndlaia tlg we;=¿ùug fla;kh
lr we;' fuf,i tu w.h tl;= jqjfyd;A tu b*A iafÜÜukaÜ tl t;kskau
wjika lr we;' oeka wmg fuu f¾äfhda nÜka tl f;dard fkdue;skï
by; wdldrfha m%;sM,hla ,nd.ekSug kï Tng wksjd¾fhkau Æma tlla ;=, Æma
tlla Ndú;d lrñka fla;kh lsÍug isÿfjhs¡ fï i|yd f*daï tlg f,An,hla iy
nÜka tlla ,nd.kak¡
fyd|hs wms oeka fuu fla;kh l%shd;Auljk wdldrh meyeos,s lr.ksuq¡ fuysoS Æma
tl lrlefjk úg tu mshjr .Kk u;l ;nd.ekSu i|yd x iy y f,i fõßhn,A
folla ks¾udKh lr we;' fuu Æma folu l%shd;Aulùug m%:ufhka y hk
fõßhn,hg 1 hk w.h mjrdf.k we;' fldákau lshd we;Af;A y hk fõßhn,h 1
ka mgka.kakd f,igh'
Do While y <= 5
Created By: S.Wajira Madushanka
Disapamok Online IT Academy
fuys y w.h 1jk w;r th 5 fyda 5 g jvd wvq neúka Æma tl we;=,;g .uka lrkq
,nhs¡ Æma tl we;=,;g .uka l,úg x fõßhn,hg 1 hk w.h mjrd.kakd f,ig
fla;kh lr we;'
Do While x <= 5
fuúg kej;;A Æma tlla yuqfjhs¡ x j, w.h 1 jk w;r th 5 fyda 5 g l=vd neúka
tu Æma tl we;=,;go .ukalrkq ,nhs¡ fuúg f,an,a tflys mj;sk w.hgu x *
y ysia;ekla iy | ,l=K fmkaùug fla;kh lr we;' x ys w.h;A y ys w.h;A 1
neúka m%;sM,h jYfhka 1 ,eî ysia;ekg miqj | ,l=K olakg ,efnhs¡ fuu |
,l=K Ndú;dlr we;Af;A os.gu b,lalï fmkajkúg tajd fjku fjkalr
oelaùu i|yd fjhs¡ Bg miqj x ys w.hg 1 la tl;=jk w;r Loop u.ska kej;;A
wdikak;u Æma tlg lrljkq ,nhs¡ tkï Do While x <= 5 Æma tl fjhs¡ oeka x ys
w.h 2 ksid tho 5 fyda 5 g l=vd neúka kej;;A Æma tl we;=,;g .uka lrkq ,nhs¡
fuúg f,an,fhys ;sfnk w.h tfiau mj;soaoS x * y fla;kh l%shd;AuljQ úg x
hkak 2 jk w;r y ;ju;A 1 ksid 1 g miqj 2 hk w.h olakg ,efnhs¡ oeka x j,g
;j;a 1 la tl;=jQmiq x ys w.h 3 fjhs¡ kej;;A Æma tl we;=,;g .uka lrkq ,nhs¡
fï wdldrhg 1 2 3 4 5 f,i w.hka olakg ,efnhs¡ x j,g kej;;A 1 la tl;=jQmiq x
ys w.h 6 fjhs¡ fuh 5 g jvd úYd, neúka fuu Æma tl tkï Do While x < = 5 Æma
tl muKla Odjkfhka bj;Aùu isÿfjhs¡ fuúg y = y + 1 u.ska y fõßhn,fhys
;sfnk w.hg 1 la tl;=ùu isÿfjhs¡ fuúg y ys w.h 2 jk w;r
fyd|hs fï i|yd w¿;A jHdmD;shla wdrïN lrkak' fï i|yd f,An,A lkafg%da,A tlla
iy nÜka lkafg%da,A tlla m%udKj;A fjhs¡ f,An,fhys oekg mj;sk fglaiaÜ tl
bj;Alr Font fm%dmá tl Ndú;d lrñka wl=rej, m%udKh 24 f,i ilia
lr.kak¡ fuúg ;re rgdj jvd;A meyeos,sj oel.; yel' fuysoS my,g tlu
;re rgdfjys ;re tl ne.ska l%ul%ufhka jeäùu isÿfjhs¡ fyd|hs fuu
fla;kh wms ,shdf.ku meyeos,s lr.ksuq¡ nÜka tl vn,A la,sla lr Click
bfjkaÜ tl ;=, my; oelafjk wdldrhg fla;kh lrkak'
fuysoS 1 hk w.h 5 fyda 5 g jvd l=vd neúka Æma tl we;=,;g .uka lrkq ,nhs¡
fuysoS x ys w.h 1 ka mgka .kakd f,ig fla;kh lr we;'
Do While x <= y
Do While x <= y
fyd|hs fï i|yd fmr mßosu f,An,hla iy nÜka lkafg%da,A tlla f*daï tlg
,nd.kak¡ f,an,fhys wl=rej, m%udKh fmr mßosu jeä lr.kak¡ weyeg
meyeos,sj fmfkk m%udKhg jeälr.kak¡ fyd|hs nÜka tflys Click bfjkaÜ
tl ;=, my; mßos fla;kh lrkak¡
fuysoSo Æma tl lrlefjk úgoS tu lrlefjk mshjr .Kk u;l ;nd.ekSu i|yd
x iy y f,i fõßhn,A folla ks¾udKh lr we;' fuysoS y hkak 5 ka mgka.kakd
f,ig fla;kh lr we;'
Do While y >= 1
y hk w.h 1 fyda 1 g jvd l=vd fkdjk neúka fldkafoaish i;H jk neúka Æma tl
we;=,;g .uka lrkq ,nhs¡ fuúg x hkak 1 ka mgka.kakd f,ig fla;kh lr
we;'
y ys 3 1fyda 1 g jvd úYd,jk neúka kej;;A Æma tl we;=,;g .uka lrkq ,nhs¡
x ys w.h 1 ù y ys w.h 3 jk ksid we;=,; Æma tl kej; jrla ;=kajrla lrlefjk
úg ;re fma,s ;=kla uqøKhùu isÿfjhs¡ fï wdldrhg y ys w.h 1 jk úg wjidkfha
tl ;rejla muKla uqøKhùu isÿfjhs¡ fyd|hs oeka jevigyk Odjkh
lrn,kak¡
fyd|hs Æma iïnkaO isoaOdka; fldgia fu;kska idlÉPd fldg wjika lruq¡
by; fÜn,A tl ie,l+úg tys we;s Student Name, Address, DOB, Sex iy TP
Number hk tajd Fields jYfhka y÷kajkq ,nhs¡ fuf,i tla wfhl=g wh;A
iïmQ¾K *S,Aâia j, tl;=jla Record tlla jYfhka y÷kajkq ,nhs¡ tkï tla tla
*S,Aâia ;=, we;=,;A lr we;s iïmQ¾K o;A; fma,shla Record tlla jYfhka
y÷kajkq ,nhs¡ fuf,i fÜn,A tllg frfldaâia we;=,;A lrkúgoS fndfyda úg
tu frfldaâ tlla wfkla frfldaâ tllska fjka fldg úfYAI fldg
y÷kd.ekSug yelsúh hq;=h' by; j.=j foi uy;A ´kElñka neÆ úgoS tys tla
tla mqoa.,hl=f.A f;dr;=re fjka lr y÷kd.ekSug ksYAÑ; meyeos,s *S,Aâ tlla
olakg fkd,efnhs¡ WodyrKhla f,i fuys Student Name tl ie,l+úg th
Ndú;d lrñka lsisfia;Au lsishï frfldaâ tlla ksYAÑ;j y÷kd.; fkdyels fjhs¡
ukao fuys Wasantha kñka tlu k.rfhys Ôj;Ajk mqoa.,hka fofofkl= olakg
,efnk neúks¡ tu ksid fujeks fÜn,a tll o;A; ;ekam;A lrkúgoS tys we;s
Created By: S.Wajir Madushanka
Disapamok Online IT Academy
lsishï frfldaâ tlla ksYAÑ;j fjkafldg y÷kd.ekSu i|yd *S,Aâ tlla
mej;sh hq;=fjhs¡
oeka by; j.=jgu wm w¿f;ka Admission Number f,i fjku *S,Aâ tlla
we;=,;A lr we;' fuf,i lsishï mqoa.,hl=g ,ndfok Admission Number tlla
kej;;A lsisfia;Au fjk;A mqoa.,hl=g ysñfkdjk neúka th Ndú;d lrñka
ksYAÑ; mqoa.,hl=f.A f;dr;=re fÜn,A tllska fjkalr.ekSfï meyeos,s
yelshdjla we;' i;H jYfhkau lsjfyd;A Tng ysñjk cd;sl ye÷kqïmf;ys
Tng muKla ysñjkq ,nkafka Tnj uq¿ ,xldfjkau iEu mqoa.,fhl=f.kau
fjkafldg úfYAIfldg y÷kd.ekSu i|yd fjhs¡ tfia fkdjqkfyd;A tlu
kulska tlu m%foaYhl mqoa.,hska fofofkl= isáhfyd;A y÷kd.ekSug
fkdyelsjk neúks¡ tu ksid fujeks *S,Aâ tlla fâgdfíia fÜn,A tlloS
Primary Key tlla jYfhka y÷kajkq ,nhs¡ fyd|hs wms m,uqj n,uq fujeks
Access fâgdfíia tlla úIqj,A fíisla fvdÜfkÜ mß.Kl NdIdj Ndú;d lrñka
iïnkaO lr md,kh lrkq ,nkafka flfiao lshd¡ fyd|hs fï i|yd m,uqj
Access uDÿldx.h Ndú;d lrñka fâgdfíia tlla ks¾udKh lrf.k isáhhq;=
fjhs¡ fuysoS wms ta i|yd Ndú;d lrkq ,nkafka T*sia meflacfhys 2007 ixialrKh
fjhs¡ kuq;A Tng ta i|yd óg miqj meñKs ixialrKhla jqjo Ndú;d lsÍfï
.eg¿jla fkdue;' kuq;A T*Sia 2007 ixialrKh Tn i;=j mj;Skï wm;A iu`.
ta wdldrfhkau mshjfrka mshjr .eg¿jla fkdue;sj iïnkaO;djh we;s lr.;
yel' fuf,i T*Sia meflacfhys 2007 hk ixialrKh Tnf.A mß.Klh ;=,
ksjerosj msysgqjd we;s úgoS úkafvdaia fijka fufyhqï moaO;shla iys;
Created By: S.Wajir Madushanka
Disapamok Online IT Academy
mß.Klhl kï Start nÜka tl la,sla lr olakg ,efnk iagd¾Ü fukq tflka All
Programs f;dard Bg miqj olakg ,efnk uDÿldx. ,ehsia;=fjka Microsoft Office
fm%da.%Eï .DDma tflys we;s Microsoft Office Access 2007 hk wdldrh f;dard.kak¡
fuúg Microsoft Access 2007 w;=reuqyqK; ;srfhys olakg ,efnhs¡ w¿;Au ysia
fâgdfíia tlla ks¾udKh lrkúgoS fuysoS ;srfhys ueo by,ska olakg ,efnk
Blank Database nÜka tl la,sla l,hq;= fjhs¡
fuys File Name bosßfhys wod, fâgdfíia tl y÷kd.ekSu i|yd kula ,ndosh
hq;=fjhs¡ fyd|hs wms fuysoS ta i|yd MyDB f,i ,ndoS we;' fuys ol=Kqmi
fl,jfrys olakg ,efnk lymdg f*da,av¾ tllska ksfhdackh jk whslka tl
la,sla lrñka fuu fâgdfíia *hs,A tl mß.Klfhys ks¾udKh jk fyj;A
iq/l=ïjk ia:dkh f;dardosh yel' wm fuysoS fvialafgdma tflys Exampl DB
f,i fjku f*da,av¾ tlla ks¾udKh lr ta ;=, iq/l=ï lr we;'
bkamiq fuu vhf,d.A fndlaia tflys olakg ,efnk Open nÜka tl la,sla
lrkak¡ fâgdfíia tl ks¾udKhùu i|yd fuys olakg ,efnk Create nÜka
tl la,sla lrkak¡ fuysoS Access wx. iïmQ¾K úkafvda tl olakg ,efnhs¡ fuysoS
wmg wjeis wdldrfhka fÜn,A tlla ks¾udKh lrf.k hdu i|yd ;srfhys jïmi
Created By: S.Wajir Madushanka
Disapamok Online IT Academy
fl,jfrys olakg ,efnk Shutter Bar tflys Table1 kñka fÜn,A tlla olakg
,efnhs¡ Tng wjYH fÜn,A tlla ks¾udKh lrf.k hdu i|yd fuu Table1 kñka
we;s fÜn,A wdlD;sho Ndú;d l, yel'
oeka fuu fÜn,A tflys *S,Aâia ks¾udKh lsÍu i|yd ueoska fldgq fma,s iys; ISÜ
tlla olakg ,efnhs¡ fuysoS wmg ,ndfok Table1 kï fÜn,A tflys ID f,i
*S,Aâ tlla ks;ekskau ;kd fokq ,nhs¡ kuq;A wm ks¾udKh lrkq ,nk fuu fÜn,A
tl i|yd fuu *S,Aâ tl wkjYH neúka tu ID f,i i|yka *S,Aâ tl bosßfhys rhsÜ
la,sla lr olakg ,efnk fukq tflka Delete Rows fukq úOdkh wkq.ukh
lrkak¡
fuf,i Access ;=,oS fÜn,A tll lsishï *S,Aâ tlla ks¾udKh l,miq ta i|yd
welaiia u.ska ,ndfok úfYAIs; Data Type tlla Ndú;d l,hq;= fjhs¡ fuysoS
lsishï *S,Aâ tlla i|yd kula ,ndfokafka Field Name hgf;A jk w;r tys
ksYAÑ; o;A; j¾.hla ;ekam;A lsÍug wod, fâgd ghsma tl f;dard.kq ,nkafka
Data Type hgf;ys fjhs¡
Text – fuu fâgd ghsma tl Ndú;d lrkq ,nkafka lsishï *S,Aâ tll we;s o;A;
.Kkh lsÍulg Ndckh fkdlrk wjia:djloS fjhs¡ WodyrKhla f,i
StudetnID, Student Name, Address jeks *S,Aâia j, o;A; ;ekam;A lsÍfïoS Tng
fuu Text hk fâgd ghsma tl Ndú;d lsÍfï yelshdj mj;S' Tn u;l ;nd.;hq;=
úfYAIu lreK jkqfha fuu fâgd ghsma tl lsishï *S,Aâ tlla i|yd Ndú;d
lr we;s úgoS Wmßu jYfhka Ndú;dl, yelafla Characters 255 la olajd muKs¡
Number – lsishï *S,Aâ tll we;s o;A; bosß wjia:djloS .Kkh lsÍulg
Ndckh lrkq ,nkjdkï Tn f;dard.; hq;Af;A fuu fâgd ghsma tl fjhs¡
Currency – lsishï *S,Aâ tll we;s o;A; uQ,Huh lghq;A;lg Ndú;d lrkúgoS
fuu fâgd ghsma tl Ndú;d l, yel'
fyd|hs fuys my; oelafjk wdldrhg WÑ; fâgd ghsma Ndú;d lrñka my;
*S,Aâia ks¾udKh lr.kak¡
fuysoS fuu fÜn,A tl ;=, o;A; ;ekam;a lrkúgoS tu o;A; frfldaâ wfkla
frfldaâ tllska fjka fldg y÷kd.ekSu i|yd Stdid *S,Aâ tl Ndú;d lrkq ,nhs¡
tfia kï welaiia ;=,oS fuh Primary Key tl jYfhka ilia l,hq;= fjhs¡ ta i|yd
Stdid *S,Aâ tl f;dard Design geí tflys olakg ,efnk Primary Key nÜka tl
la,sla lrkak¡ ke;Akï Stdid *S,Aâ tl bosßfhys rhsÜ la,sla lr olakg ,efnk
fukq tflka Primary Key hk wdldrh f;dard.kak¡
fyd|hs wms oeka fuu o;A; ;ekam;=j iu`. .Kqfokq lsÍu i|yd úIqj,A fíisla
fvdÜfkÜ mß.Kl NdIdj Ndú;d lrñka w;=reuqyqK; ks¾udKh lruq¡ fuysoS wms
ish¿u isoaOdka; fldgia wdjrKh lrkq ,nkafka úIqj,A fíisla fvdÜfkÜ
mß.Kl NdIdfjys 2010 ixialrKh Wmfhda.S lr.ksñka fjhs¡ fyd|hs fuu
ixialrKh újD;lr w¿;A jHdmD;shla wdrïN lrkak' fuu jHdmD;sho wm
ks¾udKh lr.;A fâgdfíia tl we;=,;A f*da,av¾ tl ;=,u iq/l=ï lr.kak¡
fyd|hs wms m,uqj n,uq fuu ks¾udKh lr.;A fâgdfíia tl iy uDÿldx.h
w;r iïnkaO;djh we;s lr.ksñka tys o;A; uDÿldx. w;=reuqyqK;g
,nd.kafka flfiao lshd¡ fyd|hs fuu fÜn,A tflys mj;sk frfldaâia úIqj,A
fíisla fvdÜfkÜ u.ska ks¾udKh lr.;A mß.Kl uDÿldx. w;=reuqyqK; ;=,
fÜn,A tlla wdOdrfhka o;A; fmkaùu i|yd DataGridView lkafg%da,A tl Ndú;d
lrkq ,nhs¡ fuh gQ,A fndlaia tflys Data leg.ßfhys DataGridView f,i olakg
,efnhs¡ fuh vn,A la,sla lrñka tla lkafg%da,A tlla f*daï tlg ,ndf.k th
f*daï tflys m%udKhg we|.kak¡
fuúg my; oelafjk mßos vhf,d.A fndlaia tlla olakg ,efnk w;r wm iïnkaO
lrkq ,nkafka o;A;mokula fyj;A fâgdfíia tlla neúka fuys Database
fÜïmaf,AÜ tl f;dard fuys my,skau olakg ,efnk Next nÜka tl la,sla lrkak¡
fuysoS wms fâgdfíia tflys o;A; iu`. .Kqfokq lrkúgoS tu fâgdfíia tflys
we;s o;A; mß.Kl w;=reuqyqK;g l,ska tys fmkajk f;la tu o;A;
;djld,slj .nvdlr ;nd.ekSu i|yd Wmfhda.S lr.kq ,nkafka Dataset tlla
neúka B,`. mshjfrys we;s Dataset fgïmaf,AÜ tl f;dard Next nÜka tl la,sla
lrkak¡
fuúg Add Connection f,i ;j;a vhf,d.A fndlaia tlla olakg ,efnhs¡ fuys
Data source tflys Microsoft Access Database File (OLE DB) f,i f;AÍ mej;sh
hq;= w;r tfia olakg fkd,efí kï Change nÜka tl la,sla lrñka th
f;dard.; hq;= fjhs¡ bkamiq fuys we;s Browse nÜka tl la,sla lrñka fuu l,ska
ks¾udKh lr.;A fâgdfíia *hs,A tl f;dardfokak¡
fuúg kej;;A New Connection nÜka tl iys; mshjru olakg ,efnhs¡ fyd|hs
wms oeka fuu iïnkaO;djhg wod, tkï welaiia fâgdfíia tl iy
w;=reuqyqKf;ys" my,skau olakg ,efnk Connection String bosßfhys we;s +
,l=Kska ksfhdackh jk nÜka tl la,sla lr Bg my,ska olakg ,efnk
iïnkaO;djhg wod, iïmQ¾K Connection String tl f;dard ta u; rhsÜ la,sla
lr Copy úOdkh f;dard.ksñka fldms lr.kak¡ fï olakg ,efnkafka tu
iïnkaO;djhg wod, Connection String tl fjhs¡ fuh miqj wjYHjk neúka
wjYHkï fkdaÜmEâ *hs,A tllg fldms lr ;nd.kak¡
fyd|hs fuys Cancel nÜka tl la,sla lrñka fuu vhf,d.A fndlaia tflka
bj;Afjkak¡ fyd|hs fuf,i welaiia fâgdfíia tlla iïnkaO lsÍfïoS Bg wod,
myiqlï ,nd.ekSu i|yd Bg wod, la,dia tl m,uqj ks¾udKh lrf.k isáh
hq;=fjhs¡ ta i|yd f*daï tl u; vn,A la,sla lr Public Class Form bosßfhys
l¾i¾ tl msysgqjd Enter lS tl Tnd fma,shla my,g f.k Bg by,ska my; mßos
Class tl ks¾udKh lr.kak¡
fuhg fya;=j jkqfha Data Source = g miqj we;s fâgdfíia md;A tflys uq,ska iy
miqj fofl,jfrys “ ,l=K olakg ,eîu fjhs¡ fuysoS tu ,l=Kq fol bj;Alr
Created By: S.Wajir Madushanka
Disapamok Online IT Academy
Connection String tflys uq,g iy wjidkhg tu ,l=Kq fol igyka lr.kak¡
fuu ks¾udKh lr.;A Connection String tl;A str fõßhn,hg mjrd .;Amiq th
w¿;A iïnkaO;djhla jYfhka ilia lr.kakd f,ig my;ska fla;kh lr we;'
bkamiqj o;A; we;=,;A lsÍug" hdj;Ald,Sk lsÍug iy ä,SÜ lsÍug tu
iïnkaO;djh újD; lr.kakd f,ig fla;kh lr we;'
lsishï fÜn,A tll we;s ish¿u *S,Aâia j, olakg ,efnk o;A; fjkalr .ekSu
i|yd SQL ;=, Select úOdkh Ndú;d lrk w;r Bg miqj ,shd we;s * fyj;A
;rej u.ska fÜn,A tflys we;s ish¿u *S,Aâia j, we;s o;A; fjkalr.kakd f,ig
fla;kh lr we;' fâgdfíia tll fÜn,A úYd, m%udKhla fyda folla we;s
úgoS fuf,i o;A; fjkalr.kafka l=uk fÜn,A tflkao hkak i|yka l,hq;=
fjhs¡ tu ksid * ,l=Kg miqj by; ish¿u o;A; fjkalr.kafka Infotbl hk
fÜn,A tflka muKla nj i|yka lr we;' fuys from j,g miqj o;A; fjkalr.kq
,nk fÜn,A tflys ku i|yka l,hq;= fjhs¡ fuu iïmQ¾K SQL fla;h tkï
o;A; fjkalr.ekSug Ndú;d lrk,o fla;h “ “ ;=, wdrïN lrñka wjika l,hq;=
fjhs¡ bkamiqj , ,l=K fhdod tfia fjkalr.kq ,nkafka Conn j,g ,nd.;A
Created By: S.Wajir Madushanka
Disapamok Online IT Academy
fâgdfíia lfklaIka tflka nj i|yka lr we;' bkamiq fuu fjkalr.;A o;A;
uDÿldx. w;=reuqyqKf;ys fmkajk f;la o;A; .nvdlr ;nd.ekSu i|yd ds kñkA
DataSet tlla ks¾udKh lr we;'
da.Fill(ds,”Infotbl”)
fyd|hs by; fla;kh Tng ukdj jegfykakg we;ehs lshd wfmalaId lruq¡ fuf,i
fl,skau DataAdapter tl ;=,g SQL fla; ,sùu ;=,ska wmg tu fâgdfíia tflys
fÜn,A tflys mj;sk o;A; md,kh lsÍfï yelshdj mj;S' fyd|hs Tng by;
fâgdfíia tflys Infotbl j.=fjys mj;sk o;A; j,ska Stdid tl iy Stdname
tflys o;A; muKla DataGridView lkafg%da,A tflys fmkaùug wjYHjQjdhehs
is;kak¡ fuho isÿúhhq;Af;A fmr mßosu f*daï tl m,uqj fmkajk wjia:dfõoS
fjhs¡ tfia kï ta i|yd fla;kh l,hq;Af;A f*daï f,daâ bfjkaÜ tl ;=, fjhs¡
Select * from Infotbl fuf,i SQL fla; ,shQúgoS bka woyia jkqfha fÜn,A tflys
we;s ish¿u *S,Aâia j, o;A; f;dard.kakd f,ig fjhs¡ fuys ;rej fjkqjg tu
fÜn,A tflys mj;sk *S,Aâ tll kula fyda , ,l=K fhdoñka *S,Aâia j, kï
Created By: S.Wajir Madushanka
Disapamok Online IT Academy
i|yka l,úg Bg wod, o;A; muKla fmkajd.ekSfï yelshdj we;' fyd|hs ta
i|yd l,ska f*daï f,daâ tflys ,shk,o fla;kh bj;Alr my; oelafjk
wdldrhg DataAdapter tl ;=,oS SQL fla; Ndú;d l,hq;= fjhs¡
fyd|hs fuu fÜn,a tllska o;A; fjkalr .ekSu i|yd DataAdapter tl ;=,
,shk,o SQL fla;h ;jÿrg;A w;Ayodne,Su i|yd ;j;a fÜn,A tlla welaiia
fâgdfíia ;=, ks¾udKh lr.ksuq¡ ta i|yd l,ska ks¾udKh lrk,o welaiia
fâgdfíia tl újD; lr.kak¡ w¿;Au fÜn,A tlla ks¾udKh lr.ekSu i|yd
Create geí tflys olakg ,efnk Table nÜka tl la,sla l,hq;= fjhs¡
fuúg welaiia úkafvda tflys ol=Kqmi fl,jfrys olakg ,efnk Shutter bar
tflys Table1 kñka w¿;A fÜn,A tlla ks¾udKh ù ;sfnk wdldrh olakg ,efnhs¡
Created By: S.Wajir Madushanka
Disapamok Online IT Academy
oeka fuu fÜn,A tl ;=, w;HjYH *S,Aâia ks¾udKh lr.ekSu i|yd fuu Table1
ku u; rhsÜ la,sla lr olakg ,efnk fukq tflka Design View hk wdldrh
f;dard.kak¡ fuúg fÜn,A tflys ku jYfhka Products f,i ,ndoS my;
oelafjk *S,Aâia ks¾udKh lr.kak¡
fuys ProductID hk *S,Aâ tl i|yd Primary Key tl we;=,;A lr.kak¡ oeka my;
oelafjk wdldrhg fuu fÜn,A fkaï tl u; vn,A la,sla lrñka frfldaâia
lsysmhla we;=,;A lr.kak¡
fyd|hs fuu fÜn,A tflys ish¿u frfldaâia fmr fÜn,A tflys mßosu
DataGridView lkafg%da,A tl ;=, fmkajd.ekSug wjYHkï DataAdapter tl ;=,
my; oelafjk mßos fla;h ,sùu isÿl, yel'
fyd|hs Tng fuu Products fÜn,A tflys Price *S,Aâ tflys ñ, remsh,a 200 g jvd
jeä frfldaâia muKla DataGridView lkafg%da,A tl ;=, fmkajd.ekSug
wjYHjqjdhehs is;kak¡ fyd|hs tfia kï wmg my; mßos ta i|yd SQL fla;h ,súh
yel' fuysoS ish¿u *S,Aâia j, o;A; fmkaúh hq;= neúka m,uqj Select * from
Products f,i ,súhhq;= w;r fuysoS fmkajkafka Price *S,Aâ tflys ñ, 200 g jvd
jeä ksIAmdok neúka Where f,i i|yka lr Price f,i i|yka l,hq;= fjhs¡ 200 g
jvd jeä ksid > 200 f,i i|yka l,hq;= fjhs¡
fyd|hs wms oeka n,uq fuu Products fÜn,A tlg úIqj,A fíisla fvdÜfkÜ
w;=reuqyqK; Ndú;d lrñka w¿;A frfldaâ tlla we;=,;A lrkafka flfiao lshd¡
fuf,i Products fÜn,a tlg fuu SQL fla; u.ska o;A; heùu i|yd
OleDbCommand tlla fl,skau la,dia tl ;=, fõßhn,hla wdldrfhka
ks¾udKh l,hq;= fjhs¡ Dim cmd As OleDbCommand f,i w¿;A
OleDbCommand TífclaÜ tlla ks¾udKh lr.kak¡
fyd|hs wms oeka n,uq úIqj,A fíisla fvdÜfkÜ w;=reuqyqK;la Ndú;d lrñka
fÜn,A tll we;s lsishï frfldaâ iuQyhlska w;HjYH frfldaâ tlla bj;A
lr.kafka flfiao lshd¡ fuysoSo wms lrkq ,nkafka SQL fla; yryd neúka fmr
ks¾udKh lrk,o OleDbCommand fõßhn,A TífclaÜ tl fï i|yd Ndú;d l,
yel' f*daï tlg w¿;A nÜka lkafg%da,A tlla ,ndf.k th Delete Record f,i
kï lrñka tys la,sla bfjkaÜ tl ;=, my; mßos fla;kh lrkak¡
oeka fuu ds kue;s DataSet tflys we;s o;A; j,ska Productid fi,a tl u; la,sla
l,úg tu la,sla lrk,o fi,A tlg wod, frda tflys we;s Productid tl fglaiaÜ
fndlaia tl ;=,g nhskaäka lsÍu i|yd my; oelafjk wdldrhg fla;kh lrkak¡
TextBox1.DataBindings.Add(“text”,ds,”Products.ProductID”)
by; fla;kh u.ska TextBox1 lkafg%da,A tl ;=,g Text tlla weiqfrka oekg ds
fâgdfiÜ tflys we;s tkï mj;sk o;A; ,nd.kakd w;r tu o;A; j,ska fuu
fglaiaÜ fndlaia tflys fmkaúh hq;Af;A la,sla lrk,o fi,a tlg wod, frda
tflys Products fÜn,A tlg wod, ProductID tlg wod, o;A; fjhs¡ fï wdldrhg
wksl=;A fla;khkao isÿlrkak¡ óg wod, iïmQ¾K fla;khu my;ska bosßm;A
lr we;'
fyd|hs Delete Record nÜka tl vn,A la,sla lr tys Click bfjkaÜ tl ;=, my;
mßos fla;kh lrkak¡
fuu Textbox1 ys ,ndoS we;s Productid tlg wod, fÜn,A tflys mj;sk frfldaâ
tl ä,SÜ lsÍu i|yd wod, SQL fla;h mdia lsÍug OleDbCommand TífclaÜ
fõßhn,A tlla Ndú;d lr we;' fuysoS Delete from g miqj o;A; ä,SÜ lrkafka
Products fÜn,A tflka neúka Products f,i i|yka lr we;' ksYAÑ; frfldaâ
tlla bj;Alrk neúka Where f,i i|yka lr we;' fuysoS ks¾udKh lr.;A
@ProductID merdóg¾ tl ;=,g ,ndf.k we;s Productid tlg wod, frfldaâ tl
bj;Ajk f,ig fla;kh lr we;' fuh isÿjkafka ks¾udKh lr.;A Conn
lfklaIka tl yryd neúka Conn f,i i|yka lr we;' bkamiq fuu cmd kñkA
ks¾udKh lr.;A OleDbCommand TífclaÜ tl yryd o;A; ä,SÜ lsÍug fla;
mdia lrkúgoS fuu @ProductID merdóg¾ tl tkï tys p1 ys ,ndf.k we;s
Productid tl OleDbCommand TífclaÜ tlg we;=,;A lr.kakd f,ig
fla;kh lr we;' fldákau lsjfyd;A OleDbCommand TífclaÜ tl yryd o;A;
ä,SÜ lsÍug fla; mdia lrkúgoS p1 j,g ,nd.;A TextBox1 ys Productid tl
OleDbCommand TífclaÜ tlg we;=¿ lr.kakd f,ig fla;kh lr we;' fuu
frfldaâ tl bj;AjQ nj ye`.ùu i|yd uefiaÊ tlla fmkaùug fla;kh lr
we;' fuu fla;khg miqj f*daï f,daâ tl ;=, ,shk,o fla;kh isÿl,úg
Tng tu fudfydf;Au frfldaâ tl bj;Aù we;s wdldrh oeln,d.; yels fjhs¡
fyd|hs wms oeka n,uq fâgdfíia tll fÜn,A tll mj;sk wmg leu;s frfldaâ
tlla wmafâÜ fyj;A hdj;Ald,Sk lrkafka flfiao lshd¡ fuysoS Product Name
fglaiaÜ fndlaia tflys we;s Productname tl" Supplier ID fglaiaÜ fndlaia
tflys we;s Supplierid tl" Supplier Name fglaiaÜ fndlaia tflys we;s
Suppliername tl iy Price fglaiaÜ fndlaia tflys we;s Price hk o;A;
hdj;Ald,Sk lsÍug yelsúh hq;=h' tkï DataGridView tflka lsishï frfldaâ
tlla f;ArEmiq tu fglaiaÜ fndlaia j,g ,efnk o;A; fufia tys Productid
Created By: S.Wajir Madushanka
Disapamok Online IT Academy
tlg wkqj hdj;Ald,Sk lsÍug yelsúh hq;=h' tfukau Productid tl jkqfha
Product ID fglaiaÜ fndlaia tl ;=, we;s Productid tl neúka fï i|yd
merdóg¾ tlla ks¾udKh lsÍug isÿjk w;r o;A; hdj;Ald,Sk lrkq ,nkafka
fglaiaÜ fndlaia ;=, we;s o;A; neúka OleDbCommand yryd o;A; mdia
lrkúgoS tajd i|ydo fjku merdóg¾ia ks¾udKh lsÍug isÿfjhs¡ fyd|hs tfia
kï fl,skau la,dia tl ;=, p2, p3, p4,p5 iy p6 f,i merdóg¾ia 5 la
ks¾udKh lr.kak¡
oeka Update Record nÜka tl vn,A la,sla lr tys Click bfjkaÜ tl ;=, my;
oelafjk wdldrhg merdóg¾ia ks¾udKh lr thg tu tla tla fglaiaÜ fndlaia
j, i|yka o;A; mjrd.kakd f,ig fla;kh lr we;'
oeka fuu cmd kñka kïlr.;A OleDbCommand TífclaÜ tl yryd SQL fla;h
mdia lrkúgoS fuu merdóg¾ia j, w.hka o thg we;=,;A lr.ekSug fla;kh lr
we;'
fyd|hs wms oeka n,uq úIqj,a fíisla fvdÜfkÜ w;=reuqyqK; Ndú;d lrñka w¿;Au
frfldaâ tlla fÜn,A tlg we;=,;A lr.kafka flfiao lshd¡ fyd|hs fuu f*daï
tflys DataGridView tflys lsishï fi,A tlla u; la,sla l,úg Bg wod,
frfldaâ tflys ish¿u *S,Aâia j, o;A; ta ta fglaiaÜ fndlaia ;=, fmkajkq ,nhs¡
fyd|hs fuúg w¿;A frfldaâ tlla fÜn,A tlg we;=,;A lsÍu i|yd ish¿u
fglaiaÜ fndlaia ysiaùu isÿúh hq;=h' ta i|yd Add New Record nÜka tflys
la,sla bfjkaÜ tl ;=, my; mßos fla;kh lrkak¡
fuysoSo wms fÜn,A tl i|yd o;A; we;=,;A lrkq ,nkafka fglaiaÜ fndlaia j,
i|yka lrkq ,nk o;A; fjhs¡ tu ksid ProductID fglaiaÜ fndlaia tflys"
Productname fglaiaÜ fndlaia tflys" Supplierid fglaiaÜ fndlaia tflys"
Created By: S.Wajir Madushanka
Disapamok Online IT Academy
Suppliername fglaiaÜ fndlaia tflys iy Price fglaiaÜ fndlaia tflys o;A;
we;=,;A lsÍug we;s neúka merdóg¾ia 5 la Ndú;d lsÍug isÿfjhs¡ wm oekgu;A
ks¾udKh lrf.k we;s merdóg¾ia fï i|yd m%udKj;A fjhs¡ fï i|yd Save
Record nÜka tl vn,A la,sla lr tys Click bfjkaÜ tl ;=, my; mßos fla;kh
lrkak¡
fuys fldgq lrk,o fla;kh tl fm,lg ,súh hq;=fjhs¡ lsishï fÜn,A tlla i|yd
w¿;ska frfldaâ tlla we;=,;A lsÍug Insert into iafÜÜukaÜ tl Ndú;d lrkq
,nhs¡ bkamiq o;A; we;=,;A lrkq ,nk fÜn,A tflys ku i|yka l,hq;= fjhs¡
fuys Values j,g miqj o;A; ,ndf.k ;ekam;A lrf.k we;s merdóg¾ia ish,A,
fÜn,A tflys *S,Aâia we;s wkq ms,sfj,g i|yka l,hq;= fjhs¡ bkamiq ms,sfj,ska
fuu merdóg¾ia ;=, we;s o;A; cmd kñkA ks¾udKh lr.;A OleDbCommand
tlg we;=,;A l,hq;= fjhs¡ wjidkfha o;A; we;=,;A ù we;s nj ;yjre lsÍu
i|yd uefiaÊ tlla fmkajk f,ig fla;kh lr we;' f*daï f,daâ tflys
,shk,o fla;kh ógmiqj ,sùfuka tu frfldaâ tl we;=,;A jQ wdldrh Tng
tu fudfydf;Au n,d.ekSfï yelshdj we;' fyd|hs oeka Tng fâgdfíia tlla
úIqj,A fíisla fvdÜfkÜ w;=reuqyqK;la iu`. iïnkaO lr md,kh lrk
wkaou ms,sn|j o, wjfndaOhla ,efnkakg we;ehs lshd wfmalaId lruq¡
fyd|hs wms oeka by; bf.k.;A isoaOdka; fldgia m%dfhda.slj Ndú;djk ;rul
ixlS¾K jevigykla ks¾udKh lsÍu i|yd w;.iuq¡ oS¾> yqiaula wrka
jevmgka .ksuq¡ Tng l,ska bf.k.;A isoaOdka; fldgia ms,sn|j .eg¿jla
mj;Skï kej;;A tajd fyd|ska wOHhkh lr tu .eg¿ ksrdlrKh lr.kakd
f,ig wjOdrKfhka u;la lr isáuq¡ fyd|hs m,uqj úIqj,a fíisla fvdÜfkÜ
2010 ixialrKh Ndú;d lrñka w¿;A jHdmD;shla wdrïN lrkak' fuu iïmQ¾K
jHdmD;shu fjku f*da,Av¾ tlla ;=, ks¾udKh lsÍug j.n,d.; hq;= w;r óg
wod, welaiia fâgdfíia *hs,A tlo fuu f*da,Av¾ tl ;=,u fiaõ lr.;
hq;=fjhs¡
Created By: S.Wajir Madushanka
Disapamok Online IT Academy
fuysoS wm ish¿u wx.iïmQ¾K uDÿldx.hla ks¾udKh lsÍug woyia fkdlrk
w;r tjeks uDÿldx.hlg mokula oeñhyels jevigykla ks¾udKh lrk w;r
fuh wm;A iu`. mshjfrka mshjr ksjerosj ks¾udKh lsÍfuka Tngo tjeks
wx.iïmQ¾K uDÿldx.hla ks¾udKh l,yels njg iy;sl fjuq¡ fuh NdKav
úl=Kk ,nk is,a,r fj<|ie,lg WÑ; uDÿldx.hla jYfhka ye|skajQjdg
jrola fkdue;' iqmsß fj,|ie,A ;=, olakg ,efnk mß.Kl jevigyka ;=,
mj;sk wx. fndfyda m%udKhla fuu jevigyk ;=, wka;¾.;j we;' fyd|hs
wms oeka jegmgka .ksuq¡ fuu jevigyk i|yd iEu flfkl=gu msúish
fkdyels w;r ksYAÑ; hQi¾ fkaï tlla iy mdiaj¾â tlla iys; mqoa. ,hl=g
muKla msúish yels jevigykla fjhs¡ fyd|hs fuu w;=reuqyqK; ks¾udKh
lsÍug m%:ufhka fuu hQi¾fkaï tl iy mdiaj¾â tl .nvdlr ;nd.ekSu
i|yd m,uqj fâgdfíia tlla ks¾udKh lr Bg wod, fÜn,A tl ks¾udKh
lr.; hq;=fjhs¡ ta i|yd fuu ks¾udKh lrk,o fm%dfclaÜ tl iys; m%Odk
f*da,Av¾ tl ;=,g BusinessDB kñka fâgdfíia tl ks¾udKh lr.kak¡
fyd|hs fuu Shutter bar tl ;=, olakg ,efnk wdo¾Y fÜn,A tl logintbl f,i
kïlr tys my; oelafjk wdldrhg *S,Aâia ks¾udKh lr.kak¡
fuysoS fÜn,A tflys o;A; fjka lr.ekSug SQL fla; heùu i|yd da f,i
DataAdapter tlla ks¾udKh lr we;s w;r th SQL fla; heùug Ndú;d lrk
iEu wjia:djloSu w¿;A TífclaÜ tlla jYfhka ks¾udKh lr we;' fuysoS
logintbl fÜn,A tflys we;s ish¿u *S,Aâia j,ska lgoinname *S,Aâ tl fyj;A
hQi¾fkaï tl muKla fjkalr .kakd f,ig fla;kh lr we;' bkamiq fuu
Created By: S.Wajir Madushanka
Disapamok Online IT Academy
fjkalr.kq ,nk o;A; fyj;A frfldaâia ;djld,slj .nvdlr ;nd.ekSug ds
j,ska Ndú;d lrk iEu wjia:djloSu w¿;A DataSet TífclaÜ tlla jYfhka
ks¾udKh lr we;' bkamiq fuu o;A; ds fâgdfiÜ tlg mqrjd.kakd f,ig;A
tu mqrjd.kq ,nkafka logintbl fÜn,A tfla tajd njg;A fla;kh lr we;'
ComboBox1.DataSource=ds u.ska lïfnd fndlaia tlg o;A; ,nd.ekSfïoS o;A;
,nd.kakd udOH jYfhka fjkalr.;A o;A; ;djld,slj ;ekam;A lrf.k
;ndf.k we;s ds fâgdfiÜ tl i|yka lr we;'
ComboBox1.DisplayMember=logintbl.lgoinname fuysoS o;A; ,nd.kafka
fldákau lsjfyd;A lïfnd fndlaia tflys ,ehsia;=j f,i logintbl fÜn,A tflys
lgoinname *S,Aâ tl f,i i|yka lr we;' fyd|hs oeka jevigyk Odjkh lr
neÆúg Tnj mqÿuhg m;Alrjñka Tn logintbl fÜn,A tflys ,ndÿka hQi¾ fkaï
tl olakg ,efnhs¡
fyd|hs fuu hQi¾fkaï bosßfhys we;s lïfnd fndlaia tflka ;ukag wod,
.sKqfuys ku f;dard Password bosßfhys we;s fglaiaÜ fndlaia tl ;=, mdiaj¾â
tl ,ndoS Log In nÜka tl la,sla l, úgoS tu hQi¾fkaï tl iy mdiaj¾â tl
folu tlg .e,fmakï tkï ;ks frfldaâ tlla jYfhka olakg ,efíkï
fuu uDÿldx.fhys m%Odk w;=reuqyqK;g msúiSug yelsúh hq;=h' wm fuu m%Odk
w;=reuqyqK; ks¾udKh lsÍu i|yd Ndú;d lrk ,oafoa idudkH f*daï tlla
fkdj MDI wdldrfha tkï MDI Parent f*daï tlla fjhs¡ fuu MDI Parent f*daï
tl ,nd.ekSu i|yd úIqj,A fíisla fvdÜfkÜ ;srfhys ol=Kqmi by,
fl,jfrys olakg ,efnk fid,shqIka tlaiamaf,dar¾ úkafvda tflys fm%dfclaÜ
fkaï tl u; rhsÜ la,sla lr olakg ,efnk fukq tflka Add f;dard túg
olakg ,efnk fukq tflka Windows Forms hk wdldrh f;dard.kak¡ fuúg
olakg ,efnk vhf,d.A fndlaia tflka ueo msysá fgïmaf,AÜ ,ehsia;=fjka
;rula my,ska olakg ,efnk MDI Parent Form hkak f;dard Add nÜka tl
la,sla lrkak¡
fuysoS fglaiaÜ fndlaia tl ;=, lsisÿ mdiaj¾â tlla ,ndfkdfoñka fuu LogIn
nÜka tl la,sla lr we;Aoehs b*A iafÜÜukaÜ tllska úuidn,d we;' fuúg ta nj
isys.kajñka uefiaÊ tlla fmkaùug fla;kh lr we;' Else hkq tfia
fkdfõkï tkï mdiaj¾â tlla ,ndoS we;s wjia:djloS fuu ds fâgdfiÜ tlg
,ndf.k we;s frfldaâ tlla ;sfío hkak úuid n,d we;' fuhska woyia
lrkqfha fuu jevigyfkys miq wjia:djloS hQi¾ flfkl= ks¾udKh lrkúgoS
tlu kulska ks¾udKh l, yelafla tl hQi¾ flfkl= muKs¡ tkï lsishï
kulska hQi¾ fkaï tlla ks¾udKh lr we;s úgoS miq wjia:djloS tu kñka
;j;A hQi¾ flfkl= ks¾udKh l,fkdyels fjhs¡ tu ksid fldhs wdldrfha
mdiaj¾â tlla ,ndÿkako fuf,i ksYAÑ; hQi¾fkaï tlla iy Bg wod,
mdiaj¾â tllska hq;= frfldaâ tlla yuqjkafka tlla muKs¡ ukao tl kulska
mej;sh yelafla tla hQi¾fkaï tlla muKla neúks¡
If ds.Tables(“logintbl”).Rows.Count=1 Then
Else hkq tfia .e,fmk frfldaâ tl yuqfkdjqk wjia:dj fjhs¡ fuúg uefiaÊ
fndlaia tlla fmkaùug iy ;snQ jeros mdiaj¾â tl bj;Aù kej; tysu mdiaj¾â
tlla kej; i|yka lsÍug l¾i¾ tl msysgqùug fla;kh lr we;' fyd|hs fuu
f*daï tlg wod, ish¿u fla;kh wyjr neúka jevigyk Odjkhlr tys
ksrjoH;djh uek n,kak¡ oeka Tng fuu jevigyfkys bosßh ks¾udKh
lrf.khdu i|yd ;on, wdYdjla we;sjkakg we;ehs lshd wfmalaId lruq¡
fuu jevigyfkys ;ukag wjYH mßos jevigyk ;=,g msúiSu i|yd w¿;A hQi¾
tljqkaÜ tlla iEoSu fyda tys mdiaj¾â tl fjkia lsÍug fyda wjYHkï hQi¾
flfkl= bj;A lsÍuo isÿl, yel' tfia kï tu w;=reuqyqK; ks¾udKh lsÍu
i|yd fid,shqIka tlaiamaf,dar¾ úkafvda tflys fm%dfclaÜ fkaï tl u; rhsÜ
la,sla lr olakg ,efnk fukq tflka Add >>> Windows Form fukq úOdkh
wkq.ukh lrñka w¿;A f*daï tlla tl;= lr.kak¡ fyd|hs fuu ,nd.;A f*daï tl
jevigyk ;=, fmkajkq ,nkafka MDI Parent Form tflys fukq nd¾ tflys my;
fukq úOdkh wkq.ukh lrkúgoS fjhs¡ fuu MDI Parent Form tl ,nd.;A úgu
ks;ekskau tys fukq nd¾ tlla iy Bg .e,fmk gQ,And¾ tllska iukaú; fjhs¡
wm ks¾udKh lrkq ,nk jevigyk ;=, fuu MDI Parent Form tl ;=,
ks;ekskau olakg ,efnk gQ,and¾ tl iy fukqnd¾ tl wkjYH neúka tajd
isf,laÜ lr ä,SÜ lS tl Tnñka tajd bj;A lr.kak¡ kuq;A fuu fukqnd¾ iy
gQ,And¾ iïnkaO lr.ksñka hï hï fla;khkao ,shd we;s neúka tajdo
m%fõYfuka bj;Alr .;hq;= fjhs¡ ta i|yd MDI Parent Form tflys ueo
fld;ekl fyda vn,A la,sla lr fldaâ úkafvda tl ,nd.ksñka fukqnd¾ iy
wms oeka fojkshg ,nd.;A f*daï tl ;=, w¿;A hQi¾ flfkl= we;=,;A lsÍu"
bj;A lsÍu iy wjirmoh fjkia lsÍug wod, w;=reuqyqK; ks¾udKh lruq¡ fï
ld¾hh i|yd wm idudkH mßos w;=reuqyqK; ks¾udKh lrkúgoS by;
ld¾hhka ;=k fjka fjka jYfhka isÿlrk úgoS ta i|yd tlsfklg fjkia
f*daï ;=kla fhdod.ekSug isÿfjhs¡ tkï w¿;A hQi¾ flfkl= we;=,;A lsÍug
tl f*daï tll=;A hQi¾ flfkl= bj;A lsÍug tla f*daï tll=;A iy wjir moh
fjkia lsÍug wod, ;j;a f*daï tlla f,igh¡ fuúg jevigyfkys jD;A;Suh
iaNdjhg isÿjk ydksh wuq;=fjka lsjhq;= ke;' kuq;A fï i|yd losu lkafg%da,A
tlla gQ,Afndlaia tl ;=, olakg ,efnhs¡ fuh gQ,Afndlaia tflys Containers
leg.ßfhys Tab Control kñka olakg ,efnhs¡
fuúg TabPage3 f,i w¿;A geí tlla tl;=ù we;s wdldrh olakg ,efnhs¡ fuu
tla tla geí ;=, fmkajkq ,nk ud;Dldj fjkia lsÍu i|yd Members
,ehsia;=fjka wod, geí tl f;dard Bg bosßfhka we;s fm%dm¾àia ,ehsia;=fjka Text
bosßfhys oekg we;s TabPage3 fjkqjg Tng wjYH ud;Dldj i|yka lrkak¡
wmf.A jevigyfkys m,uq geí tl New User f,i kïlrñka f,an,a lkafg%da,a 4
la" fglaiaÜ fndlaia lkafg%da,A 3 la" lïfnd fndlaia lkafg%da,A tlla iy nÜka
lkafg%da,A tlla ,nd.ksñka my; mßos m,uq geí tl ;=, äihska lr.kak¡
wms oeka fuys l%shdldÍ;Ajh meyeos,s lr.ksuq¡ fuys Enter User Name bosßfhys
fuu mß.Kl moaO;shg msúiSu i|yd Tn leu;s iqÿiq hQi¾fkaï tlla ,ndosh
hq;=h' fufia ,ndoS Tng Enter Password bosßfhys mdiaj¾â tlla ,ndoSug
;e;alrk úgoS l,ska ,ndÿka hQi¾fkaï tl oekg fuu mß.Kl moaO;sh ;=,
Ndú;djk úgl kï wksjd¾fhkau ta nj okajñka uefiaÊ tlla fmkaúh hq;=
w;r bkamiq kej;;A fjk;A hQi¾fkaï tlla ,ndoSug tu fglaiaÜ fndlaia tl
ysiaùu isÿúh hq;=h' fuys Enter Password bosßfhys ,ndÿka mdiaj¾â tl ta
wdldrfhkau Re Enter Password bosßfhys ,ndosh hq;=fjhs¡ fuysoS jeroSulska Tn
is;+ mdiaj¾â tl ghsma fkdù fojks wjia:dfõoS th ksjerosj ,ndoS we;s úgl
mdiaj¾â tl ms,sn| .eg¿jla mj;S hkqfjka uefiaÊ tlla fmkajd tu fglaiaÜ
fndlaia folu ysiaù kej;;A uq,isgu mdiaj¾â ,ndoSug yelsúh hq;=h' fuys
Create New User nÜka tl la,sla l,úg fuh w¿;A hQi¾ flfkl= f,i mß.Kl
moaO;shg we;=,Aùu isÿúh hq;=h' fyd|hs fuu f*daï tl i|ydo l,ska f*daï
tflysoS fuka OleDb la,dia tl ks¾udKh lrñka welaiia iy úIqj,A fíisla
fvdÜfkÜ w;=reuqyqK; w;r mj;sk iïnkaO;djh f.dvk`.d.kak¡ fuys Enter
User Name bosßfhys hQi¾ fkaï tlla ,ndoS mdiaj¾â tlla ,ndoSug ;e;alrk úgoS
tu kñka moaO;sh ;=, hQi¾ fkaï tlla ;sfíoehs fidhdne,sh hq;=fjhs¡ fyd|hs
tfiakï fï i|yd fla;kh l,hq;Af;A TextBox1 ys LostFocus bfjkaÜ tl ;=,
Created By: S.Wajir Madushanka
Disapamok Online IT Academy
fjhs¡ fuu lkafg%da,A tl vn,A la,sla lr fldaâ úkafvda tl ,ndf.k ol=Kqmi
by, fl,jfrys we;s bfjkaÜia ,ehsia;=fjka LostFocus bfjkaÜ tl
f;dard.kak¡
fuysoS hQi¾ fkaï tl i|yka lrkq ,nkafka TextBox1 lkafg%da,a tl ;=, neúka th
wod, logintbl fÜn,A tflys mj;So hkak fidhdne,sh hq;= neúka fï i|yd
OleDbParameter tlla ks¾udKh l,hq;= fjhs¡ ta i|yd my; oelafjk wdldrhg
fla;kh lrkak¡
fuys Create New User nÜka tl la,sla l,úgoS fuu o;A; w¿;A hQi¾ flfkl=
jYfhka logintbl fÜn,A tlg we;=,;Aùu i|yd my; mßos fla;kh lrkak¡
hQi¾fkaï tl" mdiaj¾â tl iy .sKqï wdldrh hk tajd w¿f;kau frfldaâ
tlla f,ig fÜn,A tlg we;=,;A lsÍug wjYHksid merdóg¾ia ;=kla ks¾udKh
lsÍug isÿfjhs¡ oekgu;A p1 f,i merdógrhla ks¾udKh lr we;s neúka p2 iy
p3 f,i fl,skau la,dia tl ;=, ;j;a merdóg¾ folla ks¾udKh lr.kak¡
oeka fuu Create New User nÜka tflys Click bfjkaÜ tl ;=, my; mßos fla;kh
lrkak¡
fuysoS fuu logintbl fÜn,A tflka ds fâgdfiÜ tlg fjka lr.;Af;A tla
frfldaâ tlla kï tkï frfldaâ tlla mej;Suhkq ,ndoS we;Af;A ksjerosu
mdiaj¾â tl iy hQi¾fkaï tl neúka ;djld,slj wl%shj ;snQ lkafg%da,Aia il%sh
lsÍu i|yd fla;kh lr we;' Else hkq tfia fkdjk wjia:dj fjhs¡ tkï
TextBox4 ys ksjeros mdiaj¾â tl ghsma lr kej;;A jeros wdldrhg ,ndÿk
fyd;A l,ska il%sh lrk,o lkafg%da,AiA wl%sh lsÍug fla;kh lr we;' fuu
Select Username bosßfhys we;s lïfnd fndlaia tlg oekg logintbl fÜn,A tflys
we;s ish¿u hQi¾fkaï ,ehsia;=jla f,i ,nd.; hq;=fjhs¡ fuh isÿúhhq;Af;A
jevigyk wdrïNjk úgoS neúka ta i|yd f*daï f,daâ bfjkaÜ tl ;=, my;
mßos fla;kh lrkak¡
fuysoS logintbl fÜn,A tflka lgoinname *S,Aâ tflys we;s ish¿u frfldaâia
fjkalr th ds fâgdfiÜ tlg fjkalrf.k we;' bkamiqj th lïfnd fndlaia
fuys Account Type lïfnd fndlaia tl ;=, fmr mßosu .sKqï wdldr fol jk
administrator iy local f,i whs;u folla ,ndfokak¡ fuys Apply Settings nÜka
tl la,sla l,úgoS by; fjkia lrk,o mdiaj¾â tl iy .sKqï wdldrh wod,
f;dard we;s hQi¾fkaï tlg wkqj hdj;Ald,Skùu i|yd Apply Settings nÜka tl
;=, my; mßos fla;kh lrkak¡
fuysoSo Remove User nÜka lkafg%da,A tl f;dard tyso fm%dm¾àia úkafvda tflys
Enabled fm%dmá tl False lr ;nkak¡ fuysoS wod, hQi¾fkaï tl f;dard Bg wod,
mdiaj¾â tl ghsma l,úgoS muKla wod, hQi¾ j bj;A lsÍu i|yd fuu nÜka tl
il%shúh hq;=h' fyd|hs Select User Name bosßfhys we;s lïfnd fndlaia tl i|yd
logintbl fÜn,A tflys oekg mj;sk ish¿u hQi¾fkaï ,nd.ekSu i|yd f*daï
f,daâ bfjkaÜ tl ;=, my; mßos fla;kh lrkak¡
logintbl fÜn,A tflka fuu ds fâgdfiÜ tflys tjeks frfldaâ tlla yuqjqjfyd;A
tkï frfldaâ tlla ;sîuhkq ,ndoS we;Af;A kshñ; hQi¾fkaï tlg wod,
mdiaj¾â tl neúka fuúg tu hQi¾ bj;A lsÍug wod, Button3 lkafg%da,a tl
fyj;A Remove User nÜka tl il%sh lsÍug fla;kh lr we;' fuu
w;=reuqyqKf;ys Remove User nÜka tl la,sla l,úg oekg f;dardf.k we;s hQi¾
iïmQ¾Kfhkau moaO;sfhka bj;Aùu isÿúh hq;=h' ta i|yd my; oelafjk wdldrhg
fuu nÜka tflys Click bfjkaÜ tl ;=, my; mßos fla;kh lrkak¡
fuysoS Category Name bosßfhys we;s fglaiaÜ fndlaia tl ;=, wod, leg.ßfhys
ku ,ndosh hq;=fjhs¡ WodyrKhla f,i Nestomolt, Nespray f,i lsß ksIAmdok
we;=,;A lrkúgoS Milk Powder f,i leg.ßh ks¾udKh lr.; yel' tfukau
fuhska bosßhg ksIAmdok we;=,;A lrkúgoS ta i|yd Item Code iliaùu i|yd
Item Code tllao leu;s mßos ,ndosh yel' WodyrKhla f,i MLK f,i ,ndosh
yel' kuq;A ksIAmdok we;=,;A lrkúgoS MLK1, MLK2, MLK3 ys 1,2,3 f,i
.Kkhùu moaO;sh u.ska isÿlrk neúka leg.ßfhys Item Code tflys wl=re
muKla ,ndoSu m%udKj;A fjhs¡ fyd|hs fuu f*daï tl i|ydo OleDb la,dia tl
ks¾udKh lr fmr wdldrhgu iïnkaO;djh we;s lr.kak¡ Conn.Open () f,i
iïnkaO;djh újD; lr.ekSugo wu;l fkdlrkak¡ fyd|hs fuu ,ndfok
leg.ß .nvdùug Bg wod, Item Code tl iliaùug wod, o;A; .nvd lr.ekSug
welaiia fâgdfíia tl ;=, Cateogry kñka fÜn,A tlla ks¾udKh lr.kak¡ fuys
my; oelafjk *S,Aâia we;=,;A úhhq;=h'
fuys catname *S,Aâ tl i|yd Primary Key tl we;=,;A lr we;' fuys catname
*S,Aâ tl ;=, .nvd lrkq ,nkafka leg.ßfhys ku fjhs¡ tkï Milk, Soap, Soya
Meat hk tajd fjhs¡ catcode *S,Aâ tl ;=, .nvd lrkq ,nkafka tla tla ksIAmdok
i|yd wh;Ajk Item Code tlg wod, leg.ß fldaâ tl fjhs¡ WodyrKhla jYfhka
Milk kï MLK o" Soap kï SAP f,i fjhs¡ catnum *S,Aâ tl ;=, ;ekam;A
lr.kafka tla tla ksIAmdok j, Item Code tflys wl=rej,g miqj ysñjk w.h
fjhs¡ MLK1 ys 1" ;j ksIAmdok we;=,;A l,miq MLK2 ys 2 hk w.h fjhs¡ fuh Tng
my; rEmigyfkka wjfndaO lr.; yel'
fyd|hs fuu w;=reuqyqKf;ys Add New Category nÜka tl vn,A la,sla lr tys
la,sla bfjkaÜ tl;=, my; mßos fla;kh lrkak¡ fuysoS leg.ßfhys ku iy
leg.ß fldaâ tl ;u wNsu;h mßos ,ndfok neúka ta i|yd merdóg¾ folla
ks¾udKh lsÍug isÿfjhs¡ fuysoS ,ndfokafka w¿;Au leg.ßhla neúka tu
fldaâ tlg miqj ysñjk w.h 1 neúka th wmg fl,skau w.h 1 f,i ,ndosh
yel'
fuu fla;h ukdj jegfykakg we;ehs lshd wfmalaId lruq¡ fuysoS Category fÜn,A
tlg leg.ß fkaï tlla" tys fldaâ tl;A Item tlla i|yd ysñjk fldaâ tflys
mgka .kakd w.h 1 f,i i|yka lr we;' ;j;a Item tlla we;=,;A lrk úgoS 2
f,i hdj;Ald,Sk jkafka fuu 1 ka mgka .kakd w.h fjhs¡ fuu w.h iy
leg.ß fldaâ tl tlg wE|Su u.ska Item Code tl iliaùu isÿjkq ,nhs¡ fuf,i
leg.ßh ,ndoSfuka miqj fuu f*daï tl bj;Alr fâgdfíia tflys wod, fÜn,A
tl újD;lr neÆúg Tng frfldaâ tlla jYfhka by; o;A; ;ekam;A ù we;s
wdldrh n,d.; yel' tfukau moaO;shg NdKAvhla we;=,;A lrkúgoS ta i|yd
ksYAÑ; fnodyßkafkla fyj;A Supplier flfkl=o olakg ,efnhs¡ w¿;ska NdKav
we;=,;A lrk úgoS fuu Supplier f.A f;dr;=reo we;=,;A lsÍug isÿfjhs¡ jevigyk
wdrïNjk úgoSo fujeks Supplier flfkl=f.A f;dr;=re we;=,;A lr fkdue;s
neúka New Supplier nÜka tl la,sla lrkúgoS fuu Supplier flfkl= moaO;shg
we;=,;A lsÍug yelsúh hq;=h' fuu Supplier flfkl= i|yd Tyqgu muKla ysñjk
ksYAÑ; Supplier Code tlla olakg ,efnhs¡ fuu w;=reuqyqK; ks¾udKh lsÍu
i|yd fm%dfclaÜ tlg ;j;a w¿;A f*daï tlla ,nd.kak¡ Item Code tl fuka
Supplier Code tlo os.ska os.gu .Kkhùu i|yd welaiia fâgdfíia tl ;=, ;j;a
w¿;A fÜn,A tlla ks¾udKh lr.kak¡ fuh suptbl f,i kï lr my; *S,Aâia
ks¾udKh lr.kak¡
Created By: S.Wajir Madushanka
Disapamok Online IT Academy
fuys supcode hkq Supplier Code tflys wl=rejk w;r supnumb ;=,oS tla tla
ima,h¾g ysñjk Supplier Code tflys b,lalu fyj;A w.h .Kkhùu i|yd
Ndú;d lr we;' fuu fldaâ tl iy w.h tl;=ùfuka Supplier Code tl
ks¾udKhùu isÿfjhs¡ fuysoS leg.ßfhka iEfok Item Code tl fuka fkdj iEu
flfkl=gu ,efnkafka tlu wdlD;shlska hq;A Supplier Code tlla neúka fuu
ks¾udKh lr.;A suptbl fÜn,A tl újD;lr supcode tl SUP f,i;A supnumber
tl 1 f,i;A ilia lr.kak¡ fuúg we;=,;A lrkq ,nk ima,h¾ia i|yd m,uqj
SUP1 f,i iliaùu isÿfjhs¡
fyd|hs wms oeka ,nd.;A f*daï tl ;=, w¿;A ima,h¾ flfkl= we;=,;A lsÍug wod,
w;=reuqyqK; ks¾udKh lruq¡ fï i|yd f,An,A lkafg%da,A folla" fglaiaÜ fndlaia
lkafg%da,A ;=kla iy nÜka lkafg%da,A tlla muKla wjYH fjhs¡ oeka my;
oelafjk wdldrhg f*daï tl äihska lr.kak¡
iqmqreÿ f,i fuu f*daï tl ;=,o OleDb la,dia tl ks¾udKh lrñka welaiia
fâgdfíia tl iy uDÿldx. w;=reuqyqK; w;r iïnkaO;djh f.dvk.d.kak¡
fyd|hs fuu f*daï tl fmkajkjd;A iu`.u oekg ,nd.; yels Supplier Code tlo
fmkaúh hq;=h' fyd|hs ta i|yd f*daï f,daâ bfjkaÜ tl ;=, my; mßos fla;kh
isÿlrkak¡ iqmqreÿ f,i fl,skau la,dia tl ;=, da f,i OleDbDataAdapter
Created By: S.Wajir Madushanka
Disapamok Online IT Academy
fõßhn,A TífclaÜ tlla iy ds f,i fâgdfiÜ fõßhn,A TífclaÜ tlla
ks¾udKh lr.kak¡
fuysoS wevemag¾ tl ;=, ,shd we;s SQL fla;fhys suptbl tflys we;s ish¿u
frfldaâ i,ldn,d tajd fjka lr.kakd f,ig fla;kh lr we;' fuu fÜn,A
tflys mj;skafka tlu frfldaâ tlla neúka th ds fâgdfiÜ tflys
;djld,slj .nvdlr ;nd.ekSug fla;kh lr we;' bkamiq fuu fjkalr.;A
frfldaâ tflys we;s supcode tlg wod, fldaâ tl iy supnum tlg wod,
mj;sk w.h ms,sfj,ska TextBox2 ys iy TextBox3 hk lkafg%da,Aia i|yd mjrdf.k
we;' fuu f*daï tflys Add New Supplier nÜka tl la,sla l,úg oekg fuu f*daï
tflys we;s Supplier Name tl iy Supplier Code tl fâgdfíia tflys Bg wod,
fÜn,A tllg .uka l,hq;= fjhs¡ ta i|yd welaiia fâgdfíia tl újD;lr w¿;A
fÜn,A tlla ks¾udKh lr.kak¡ fuh Supplier f,i kïlr my; *S,Aâia
ks¾udKh lr.kak¡
fuys supname *S,Aâ tl ;=, ima,h¾ f.A ku;A supcode *S,Aâ tl ;=, ima,h¾
flfkl= i|yd ysñjk Supplier Code tflys .Kkh fjñka mj;sk w.h .nvdùu
isÿfjhs¡ fuys supcode *S,Aâ tl i|yd Primary Key tl we;=,;A lr.kak¡ fya;=j
ysñjk Supplier Code tflys .Kkh fjñka mj;sk w.h tla flfkl=g ,enqK
miqj th fjk;A lsisu flfkl=g ysñ fkdjk neúks¡ oeka fuu Add New
Created By: S.Wajir Madushanka
Disapamok Online IT Academy
Supplier nÜka tl la,sla l,úg fuu o;A; Supplier fÜn,a tlg ,nd.ekSu i|yd
my; mßos fla;kh l,hq;= fjhs¡ fuysoS ima,h¾f.A ku iy ima,h¾ fldaâ tl
fglaiaÜ fndlaia j,ska ,nd.kakd neúka fï i|yd merdóg¾ia folla ks¾udKh
l,hq;= fjhs¡
fuf,i ima,h¾ flfkl= we;=,;A l,miq B,`. ima,h¾ flfkl= we;=,;A lsÍu
i|yd ima,h¾ fldaâ tl hdj;Ald,Skùu isÿúh hq;=h' WodyrKhla f,i Tn SUP1
kñka tla ima,h¾ flfkl= fÜn,A tlg we;=,;A l,dhehs is;kak¡ fuúg
ima,h¾ fÜn,A tflys frfldaâ tl jkafka SUP1 fjhs¡ oeka B,`. ima,h¾ we;=,;A
lsÍug meñKsúg fuh iajhxl%Shju SUP2 f,i fmkaúh hq;=h' fyd|hs fuf,i
ima,h¾ fldaâ tl hdj;Ald,Sk ùu i|yd my; mßos fla;kh lrkak¡ fuysoS Suptbl
fÜn,A tflys i;HjYfhkau isÿjkafka supcode tflys fglaiaÜ tl tf,iu
mj;soaoS supnumb *S,Aâ tflys we;s w.hg tl ne.ska tl;= lrñka tu supcode
tl iy supnumb *S,Aâ folu tl;=ùfuka ima,h¾ fldaâ tl ks¾udKh ùu
by; fla;kh ukdj jegfykakg we;ehs lshd wfmalaId lruq¡ fuu f*daï tflys
Select Category bosßfhys we;s lïfnd fndlaia tflka lsishï leg.ßhla f;ArEúgoS
tu leg.ßfhka w¿;A NdKAvhla we;=,;A lsÍug Bg wod, ,nd.; yels Item Code
tl fmkaúh hq;=h' fyd|hs ta i|yd Select Category bosßfhys we;s lïfnd fndlaia
tl vn,A la,sla lr tys SelectedIndexChanged bfjkaÜ tl ;=, my; mßos
fla;kh lrkak¡ fuysoS lïfnd fndlaia tflka f;dark leg.ßhg wod, Item
Code tl fmkaúh hq;= neúka merdóg¾ tlla fï i|yd ks¾udKh lr.; hq;=fjhs¡
Select Supplier bosßfhys we;s lïfnd fndlaia tflka lsishï ima,h¾ flfkl=
f;ArEmiq Tyqg wod, ima,h¾ fldaâ tl fmkaùu i|yd fuu lïfnd fndlaia
tflys SelectedIndexChanged bfjkaÜ tl ;=, my; mßos fla;kh lrkak¡
fuys Item Code tl i|yd Primary Key tl we;=,;A lr.kak¡ fuysoS Products
fÜn,A tl .;Aúg w¿;A frfldaâ tlla we;=,;A lsÍfïoS itmcode, itmname,
category, supcode fyj;A ima,h¾ fldaâ tl iy supname fyj;A ima,h¾ fkaï
tl wdosh we;=,;A lrk neúka merdóg¾ 5 la Ndú;d lsÍug isÿfjhs¡ tu ksid
fl,skau la,dia tl ;=, fï i|yd p1, p2, p3, p4, p5 f,i merdóg¾ia fõßhn,A
TífclaÜ 5 la ks¾udKh lr.kak¡ oeka my; oelafjk wdldrhg fla;kh
isÿlrkak¡
fuys 0 f,i w.hka folla hjd we;Af;A NdKav m%udKh iy ydKAvhl ñ, i|yd
fjhs¡ fuysoS miq wjia:djloS Stock tlg NdKAv m%udKh iy ñ, .Kka
,ndfokafka fjku w;=reuqyqK;lska neúka 0 f,i ,ndoS we;' fuysoS wm fuu
fÜn,A tlg o;A; mdialrk úgoS l,ska fÜn,A tlg Ndú;d lrk,o merdóg¾ia
Created By: S.Wajir Madushanka
Disapamok Online IT Academy
o Ndú;d lr we;' tu ksid fojkshg fjk;A fÜn,A tllg fuu merdóg¾ia
Ndú;d lrkúgoS cmd.Parameters.Clear() f,ig fla;kh lr we;'
fuu TextBox3 mj;sk w.hg tlla tl;= fjñka Item Code tl ks¾udKhùu
isÿfjhs¡ fuys oekg olakg ,efnkafka ,nd.; yels Item Code tlg wod,
wxlh fjhs¡ fuys count f,i Long fâgd ghsma tflys fõßhn,hla ks¾udKh lr
we;' fuhg TextBox3 ys w.hg tlla tl;= lrñka ,efnk w.h u;l ;nd.kakd
Created By: S.Wajir Madushanka
Disapamok Online IT Academy
f,ig fla;kh lr we;' ks¾udKh lrkq ,nk p6 merdóg¾ tl i|yd count ys
,efnk w.h;A p7 merdóg¾ tl i|yd comboBox1 ys f;dark,o leg.ßh
mjrdf.k we;' fuf,i Item Code tflys bosßhg .Kkh jk w.h hdj;Ald,Sk
lsÍug wod, SQL fla;h heùu i|yd fl,skau la,dia tl ;=, cmd1 f,i
OleDbCommand fõßhn,A TífclaÜ tlla ks¾udKh lr.kak¡
fuys fldgq lrk,o fla;kh tl fm,g ,súhhq;= nj Tng wuq;=fjka lsjhq;= ke;'
fuysoS Category fÜn,A tflys catnum *S,Aâ tlg count ys w.h ,nd.;A p6
merdóg¾ tlg wkqj hdj;Ald,Sk ùu i|yd fla;kh lr we;' fuysoS tu
hdj;Ald,Sk jk w.h fyj;A count ys w.h ,nd.;A p7 merdógrfhys tkï
lïfnd fndlaia tflka f;dardf.k we;s leg.ßhg wkqj isÿfjhs¡ fyd|hs oeka
jevigyk Odjkh lr n,d w¿;A whs;uhla we;=,;A lr n,kak¡ Tnj mqÿuhg
m;Alrjñka tla tla NdKav mß.Kl moaO;shg we;=,;A jk wdldrh oel
n,d.; yel'
fyd|hs fï wdldrhg w¿;ska NdKav mß.Kl moaO;shg we;=¿ lsÍug isÿjQúg tA
i|yd by; w;=reuqyqK; Ndú;d lsÍfï yelshdj we;' fuf,i we;=,;A lrk,o
NdKav ;jÿrg;A ñ,oS .;Aúg tu m%udKh" ñ, wdosh Stock tlg we;=,;A lsÍug
isÿjQúg ta i|yd Ndú;d lsÍug isÿjk w;=reuqyqK; oeka ks¾udKh lruq¡ fyd|hs
fï i|yd w¿;A f*daï tlla fm%dfclaÜ tlg ,nd.kak¡ fmr f*daï j,oS fuka
OleDb la,dia tl ks¾udKh lrñka welaiia fâgdfíia tl iu`. wod,
iïnkaO;djh f.dvk.df.k isákak¡ fï i|yd f,An,A lkafg%da,A 13 la" fglaiaÜ
fndlaia lkafg%da,A 4 la" .ArEma fndlaia lkafg%da,A tllA" nÜka lkafg%da,A tlla iy
DataGridView lkafg%da,A tlla wjYH fjhs¡ oeka by; lkafg%da,Aia Ndú;d lrñka
my; oelafjk wdldrhg w;=reuqyqK; ks¾udKh lrkak¡
fyd|hs fuu w;=reuqyqK; Ndú;d lrkq ,nkafka ld,fhka ld,hg wod, NdKAv
Stock tlg f.k wdúg tu NdKav m%udKh iy ñ, .Kka hdj;Ald,Sk lsÍu
i|yd fjhs¡ fuu f*daï tl fmkajkjd;A iu`.u Data Grid View lkafg%da,A tl
;=, oekg Stock tlg we;=,;A lr we;s ish¿u NdKAvj, Item Code tl iy Item
Name we;=¿ ish¿u frfldaâia fmkaúh hq;=fjhs¡ bkamiq Item Name fglaiaÜ
fndlaia tl ;=, ghsma lrkq ,nk wl=re j,g .e,fmk NdKav j, f;dr;=re
muKla DataGridView lkafg%d,A tl ;=, fmkaúh hq;=h' WodyrKhla f,i Item
Name hgf;ys we;s fglaiaÜ fndlaia tl ;=, K wl=r ghsma lrkq ,nkúg K wl=frka
mgka.kakd ish¿u ksIAmdok DataGridView lkafg%d,A tl ;=, fmkaúh hq;=fjhs¡
Ka f,i ghsma lrkúg Ka j,ska mgka.kakd NdKavj, f;dr;=re muKla fuu
DataGridView lkafg%d,A tl ;=, fmkaúh hq;=fjhs¡ tfukau Item code fglaiaÜ
fndlaia tl ;=, ghsma lrkq ,nkúg tu wl=re j,g .e,fmk Item Code j,g
wod, o;A; fuu DataGridView lkafg%d,A tl ;=, fmkaúh hq;=fjhs¡ fyd|hs fuu
fla;kh isÿlsÍug m%:ufhka my; SQL fla;h foig uolg wjOdkh fhduq
lrkak¡
fuysoS isÿlr we;Af;A Products fÜn,A tflys Productname tflys uq,A wl=r K
wl=frka mgka.kq,nk ish¿u frfldaâia fmkajk f,ig fjhs¡ kuq;A Tn fuys K
wl=r bj;Alr jevigyk Odjkh l,úg iudk ùug lsisfohla i|yka lr fkdue;s
neúka tkï l=uk wl=frka mgka.kakd Productname fmkajk f,ig fla;kh
lr fkdue;s neúka fÜn,A tflys olakg ,efnk ish¿u frfldaâia fmkajkq
,nhs¡ kuq;A wmf.A jevigyk .;Aúg Bg jvd ;rula fjkia iajrEmhla .kq
,nhs¡ fuysoS fmkaúh hq;Af;A fglaiaÜ fndlaia tflys ghsma lrkq ,nk
wl=rej,g .e,fmk NdaKv fjhs' tkï Tn okakjd fglaiaÜ fndlaia tflys
hula ghsma lrkúg lsishï ld¾hhla isÿlr.ekSug kï fla;kh l,hq;Af;A
fglaiaÜ fndlaia tflys TextChanged bfjkaÜ tl ;=, nj' fuúg by; fla;kh
TextChanged bfjkaÜ tl ;=, fla;kh l,úgoS fglaiaÜ fndlaia tflys wl=re
,ndfok úg tu ghsma lrkq ,nk wl=re j,g wod, Items ish,a, DataGridView
lkafg%da,a tl ;=, fmkajkq ,nhs¡ fuysoS ta i|yd tkï TextBox2 ys ghsma lrkq
,nk wl=rej,g wkqj o;A; DataGridView tflys fmkaùug wjYH neúka merdóg¾
tlla ks¾udKh lsÍug isÿfjhs¡ fuu o;A; wevemag¾ tl yryd fjkalr
fâgdfiÜ tlla yryd ,nd.kakd neúka da f,i wevemag¾ tll=;A ds f,i
fâgdfiÜ tll=;A p1 f,i merdóg¾ tll=;A fl,skau la,dia tl ;=, ks¾udKh
lr.kak¡ fyd|hs oeka Item Name hgf;ys olakg ,efnk fglaiaÜ fndlaia tl
u; vn,A la,sla lr fldaâ úkafvda tl ,ndf.k tys TextChanged bfjkaÜ tl
;=, my; mßos fla;kh lrkak¡
fuysoS Salestock fÜn,A tflys wo oskh" NdKAv m%udKh" ñ, .Kka hk tajd Label4
ys fmkajkq ,nk Item Code tlg wod,j hdj;Ald,Sk jk f,ig fla;kh lr
we;' fuf,i SQL fla;h heùug cmd f,i fjku OleDbCommand fõßhn,a
TífclaÜ tlla fl,skau la,dia tl ;=, ks¾udKh lrf.k isáhhq;= fjhs¡ fuu
f*daï tl MDI Parent Form tflys ,nd.ekSu i|yd Stock f,i m%Odk fukq
whs;uhla ks¾udKh lr ta ;=, Stock Products f,i Wm fukq whs;uhla
ks¾udKh lr.kak¡ oeka fuu Stock Products fukq whs;uh vn,A la,sla lr
fuu f*daï tl fmkaùug wod, fla;kh isÿlrkak¡ oeka fuu f*daï tl
Odjkh lr n,kak¡
fuys DataGridView1 lkafg%da,A tl ;rula os.g we| th by,u msysá Item Code tl
iy Item Name fglaiaÜ fndlaia j,g my,ska isák wdldrhg msysgqjd .kak¡ fuh
wdrïNfhysu olakg fkd,efnk w;r Tn ñ,oS .;A NdKAvhla Item Name
bosßfhys ,ndfok úgoS fuu .%sâ tl fmkaúhhq;= w;r ghsmalrkq ,nk
wl=rej,g .e,fmk NdKav fuu .%sâ tflys fmkaúh hq;=fjhs¡ lsishï
NdKavhla f;ArEmiq tys Item Code tl Item Name tl iy Unit Price tkï
NdKavfhys ñ, hk wdosh ta ta fglaiaÜ fndlaia ;=, fmkaúhhq;= fjhs¡ t;A iu`.u
Created By: S.Wajir Madushanka
Disapamok Online IT Academy
fuu .%sâ lkafg%da,A tl kej;;A ie`.ùu isÿúh hq;=h' fuu w;=reuqyqK; yryd
isÿlrkq ,nkafka lsishï mqoa.,fhl= hï NdKav m%udKhla ñ,oS .;Aúg tajd
Stock tflka hdj;Ald,Sk ùu fjhs¡ tfukau fuysoS ßisÜ m;lao ksl=;A lrk neúka
ta i|yd iajhxl%Shj hdj;Ald,Sk jk ßisÜm;A wxlhlao ;sìh hq;= fjhs¡ fuu
ßisÜm;g wod, ßisÜ wxlh .Kkhùu i|yd fjku fÜn,A tlla ks¾udKh
l,hq;= fjhs¡ fyd|hs ta i|yd iqmqreÿ f,i welaiia fâgdfíia tl újD;lr
Create geí tflys we;s Table nÜka tl la,sla lr Invoicenumb kñka fÜn,A tlla
ks¾udKh lr tys Design View tlg f.dia my; mßos *S,Aâia folla ks¾udKh
lrkak¡
fuys invoicenm *S,Aâ tl i|yd Priamry Key tl we;=,;A lrkak¡ bkamiq fuu
ks¾udKh lr.;A fÜn,A tl újD;lr invoicenm *S,Aâ tl ;=, INVS f,i;A
number1 *S,Aâ tl ;=, 1 f,i;A ,ndfokak¡
fuysoS wms m,uqj DataTable tlla ilia lrf.k thg wjYH Columns we;=,;A
lr tajd miqj Dataset tllg ;djld,slj we;=,;A lr miqj th DataGridView
lkafg%da,A tl i|yd mjrkq ,nhs¡ ta i|yd fl,skau la,dia tl ;=, ds kñka
fâgdfiÜ tlla iy dt kñka DataTable tlla ks¾udKh lrf.k isákak¡
fuysoS Salestock fÜn,A tflka TextBox2 ys ghsma lrkq ,nk wl=rej,g .e,fmk
frfldaâia fjku fjkalr ds fâgdfiÜ tl ;=, .nvdlr ;nd.kakd f,ig
fla;kh lr we;' fuysoS fuu fla;kh ,shd we;Af;A TextChanged bfjkaÜ tl ;=,
neúka tu ghsma lrk fudfydf;ysu by; fla;kh kej; kej; uqodyßk neúka
tu wjia:dfõoSu fâgdfiÜ tl ;=, wod, frfldaâia ;ekam;A lrkq ,nhs¡
bkamiq iqmqreÿ f,i fuu fâgdfiÜ tl ;=, we;s frfldaâia DataGridView1
lkafg%da,A tlg mjrd.kakd f,ig fla;kh lr we;' fï wdldrhgu Item Code
fglaiaÜ fndlaia tl ;=,o ghsma lrkq ,nk Item Code tlg .e,fmk wl=rej,g
wod, frfldaâia fmkaùu i|yd TextBox1 ys TextChanged bfjkaÜ tl ;=, my;
mßos fla;kh lrkak'
fuysoS m,uqj tkag¾ lS tl Tnd we;Aoehs úuid n,d we;s w;r tfukau TextBox1,
TextBox2, TextBox3 iy TextBox4 hk tajdo ysiaj mj;skafkao hkak úuid n,d
we;' tfia fkdjk úgoS tkï tkag¾ lS tl Tnd fglaiaÜ fndlaia ysiaj
fkdmj;sk úgoS NdKavhla f;ArEmiq tys TextBox1 ys ;ekam;Ajk Item Code tl
i|yd merdóg¾ tlla ks¾udKh lr we;'
fuysoS wevemag¾ tl ;=, ,shd we;s SQL fla;h u.ska TextBox1 ys we;s Item Code
tl ,nd.;A @itmcode merdógrhg iudk frfldaâ tflys quntity fyj;A NdKAv
m%udKh muKla fjka lrf.k ds kñka ks¾udKh lr.;A fâgdfiÜ tl ;=,g
,nd.kakd f,ig fla;kh lr we;' bkamiqj tu w.h fâgd nhskaäka lrñka
Label11 lkafg%da,A tlg ,ndf.k we;'
fyd|hs fuu f,an,hg ,nd.;A Quntity h fyj;A NdKAv m%udKh g jvd jeä w.hla
TextBox4 ys i|yka l,úg th jeros nj y`.jñka fjkuu uefiaÊ tlla
Created By: S.Wajir Madushanka
Disapamok Online IT Academy
fmkaúh hq;=h' tfia fkdue;s úgoS fuu ñ,oS.;A NdKAvhg wod, úia;r
DataGridView2 lkafg%da,A tl ;=,g fjku frda tlla jYfhka we;=,;A úhhq;=h'
fyd|hs ta i|yd by; fla;khg miqj my; oelafjk wdldrhg fla;kh lrkak¡
fuysoS NdKav ñ,oS .kakdúg TextBox4 ys i|yka lrk,o NdKav m%udKh Label11
g ,ndf.k we;s NdKav m%udKhg jvd jeä w.hla kï Over Quantity f,i
uefiaÊ tlla fmkaùug fla;kh lr we;' tfukau tu ,ndÿka w.h bj;A lsÍu
i|yd TextBox4 lkafg%da,A tl ysialr kej; w.hla ,ndoSu i|yd tys l¾i¾ tl
msysgqjd we;' Else hkq tfia fkdjk wjia:dj fjhs¡ tkï Label11 ys i|yka w.hg
jvd wvq w.hla ,ndoS we;s úgoS fuu f;dard.;A NdKAvh g wod, úia;r
DataGridView2 ys fjku frda tlla jYfhka we;=,;A ùu i|yd my; oelafjk
wdldrhg fla;kh lrkak¡
fuysoS fuu f;dard.;A NdKAvhg wod, úia;r fjku frda tlla jYfhka
DataGridView2 lkafg%da,A tl ;=,g we;=,;A lr.ekSu i|yd fl,skau la,dia tl
;=, dr kñka fjku DataRow fõßhn,A TífclaÜ tlla ks¾udKh lr.kak¡
fuysoS fuu ks¾udKh lr.;A dt fâgd fÜn,A tl i|yd w¿;A ysia frda tlla we;=,;A
lrf.k th dr fõßhn,A TífclaÜ tl i|yd mjrdf.k we;' bkamiq fuu dr
kñka we;s w¿;A frda tflys dr(0) fyj;A m,uq fld,ï tlg TextBox1 ys Item
Code tl;A" fojk fld,ï tlg tkï dr(1) tl i|yd TextBox2 ys Item Name
tl;A" ;=kajk fld,ï tlg tkï dr(2) tl i|yd NdKavfhys ñ,;A y;rfjks
fld,ï tlg ,ndfok NdKav m%udKh;A mjrd.kq ,nhs¡ fuys miajk fld,ï
tl jkqfha ,nd.;A NdKAv m%udKh tu tla NdKavhl ñf,ka .=K l,úg
,efnk Wm tl;=j fyj;A Sub total tl fjhs¡ tu ksid TextBox3 ys mj;sk
ñf,ka TextBox4 ys mj;sk NdKav m%udKfhka .=K lr we;' fuu w;=reuqyqKf;ys
ñ,oS .kakd NdKav tlsfkl we;=,;A lrkúgoS tu Wm tl;=fjys ish,Af,ysu
tl;=j bosßhg TextBox5 ys fmkaúh hq;=h' tu ksid TextBox5 ys oekg ,ndf.k
we;s w.hg dr(4) ys .Kkh lr.;A Sub Total tl tl;=jk f,ig fla;kh lr
we;' bkamiq fuh dt fÜn,A tlg we;=,;A jk f,ig fla;kh lr we;' kej;;A
w¿;A NdKAvhla ,ndoSu i|yd TextBox1, TextBox2, TextBox3 iy TextBox4 hk
lkafg%da,Aia ysialr we;'
oeka fuu fÜn,A tflys Design View tlg msúiS my; *S,Aâia ks¾udKh lr.kak¡
fuu fÜn,A tflys INVS 4 f,i ßisÜ m;lska NdKav y;rla ñ,oS .;Af;Ahehs
is;kak¡ fuúg fuu NdKavj, f;dr;=re fjku frfldaâ jYfhka fuu fÜn,A
tl ;=, ;ekam;A ùfïoS invoicenumb hk Invoice Number tl .nvdjk *S,Aâ
tflys tlu Invoice Number tl y;r jrla kej; kej;;A frfldaâ ;=,
fmkajk neúka ta i|yd Primary Key tlla Ndú;d l,fkdyels fjhs¡ tfukau
tlu NdKavh lsysmfofkla ñ,oS.;A wjia:djl Item Code tlo kej; jrla
fhfok neúka ta i|ydo Primary Key tlla Ndú;d l, fkdyels fjhs¡ fuys
subtotal hkq ta ta NdKavj, Wm tl;=jk w;r dttime hkq tu NdKavh ñ,oS.;A
oskh iy fõ,dj fjhs¡ payment hkq NdKav i|yd f.ùï lrkq ,nk uqo,jk w;r
balance hkq tu f.ùï l,miq b;sßjk uqo, fjhs¡ fyd|hs fuu w;=reuqyqKf;ys
we;s Sale nÜka tl la,sla l,úgoS ñ,oS .;A tla tla NdKav j,g wkqrEmjk mßos
Stock tflys we;s NdKav hdj;Ald,Skùu isÿúhhq;= w;r ñ,oS.;A NdKAvj, ish¿u
úia;r Saleitem fÜn,A tlg we;=,;A úhhq;=h' tfukau B,`. ßisÜm; ksl=;A lsÍug
tu ßisÜm;A wxlho hdj;Ald,Skùu isÿúhhq;=h' fyd|hs ta i|yd Sale nÜka tl
;=, my; mßos fla;kh lrkak¡ fuysoS wms isÿlrkq ,nkafka DataGridView tflys
;ekam;Aj we;s m,uq frda tflys isg wjidk frda tl olajd Æma tlla l%shd;Aul
lrjñka tajd frfldaâ jYfhka ms,sfj,ska fÜn,A tlg heùu fjhs¡ fyd|hs fï
i|yd fl,skau la,dia tl ;=, Dim count As Integer f,i fõßhn,hla
ks¾udKh lr.kak¡
fuysoS Æma tl jYfhka While Æma tl fhdodf.k we;' fuf,i we;=,;A lrk,o
iEu NdKavhlgu wod,u frfldaâ ;ekam;A lrf.k ;snqfka dt kñka ks¾udKh
lr.;A fâgd fÜn,A tl ;=, fjhs¡ tu ksid fuu Æma tl lrlefjk mshjr
.Kk u;l ;nd.ekSug count fõßhn,h Ndú;d lr we;' Æma tl lrlefjk úg
count fõßhn,hg tl ne.ska tl;=ùu isÿfjhs¡ tu ksid fl,skau la,dia tl ;=,
Dim count As Integer f,i fõßhn,hla ks¾udKh lr.kak¡ fuu dt.Rows.Count
u.ska dt fÜn,A tflys oekg ;ekam;Aù we;s NdKav j,g wod, f;dr;=re we;=,;A
iïmQ¾K rows .Kk .Kkh lr.; yels fjhs¡ fuf,i Æma tl 0 ys isg
lrlefjk jdr .Kkg .e,fmk f,i count fõßhn,h ;=,o tu jdr.Kkg
wod, w.h ;ekam;A jkq ,nhs¡ fuysoS dt fâgd fÜn,A tflys frfldaâ 5 la
;snqfkakï count 0 ka mgka wrf.k Rowcount tl 5 g jvd wvqjk f;la Æma tl
l%shd;Aulùu isÿfjhs¡ fuysoS wmg dt fâgd fÜn,A tflys Æma tl lrlefjk úgoS
tla tla Item ;sfnk m%udKh fidhd oekg dt fâgd fÜn,A tflys wod, Item
m%udKh wvqù hdj;Ald,Sk ùu isÿúh hq;=h¡ tu ksid dt fâgd fÜn,A tflys
Created By: S.Wajir Madushanka
Disapamok Online IT Academy
@itmcode merdóg¾ tl i|yd ,nd.kafka dt.Rows(count).ItemArray(0) tkï
wdrïNfhys oekg count fõßhn,fhys olakg ,efnkafka 0 neúka dt fÜn,A
tflys oekg mj;sk 0 fyj;A wdrïNl frfldaâ tflys ItemArray(0) tkï tys
m,uq fld,ï tflys mj;sk Itemcode tl merdóg¾ tl i|yd ,nd.kq ,nhs¡
fuu fâgd fÜn,A tflys mj;sk Item Code tl" Item Name tl" Item Price tl"
.;A NdKAv m%udKh" tu ,nd.;A NdKav m%udKhg wod, Wm tl;=j" f.jk ,o uqo,
iy b;sß jQ uqo, ßisÜ m;la ksl=;A lsÍfïoS oskh iy fõ,dj" ßisÜm;A wxlh
fjku Saleitem fÜn,A tlg w¿;A frfldaâ tlla jYfhka we;=,;Aùu i|yd my;
mßos fla;kh lrkak¡ fï i|yd merdóg¾ia wjYHjk neúka p4, p5, p6, p7, p8, p9,
p10, p11 iy p12 f,i fjku merdóg¾ia ks¾udKh lr.kak¡
fuf,i Æma tl tl jrla lrleù by; wod, NdKAvhg wod, Quantity tl wvqù
tu iïmQ¾K o;A; fjku frfldaâ tlla jYfhka Saleitem fÜn,A tlg we;=,;A
l,miq B,`. mshjrg lrlefjk úg count j,g tlla tl;=ù End While u.ska
kej;;A Æma tl uq,g lrljkq ,nhs¡ fuúg fuu Æma tl dt fâgd fÜn,A tflys
wjidk frfldaâ tl olajdu l%shd;Aul fjñka ta w;r;=r tla tla frfldaâ
Saleitem fÜn,A tlg we;=,;A fjñka tu wvqjQ NdKAv m%udKh Salestock fÜn,A
tflka hdj;Ald,Sk ùu isÿfjhs¡ fuf,i Æma tl l%shd;Aulù wjika jQ miq
Successfully Update Stock. f,i uefiaÊ tlla fmkaùug fla;kh lr we;'
fuf,i o;A; we;=,;AjQ miq B,`. ñ,oS.ekSuloS fuu w;=reuqyqK;g msúiqKq miq
Invoice Number tl .e,fmk f,i hdj;Ald,Skù mej;sh hq;=fjhs¡ ta i|yd my;
mßos fla;kh lrkak¡
fuysoS Label10 lkafg%da,A tl ;=, hdj;Ald,Sk fjñka mj;sk oekg ,nd.; yels
Invoice Number tflys fglaiaÜ tlg miqj we;s w.h fmkajkq ,nk w;r fuhg
tlla tl;= fjñka th z kue;s fõßhn,hg mjrdf.k we;' bkamiq fuh
@number1 merdógrhg ,ndf.k we;' cmd2 f,i ;j;A fl,skau la,dia tl ;=,
OleDbCommand fõßhn,A TífclaÜ tlla ks¾udKh lr Invoicenumb fÜn,A
tflys number1 *S,Aâ tl fuu @number1 merdógrfhys mj;sk w.hg
hdj;Ald,Sk jk f,ig fla;kh lr we;' fuysoS fuu fÜn,A tflys mj;skafka
tlu frfldaâ tl neúka tkï w.h muKla hdj;Ald,Sk jk ksid where f,i
i|yka lsÍu wkjYH fjhs¡
fyd|hs oeka wmg isÿlsÍug we;Af;A Saleitem tflys o;A; j,g wod,j ßisÜm;
ks¾udKh lr.ekSu fjhs¡ fuf,i úIqj,A fíisla fvdÜfkÜ w;=reuqyqK; Ndú;d
lrñka fÜn,A tflys we;s o;A; jd¾:djla jYfhka uqøKh lr.ekSu i|yd
fldákau lsjfyd;A Invoice tlla jYfhka uqøKh lr.ekSu i|yd Crystal Report
kue;s fjku uDÿldx.hla wjYHùu isÿfjhs¡ fuu uDÿldx.h Ndú;d lrñka
b;du;a wdl¾IKSh wkaoñka fÜn,A tll mj;sk o;A; jd¾;duh wdldrfhka
uqøKh lr.ekSfï yelshdj mj;S' fuf,i úIqj,A fíisla fvdÜfkÜ
w;=reuqyqK;la Ndú;d lrñka o;A; jd¾:duh wdldrfhka uqøKh lr.ekSfïoS
Crystal Report uDÿldx.h m,uqj Tnf.A mß.Klhg bkaiafgda,A lr.; hq;=fjhs¡
fuh Tng wka;¾cd,fha mj;sk The Pyrates Bay jeks Torrent fijqï hka;%hla
Ndú;d lrñka b;du;a myiqfjka vjqkaf,daâ lr.ekSfï yelshdj mj;S' fuys figma
*hs,A tl Ndú;d lrñka Tnf.A mß.Klhg m,uqj ksjerosj bkaiafgda,A lr.;
hq;=fjhs¡ fuh t;rïu wmyiq lghq;A;la fkdjk neúka wm th bosßm;A lr
ke;' fuf,i vjqkaf,daâ lrkúgoS úIqj,A iagqäfhda 2010 ixialrKhg
.e,fmk Crystal Report ixialrKhla vjqkaf,daâ lsÍug j.n,d.kak¡ fyd|hs
fuf,i bkaiafgda,A lsÍfuka wk;=rej fuu ßfmdaÜ tl wjYH wdldrhg äihska
lr.ekSuo isÿl,hq;Af;A úIqj,A fíisla fvdÜfkÜ w;=reuqyqK; yryd fjhs¡ ta
i|yd fid,shqIka tlaiamaf,dar¾ úkafvda tflys fm%dfclaÜ fkaï tl u; rhsÜ
la,sla lr olakg ,efnk fukq tflka Add f;dard bkamiq olakg ,efnk fukq
Created By: S.Wajir Madushanka
Disapamok Online IT Academy
tflka New Items hk wdldrh f;dard.kak¡ fuúg olakg ,efnk vhf,d.A
fndlaia tflys jïmi ,ehsia;=fjka Reporting hk wdldrh f;dard túg olakg
,efnk fgïmaf,AÜia j,ska Crystal Report hk fgïmAf,aÜ tl f;dard Add nÜka
tl la,sla lrkak¡
fuúg Crystal Report Gallery f,i fjku vhf,d.A fndlaia tlla olakg ,efnhs¡
fuys by,skau olakg ,efnk Using the report wizard hk wdldrh f;dard OK
nÜka tl la,sla lrkak¡
fuúg B,`. mshjr fj; fhduqùu isÿfjhs¡ fuysoS wm ßfmdaÜ tl fyj;A bkafjdhsia
tl ilia lrkq ,nkafka w¿;Au iïnkaO;djhla ;=,ska neúka fuys jïmi we;s
,ehsia;=fjka Create New Connection f*da,av¾ tl u; vn,A la,sla lrkak¡ fuúg
os.yefrk f*da,Av¾ia ,ehsia;=fjka OLEDB (ADO) f*da,Av¾ tl u; vn,A la,sla
lrkak¡
fuu OLEDB (ADO) f*da,Av¾ tl u; vn,A la,sla úgoS olakg ,efnk OLEDB
(ADO) vhf,d.A fndlaia tflys by,skau olakg ,efnk Provider ,ehsia;=fjka
Microsoft Office 12.0 Access Database Engine hk wdldrh f;dard Next nÜka tl
la,sla lrkak¡
ó,`. mshjfrys we;s Office Database Type j,ska Access hk wdldrh f;dard Bg
by,ska we;s Data Source bosßfhys we;s ;s;a ;=klska ksfhdackh jk nÜka tl
la,sla lsÍfuka wmf.A jevigyk i|yd Ndú;d lrk,o BusinessDB hk
fâgdfíia *hs,A tl f;dardfokak¡
bkamiq Next nÜka tl la,sla lr wjidkfha Finish nÜka tl la,sla lrkak¡ fuúg
wod, fâgdfíia tl ;=, ks¾udKh lr we;s ish¿u fÜn,Aia ks¾udKh lr.;A
iïnkaO;djh ;=,ska olakg ,efnhs¡
fuysoS wm bkafjdhsia tlla uqøKh lrkq ,nkafka Saleitem fÜn,A tflys mj;sk
o;A; j,ska neúka fuu fÜn,A tl f;dard Bg bosßfhka by,ska olakg ,efnk >
nÜka tl la,sla lrkak¡
oeka Next nÜka tl la,sla lrkak¡ fuúg B,`. mshjf¾oS fuu fÜn,A tl ;=,
mj;sk ish¿u *S,Aâia fuys olakg ,efnhs¡ fuysoS oekg wm ish¿u *S,Aâia
,nd.kakd neúka >> nÜka tl la,sla lrkak¡
oeka Next nÜka tl la,sla lrkak¡ fuysoS wmg lsishï *S,Aâ tlla Ndú;d lrñka
o;A; .DDma lsÍula isÿfkdlrk neúka Next nÜka tl la,sla lrkak¡ kej;;A Next
nÜka tl la,sla lrkak¡ Available Styles j,ska Standard wdldrh f;dard Finish
nÜka tl la,sla lrkak¡ fuúg my; rEmfha oelafjk wdldrhg CrystalReport.rpt
f,iska ks¾udKh lr.;A ßfmdaÜ tflys Design View tl olakg ,efnhs¡
Created By: S.Wajir Madushanka
Disapamok Online IT Academy
fuys jïmi we;s Field Explorer úkafvda tflys Database Fields u; vn,A la,sla
l,úg ta hgf;ys we;s Saleitem fÜn,A tflys ku u; vn,A la,sla l,úgoS tu
fÜn,A tflys f;dard.kakd,o ish¿u *S,Aâia olakg ,efnhs¡ hïlsis wdldrhlska
ßfmdaÜ tflys lsishï *S,Aâ tlla bj;AjQfha kï by; wdldrhg kej;;A tu *S,Aâ
tlla ßfmdaÜ tlg ,nd.ekSfï yelshdj we;'
fuu ,enqk Design View tflys we;s ßfmdaÜ tflys Section 3 (Details) fldgfiys
we;s tys Bg by,ska we;s Section 2 (Page Header) fldgfiys we;s invoicenumb
*S,Aâ tl" Payment, Balance iy dttime hk *S,Aâia bj;A lr.kak¡ ukao fuu
Details fldgi ;=, hï *S,Aâ tlla i|yka l,úgoS Items 10 l f;dr;=re
;snqfkakï tajd tl ne.ska fmkajk úgoS by; *S,Aâia o kej; kej; oi jrla
fmkajkq ,nhs¡ tfukau Section 2 j, we;s Print Date bj;Alr tu fldgi ;rula
úYd,lr tys invoicenumb *S,Aâ tl;A dttime *S,Aâ tl;A msysgqjd.kak¡ fuys
fmkajkq ,nkfkA Invoice Number tl iy NdKav ñ,oS.;A oskh iy fõ,dj nj
fmkaùug tu Section 2 u; rhsÜ la,sla lr olakg ,efnk fukq tflka Insert j,
we;s Text Object u; la,sla lr fglaiaÜ TífclaÜ tlla msysgqjd Invoice Number
f,i;A dttime bosßfhys ;j;a fglaiaÜ TífclaÜ tlla msysgqjd Date and Time
f,i ,ndfokak¡
fuúg olakg ,efnk vhf,d.A fndlaia tflys Choose the field to summarize
j,ska Saleitem.subtotal hk wdldrh f;dard wms ,nd.kafka ish¿u Sub Total j,
tl;=jla neúka Bg my,ska we;s Calculate this summary j,ska Sum hk wdldrh
f;dard OK nÜka tl la,sla lrkak¡
fuúg olakg ,efnk vhf,d.A fndlaia tflys my,skau msysá Target framework
tl jYfhka oekg olakg ,efnk .Net Framework 4 Client Profile fjkqjg .Net
Framework 4 hkak f;dard.kak¡ bkamiq olakg ,efnk mKsúvfhys Yes nÜka tl
la,sla lrkak¡
oeka gQ,A fndlaia tflys Reporting leg.ßh ;=, Crystal Report Viewer f,i
fjku lkafg%da,a tlla olakg ,efnhs¡
fuu ,nd.;A f*daï tflys Crystal Report Viewer lkafg%da,A tl msysgqjd thg
my,ska ol=Kqmiska View Invoice f,i nÜka tlla msysgqjd.kak¡ fuu nÜka tl
la,sla lrkúgoS uqøKh úhhq;Af;A oekgu;A Form7 ys Sale nÜka tl la,sla
lrkúgoS olakg ,enqk Invoice Number tlg wod,j ñ,oS.;A NdKAv fjhs¡ tu
ksid ta hgf;A ;snQ Invocie Number tlu Report Viewer lkafg%da,A tl msysgqjd.;A
f*daï tlg ,nd.ekSug tu f*daï tl ;=, my,ska f,an,a lkafg%da,a folla
msysgqjd .kak¡ fuu Form7 ys oekg Invoice Number tl olakg ,efnkafka
Label9 ys Label10 ys neúka tajd Form8 fyj;A Crystal Report Viewer lkafg%da,A tl
msysgqjd we;s f*daï tlg ,nd.ekSu i|yd Sale nÜka tflys oekg isÿlrk,o
ish¿u fla;khg my,ska my; mßos fla;kh lrkak¡
oeka fuu Crystal Report myiqlu Ndú;d lrñka o;A; ßfmdaÜ tlla jYfhka
uqøKh lr.ekSfïoS fuu Crystal Report Viewer lkafg%da,A tl ,nd.;A w¿;A f*daï
tl ;=, la,dia tlg by,ska my; la,dia fol ks¾udKh lr.kak¡
oeka fl,skau la,dia tl ;=, rpt f,i fjku my; mßos fõßhn,a tlla ks¾udKh
lr.kak¡
Dim rpt As CrystalReport1
fyd|hs fuu w¿f;ka ,nd.;A f*daï tl ;=, Invoice tlla jYfhka uqøKh
lr.;hq;af;a Saleitem fÜn,A tflys oekg Form8 ys olakg ,efnk Invoice
Number tlg wod, o;A; fjhs¡ fyd|hs tajd fjku fâgdfiÜ tllg ,nd.ekSu
i|yd fl,skau la,dia tl ;=, OleDbDataAdapter tlla iy DataSet tlla
ks¾udKh lr f*daï f,daâ bfjkaÜ tl ;=, my; mßos fla;kh lrkak¡
Created By: S.Wajir Madushanka
Disapamok Online IT Academy
fuysoS DataSource tl jYfhka Saleitem fÜn,A tflys oekg ds j,g ,nd.;A o;A;
uqøKh lr.ekSug fuysoS fla;kh lr we;' hïfyhlska Tnf.A ßfmdaÜ tl uqøKh
fkdù hï.eg¿uh iy.; ;;Ajhla we;sjQfhakï fid,shqIka tlaiamaf,dar¾
úkafvda tflys Show all files nÜka tl la,sla lrkak¡ fuúg olakg ,efnk
fm%dfclaÜ tlg wod, ish¿u *hs,aia j,ska App.config *hs,a tl vn,A la,sla
lrkak¡
fyd|hs oeka jevigyk Odjkhlr NdKav wf,ú lsÍug wod, w;= reuqyqK;g
msúiS NdKav lsysmhla ñ,oSf.k Sale nÜka tl la,sla lr B,`.g Crystal Report
Viewer lkafg%da,a tl ,nd.;A f*daï tflys View Invoice nÜka tl la,sla lr
n,kak¡ Tnj mqÿuhg m;Alrjñka wod, Invoice tl uqøKhù we;s wdldrh n,d.;
yel'
fyd|hs by; jevigyk weiqßka Tng welaiia fâgdfíia tlla úIqj,A fíisla
fvdÜfkÜ w;=reuqyqK;la iu`. iïnkaO lrñka lghq;= lrk wdldrh ms,sn|j
ukd jegySula ,efnkakg we;ehs lshd wfmalaId lruq¡ fuysoS wm ish¿u jeros
ksjeros lsÍïj,g wod, fla;khka bosßm;A fkdl, w;r uQ,slu fla; muKla
bosßm;A lr we;' fuh ;jÿrg;A jeros ksjeros lrñka jeäoshqKq lsÍu Tn i;=
ld¾hhla jk w;r Bg wjeis iEu iyfhda.hlau ,ndoSug wms ieoS meyeoS u.n,d
isáuq¡ fuu .%ka: ud,dj wOHhkh lsÍfuka mßmQ¾K uDÿldx. ixj¾Olhl=
ìyslsÍu wmf.A uQ,sl wfmalaIdj fjhs¡
wdrïN lrkak¡ uDÿldx. ixj¾Olhl= ùfï m,uq mshjr fuu .%ka: ud,dj ;=,ska
tf;la Tng chæ