<?xml version="1.0" encoding="utf-8"?>
				<!-- generator="e107" -->
				<!-- content type="Forum / topic" -->
				<rss  version="2.0">
				<channel>
				<title>8051 Microcontroller Projects AVR PIC Projects Tutorials Ebooks Libraries codes : Forum / topic</title>
				<link>http://www.8051projects.net/</link>
				<description>Learn to make simple microcontroller projects, pic, 8051, avr and arm projects. download 8051 projects, tutorials, libraries, sample codes. join the microcontroller discussion forum and ask doubts regarding electronics. the best source for 8051 over internet.</description>

<language>en-gb</language>
				<copyright>2008 Rickey's World</copyright>
				<managingEditor>contact@nospam.com (Ajay Bhargav)</managingEditor>
				<webMaster>contact@nospam.com (Ajay Bhargav)</webMaster>
				<pubDate>Wed, 07 Jan 2009 16:54:24 -0800</pubDate>
				<lastBuildDate>Wed, 07 Jan 2009 16:54:24 -0800</lastBuildDate>
				<docs>http://backend.userland.com/rss</docs>
				<generator>e107 (http://e107.org)</generator>
				<ttl>60</ttl>
				<textInput>
				<title>Search</title>
				<description>Search 8051 Microcontroller Projects AVR PIC Projects Tutorials Ebooks Libraries codes</description>
				<name>query</name>
				<link>http://www.8051projects.net/search.php</link>
				</textInput>
						<item>
						<title>VISUAL BASIC 8051-> FORMS HELP NEEDED</title>
<link>http://www.8051projects.net/forum-t9488.html</link>
<description><![CDATA[i have interfaced a microcontoller 8051 with visual basic 2008.the serial communication is working correctly<br />i wanted to know that during runtime can the form update itself according to the data send by the nicrocontroller.<br />let me give an example to explain my problem<br /><br />i send a 3 from the microcontroller then VB shud display "connection established"<br />in the same form when i send 4 from the microcontroller then VB shud display "danger occurred".<br />the above part shud occur at runtime continuosly as the 8051 keeps monitoring external events and sends it to PC.<br />this problem can be elaborated as<br /><br />  Dim a As Integer<br />        Dim b As Integer<br />        Label1.Text = a + b<br />        Label1.Text = a - b<br /><br />i want during runtime first a+b shud be displayed<br />then after sometime a-b shud be displayed in the same form]]></description>
<pubDate>Mon, 12 May 2008 05:32:41 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t9488.html</guid>
</item>
						<item>
						<title>Re: VISUAL BASIC 8051-> FORMS HELP NEEDED</title>
<link>http://www.8051projects.net/forum-t9488.html</link>
<description><![CDATA[I am writing a small code with a button and a lable.<br />so whenever button is clicked label will change<br /><br /><div class='code_box'>CODE:</div><div class='code_highlight' style='unicode-bidi: embed; direction: ltr'><div class="vb" style="font-family: monospace;"><span style="color: #b1b100;">Dim</span> a <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Boolean</span><br /><span style="color: #b1b100;">Private</span> <span style="color: #b1b100;">Sub</span> Command1_Click<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br /><span style="color: #b1b100;">If</span> a <span style="color: #b1b100;">Then</span><br />&nbsp; &nbsp; Label1.<span style="color: #66cc66;">Caption</span> = <span style="color: #ff0000;">&quot;Click to change&quot;</span><br />&nbsp; &nbsp; a = <span style="color: #b1b100;">False</span><br /><span style="color: #b1b100;">Else</span><br />&nbsp; &nbsp; Label1.<span style="color: #66cc66;">Caption</span> = <span style="color: #ff0000;">&quot;Text changed!&quot;</span><br />&nbsp; &nbsp; a = <span style="color: #b1b100;">True</span><br /><span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span><br /><span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Sub</span><br /><br /><span style="color: #b1b100;">Private</span> <span style="color: #b1b100;">Sub</span> Form_Load<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />a = <span style="color: #b1b100;">False</span><br />Label1.<span style="color: #66cc66;">Caption</span> = <span style="color: #ff0000;">&quot;Click button to change text&quot;</span><br /><span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Sub</span><br />&nbsp;</div></div><br /><br />You need to change caption of label not text <img src='http://www.8051projects.net/e107_images/emotes/yahoo/1.gif' alt='' style='vertical-align:middle; border:0' />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Mon, 12 May 2008 17:15:26 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t9488.html</guid>
</item>
						<item>
						<title>Re: VISUAL BASIC 8051-> FORMS HELP NEEDED</title>
<link>http://www.8051projects.net/forum-t9488.html</link>
<description><![CDATA[sorry moderator by mistake two threads have opened. plz delete one of them.<br /><a class='bbcode' href='http://www.8051projects.net/forum-t9489.html  ' rel='external'  target='_blank'>http://www.8051projects.net/forum-t9489.html  </a>   delete this]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Mon, 12 May 2008 05:34:32 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t9488.html</guid>
</item>
						<item>
						<title>Re: VISUAL BASIC 8051-> FORMS HELP NEEDED</title>
<link>http://www.8051projects.net/forum-t9488.html</link>
<description><![CDATA[but the main problem is the microcntroller will send data based on external events and so i want the  caption to change automatically based on what the microcontroller state.the vb code is continuously communicating with the microcontroller.so when it caotures data say a 3 it shud display  "connection established" within the caption.<br />when it captures data 4 from the microcontroller it shud display    "danger occurred".<br />the  display within the label shud continuosly change based on micrcontroller input<br />and all the above display changes shud occur within the same form and same label.<br />is it possible in visual basic????]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Mon, 12 May 2008 17:55:44 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t9488.html</guid>
</item>
						<item>
						<title>Re: VISUAL BASIC 8051-> FORMS HELP NEEDED</title>
<link>http://www.8051projects.net/forum-t9488.html</link>
<description><![CDATA[whenever event occurs simply change the caption of lable using<br /><div class='code_box'>CODE:</div><div class='code_highlight' style='unicode-bidi: embed; direction: ltr'><div class="vb" style="font-family: monospace;">label.<span style="color: #66cc66;">caption</span> = <span style="color: #ff0000;">&quot;text to display&quot;</span><br />&nbsp;</div></div><br />within that event loop or condition]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Mon, 12 May 2008 18:14:31 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t9488.html</guid>
</item>
						<item>
						<title>Re: VISUAL BASIC 8051-> FORMS HELP NEEDED</title>
<link>http://www.8051projects.net/forum-t9488.html</link>
<description><![CDATA[actually my code is working fine in single step i can recieve and send with the microcontroller but the problem is  when i run the .exe the current event is not being taken into account and the  vb does not display the text correspnding to the event.<br />here is my vb.net code <br /><br /><div class='code_box'>CODE:</div><div class='code_highlight' style='unicode-bidi: embed; direction: ltr'><div class="vb" style="font-family: monospace;"><span style="color: #b1b100;">Public</span> Class Form1<br />&nbsp; &nbsp; <span style="color: #b1b100;">Const</span> check <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span> = <span style="color: #cc66cc;">1</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">Const</span> ack <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span> = <span style="color: #cc66cc;">2</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">Const</span> danger <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span> = <span style="color: #cc66cc;">3</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">Const</span> tout <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span> = <span style="color: #cc66cc;">4</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">Const</span> incr <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span> = <span style="color: #cc66cc;">5</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">Const</span> reset1 <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span> = <span style="color: #cc66cc;">6</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">Const</span> endack <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span> = <span style="color: #cc66cc;">7</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">Const</span> sendadd <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span> = <span style="color: #cc66cc;">8</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">Const</span> taskcomp <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span> = <span style="color: #cc66cc;">9</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">Const</span> ready <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span> = <span style="color: #cc66cc;">10</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">Const</span> invalid <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span> = <span style="color: #cc66cc;">11</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> rst <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> i <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> data1 <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">String</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> status<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> dng_address <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">String</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> <span style="color: #b1b100;">instr</span> <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> toutaddr <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> endacko <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> readyinp <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> temp <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">Private</span> <span style="color: #b1b100;">Sub</span> MONITOR_Click<span style="color: #66cc66;">&#40;</span>ByVal sender <span style="color: #b1b100;">As</span> System.<span style="color: #66cc66;">Object</span>, ByVal e <span style="color: #b1b100;">As</span> System.<span style="color: #66cc66;">EventArgs</span><span style="color: #66cc66;">&#41;</span> Handles MONITOR.<span style="color: #66cc66;">Click</span><br />&nbsp; &nbsp; &nbsp; &nbsp; Label2.<span style="color: #66cc66;">Text</span> = <span style="color: #ff0000;">&quot;SYSTEM IS MONITORING&quot;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.<span style="color: #66cc66;">InBufferCount</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">0</span> <span style="color: #808080;">'CLEAR THE BUFFERS</span><br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.<span style="color: #66cc66;">OutBufferCount</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.<span style="color: #66cc66;">Settings</span> = <span style="color: #ff0000;">&quot;9600,n,8,1&quot;</span> <span style="color: #808080;">' SEND SETTINGS TO PORT</span><br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.<span style="color: #66cc66;">PortOpen</span> = <span style="color: #b1b100;">True</span> <span style="color: #808080;">' MAKE THE PORT OPEN</span><br />back: AxMSComm1.<span style="color: #66cc66;">Output</span> = ready &amp; <span style="color: #b1b100;">Chr</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">13</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080;">'SEND READY COMMAND TO MICROCONTROLLER</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">While</span> <span style="color: #66cc66;">&#40;</span>AxMSComm1.<span style="color: #66cc66;">InBufferCount</span> = <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080;">'WAIT FOR READY COMMAND FROM MICROCONTROLLER</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">While</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> temp2 <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">String</span><br />&nbsp; &nbsp; &nbsp; &nbsp; temp2 = AxMSComm1.<span style="color: #b1b100;">Input</span> <span style="color: #808080;">'ASSIGN TEMP2 AS INPUT RECEIVED FROM MIC</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080;">' if there is input from 8051</span><br />&nbsp; &nbsp; &nbsp; &nbsp; PictureBox5.<span style="color: #66cc66;">Image</span> = System.<span style="color: #66cc66;">Drawing</span>.<span style="color: #66cc66;">Image</span>.<span style="color: #66cc66;">FromFile</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;c:\4.jpg&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080;">'DISPLAY IMAGE OF NOKIA CONNECTION ESTABLISHED</span><br />&nbsp; &nbsp; &nbsp; &nbsp; Label4.<span style="color: #66cc66;">Text</span> = <span style="color: #ff0000;">&quot;CONNECTION ESTABLISHED&quot;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; Label2.<span style="color: #66cc66;">Enabled</span> = <span style="color: #b1b100;">False</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">GoTo</span> checkinput <span style="color: #808080;">' JUMP TO CHECKINPUT IF RECEIVED FROM MIC</span><br /><br />checkinput:<br />&nbsp; &nbsp; &nbsp; &nbsp; Label2.<span style="color: #66cc66;">Text</span> = <span style="color: #ff0000;">&quot;SYSTEM IS CHECKING THE INPUT&quot;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">If</span> <span style="color: #66cc66;">&#40;</span>rst = <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">Then</span> <span style="color: #808080;">'IF RESET BUTTON IS PRESSED CALL RESET SUBROUTINE</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Call</span> <span style="color: #b1b100;">reset</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.<span style="color: #66cc66;">InBufferCount</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.<span style="color: #66cc66;">Output</span> = check &amp; <span style="color: #b1b100;">Chr</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">13</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080;">'SEND CHECK COMMAND TO MIC</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">While</span> <span style="color: #66cc66;">&#40;</span>AxMSComm1.<span style="color: #66cc66;">InBufferCount</span> = <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080;">'WAIT TILL MIC REPLIES</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">While</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; data1 = AxMSComm1.<span style="color: #b1b100;">Input</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Select <span style="color: #b1b100;">Case</span> data1 <span style="color: #808080;">' COMPARE THE DATA ONE RECEIVED WITH ALL POSSIBLE PARAMETERS</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Case</span> endack<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">GoTo</span> endacknowledge<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Case</span> danger<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">GoTo</span> danger_tree<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Case</span> tout<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">GoTo</span> tout_tree<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">End</span> Select<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span><br />&nbsp; &nbsp; &nbsp; &nbsp; Label2.<span style="color: #66cc66;">Enabled</span> = <span style="color: #b1b100;">False</span><br /><br />endacknowledge: Label2.<span style="color: #66cc66;">Text</span> = <span style="color: #ff0000;">&quot;END ACKNOWLEDGE SIGNAL RECEIVED&quot;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">GoTo</span> checkinput <span style="color: #808080;">'AGAIN CHECK FOR THE INPUT FROM MIC</span><br /><br />danger_tree: Label2.<span style="color: #66cc66;">Text</span> = <span style="color: #ff0000;">&quot;SOME DANGER OCCURED&quot;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; PictureBox6.<span style="color: #66cc66;">Image</span> = System.<span style="color: #66cc66;">Drawing</span>.<span style="color: #66cc66;">Image</span>.<span style="color: #66cc66;">FromFile</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;c:\3.jpg&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080;">'DISPLAY DANGER IMAGE IN PIC BOX 6 IF DANGER COMMAND IS RECEIVED</span><br />&nbsp; &nbsp; &nbsp; &nbsp; My.<span style="color: #66cc66;">Computer</span>.<span style="color: #66cc66;">Audio</span>.<span style="color: #66cc66;">Play</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;C:\fire alarm.wav&quot;</span>, AudioPlayMode.<span style="color: #66cc66;">WaitToComplete</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080;">'PLAY DANGER SIREN</span><br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.<span style="color: #66cc66;">InBufferCount</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.<span style="color: #66cc66;">OutBufferCount</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.<span style="color: #66cc66;">Output</span> = sendadd &amp; <span style="color: #b1b100;">Chr</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">13</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080;">'SEND ADDRESS command TO MIC</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">While</span> <span style="color: #66cc66;">&#40;</span>AxMSComm1.<span style="color: #66cc66;">InBufferCount</span> = <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080;">' WAIT FOR THE ADDRESS TO COME IN BUFFER</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">While</span><br />&nbsp; &nbsp; &nbsp; &nbsp; dng_address = AxMSComm1.<span style="color: #b1b100;">Input</span> <span style="color: #808080;">'ASSIGN ADDRESS TO DNG_ADDRESS</span><br />&nbsp; &nbsp; &nbsp; &nbsp; Select <span style="color: #b1b100;">Case</span> dng_address <span style="color: #808080;">'COMPARE THE ADRESS RECEIVED WITH 1,2,3,4...... AND SHOW DANGER IN CORRESPONG PICBOX</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Case</span> <span style="color: #cc66cc;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PictureBox1.<span style="color: #66cc66;">Image</span> = System.<span style="color: #66cc66;">Drawing</span>.<span style="color: #66cc66;">Image</span>.<span style="color: #66cc66;">FromFile</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;c:\1.jpg&quot;</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">1</span> <span style="color: #808080;">'IF DANGER IS IN TREE 1 MARK THE ARRAY LOCATION 1 AS AFFECTED</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Case</span> <span style="color: #cc66cc;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PictureBox2.<span style="color: #66cc66;">Image</span> = System.<span style="color: #66cc66;">Drawing</span>.<span style="color: #66cc66;">Image</span>.<span style="color: #66cc66;">FromFile</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;c:\1.jpg&quot;</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Case</span> <span style="color: #cc66cc;">3</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PictureBox3.<span style="color: #66cc66;">Image</span> = System.<span style="color: #66cc66;">Drawing</span>.<span style="color: #66cc66;">Image</span>.<span style="color: #66cc66;">FromFile</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;c:\1.jpg&quot;</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Case</span> <span style="color: #cc66cc;">4</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PictureBox4.<span style="color: #66cc66;">Image</span> = System.<span style="color: #66cc66;">Drawing</span>.<span style="color: #66cc66;">Image</span>.<span style="color: #66cc66;">FromFile</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;c:\1.jpg&quot;</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Case</span> <span style="color: #cc66cc;">5</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PictureBox5.<span style="color: #66cc66;">Image</span> = System.<span style="color: #66cc66;">Drawing</span>.<span style="color: #66cc66;">Image</span>.<span style="color: #66cc66;">FromFile</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;c:\1.jpg&quot;</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">End</span> Select<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">For</span> <span style="color: #b1b100;">Me</span>.<span style="color: #66cc66;">i</span> = <span style="color: #cc66cc;">1</span> <span style="color: #b1b100;">To</span> <span style="color: #cc66cc;">5</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">If</span> status<span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">1</span> <span style="color: #b1b100;">Then</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.<span style="color: #66cc66;">Output</span> = incr &amp; <span style="color: #b1b100;">Chr</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">13</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080;">'IF DANGER OCCURS IN ANY CASE THAN SEND INCREMENT COMMAND TO MIC</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; temp = i<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Next</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">While</span> <span style="color: #66cc66;">&#40;</span>AxMSComm1.<span style="color: #66cc66;">InBufferCount</span> = <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080;">'WAIT UNTIL SENDADDRESS COMMAND COMES FROM MIC</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">While</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> temp3 <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">String</span><br />&nbsp; &nbsp; &nbsp; &nbsp; temp3 = AxMSComm1.<span style="color: #b1b100;">Input</span><br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.<span style="color: #66cc66;">Output</span> = <span style="color: #66cc66;">&#40;</span>temp - <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> &amp; <span style="color: #b1b100;">Chr</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">13</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080;">'VB SENDS ADDR-1 TO MIC TO INCR</span><br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.<span style="color: #66cc66;">OutBufferCount</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">While</span> <span style="color: #66cc66;">&#40;</span>AxMSComm1.<span style="color: #66cc66;">InBufferCount</span> = <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080;">' WAIT TILL TASK COMPLETE COMMAND IS RECEIVED</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">While</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> temp4 <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">String</span><br />&nbsp; &nbsp; &nbsp; &nbsp; temp4 = AxMSComm1.<span style="color: #b1b100;">Input</span><br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.<span style="color: #66cc66;">InBufferCount</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; Label2.<span style="color: #66cc66;">Enabled</span> = <span style="color: #b1b100;">False</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">GoTo</span> checkinput <span style="color: #808080;">'AGAIN CHECK FOR INPUT</span><br />tout_tree: Label2.<span style="color: #66cc66;">Text</span> = <span style="color: #ff0000;">&quot;TIMEOUT OCCURED&quot;</span> <span style="color: #808080;">' TIMEOUT IS THE CASE WHEN THERE IS PROBLEM IN BATTERY ETC</span><br />&nbsp; &nbsp; &nbsp; &nbsp; My.<span style="color: #66cc66;">Computer</span>.<span style="color: #66cc66;">Audio</span>.<span style="color: #66cc66;">Play</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;C:\fire alarm.wav&quot;</span>, AudioPlayMode.<span style="color: #66cc66;">WaitToComplete</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080;">'PLAY DANGER SIREN</span><br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.<span style="color: #66cc66;">Output</span> = sendadd &amp; <span style="color: #b1b100;">Chr</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">13</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080;">'VB WANTS ADDRESS OF TIMEOUT LOCATION</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">While</span> <span style="color: #66cc66;">&#40;</span>AxMSComm1.<span style="color: #66cc66;">InBufferCount</span> = <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080;">'WAIT TILL ADDRESS OF TIMEOUT LOCATION IS RECEIVED</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">While</span><br />&nbsp; &nbsp; &nbsp; &nbsp; toutaddr = AxMSComm1.<span style="color: #b1b100;">Input</span><br />&nbsp; &nbsp; &nbsp; &nbsp; PictureBox6.<span style="color: #66cc66;">Image</span> = System.<span style="color: #66cc66;">Drawing</span>.<span style="color: #66cc66;">Image</span>.<span style="color: #66cc66;">FromFile</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;c:\3.jpg&quot;</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; Select <span style="color: #b1b100;">Case</span> toutaddr <span style="color: #808080;">'COMPARE THE ADRESS RECEIVED WITH 1,2,3,4...... AND SHOW TIMEOUT IN CORRESPONG PICBOX</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Case</span> <span style="color: #cc66cc;">1</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PictureBox1.<span style="color: #66cc66;">Image</span> = System.<span style="color: #66cc66;">Drawing</span>.<span style="color: #66cc66;">Image</span>.<span style="color: #66cc66;">FromFile</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;c:\5.jpg&quot;</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Case</span> <span style="color: #cc66cc;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PictureBox2.<span style="color: #66cc66;">Image</span> = System.<span style="color: #66cc66;">Drawing</span>.<span style="color: #66cc66;">Image</span>.<span style="color: #66cc66;">FromFile</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;c:\5.jpg&quot;</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Case</span> <span style="color: #cc66cc;">3</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PictureBox3.<span style="color: #66cc66;">Image</span> = System.<span style="color: #66cc66;">Drawing</span>.<span style="color: #66cc66;">Image</span>.<span style="color: #66cc66;">FromFile</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;c:\5.jpg&quot;</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Case</span> <span style="color: #cc66cc;">4</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PictureBox4.<span style="color: #66cc66;">Image</span> = System.<span style="color: #66cc66;">Drawing</span>.<span style="color: #66cc66;">Image</span>.<span style="color: #66cc66;">FromFile</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;c:\5.jpg&quot;</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Case</span> <span style="color: #cc66cc;">5</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PictureBox5.<span style="color: #66cc66;">Image</span> = System.<span style="color: #66cc66;">Drawing</span>.<span style="color: #66cc66;">Image</span>.<span style="color: #66cc66;">FromFile</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;c:\5.jpg&quot;</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">5</span><span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">2</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">End</span> Select<br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">For</span> <span style="color: #b1b100;">Me</span>.<span style="color: #66cc66;">i</span> = <span style="color: #cc66cc;">1</span> <span style="color: #b1b100;">To</span> <span style="color: #cc66cc;">5</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">If</span> status<span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">2</span> <span style="color: #b1b100;">Then</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.<span style="color: #66cc66;">Output</span> = incr &amp; <span style="color: #b1b100;">Chr</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">13</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080;">'SEND INCREMENT COMMAND TO MIC</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.<span style="color: #66cc66;">OutBufferCount</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; temp = i<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Else</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Next</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">While</span> <span style="color: #66cc66;">&#40;</span>AxMSComm1.<span style="color: #66cc66;">InBufferCount</span> = <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080;">'Mic WANTS ADDR OF WHICH LOCATION TO INCREMENT</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">While</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> temp5 <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">String</span><br />&nbsp; &nbsp; &nbsp; &nbsp; temp5 = AxMSComm1.<span style="color: #b1b100;">Input</span><br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.<span style="color: #66cc66;">Output</span> = <span style="color: #66cc66;">&#40;</span>temp - <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> &amp; <span style="color: #b1b100;">Chr</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">13</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080;">'VB SENDS ADDR-1 TO MIC</span><br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.<span style="color: #66cc66;">OutBufferCount</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">While</span> <span style="color: #66cc66;">&#40;</span>AxMSComm1.<span style="color: #66cc66;">InBufferCount</span> = <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080;">'WAIT TILL TASK COMPLETE CODE IS RECEIVED</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">While</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> temp6 <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">String</span><br />&nbsp; &nbsp; &nbsp; &nbsp; temp6 = AxMSComm1.<span style="color: #b1b100;">Input</span><br />&nbsp; &nbsp; &nbsp; &nbsp; Label2.<span style="color: #66cc66;">Enabled</span> = <span style="color: #b1b100;">False</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">GoTo</span> checkinput<br />&nbsp; &nbsp; <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Sub</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">Private</span> <span style="color: #b1b100;">Sub</span> RESET2_Click<span style="color: #66cc66;">&#40;</span>ByVal sender <span style="color: #b1b100;">As</span> System.<span style="color: #66cc66;">Object</span>, ByVal e <span style="color: #b1b100;">As</span> System.<span style="color: #66cc66;">EventArgs</span><span style="color: #66cc66;">&#41;</span> Handles RESET2.<span style="color: #66cc66;">Click</span><br />&nbsp; &nbsp; &nbsp; &nbsp; rst = <span style="color: #cc66cc;">1</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Sub</span><br /><br />&nbsp; &nbsp; <span style="color: #b1b100;">Function</span> <span style="color: #b1b100;">reset</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Single</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> TEMP_RESET <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span><br />&nbsp; &nbsp; &nbsp; &nbsp; Label2.<span style="color: #66cc66;">Text</span> = <span style="color: #ff0000;">&quot;RESETTING THE NETWORK PLZ WAIT&quot;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; rst = <span style="color: #cc66cc;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">For</span> <span style="color: #b1b100;">Me</span>.<span style="color: #66cc66;">i</span> = <span style="color: #cc66cc;">1</span> <span style="color: #b1b100;">To</span> <span style="color: #cc66cc;">5</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">If</span> status<span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">1</span> <span style="color: #b1b100;">Or</span> status<span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">2</span> <span style="color: #b1b100;">Then</span> <span style="color: #808080;">'IF TIMEOUT OR DANGER HAS OCCURED</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.<span style="color: #66cc66;">Output</span> = reset1 <span style="color: #808080;">'SENDS RST COMMAND TO MIC</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.<span style="color: #66cc66;">OutBufferCount</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TEMP_RESET = i<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status<span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">&#41;</span> = <span style="color: #cc66cc;">0</span><br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">If</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Next</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">While</span> <span style="color: #66cc66;">&#40;</span>AxMSComm1.<span style="color: #66cc66;">InBufferCount</span> = <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080;">'Mic WANTS ADDR OF WHICH LOCATION TO RESET</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">While</span><br />&nbsp; &nbsp; &nbsp; &nbsp; Dim&#<span style="color: #cc66cc;">31889</span>;TEMP4 <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span><br />&nbsp; &nbsp; &nbsp; &nbsp; TEMP4 = AxMSComm1.<span style="color: #b1b100;">Input</span><br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.<span style="color: #66cc66;">Output</span> = TEMP_RESET - <span style="color: #cc66cc;">1</span> <span style="color: #808080;">'VB SENDS ADDR-1 TO MIC</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">While</span> <span style="color: #66cc66;">&#40;</span>AxMSComm1.<span style="color: #66cc66;">InBufferCount</span> = <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080;">'WAIT TILL TASC COMPLETE CODE IS RECEIVED BY VB</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">While</span><br />&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">Dim</span> TEMP5 <span style="color: #b1b100;">As</span> <span style="color: #b1b100;">Integer</span><br />&nbsp; &nbsp; &nbsp; &nbsp; TEMP5 = AxMSComm1.<span style="color: #b1b100;">Input</span><br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; PictureBox1.<span style="color: #66cc66;">Image</span> = System.<span style="color: #66cc66;">Drawing</span>.<span style="color: #66cc66;">Image</span>.<span style="color: #66cc66;">FromFile</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;c:\2.jpg&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #808080;">' CHANGE THE PICTURES AS DEFAULT</span><br />&nbsp; &nbsp; &nbsp; &nbsp; PictureBox2.<span style="color: #66cc66;">Image</span> = System.<span style="color: #66cc66;">Drawing</span>.<span style="color: #66cc66;">Image</span>.<span style="color: #66cc66;">FromFile</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;c:\2.jpg&quot;</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; PictureBox3.<span style="color: #66cc66;">Image</span> = System.<span style="color: #66cc66;">Drawing</span>.<span style="color: #66cc66;">Image</span>.<span style="color: #66cc66;">FromFile</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;c:\2.jpg&quot;</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; PictureBox4.<span style="color: #66cc66;">Image</span> = System.<span style="color: #66cc66;">Drawing</span>.<span style="color: #66cc66;">Image</span>.<span style="color: #66cc66;">FromFile</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;c:\2.jpg&quot;</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; PictureBox5.<span style="color: #66cc66;">Image</span> = System.<span style="color: #66cc66;">Drawing</span>.<span style="color: #66cc66;">Image</span>.<span style="color: #66cc66;">FromFile</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;c:\2.jpg&quot;</span><span style="color: #66cc66;">&#41;</span><br />&nbsp; &nbsp; &nbsp; &nbsp; Label2.<span style="color: #66cc66;">Enabled</span> = <span style="color: #b1b100;">False</span><br />&nbsp; &nbsp; <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Function</span><br /><br />&nbsp; &nbsp; <span style="color: #b1b100;">Private</span> <span style="color: #b1b100;">Sub</span> Timer1_Tick<span style="color: #66cc66;">&#40;</span>ByVal sender <span style="color: #b1b100;">As</span> System.<span style="color: #66cc66;">Object</span>, ByVal e <span style="color: #b1b100;">As</span> System.<span style="color: #66cc66;">EventArgs</span><span style="color: #66cc66;">&#41;</span> Handles Timer1.<span style="color: #66cc66;">Tick</span><br />&nbsp; &nbsp; &nbsp; &nbsp; Label3.<span style="color: #66cc66;">Text</span> = TimeString<br />&nbsp; &nbsp; <span style="color: #b1b100;">End</span> <span style="color: #b1b100;">Sub</span><br /><span style="color: #b1b100;">End</span> Class<br />&nbsp;</div></div><br /><br />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Tue, 13 May 2008 17:04:46 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t9488.html</guid>
</item>
						<item>
						<title>Re: VISUAL BASIC 8051-> FORMS HELP NEEDED</title>
<link>http://www.8051projects.net/forum-t9488.html</link>
<description><![CDATA[try cleaning the o/p files and re-build the whole project again. coz if the logic is working in step execution then it must work in final exe.]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Wed, 14 May 2008 14:31:54 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t9488.html</guid>
</item>
						<item>
						<title>Re: VISUAL BASIC 8051-> FORMS HELP NEEDED</title>
<link>http://www.8051projects.net/forum-t9488.html</link>
<description><![CDATA[my only problem is the <strong class='bbcode bold'>label12.text</strong> does not changes during run-time according to the events.thus when  a particular event occurs say danger it shud display "some danger occurred" in label12.text.<br />i am using vb.net so label12.text is same as label12.caption in VB6<br />so basically i want the text to change according to the event received and this shud happen continuously<br /> <br /><br />]]></description>
<author>contact@nospam.com (Ajay Bhargav)</author>
<pubDate>Tue, 13 May 2008 17:09:02 -0700</pubDate>
<guid isPermaLink="true">http://www.8051projects.net/forum-t9488.html</guid>
</item>
				</channel>
				</rss>