Sub btnPlotDataOK_Click
screenW=txtscreenw.Text
screenH=txtscreenH.Text
crd()=StrSplit(txtulcoord.Text,"-")
upltx=crd(0)
uplty=crd(1)
crd()=StrSplit(txtlrcoord.Text ,"-")
lwrtx=crd(0)
lwrty=crd(1)
ppts=txtplotpoints.Text
pts()=StrSplit(ppts,"-")
x=ArrayLen(pts())
'For i=1 To ArrayLen(ppts)
'FileClose(c)
FileOpen(c,strfilename,cRead)
lineoftext=FileRead(c)
Do Until lineoftext=EOF
coord()=StrSplit(lineoftext,",")
If coord(0)=pts(0) Then
dblnorth=coord(1)
dbleast=coord(2)
x1=(dbleast-upltx)/(lwrtx-upltx) * screenW
y1=(uplty-dblnorth)/(uplty-lwrty)* screenH
Exit
End If
lineoftext=FileRead(c)
Loop
'crd()=StrSplit(txtplotpoints.Text ,"-")
FileClose(c)
For i=1 To ArrayLen(pts())-1
j=j+1
FileClose(c)
FileOpen(c,strfilename,cRead)
lineoftext=FileRead(c)
Do Until lineoftext=EOF
coord()=StrSplit(lineoftext,",")
If coord(0)= pts(j) Then
dblnorth=coord(1)
dbleast=coord(2)
x2=(dbleast-upltx)/(lwrtx-upltx) * screenW
y2=(uplty-dblnorth)/(uplty-lwrty)* screenH
Exit
End If
lineoftext=FileRead(c)
Loop
frmPlotPoints.Show
frmPlotPoints.Line (x1,y1,x2,y2,cBlack)
frmplotpoints.drawstring(coord(0),8,x2,y2,x2,y2,cBlack)
frmplotpoints.Refresh
x1=x2
y1=y2
Next
FileClose(c)
End Sub