Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Communications > mscomm


Reply
 
Thread Tools Display Modes
  #1  
Old 02-15-2008, 08:37 AM
confusian confusian is offline
Newcomer
 
Join Date: Jan 2008
Posts: 7
Default mscomm


i am creating an application as below to send decimal value to microcontroller through serial comm, the setting is 2400, n, 8, 1...hardware flow control...

if i am expecting character from the microcontroller for display at the screen, which icon should i select from the toolbox to put in the form1.frm for this display purpose? and what should i write inside the command?

----------------------------------------------------------------------
Private Sub Command1_Click()

MSComm1.Output = Chr$(Text1.Text)

End Sub

-----------------------------------------------------------------------
Private Sub Form_Load()
MSComm1.PortOpen = True
MSComm1.Settings = "2400,n,8,1"
End Sub

------------------------------------------------------------------------
Private Sub MSComm1_OnComm()

///what shall i write here? or just leave it blank?

End Sub

------------------------------------------------------------------------
Private Sub Text1_Change()

End Sub
Reply With Quote
  #2  
Old 02-16-2008, 02:03 AM
mkaras's Avatar
mkaras mkaras is offline
Ultimate Contributor

Retired Leader
* Expert *
 
Join Date: Mar 2004
Location: Beaverton, OR
Posts: 1,874
Default

You could use the On_Comm() event to recognize when the output transmit is completed, when something has been received or when an input handshake signal has changed state.

Perform a search in the forums of this website or access Google for a search on implementation of MSComm.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->