How to copy data from serial port to notepad

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Apr 2007
Posts: 28
Reputation: jatinder_44 is an unknown quantity at this point 
Solved Threads: 0
jatinder_44's Avatar
jatinder_44 jatinder_44 is offline Offline
Light Poster

How to copy data from serial port to notepad

 
0
  #1
Jun 16th, 2007
How to copy data from serial port to notepad,by the save button on the form without calling notead to write it in ,can we directly place the data to notepad from textbox which receving data.
thank u wating for reply
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: How to copy data from serial port to notepad

 
0
  #2
Jun 16th, 2007
Hi,

To Get Data from Serial Port use "MSComm" Control.

Yes u can write directly into Note Pad, Open the TextFile using "Open" key word, Write by using "Print"
Or Else
U can also use "File Scripting Objects" to write to Notepad.


REgards
Veena
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 28
Reputation: jatinder_44 is an unknown quantity at this point 
Solved Threads: 0
jatinder_44's Avatar
jatinder_44 jatinder_44 is offline Offline
Light Poster

Re: How to copy data from serial port to notepad

 
0
  #3
Jun 16th, 2007
thanx Qveena , iam using mscomm i am retreving data but how to use open keyword in save button can u show me syntax for it . i am trying to use it thank u
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 28
Reputation: jatinder_44 is an unknown quantity at this point 
Solved Threads: 0
jatinder_44's Avatar
jatinder_44 jatinder_44 is offline Offline
Light Poster

Re: How to copy data from serial port to notepad

 
0
  #4
Jun 16th, 2007
i am using this syntax by using scripting object
Dim fsys As New FileSystemObject
Dim Txtfl As TextStream
'
Set Txtfl = fsys.CreateTextFile(App.Path & "\" & "New Text Document.txt", True)
''Txtfl.WriteLine Text1.Text
Txtfl.WriteLine Text2.Text
it displaying the text2 value on the Form ,on which i working.is there is a mistake in the Path specification i have kept "New Text Document.txt" text in the C:\Program Files\Microsoft Visual Studio\VB98 but is the path is write
thank u
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 28
Reputation: jatinder_44 is an unknown quantity at this point 
Solved Threads: 0
jatinder_44's Avatar
jatinder_44 jatinder_44 is offline Offline
Light Poster

Re: How to copy data from serial port to notepad

 
0
  #5
Jun 16th, 2007
I am also tryed using open keyword
open "NewTextDocument.txt" For Random As ..
what we have to write for,For Random As ..
it ask for as keyword here wat we have to mention
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 28
Reputation: jatinder_44 is an unknown quantity at this point 
Solved Threads: 0
jatinder_44's Avatar
jatinder_44 jatinder_44 is offline Offline
Light Poster

Re: How to copy data from serial port to notepad

 
0
  #6
Jun 16th, 2007
Sorry veena it work 's using FileSystemobject
my mistake at defining the path for it
thank u can we add string befor pasting text data to file like if i outputing the data then in the file it should look
Output Text1.Text value
Input Text2.Text value can we do this way
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: How to copy data from serial port to notepad

 
0
  #7
Jun 18th, 2007
Hi Jatinder,

Sorry for not following up this post...

OK If u want to use File hanling with "I/O" then, open File this way:

Dim FN As Long
FN = FreeFile
Open "c:\MtFile.txt" For Output As FN
'(Here File will be OverWritten)
Open "c:\MtFile.txt" For Append As FN
'(here u can modify into ths same File)
Add data to file:
Print #FN, "My First File"

If u want to read TextFile:
Open "c:\MyFile.txt" For Input As FN
Dim TStr As String
Line Input FN, TStr


And After all the operations, u need to close them :
Close FN

REgards
Veena
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 28
Reputation: jatinder_44 is an unknown quantity at this point 
Solved Threads: 0
jatinder_44's Avatar
jatinder_44 jatinder_44 is offline Offline
Light Poster

Re: How to copy data from serial port to notepad

 
0
  #8
Jun 18th, 2007
thank u veena i tryed with u r last post on saturday which work for me .I want to know something about Needdle whih will show some fluxation when it will recieve some data ,how's the car speed shows .Is there is any control in vb6 which can be used .And i am also using Slider control in vertical position ,my problem in this it showing it 0 value at the top and maximam value at the bottom ,I want to change this setting 's i want to bring min value to bottom and max val to the top of the slider ie is from bottom to top bottom should be 0 and top should be 250 is there is any other slider we can use .Important to know about Needle Control.
Reply With Quote Quick reply to this message  
Join Date: Nov 2006
Posts: 848
Reputation: QVeen72 is on a distinguished road 
Solved Threads: 120
QVeen72's Avatar
QVeen72 QVeen72 is offline Offline
Practically a Posting Shark

Re: How to copy data from serial port to notepad

 
0
  #9
Jun 18th, 2007
Hi,

Instead of Slider, why dont u use a
"Flat ScrollBar"
which comes with "Microsoft Windows Common Control 2 6.0"
Make Oientation = 0 (Verical)
and give Min / Max.

For the Visual Speed, Use a Line Control and a Shape(Circle) Control, Place the Line as the adius of circle, Change the CoOrdinates (X1,Y1) of Line Control Proprtionate to the speed. keeping (X2,Y2) Fixed....


REgards
Veena
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 28
Reputation: jatinder_44 is an unknown quantity at this point 
Solved Threads: 0
jatinder_44's Avatar
jatinder_44 jatinder_44 is offline Offline
Light Poster

Re: How to copy data from serial port to notepad

 
0
  #10
Jun 18th, 2007
But if some data coming from port thus this line control will very according to data .
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC