Click here to Skip to main content
15,917,808 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Close function Pin
nlarson1121-Mar-07 16:01
nlarson1121-Mar-07 16:01 
GeneralRe: Close function Pin
harveyhanson21-Mar-07 22:25
harveyhanson21-Mar-07 22:25 
GeneralRe: Close function Pin
Dave Kreskowiak22-Mar-07 5:26
mveDave Kreskowiak22-Mar-07 5:26 
QuestionHow can I set tooltips in runtime for a specific control? Pin
JUNEYT21-Mar-07 11:04
JUNEYT21-Mar-07 11:04 
AnswerRe: How can I set tooltips in runtime for a specific control? Pin
MatrixCoder21-Mar-07 12:30
MatrixCoder21-Mar-07 12:30 
GeneralRe: How can I set tooltips in runtime for a specific control? Pin
JUNEYT21-Mar-07 12:59
JUNEYT21-Mar-07 12:59 
QuestionCurrent directory %cd% Pin
tessers21-Mar-07 10:25
tessers21-Mar-07 10:25 
Questionneed help Pin
bapu288921-Mar-07 9:26
bapu288921-Mar-07 9:26 
hi
I am working on small assignment which is about files,I want to save some information and I also want to read that information,And for future reference so user can search information, So i have tried with this code but it's not working well ,Well it is working but it's shows all information at one time if user click btnOpen but i dont want that


   Private Sub btnAdd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnAdd.Click<br />
        Dim Response As DialogResult<br />
        Dim NumberLine As Integer<br />
        Try<br />
            FileOpen(1, "c:\test.txt", OpenMode.Append, OpenAccess.Write)<br />
            MyLine = (cboProcess.Text + txtWeight.Text + "   " + DateTime.Now.ToString)<br />
            PrintLine(1, MyLine)<br />
            FileClose(1)<br />
            MsgBox("File saved", MsgBoxStyle.Information)<br />
        Catch IOExcept As IO.FileNotFoundException<br />
            MessageBox.Show("file not found", "Default reset")<br />
        Catch IoExcept As IO.DirectoryNotFoundException<br />
            MessageBox.Show("directory not found ", "Default reset")<br />
        Finally<br />
            FileClose(1)<br />
        End Try<br />
    End Sub<br />
<br />
    Private Sub btnOpen_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnOpen.Click<br />
        FileOpen(1, "c:\test.txt", OpenMode.Input, OpenAccess.Read)<br />
        txtInk.Text = InputString(1, CInt(LOF(1)))<br />
        FileClose(1)<br />
    End Sub


I want to display search result line by line,And i also tried in btnAdd click event this code for line by line and open line by line ,But this code is not working at all

FileOpen(1, "c:\test.txt", OpenMode.Append)<br />
        For I = 1 To NumberLine<br />
            MyLine = cboProcess.Text + txtWeight.Text<br />
            PrintLine(1, MyLine)<br />
        Next I<br />
        FileClose(1)<br />

and for btnOpen click event
FileOpen(1, "c:\test.txt", OpenMode.Input)<br />
       Do Until EOF(1)<br />
           MyLine = LineInput(1)<br />
       Loop<br />
       FileClose(1)


wating for help Frown | :(
AnswerRe: need help Pin
Christian Graus22-Mar-07 5:01
protectorChristian Graus22-Mar-07 5:01 
Questionconvert x y coordinate to latlong Pin
rahul198321-Mar-07 9:05
rahul198321-Mar-07 9:05 
AnswerRe: convert x y coordinate to latlong Pin
Dave Kreskowiak21-Mar-07 9:13
mveDave Kreskowiak21-Mar-07 9:13 
GeneralRe: convert x y coordinate to latlong Pin
rahul198321-Mar-07 9:24
rahul198321-Mar-07 9:24 
GeneralRe: convert x y coordinate to latlong Pin
Colin Angus Mackay22-Mar-07 1:37
Colin Angus Mackay22-Mar-07 1:37 
GeneralRe: convert x y coordinate to latlong Pin
Dave Kreskowiak22-Mar-07 2:17
mveDave Kreskowiak22-Mar-07 2:17 
GeneralRe: convert x y coordinate to latlong Pin
Colin Angus Mackay22-Mar-07 2:46
Colin Angus Mackay22-Mar-07 2:46 
GeneralRe: convert x y coordinate to latlong Pin
Dave Kreskowiak22-Mar-07 5:07
mveDave Kreskowiak22-Mar-07 5:07 
GeneralRe: convert x y coordinate to latlong Pin
Christian Graus22-Mar-07 5:03
protectorChristian Graus22-Mar-07 5:03 
AnswerRe: convert x y coordinate to latlong Pin
The ANZAC21-Mar-07 11:22
The ANZAC21-Mar-07 11:22 
Questionserial port Pin
opmfa185021-Mar-07 9:01
opmfa185021-Mar-07 9:01 
AnswerRe: serial port Pin
Dave Kreskowiak21-Mar-07 9:10
mveDave Kreskowiak21-Mar-07 9:10 
AnswerRe: serial port Pin
chamal77721-Mar-07 20:33
chamal77721-Mar-07 20:33 
QuestionVB 2005 - sharing a COM dll problem Pin
LittleEd21-Mar-07 8:52
LittleEd21-Mar-07 8:52 
AnswerRe: VB 2005 - sharing a COM dll problem Pin
Dave Kreskowiak21-Mar-07 9:10
mveDave Kreskowiak21-Mar-07 9:10 
GeneralRe: VB 2005 - sharing a COM dll problem Pin
LittleEd21-Mar-07 12:58
LittleEd21-Mar-07 12:58 
GeneralRe: VB 2005 - sharing a COM dll problem Pin
Dave Kreskowiak22-Mar-07 5:20
mveDave Kreskowiak22-Mar-07 5:20 

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.