<?xml version="1.0" encoding="utf-8" ?>
				<!-- generator="e107" -->
				<!-- content type="Forum / topic" -->
				<rdf:RDF xmlns="http://purl.org/rss/1.0/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
				<channel rdf:about="http://www.8051projects.net/">
				<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>
				<dc:language>en-gb</dc:language>
				<dc:date>2009-01-08T12:21:46-08:00</dc:date>
				<dc:creator>contact@nospam.com</dc:creator>
				<admin:generatorAgent rdf:resource="http://e107.org" />
				<admin:errorReportsTo rdf:resource="mailto:contact@nospam.com" />
				<sy:updatePeriod>hourly</sy:updatePeriod>
				<sy:updateFrequency>1</sy:updateFrequency>
				<sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
				<items>
				<rdf:Seq>
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t9488.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t9488.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t9488.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t9488.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t9488.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t9488.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t9488.html" />
						<rdf:li rdf:resource="http://www.8051projects.net/forum-t9488.html" />
				</rdf:Seq>
				</items>
				</channel>
						<item rdf:about="http://www.8051projects.net/forum-t9488.html">
						<title>VISUAL BASIC 8051-> FORMS HELP NEEDED</title>
						<link>http://www.8051projects.net/forum-t9488.html</link>
						<dc:date>2009-01-08T12:21:46-08:00</dc:date>
						<dc:creator></dc:creator>
						<dc:subject></dc:subject>
						<description>i have interfaced a microcontoller 8051 with visual basic 2008.the serial communication is working correctlyi wanted to know that during runtime can the form update itself according to the data send by the nicrocontroller.let me give an example to explain my problemi send a 3 from the microcontroller then VB shud display "connection established"in the same form when i send 4 from the microcontroller then VB shud display "danger occurred".the above part shud occur at runtime continuosly as the 8051 keeps monitoring external events and sends it to PC.this problem can be elaborated as  Dim a As Integer        Dim b As Integer        Label1.Text = a + b        Label1.Text = a - bi want during runtime first a+b shud be displayedthen after sometime a-b shud be displayed in the same form</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t9488.html">
						<title>Re: VISUAL BASIC 8051-> FORMS HELP NEEDED</title>
						<link>http://www.8051projects.net/forum-t9488.html</link>
						<dc:date>2009-01-08T12:21:46-08:00</dc:date>
						<dc:creator>Ajay</dc:creator>
						<dc:subject></dc:subject>
						<description>I am writing a small code with a button and a lable.so whenever button is clicked label will changeCODE:Dim a As Boolean<br />Private Sub Command1_Click&#40;&#41;<br />If a Then<br />&nbsp; &nbsp; Label1.Caption = "Click to change"<br />&nbsp; &nbsp; a = False<br />Else<br />&nbsp; &nbsp; Label1.Caption = "Text changed!"<br />&nbsp; &nbsp; a = True<br />End If<br />End Sub<br /><br />Private Sub Form_Load&#40;&#41;<br />a = False<br />Label1.Caption = "Click button to change text"<br />End Sub<br />&nbsp;You need to change caption of label not text</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t9488.html">
						<title>Re: VISUAL BASIC 8051-> FORMS HELP NEEDED</title>
						<link>http://www.8051projects.net/forum-t9488.html</link>
						<dc:date>2009-01-08T12:21:46-08:00</dc:date>
						<dc:creator>ashishdaga</dc:creator>
						<dc:subject></dc:subject>
						<description>sorry moderator by mistake two threads have opened. plz delete one of them.http://www.8051projects.net/forum-t9489.html     delete this</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t9488.html">
						<title>Re: VISUAL BASIC 8051-> FORMS HELP NEEDED</title>
						<link>http://www.8051projects.net/forum-t9488.html</link>
						<dc:date>2009-01-08T12:21:46-08:00</dc:date>
						<dc:creator>ashishdaga</dc:creator>
						<dc:subject></dc:subject>
						<description>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.when it captures data 4 from the microcontroller it shud display    "danger occurred".the  display within the label shud continuosly change based on micrcontroller inputand all the above display changes shud occur within the same form and same label.is it possible in visual basic????</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t9488.html">
						<title>Re: VISUAL BASIC 8051-> FORMS HELP NEEDED</title>
						<link>http://www.8051projects.net/forum-t9488.html</link>
						<dc:date>2009-01-08T12:21:46-08:00</dc:date>
						<dc:creator>Ajay</dc:creator>
						<dc:subject></dc:subject>
						<description>whenever event occurs simply change the caption of lable usingCODE:label.caption = "text to display"<br />&nbsp;within that event loop or condition</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t9488.html">
						<title>Re: VISUAL BASIC 8051-> FORMS HELP NEEDED</title>
						<link>http://www.8051projects.net/forum-t9488.html</link>
						<dc:date>2009-01-08T12:21:46-08:00</dc:date>
						<dc:creator>ashishdaga</dc:creator>
						<dc:subject></dc:subject>
						<description>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.here is my vb.net code CODE:Public Class Form1<br />&nbsp; &nbsp; Const check As Integer = 1<br />&nbsp; &nbsp; Const ack As Integer = 2<br />&nbsp; &nbsp; Const danger As Integer = 3<br />&nbsp; &nbsp; Const tout As Integer = 4<br />&nbsp; &nbsp; Const incr As Integer = 5<br />&nbsp; &nbsp; Const reset1 As Integer = 6<br />&nbsp; &nbsp; Const endack As Integer = 7<br />&nbsp; &nbsp; Const sendadd As Integer = 8<br />&nbsp; &nbsp; Const taskcomp As Integer = 9<br />&nbsp; &nbsp; Const ready As Integer = 10<br />&nbsp; &nbsp; Const invalid As Integer = 11<br />&nbsp; &nbsp; Dim rst As Integer<br />&nbsp; &nbsp; Dim i As Integer<br />&nbsp; &nbsp; Dim data1 As String<br />&nbsp; &nbsp; Dim status&#40;255&#41; As Integer<br />&nbsp; &nbsp; Dim dng_address As String<br />&nbsp; &nbsp; Dim instr As Integer<br />&nbsp; &nbsp; Dim toutaddr As Integer<br />&nbsp; &nbsp; Dim endacko As Integer<br />&nbsp; &nbsp; Dim readyinp As Integer<br />&nbsp; &nbsp; Dim temp As Integer<br />&nbsp; &nbsp; Private Sub MONITOR_Click&#40;ByVal sender As System.Object, ByVal e As System.EventArgs&#41; Handles MONITOR.Click<br />&nbsp; &nbsp; &nbsp; &nbsp; Label2.Text = "SYSTEM IS MONITORING"<br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.InBufferCount&#40;&#41; = 0 'CLEAR THE BUFFERS<br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.OutBufferCount&#40;&#41; = 0<br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.Settings = "9600,n,8,1" ' SEND SETTINGS TO PORT<br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.PortOpen = True ' MAKE THE PORT OPEN<br />back: AxMSComm1.Output = ready &amp; Chr&#40;13&#41; 'SEND READY COMMAND TO MICROCONTROLLER<br />&nbsp; &nbsp; &nbsp; &nbsp; While &#40;AxMSComm1.InBufferCount = 0&#41; 'WAIT FOR READY COMMAND FROM MICROCONTROLLER<br />&nbsp; &nbsp; &nbsp; &nbsp; End While<br />&nbsp; &nbsp; &nbsp; &nbsp; Dim temp2 As String<br />&nbsp; &nbsp; &nbsp; &nbsp; temp2 = AxMSComm1.Input 'ASSIGN TEMP2 AS INPUT RECEIVED FROM MIC<br />&nbsp; &nbsp; &nbsp; &nbsp; ' if there is input from 8051<br />&nbsp; &nbsp; &nbsp; &nbsp; PictureBox5.Image = System.Drawing.Image.FromFile&#40;"c:\4.jpg"&#41; 'DISPLAY IMAGE OF NOKIA CONNECTION ESTABLISHED<br />&nbsp; &nbsp; &nbsp; &nbsp; Label4.Text = "CONNECTION ESTABLISHED"<br />&nbsp; &nbsp; &nbsp; &nbsp; Label2.Enabled = False<br />&nbsp; &nbsp; &nbsp; &nbsp; GoTo checkinput ' JUMP TO CHECKINPUT IF RECEIVED FROM MIC<br /><br />checkinput:<br />&nbsp; &nbsp; &nbsp; &nbsp; Label2.Text = "SYSTEM IS CHECKING THE INPUT"<br />&nbsp; &nbsp; &nbsp; &nbsp; If &#40;rst = 1&#41; Then 'IF RESET BUTTON IS PRESSED CALL RESET SUBROUTINE<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Call reset&#40;&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; Else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.InBufferCount&#40;&#41; = 0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.Output = check &amp; Chr&#40;13&#41; 'SEND CHECK COMMAND TO MIC<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; While &#40;AxMSComm1.InBufferCount = 0&#41; 'WAIT TILL MIC REPLIES<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End While<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; data1 = AxMSComm1.Input<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Select Case data1 ' COMPARE THE DATA ONE RECEIVED WITH ALL POSSIBLE PARAMETERS<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case endack<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GoTo endacknowledge<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case danger<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GoTo danger_tree<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case tout<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; GoTo tout_tree<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End Select<br />&nbsp; &nbsp; &nbsp; &nbsp; End If<br />&nbsp; &nbsp; &nbsp; &nbsp; Label2.Enabled = False<br /><br />endacknowledge: Label2.Text = "END ACKNOWLEDGE SIGNAL RECEIVED"<br />&nbsp; &nbsp; &nbsp; &nbsp; GoTo checkinput 'AGAIN CHECK FOR THE INPUT FROM MIC<br /><br />danger_tree: Label2.Text = "SOME DANGER OCCURED"<br />&nbsp; &nbsp; &nbsp; &nbsp; PictureBox6.Image = System.Drawing.Image.FromFile&#40;"c:\3.jpg"&#41; 'DISPLAY DANGER IMAGE IN PIC BOX 6 IF DANGER COMMAND IS RECEIVED<br />&nbsp; &nbsp; &nbsp; &nbsp; My.Computer.Audio.Play&#40;"C:\fire alarm.wav", AudioPlayMode.WaitToComplete&#41; 'PLAY DANGER SIREN<br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.InBufferCount&#40;&#41; = 0<br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.OutBufferCount&#40;&#41; = 0<br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.Output = sendadd &amp; Chr&#40;13&#41; 'SEND ADDRESS command TO MIC<br />&nbsp; &nbsp; &nbsp; &nbsp; While &#40;AxMSComm1.InBufferCount = 0&#41; ' WAIT FOR THE ADDRESS TO COME IN BUFFER<br />&nbsp; &nbsp; &nbsp; &nbsp; End While<br />&nbsp; &nbsp; &nbsp; &nbsp; dng_address = AxMSComm1.Input 'ASSIGN ADDRESS TO DNG_ADDRESS<br />&nbsp; &nbsp; &nbsp; &nbsp; Select Case dng_address 'COMPARE THE ADRESS RECEIVED WITH 1,2,3,4...... AND SHOW DANGER IN CORRESPONG PICBOX<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case 1<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PictureBox1.Image = System.Drawing.Image.FromFile&#40;"c:\1.jpg"&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status&#40;1&#41; = 1 'IF DANGER IS IN TREE 1 MARK THE ARRAY LOCATION 1 AS AFFECTED<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case 2<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PictureBox2.Image = System.Drawing.Image.FromFile&#40;"c:\1.jpg"&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status&#40;2&#41; = 1<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case 3<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PictureBox3.Image = System.Drawing.Image.FromFile&#40;"c:\1.jpg"&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status&#40;3&#41; = 1<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case 4<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PictureBox4.Image = System.Drawing.Image.FromFile&#40;"c:\1.jpg"&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status&#40;4&#41; = 1<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case 5<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PictureBox5.Image = System.Drawing.Image.FromFile&#40;"c:\1.jpg"&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status&#40;5&#41; = 1<br />&nbsp; &nbsp; &nbsp; &nbsp; End Select<br />&nbsp; &nbsp; &nbsp; &nbsp; For Me.i = 1 To 5<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If status&#40;i&#41; = 1 Then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.Output = incr &amp; Chr&#40;13&#41; 'IF DANGER OCCURS IN ANY CASE THAN SEND INCREMENT COMMAND TO MIC<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; temp = i<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If<br />&nbsp; &nbsp; &nbsp; &nbsp; Next<br />&nbsp; &nbsp; &nbsp; &nbsp; While &#40;AxMSComm1.InBufferCount = 0&#41; 'WAIT UNTIL SENDADDRESS COMMAND COMES FROM MIC<br />&nbsp; &nbsp; &nbsp; &nbsp; End While<br />&nbsp; &nbsp; &nbsp; &nbsp; Dim temp3 As String<br />&nbsp; &nbsp; &nbsp; &nbsp; temp3 = AxMSComm1.Input<br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.Output = &#40;temp - 1&#41; &amp; Chr&#40;13&#41; 'VB SENDS ADDR-1 TO MIC TO INCR<br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.OutBufferCount&#40;&#41; = 0<br />&nbsp; &nbsp; &nbsp; &nbsp; While &#40;AxMSComm1.InBufferCount = 0&#41; ' WAIT TILL TASK COMPLETE COMMAND IS RECEIVED<br />&nbsp; &nbsp; &nbsp; &nbsp; End While<br />&nbsp; &nbsp; &nbsp; &nbsp; Dim temp4 As String<br />&nbsp; &nbsp; &nbsp; &nbsp; temp4 = AxMSComm1.Input<br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.InBufferCount&#40;&#41; = 0<br />&nbsp; &nbsp; &nbsp; &nbsp; Label2.Enabled = False<br />&nbsp; &nbsp; &nbsp; &nbsp; GoTo checkinput 'AGAIN CHECK FOR INPUT<br />tout_tree: Label2.Text = "TIMEOUT OCCURED" ' TIMEOUT IS THE CASE WHEN THERE IS PROBLEM IN BATTERY ETC<br />&nbsp; &nbsp; &nbsp; &nbsp; My.Computer.Audio.Play&#40;"C:\fire alarm.wav", AudioPlayMode.WaitToComplete&#41; 'PLAY DANGER SIREN<br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.Output = sendadd &amp; Chr&#40;13&#41; 'VB WANTS ADDRESS OF TIMEOUT LOCATION<br />&nbsp; &nbsp; &nbsp; &nbsp; While &#40;AxMSComm1.InBufferCount = 0&#41; 'WAIT TILL ADDRESS OF TIMEOUT LOCATION IS RECEIVED<br />&nbsp; &nbsp; &nbsp; &nbsp; End While<br />&nbsp; &nbsp; &nbsp; &nbsp; toutaddr = AxMSComm1.Input<br />&nbsp; &nbsp; &nbsp; &nbsp; PictureBox6.Image = System.Drawing.Image.FromFile&#40;"c:\3.jpg"&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; Select Case toutaddr 'COMPARE THE ADRESS RECEIVED WITH 1,2,3,4...... AND SHOW TIMEOUT IN CORRESPONG PICBOX<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case 1<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PictureBox1.Image = System.Drawing.Image.FromFile&#40;"c:\5.jpg"&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status&#40;1&#41; = 2<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case 2<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PictureBox2.Image = System.Drawing.Image.FromFile&#40;"c:\5.jpg"&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status&#40;2&#41; = 2<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case 3<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PictureBox3.Image = System.Drawing.Image.FromFile&#40;"c:\5.jpg"&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status&#40;3&#41; = 2<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case 4<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PictureBox4.Image = System.Drawing.Image.FromFile&#40;"c:\5.jpg"&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status&#40;4&#41; = 2<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Case 5<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PictureBox5.Image = System.Drawing.Image.FromFile&#40;"c:\5.jpg"&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status&#40;5&#41; = 2<br />&nbsp; &nbsp; &nbsp; &nbsp; End Select<br />&nbsp; &nbsp; &nbsp; &nbsp; For Me.i = 1 To 5<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If status&#40;i&#41; = 2 Then<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.Output = incr &amp; Chr&#40;13&#41; 'SEND INCREMENT COMMAND TO MIC<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.OutBufferCount&#40;&#41; = 0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; temp = i<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Else<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If<br />&nbsp; &nbsp; &nbsp; &nbsp; Next<br />&nbsp; &nbsp; &nbsp; &nbsp; While &#40;AxMSComm1.InBufferCount = 0&#41; 'Mic WANTS ADDR OF WHICH LOCATION TO INCREMENT<br />&nbsp; &nbsp; &nbsp; &nbsp; End While<br />&nbsp; &nbsp; &nbsp; &nbsp; Dim temp5 As String<br />&nbsp; &nbsp; &nbsp; &nbsp; temp5 = AxMSComm1.Input<br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.Output = &#40;temp - 1&#41; &amp; Chr&#40;13&#41; 'VB SENDS ADDR-1 TO MIC<br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.OutBufferCount&#40;&#41; = 0<br />&nbsp; &nbsp; &nbsp; &nbsp; While &#40;AxMSComm1.InBufferCount = 0&#41; 'WAIT TILL TASK COMPLETE CODE IS RECEIVED<br />&nbsp; &nbsp; &nbsp; &nbsp; End While<br />&nbsp; &nbsp; &nbsp; &nbsp; Dim temp6 As String<br />&nbsp; &nbsp; &nbsp; &nbsp; temp6 = AxMSComm1.Input<br />&nbsp; &nbsp; &nbsp; &nbsp; Label2.Enabled = False<br />&nbsp; &nbsp; &nbsp; &nbsp; GoTo checkinput<br />&nbsp; &nbsp; End Sub<br />&nbsp; &nbsp; Private Sub RESET2_Click&#40;ByVal sender As System.Object, ByVal e As System.EventArgs&#41; Handles RESET2.Click<br />&nbsp; &nbsp; &nbsp; &nbsp; rst = 1<br />&nbsp; &nbsp; End Sub<br /><br />&nbsp; &nbsp; Function reset&#40;&#41; As Single<br />&nbsp; &nbsp; &nbsp; &nbsp; Dim TEMP_RESET As Integer<br />&nbsp; &nbsp; &nbsp; &nbsp; Label2.Text = "RESETTING THE NETWORK PLZ WAIT"<br />&nbsp; &nbsp; &nbsp; &nbsp; rst = 0<br />&nbsp; &nbsp; &nbsp; &nbsp; For Me.i = 1 To 5<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; If status&#40;i&#41; = 1 Or status&#40;i&#41; = 2 Then 'IF TIMEOUT OR DANGER HAS OCCURED<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.Output = reset1 'SENDS RST COMMAND TO MIC<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.OutBufferCount&#40;&#41; = 0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TEMP_RESET = i<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; status&#40;i&#41; = 0<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; End If<br />&nbsp; &nbsp; &nbsp; &nbsp; Next<br />&nbsp; &nbsp; &nbsp; &nbsp; While &#40;AxMSComm1.InBufferCount = 0&#41; 'Mic WANTS ADDR OF WHICH LOCATION TO RESET<br />&nbsp; &nbsp; &nbsp; &nbsp; End While<br />&nbsp; &nbsp; &nbsp; &nbsp; Dim&#31889;TEMP4 As Integer<br />&nbsp; &nbsp; &nbsp; &nbsp; TEMP4 = AxMSComm1.Input<br />&nbsp; &nbsp; &nbsp; &nbsp; AxMSComm1.Output = TEMP_RESET - 1 'VB SENDS ADDR-1 TO MIC<br />&nbsp; &nbsp; &nbsp; &nbsp; While &#40;AxMSComm1.InBufferCount = 0&#41; 'WAIT TILL TASC COMPLETE CODE IS RECEIVED BY VB<br />&nbsp; &nbsp; &nbsp; &nbsp; End While<br />&nbsp; &nbsp; &nbsp; &nbsp; Dim TEMP5 As Integer<br />&nbsp; &nbsp; &nbsp; &nbsp; TEMP5 = AxMSComm1.Input<br /><br /><br />&nbsp; &nbsp; &nbsp; &nbsp; PictureBox1.Image = System.Drawing.Image.FromFile&#40;"c:\2.jpg"&#41; ' CHANGE THE PICTURES AS DEFAULT<br />&nbsp; &nbsp; &nbsp; &nbsp; PictureBox2.Image = System.Drawing.Image.FromFile&#40;"c:\2.jpg"&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; PictureBox3.Image = System.Drawing.Image.FromFile&#40;"c:\2.jpg"&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; PictureBox4.Image = System.Drawing.Image.FromFile&#40;"c:\2.jpg"&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; PictureBox5.Image = System.Drawing.Image.FromFile&#40;"c:\2.jpg"&#41;<br />&nbsp; &nbsp; &nbsp; &nbsp; Label2.Enabled = False<br />&nbsp; &nbsp; End Function<br /><br />&nbsp; &nbsp; Private Sub Timer1_Tick&#40;ByVal sender As System.Object, ByVal e As System.EventArgs&#41; Handles Timer1.Tick<br />&nbsp; &nbsp; &nbsp; &nbsp; Label3.Text = TimeString<br />&nbsp; &nbsp; End Sub<br />End Class<br />&nbsp;</description>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t9488.html">
						<title>Re: VISUAL BASIC 8051-> FORMS HELP NEEDED</title>
						<link>http://www.8051projects.net/forum-t9488.html</link>
						<dc:date>2009-01-08T12:21:46-08:00</dc:date>
						<dc:creator>Ajay</dc:creator>
						<dc:subject></dc:subject>
						<description>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>
						</item>
						<item rdf:about="http://www.8051projects.net/forum-t9488.html">
						<title>Re: VISUAL BASIC 8051-> FORMS HELP NEEDED</title>
						<link>http://www.8051projects.net/forum-t9488.html</link>
						<dc:date>2009-01-08T12:21:46-08:00</dc:date>
						<dc:creator>ashishdaga</dc:creator>
						<dc:subject></dc:subject>
						<description>my only problem is the label12.text 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.i am using vb.net so label12.text is same as label12.caption in VB6so basically i want the text to change according to the event received and this shud happen continuously</description>
						</item>
				</rdf:RDF>