Click here to Skip to main content
16,007,443 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionWindow Service Pin
nitin_ion29-Jun-06 1:45
nitin_ion29-Jun-06 1:45 
QuestionPGP Pin
punam3029-Jun-06 1:10
punam3029-Jun-06 1:10 
AnswerRe: PGP Pin
Dave Kreskowiak29-Jun-06 4:39
mveDave Kreskowiak29-Jun-06 4:39 
QuestionPre and Post build steps Pin
PaulPrice29-Jun-06 1:07
PaulPrice29-Jun-06 1:07 
AnswerRe: Pre and Post build steps Pin
Duncan Edwards Jones29-Jun-06 1:26
professionalDuncan Edwards Jones29-Jun-06 1:26 
AnswerRe: Pre and Post build steps Pin
Kevin McFarlane30-Jun-06 0:22
Kevin McFarlane30-Jun-06 0:22 
Question[2005] HTTP:POST form emulation - don't even know where to start? Pin
Duncan Edwards Jones28-Jun-06 23:53
professionalDuncan Edwards Jones28-Jun-06 23:53 
QuestionMscomm and draw chart Pin
codeadair28-Jun-06 22:44
codeadair28-Jun-06 22:44 
Hi,everybody

A difficulty happens to me when i programming.I heartly need your help.

My program is:
i read datas from a test equipment once per 100ms.At the same time,i draw this data to coordinate.As follow:

Private Sub Timer1_Elapsed(ByVal sender As System.Object, ByVal e As System.Timers.ElapsedEventArgs) Handles Timer1.Elapsed
tg = Me.Panel1.CreateGraphics
' tg.TranslateTransform(xtran, ytran)
'tg.ScaleTransform(xscaletran, yscaletran)
xaxis2 += 5.0 ' x coordinate add 5 pixles once
yaxis2 = Tesle() * 10 ' tesle() is a function reading data from
'test equipment
rwrecord += 1
tg.DrawLine(dpen, xaxis, -yaxis, xaxis2, -yaxis2)
xaxis = xaxis2
yaxis = yaxis2
xredraw(rwrecord) = xaxis
yredraw(rwrecord) = yaxis
tg.Dispose()
End Sub
Private Sub Tesle()
Dim inbuffer As String

Do
inbuffer = AxMSComm1.Input
Loop Until InStr(inbuffer, vbCr)

Dim readdata As String
Dim istart As Integer
Dim mstart As Integer

Try
istart = inbuffer.IndexOf("-")
mstart = inbuffer.IndexOf("+")
If istart < 0 Then
Tesle = inbuffer.Substring(mstart, 8)
Else
Tesle = inbuffer.Substring(istart, 8)
End If
Catch ex As Exception
End Try
End Sub

Above is the main code.If i do nothing(such as moving the form),it will draw chart exactly.But when i moved the form(any action activate paint event),It will not draw the point at that time point.after paint event over,it will draw chart well.

i have do something to debug the problem.i find that when form paint event activated.the data read from test equiment is null.here the problem is.

And now i want to get your help.How can i sove the problem.

Waitting for your reply.
Any reply will be appreciated

ICQ:258-235-734
MSN:msnadair@hotmail.com
AnswerRe: Mscomm and draw chart Pin
Dave Kreskowiak29-Jun-06 1:49
mveDave Kreskowiak29-Jun-06 1:49 
GeneralRe: Mscomm and draw chart [modified] Pin
codeadair29-Jun-06 15:06
codeadair29-Jun-06 15:06 
GeneralRe: Mscomm and draw chart Pin
Dave Kreskowiak29-Jun-06 16:39
mveDave Kreskowiak29-Jun-06 16:39 
GeneralRe: Mscomm and draw chart Pin
codeadair29-Jun-06 18:09
codeadair29-Jun-06 18:09 
GeneralRe: Mscomm and draw chart Pin
Dave Kreskowiak30-Jun-06 0:50
mveDave Kreskowiak30-Jun-06 0:50 
GeneralRe: Mscomm and draw chart Pin
codeadair30-Jun-06 1:06
codeadair30-Jun-06 1:06 
GeneralRe: Mscomm and draw chart [modified] Pin
Dave Kreskowiak30-Jun-06 3:51
mveDave Kreskowiak30-Jun-06 3:51 
GeneralRe: Mscomm and draw chart Pin
codeadair3-Jul-06 2:07
codeadair3-Jul-06 2:07 
GeneralRe: Mscomm and draw chart Pin
Dave Kreskowiak3-Jul-06 17:32
mveDave Kreskowiak3-Jul-06 17:32 
GeneralRe: Mscomm and draw chart [modified] Pin
codeadair3-Jul-06 17:41
codeadair3-Jul-06 17:41 
GeneralRe: Mscomm and draw chart Pin
Dave Kreskowiak4-Jul-06 5:49
mveDave Kreskowiak4-Jul-06 5:49 
GeneralRe: Mscomm and draw chart Pin
codeadair4-Jul-06 14:54
codeadair4-Jul-06 14:54 
QuestionError when installing in a XP machine Pin
Arunag28-Jun-06 22:41
Arunag28-Jun-06 22:41 
AnswerRe: Error when installing in a XP machine Pin
fredy66628-Jun-06 23:42
fredy66628-Jun-06 23:42 
GeneralRe: Error when installing in a XP machine Pin
Arunag29-Jun-06 0:20
Arunag29-Jun-06 0:20 
GeneralRe: Error when installing in a XP machine Pin
fredy66629-Jun-06 0:29
fredy66629-Jun-06 0:29 
AnswerRe: Error when installing in a XP machine Pin
Mekong River29-Jun-06 0:34
Mekong River29-Jun-06 0:34 

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.