Click here to Skip to main content
15,891,431 members
Home / Discussions / Visual Basic
   

Visual Basic

 
General.Net framework download size Pin
cnurse7-Feb-04 22:05
cnurse7-Feb-04 22:05 
GeneralRe: .Net framework download size Pin
Ian Darling7-Feb-04 22:15
Ian Darling7-Feb-04 22:15 
GeneralRe: .Net framework download size Pin
cnurse7-Feb-04 22:26
cnurse7-Feb-04 22:26 
GeneralRe: .Net framework download size Pin
Ian Darling7-Feb-04 22:49
Ian Darling7-Feb-04 22:49 
QuestionSleep not working right? Pin
MadCow7-Feb-04 16:44
MadCow7-Feb-04 16:44 
AnswerRe: Sleep not working right? Pin
Dave Kreskowiak8-Feb-04 9:39
mveDave Kreskowiak8-Feb-04 9:39 
GeneralRe: Sleep not working right? Pin
MadCow8-Feb-04 14:26
MadCow8-Feb-04 14:26 
GeneralMSComm serial port control HELP!!! Pin
maria_p6-Feb-04 19:39
maria_p6-Feb-04 19:39 
HELP please someone I'm using MSComm with C#.....at the moment I'm communicating via a null modem connection between 2 PCs. At the moment I'm just sending out some bytes from one PC to another PC... Got the communication to work... all is well.

The problem; I only expect something to be sent from one PC to other when I press a button on the sending PC which then uses the command object.Output= new byte [] {a number}; to send a byte to the other computer.... the recieving computer in turn recieves this and displays it via the ONComm event handler. The ONComm event on the recieving PC is raised when a byte arrives at the recieving PC serial port on pressing a button on the sending PC.... HOWEVER the ONComm Event is also raised (on the recieving PC)when I start up and exit the sending application. I just can't understand this! This could obviously be a really big problem... Can someone explain or have a solution to this? I would be grateful... I just can't seem to stop this event from raising when the sending application starts up or shuts down... This could be reallly disasterous if the sending PC sends something on start up (ie without me even having instructed the sending application to output a signal by pressing a button) when connected to a PICmicrocontroller which shouldn't recieve that signal....

Here is how i set up the 2 PCs;

com.CommPort = 1;
if (com.PortOpen) com.PortOpen = false;
com.RThreshold = 1;
com.Settings = "9600,n,8,1";
//com.DTREnable = true;
com.Handshaking = MSCommLib.HandshakeConstants.comNone;
com.InputMode = MSCommLib.InputModeConstants.comInputModeBinary;
com.InputLen = 0;
com.NullDiscard = false;
com.OnComm += new System.EventHandler(this.OnComm);
com.PortOpen = true;

Here is the ONComm event handler on the recieving PC which is connected with a null modem cable;

// MSCommLib OnComm Event Handler
private void OnComm(object sender, EventArgs e)
{
//Message box 1
MessageBox.Show("recieved something 1");

switch (com.CommEvent)
{
case (short)MSCommLib.OnCommConstants.comEvReceive:
//Message box 2
MessageBox.Show("recieved something 2");

byte[] x = (byte[]) com.Input;
foreach (byte byt in x)
{
strrecvd += (char) byt;
//Message box 3
MessageBox.Show(strrecvd);........................

The only Message box that should show on the recieving PC is 3 and that only when I press a button to send a byte on the sending PC... However on the inclusion of message boxes 1 and 2 I noticed that when I started up or shut down the sending application they would show on the recieving PC.... Frown | :(
anyone?
I would never have known this happens had i not put a message box there to check something else...SCARY!

maria (phillips_maria2@hotmail.com)
GeneralRe: MSComm serial port control HELP!!! Pin
John Kuhn9-Feb-04 13:10
John Kuhn9-Feb-04 13:10 
GeneralDirectory Permissions in vb.net Pin
Tasnim6-Feb-04 19:28
Tasnim6-Feb-04 19:28 
GeneralRe: Directory Permissions in vb.net Pin
John Kuhn9-Feb-04 13:16
John Kuhn9-Feb-04 13:16 
GeneralRe: Directory Permissions in vb.net Pin
Dave Kreskowiak10-Feb-04 5:27
mveDave Kreskowiak10-Feb-04 5:27 
QuestionHow to get aVB .Net Datagrid to scroll when selecting rows Pin
krluke6-Feb-04 19:00
krluke6-Feb-04 19:00 
GeneralNo more resizing datagrid columns Pin
len_ems6-Feb-04 16:45
len_ems6-Feb-04 16:45 
GeneralAPI Viewer Pin
Pugman8126-Feb-04 15:20
Pugman8126-Feb-04 15:20 
GeneralRe: API Viewer Pin
Hesham Amin8-Feb-04 8:15
Hesham Amin8-Feb-04 8:15 
GeneralTesters Needed Pin
Matthew Hazlett6-Feb-04 7:51
Matthew Hazlett6-Feb-04 7:51 
GeneralPDF Processing Pin
Jim Taylor6-Feb-04 5:51
Jim Taylor6-Feb-04 5:51 
GeneralRe: PDF Processing Pin
Dave Kreskowiak6-Feb-04 7:07
mveDave Kreskowiak6-Feb-04 7:07 
GeneralRe: PDF Processing Pin
Jim Taylor8-Feb-04 21:50
Jim Taylor8-Feb-04 21:50 
GeneralVisual Basic&Pentium4 Pin
Member 6339076-Feb-04 5:13
Member 6339076-Feb-04 5:13 
GeneralRe: Visual Basic&Pentium4 Pin
Dave Kreskowiak6-Feb-04 6:58
mveDave Kreskowiak6-Feb-04 6:58 
GeneralRe: Visual Basic&Pentium4 Pin
Member 6339078-Feb-04 22:14
Member 6339078-Feb-04 22:14 
GeneralRe: Visual Basic&Pentium4 Pin
Dave Kreskowiak9-Feb-04 4:57
mveDave Kreskowiak9-Feb-04 4:57 
GeneralRe: Visual Basic&Pentium4 Pin
Member 6339079-Feb-04 5:38
Member 6339079-Feb-04 5:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.