944,038 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Jun 16th, 2007
0

How to copy data from serial port to notepad

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Unverified User
jatinder_44 is offline Offline
28 posts
since Apr 2007
Jun 16th, 2007
0

Re: How to copy data from serial port to notepad

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
Reputation Points: 84
Solved Threads: 140
Posting Shark
QVeen72 is offline Offline
923 posts
since Nov 2006
Jun 16th, 2007
0

Re: How to copy data from serial port to notepad

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
Reputation Points: 10
Solved Threads: 0
Unverified User
jatinder_44 is offline Offline
28 posts
since Apr 2007
Jun 16th, 2007
0

Re: How to copy data from serial port to notepad

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
Reputation Points: 10
Solved Threads: 0
Unverified User
jatinder_44 is offline Offline
28 posts
since Apr 2007
Jun 16th, 2007
0

Re: How to copy data from serial port to notepad

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
Reputation Points: 10
Solved Threads: 0
Unverified User
jatinder_44 is offline Offline
28 posts
since Apr 2007
Jun 16th, 2007
0

Re: How to copy data from serial port to notepad

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
Reputation Points: 10
Solved Threads: 0
Unverified User
jatinder_44 is offline Offline
28 posts
since Apr 2007
Jun 18th, 2007
0

Re: How to copy data from serial port to notepad

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
Reputation Points: 84
Solved Threads: 140
Posting Shark
QVeen72 is offline Offline
923 posts
since Nov 2006
Jun 18th, 2007
0

Re: How to copy data from serial port to notepad

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.
Reputation Points: 10
Solved Threads: 0
Unverified User
jatinder_44 is offline Offline
28 posts
since Apr 2007
Jun 18th, 2007
0

Re: How to copy data from serial port to notepad

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
Reputation Points: 84
Solved Threads: 140
Posting Shark
QVeen72 is offline Offline
923 posts
since Nov 2006
Jun 18th, 2007
0

Re: How to copy data from serial port to notepad

But if some data coming from port thus this line control will very according to data .
Reputation Points: 10
Solved Threads: 0
Unverified User
jatinder_44 is offline Offline
28 posts
since Apr 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Clearing Controls & Forms in Access (VBA)
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: searching query to meet criteria





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC