Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
iphone x used
AssassiN1
Updated:
Yesterday at 10:30 PM
කිතුල් තලප
Manoj Suranga Bandara
Updated:
Saturday at 7:04 PM
Ad icon
ව්යාපාර, Tuition පන්ති සහ Personal Portfolios සඳහා Web Setup එකක් රු. 9,099/- කට (වාර්ෂික renewal ර
thathsilura
Updated:
Thursday at 6:17 PM
AWS Certified Solutions Architect-Associate + AWS Certified Cloud Practitioner
Sanjeewani95
Updated:
Aug 19, 2026
🚀 එක පැකේජ් එකයි - මාසෙටම Unlimited Internet! 🌐
sayuru bandara
Updated:
Aug 18, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
ElaKiri Talk!
පරිඝණකයෙන් විදුලි උපකරණ හසුරවමු 03.
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="Hasistranger" data-source="post: 14962742" data-attributes="member: 314292"><p><strong>පරිඝණකයෙන් විදුලි උපකරණ හසුරවමු 03.</strong></p><p></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen"><strong><span style="color: SeaGreen"></span></strong></span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen"><strong><span style="color: SeaGreen"></span></strong><a href="http://www.elakiri.com/forum/showthread.php?t=1493101" target="_blank">පරිඝණකයෙන් විදුලි උපකරණ හසුරවමු 01.</a></span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen"></span></strong></span></p><p><span style="font-size: 15px"><a href="http://www.elakiri.com/forum/showthread.php?t=1493101" target="_blank">http://www.elakiri.com/forum/showthread.php?t=1493101</a><strong><span style="color: SeaGreen"></span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen"></span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen"><a href="http://www.elakiri.com/forum/showthread.php?t=1497593" target="_blank">පරිඝණකයෙන් විදුලි උපකරණ හසුරවමු 02.</a></span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen"></span></strong></span></p><p><span style="font-size: 15px"><a href="http://www.elakiri.com/forum/showthread.php?t=1497593" target="_blank">http://www.elakiri.com/forum/showthread.php?t=1497593</a><strong><span style="color: SeaGreen"></span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen"></span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen"></span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen"></span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen">අද මන් ඔයාලට කියල දෙන්න යන්නේ පරිඝණකයේ යතුරු පුවරුවේ යතුරු එබිම මගින් පරිඝණකයෙන් පිටතට සංඥා යවන්න පුළුවන් පරිගණක වැඩසටනක් නිර්මාණය කරන ආකාරයි .</span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen">මෙයට අපි පරිඝණක භාෂාවේදී හදුන්වන්නේ <span style="color: Blue">Key Binding</span> කියාය , ඒ කියන්නේ අපි යතුරු පුවරුවේ යම් යතුරක් එබූ විට එයට අනුරුප ක්රියාවක් සිදු කිරීමයි.මෙහිදී යතුරු පුවරුවේ සෑම යතුරකටම අදාළ කේතයක් (<span style="color: Blue">code</span> එකක්) තිබෙනවා ,මෙය පරිඝණක මෘදුකාංග නිර්මාණය කිරීමේදී අංකයක් ලෙස භාවිතා කරයි .</span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen">අප ප්රථමයෙන්ම එකී එකී යතුරට අදාළ කේතය සොයාගත යුතුය . මන් ඔබට එම අදාල කේතයන් සොයාගත හැකි ක්රමයක් දෙන්නම් .මෙම වෙබ් පිටුව මගින් ඔබට අවශ්ය සෑම යතුරකටම අදාළ කේතය ලබාගත හැක .</span></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: Blue"><a href="http://msdn.microsoft.com/en-us/library/0z084th3%28v=vs.80%29.aspx" target="_blank">http://msdn.microsoft.com/en-us/library/0z084th3(v=vs.80).aspx</a></span></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen">මෙම වැඩසටහනට අපි Key Code එක ලෙස යොදාගන්නේ එම යතුරට අදාළ ඉලක්කමයි .</span></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p> <span style="font-size: 15px"><strong><span style="color: SandyBrown">VbKeyA</span> (<span style="color: Red">65</span>) -----> A</strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen">මෙහිදී යතුරු පුවරුවේ</span> <span style="color: SandyBrown">A</span> <span style="color: SeaGreen">අකුරට අදාළ ඉලක්කම වන්නේ</span> <span style="color: Red">65</span> <span style="color: SeaGreen">යි .</span></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p> <span style="font-size: 15px"><strong><span style="color: SandyBrown">vbKeyUp</span> (<span style="color: Red">38</span>) -----> Up</strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen">මෙහිදී යතුරු පුවරුවේ</span> <span style="color: SandyBrown">Up Arrow Key</span> <span style="color: SeaGreen">එකට අදාළ ඉලක්කම වන්නේ</span> <span style="color: Red">38</span> <span style="color: SeaGreen">යි .</span></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen">හරි මන් හිතනවා Key Codes පිලිබදව ඔගොල්ලන් යම් දල අවබෝධයක් ලබා ගන්න ඇති කියා ,හරි අපි දැන් වැඩේට බහිමු .මෙහිදී මම මගේ වැඩසටහනට යොදා ගන්නේ යතුරු පුවරුවේ ඇති</span> <span style="color: Red">Arrow Keys</span> <span style="color: SeaGreen">හතරයි.</span></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen">ඒවායේ Key Codes මොනාද කියල අපි බලමු .</span></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SandyBrown">vbKeyLeft</span>(<span style="color: Red">37</span>) -----> Left</strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SandyBrown">vbKeyUp</span>(<span style="color: Red">38</span>) -----> Up</strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SandyBrown">vbKeyRight</span>(<span style="color: Red">39</span>) -----> Right</strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SandyBrown">vbKeyDown</span>(<span style="color: Red">40</span>) -----> Down</strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen">හරි අපි මුලින්ම Visual Studio open කරන් අලුත් Project එකක් Create කරගන්න ඕන .ඉන්පසු කලින් අපි වැඩසටහන් Code කරපු ආකාරයට කිරීමයි තිබෙන්නේ ,</span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen">වෙනසකට ඇත්තේ යතුරු පුවරුවේ යතුරක් එබෙන විට එය හදුනාගනීමට වෙනමම <span style="color: Blue">method</span> එකක් නිර්මාණය කිරීමයි .එම method එක මම පහතින් පල කරන්නම් ,</span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen"></span></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: Blue">Private Sub Key (ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown</span></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong>// Your Codes type here </strong></span></p><p><span style="font-size: 15px"><strong> </strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: Blue">End Sub</span></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen">මෙම method එක අපගේ වැඩසටහනේ paste කරගත් පසු Your Codes type here කියන ස්ථානයේ අපගේ වැඩසටහනට අදාළ codes ලිවීම පමණයි ඇත්තේ ,</span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen"></span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen">පහතින් දක්වා ඇත්තේ Key Binding යොදාගෙන නිර්මාණය කල ඉතා සරල පරිඝනක වැඩසටහනකි.</span></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: Blue">Private Sub KeyPressed(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown</span></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong> <span style="color: SandyBrown"> If e.KeyValue = 38 Then 'UpArrow Key </span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SandyBrown"></span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SandyBrown"> Out(Val("&h378"), 1)</span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SandyBrown"></span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SandyBrown"> ElseIf e.KeyValue = 37 Then 'LeftArrow Key</span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SandyBrown"></span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SandyBrown"> Out(Val("&h378"), 4)</span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SandyBrown"></span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SandyBrown"> ElseIf e.KeyValue = 39 Then 'RightArrow Key</span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SandyBrown"></span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SandyBrown"> Out(Val("&h378"), 8)</span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SandyBrown"></span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SandyBrown"> ElseIf e.KeyValue = 40 Then 'DownArrow Key</span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SandyBrown"></span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SandyBrown"> Out(Val("&h378"), 2)</span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SandyBrown"></span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SandyBrown"> End If</span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SandyBrown"></span></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong> <span style="color: Blue">End Sub</span></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: Blue">Private Sub KeyReleased(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyUp</span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: Blue"></span></strong></span></p><p><span style="font-size: 15px"><strong> <span style="color: SandyBrown"> Out(Val("&h378"), 0)</span></strong></span></p><p><span style="font-size: 15px"><strong> </strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: Blue">End Sub</span></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen">මෙම වැඩසටහනේ ක්රියාකාරිත්වය සැකෙවින් මෙසේය , අප UpArrow Key එක එබූ විට Pin අංක 02 හි විභවය ඉහල දමන අතර Key එක අතහැරිය විට එම Pin එකේ විභවය ශුන්ය වේ,</span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen">එලෙසම DownArrow Key එක එබූ විට Pin අංක 03 හිද ,LeftArrow Key එක එබූ විට Pin අංක 04 හිද RightArrow Key එක එබූ විට Pin අංක 05 හිද විභවය ඉහල දමන අතර එම අදාළ Key එක </span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen">අතහැරිය විට එම Pin වල විභවය ශුන්ය වේ.මෙහිදී එකවර එබිය හැක්කේ එක Key එකක් පමණි .</span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen"></span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen">පහතින් මෙම වැඩසටහන නිර්මාණය කිරීමේ වීඩියෝ එක .</span></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong><a href="http://www.youtube.com/watch?v=IwanfQo9Cds&feature=youtu.be" target="_blank">http://www.youtube.com/watch?v=IwanfQo9Cds&feature=youtu.be</a></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px">[YOUTUBE]<strong>IwanfQo9Cds</strong>[/YOUTUBE]<strong></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen">මෙහි</span> <span style="color: Blue">Module</span> <span style="color: SeaGreen">එකේ Code එක පහතින් .</span></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: Blue">Option Strict Off</span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: Blue"></span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: Blue">Option Explicit On</span></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: Blue">'Inp and Out declarations for port I/O using inpout32.dll.</span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: Blue"></span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: Blue">Public Declare Function Inp Lib "inpout32.dll" Alias "Inp32" (ByVal PortAddress As Integer) As Integer</span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: Blue"></span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: Blue">Public Declare Sub Out Lib "inpout32.dll" Alias "Out32" (ByVal PortAddress As Integer, ByVal Value As Integer)</span></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen">මෙම වැඩසටහන නිර්මාණය කර ,ඉහත Threads වලදී මන් ඔයාලට කියල දුන්න ආකාරයට LED Bulbs 4 ක් Pararrel Port එකේ අංක 2,3,4,5 යන Pin වලට සවිකර වැඩසටහන ධාවනය කර ඔබගේ යතුරු පුවරුවේ Arrow Keys Press කර බලන්න ,එලෙසම </span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen">යතුරු පුවරුවේ අනෙකුත් යතුරු වලටද අපට අවශ්ය ආකාරයට විදානයන් සැකසිය හැක අපට එයට අවශ්ය වන්නේ අදාළ Key එකෙහි අංකය පමණි.</span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen"></span></strong></span></p><p><span style="font-size: 15px"><strong><span style="color: SeaGreen">මන් හිතනවා ඔගොල්ලන්ට මන් මේ කියල දුන්න දේ තේරුම්ගන්න පුළුවන් වෙයි කියල ... එහෙනං මන් ඊලග Thread එකෙන් කියල දෙන්නම් මෙම වැඩසටහන උපයොගී කරගෙන RC වහනයක් හසුරුවන හැටි ... එහෙනං මන් ගිහින් එන්නම් .... කට්ටියටම මේක බැලුවට ස්තුතියි.</span></strong></span></p><p><span style="font-size: 15px"><strong></strong></span></p></blockquote><p></p>
[QUOTE="Hasistranger, post: 14962742, member: 314292"] [b]පරිඝණකයෙන් විදුලි උපකරණ හසුරවමු 03.[/b] [SIZE=4][B][COLOR=SeaGreen][B][COLOR=SeaGreen] [/COLOR][/B][URL="http://www.elakiri.com/forum/showthread.php?t=1493101"]පරිඝණකයෙන් විදුලි උපකරණ හසුරවමු 01.[/URL] [/COLOR][/B] [URL]http://www.elakiri.com/forum/showthread.php?t=1493101[/URL][B][COLOR=SeaGreen] [URL="http://www.elakiri.com/forum/showthread.php?t=1497593"]පරිඝණකයෙන් විදුලි උපකරණ හසුරවමු 02.[/URL] [/COLOR][/B] [URL]http://www.elakiri.com/forum/showthread.php?t=1497593[/URL][B][COLOR=SeaGreen] අද මන් ඔයාලට කියල දෙන්න යන්නේ පරිඝණකයේ යතුරු පුවරුවේ යතුරු එබිම මගින් පරිඝණකයෙන් පිටතට සංඥා යවන්න පුළුවන් පරිගණක වැඩසටනක් නිර්මාණය කරන ආකාරයි . මෙයට අපි පරිඝණක භාෂාවේදී හදුන්වන්නේ [COLOR=Blue]Key Binding[/COLOR] කියාය , ඒ කියන්නේ අපි යතුරු පුවරුවේ යම් යතුරක් එබූ විට එයට අනුරුප ක්රියාවක් සිදු කිරීමයි.මෙහිදී යතුරු පුවරුවේ සෑම යතුරකටම අදාළ කේතයක් ([COLOR=Blue]code[/COLOR] එකක්) තිබෙනවා ,මෙය පරිඝණක මෘදුකාංග නිර්මාණය කිරීමේදී අංකයක් ලෙස භාවිතා කරයි . අප ප්රථමයෙන්ම එකී එකී යතුරට අදාළ කේතය සොයාගත යුතුය . මන් ඔබට එම අදාල කේතයන් සොයාගත හැකි ක්රමයක් දෙන්නම් .මෙම වෙබ් පිටුව මගින් ඔබට අවශ්ය සෑම යතුරකටම අදාළ කේතය ලබාගත හැක .[/COLOR] [COLOR=Blue][URL]http://msdn.microsoft.com/en-us/library/0z084th3%28v=vs.80%29.aspx[/URL][/COLOR] [COLOR=SeaGreen]මෙම වැඩසටහනට අපි Key Code එක ලෙස යොදාගන්නේ එම යතුරට අදාළ ඉලක්කමයි .[/COLOR] [COLOR=SandyBrown]VbKeyA[/COLOR] ([COLOR=Red]65[/COLOR]) -----> A [COLOR=SeaGreen]මෙහිදී යතුරු පුවරුවේ[/COLOR] [COLOR=SandyBrown]A[/COLOR] [COLOR=SeaGreen]අකුරට අදාළ ඉලක්කම වන්නේ[/COLOR] [COLOR=Red]65[/COLOR] [COLOR=SeaGreen]යි .[/COLOR] [COLOR=SandyBrown]vbKeyUp[/COLOR] ([COLOR=Red]38[/COLOR]) -----> Up [COLOR=SeaGreen]මෙහිදී යතුරු පුවරුවේ[/COLOR] [COLOR=SandyBrown]Up Arrow Key[/COLOR] [COLOR=SeaGreen]එකට අදාළ ඉලක්කම වන්නේ[/COLOR] [COLOR=Red]38[/COLOR] [COLOR=SeaGreen]යි .[/COLOR] [COLOR=SeaGreen]හරි මන් හිතනවා Key Codes පිලිබදව ඔගොල්ලන් යම් දල අවබෝධයක් ලබා ගන්න ඇති කියා ,හරි අපි දැන් වැඩේට බහිමු .මෙහිදී මම මගේ වැඩසටහනට යොදා ගන්නේ යතුරු පුවරුවේ ඇති[/COLOR] [COLOR=Red]Arrow Keys[/COLOR] [COLOR=SeaGreen]හතරයි.[/COLOR] [COLOR=SeaGreen]ඒවායේ Key Codes මොනාද කියල අපි බලමු .[/COLOR] [COLOR=SandyBrown]vbKeyLeft[/COLOR]([COLOR=Red]37[/COLOR]) -----> Left [COLOR=SandyBrown]vbKeyUp[/COLOR]([COLOR=Red]38[/COLOR]) -----> Up [COLOR=SandyBrown]vbKeyRight[/COLOR]([COLOR=Red]39[/COLOR]) -----> Right [COLOR=SandyBrown]vbKeyDown[/COLOR]([COLOR=Red]40[/COLOR]) -----> Down [COLOR=SeaGreen]හරි අපි මුලින්ම Visual Studio open කරන් අලුත් Project එකක් Create කරගන්න ඕන .ඉන්පසු කලින් අපි වැඩසටහන් Code කරපු ආකාරයට කිරීමයි තිබෙන්නේ , වෙනසකට ඇත්තේ යතුරු පුවරුවේ යතුරක් එබෙන විට එය හදුනාගනීමට වෙනමම [COLOR=Blue]method[/COLOR] එකක් නිර්මාණය කිරීමයි .එම method එක මම පහතින් පල කරන්නම් , [/COLOR] [COLOR=Blue]Private Sub Key (ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown[/COLOR] // Your Codes type here [COLOR=Blue]End Sub[/COLOR] [COLOR=SeaGreen]මෙම method එක අපගේ වැඩසටහනේ paste කරගත් පසු Your Codes type here කියන ස්ථානයේ අපගේ වැඩසටහනට අදාළ codes ලිවීම පමණයි ඇත්තේ , පහතින් දක්වා ඇත්තේ Key Binding යොදාගෙන නිර්මාණය කල ඉතා සරල පරිඝනක වැඩසටහනකි.[/COLOR] [COLOR=Blue]Private Sub KeyPressed(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown[/COLOR] [COLOR=SandyBrown] If e.KeyValue = 38 Then 'UpArrow Key Out(Val("&h378"), 1) ElseIf e.KeyValue = 37 Then 'LeftArrow Key Out(Val("&h378"), 4) ElseIf e.KeyValue = 39 Then 'RightArrow Key Out(Val("&h378"), 8) ElseIf e.KeyValue = 40 Then 'DownArrow Key Out(Val("&h378"), 2) End If [/COLOR] [COLOR=Blue]End Sub[/COLOR] [COLOR=Blue]Private Sub KeyReleased(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyUp [/COLOR] [COLOR=SandyBrown] Out(Val("&h378"), 0)[/COLOR] [COLOR=Blue]End Sub[/COLOR] [COLOR=SeaGreen]මෙම වැඩසටහනේ ක්රියාකාරිත්වය සැකෙවින් මෙසේය , අප UpArrow Key එක එබූ විට Pin අංක 02 හි විභවය ඉහල දමන අතර Key එක අතහැරිය විට එම Pin එකේ විභවය ශුන්ය වේ, එලෙසම DownArrow Key එක එබූ විට Pin අංක 03 හිද ,LeftArrow Key එක එබූ විට Pin අංක 04 හිද RightArrow Key එක එබූ විට Pin අංක 05 හිද විභවය ඉහල දමන අතර එම අදාළ Key එක අතහැරිය විට එම Pin වල විභවය ශුන්ය වේ.මෙහිදී එකවර එබිය හැක්කේ එක Key එකක් පමණි . පහතින් මෙම වැඩසටහන නිර්මාණය කිරීමේ වීඩියෝ එක .[/COLOR] [URL]http://www.youtube.com/watch?v=IwanfQo9Cds&feature=youtu.be[/URL] [/B] [YOUTUBE][B]IwanfQo9Cds[/B][/YOUTUBE][B] [COLOR=SeaGreen]මෙහි[/COLOR] [COLOR=Blue]Module[/COLOR] [COLOR=SeaGreen]එකේ Code එක පහතින් .[/COLOR] [COLOR=Blue]Option Strict Off Option Explicit On[/COLOR] [COLOR=Blue]'Inp and Out declarations for port I/O using inpout32.dll. Public Declare Function Inp Lib "inpout32.dll" Alias "Inp32" (ByVal PortAddress As Integer) As Integer Public Declare Sub Out Lib "inpout32.dll" Alias "Out32" (ByVal PortAddress As Integer, ByVal Value As Integer)[/COLOR] [COLOR=SeaGreen]මෙම වැඩසටහන නිර්මාණය කර ,ඉහත Threads වලදී මන් ඔයාලට කියල දුන්න ආකාරයට LED Bulbs 4 ක් Pararrel Port එකේ අංක 2,3,4,5 යන Pin වලට සවිකර වැඩසටහන ධාවනය කර ඔබගේ යතුරු පුවරුවේ Arrow Keys Press කර බලන්න ,එලෙසම යතුරු පුවරුවේ අනෙකුත් යතුරු වලටද අපට අවශ්ය ආකාරයට විදානයන් සැකසිය හැක අපට එයට අවශ්ය වන්නේ අදාළ Key එකෙහි අංකය පමණි. මන් හිතනවා ඔගොල්ලන්ට මන් මේ කියල දුන්න දේ තේරුම්ගන්න පුළුවන් වෙයි කියල ... එහෙනං මන් ඊලග Thread එකෙන් කියල දෙන්නම් මෙම වැඩසටහන උපයොගී කරගෙන RC වහනයක් හසුරුවන හැටි ... එහෙනං මන් ගිහින් එන්නම් .... කට්ටියටම මේක බැලුවට ස්තුතියි.[/COLOR] [/B][/SIZE] [/QUOTE]
Insert quotes…
Verification
Haya warak paha keeyada? (haya wadi kireema paha)
Post reply
Top
Bottom