Click here to Skip to main content
16,010,650 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionSound Card Interface Pin
harry82279-Apr-07 7:24
harry82279-Apr-07 7:24 
AnswerRe: Prevent form from disposing ? Pin
Dave Kreskowiak9-Apr-07 5:04
mveDave Kreskowiak9-Apr-07 5:04 
QuestionArrayList to database Pin
Guille Tamborini9-Apr-07 3:13
Guille Tamborini9-Apr-07 3:13 
AnswerRe: ArrayList to database Pin
_mubashir9-Apr-07 3:38
_mubashir9-Apr-07 3:38 
QuestionProblem with path of the ms access database Pin
vijay25839-Apr-07 2:43
vijay25839-Apr-07 2:43 
AnswerRe: Problem with path of the ms access database Pin
Colin Angus Mackay9-Apr-07 3:46
Colin Angus Mackay9-Apr-07 3:46 
AnswerRe: Problem with path of the ms access database Pin
Navneet Hegde10-Apr-07 0:00
Navneet Hegde10-Apr-07 0:00 
QuestionPlease help Pin
bapu28899-Apr-07 1:59
bapu28899-Apr-07 1:59 
Hello every one

I am doing one project with random file function and i have problem with file open but i can open file in my list box but i can not open file in text box i have three variable id , name , and weight, in find event i put one button and three text box so when user put id in first text box and click find button it should display name and weight in other two text box but it's not so any help, this is what i have done so far


Structure Ink<br />
Dim Weight As String<br />
Dim InkID As String<br />
Dim InkName As String<br />
End Structure<br />
Private Function FindLastRecordNo() As Integer<br />
Dim Temp As Ink<br />
FileNumber = FreeFile()<br />
FileOpen(FileNumber, "c:\inklist.txt", OpenMode.Random, OpenAccess.Read, , Len(Temp))<br />
FindLastRecordNo = 1<br />
Do While Not EOF(FileNumber)<br />
FileGet(FileNumber, Temp, )<br />
FindLastRecordNo = FindLastRecordNo + 1<br />
Loop<br />
FileClose(FileNumber)<br />
End Function<br />
<br />
I have no problem with this event <br />
<br />
<code>Private Sub btnOpenList_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnOpenList.Click<br />
Dim MyInk As Ink, Count As Integer, Temp As String<br />
Dim MyLine, MySubString As String, LineWidth As Integer = 60<br />
FileNumber = FreeFile()<br />
FileOpen(FileNumber, "c:\inklist.txt", OpenMode.Random, , , Len(MyInk))<br />
Count = 1<br />
lstInk.Items.Clear()<br />
Do While Not EOF(FileNumber)<br />
FileGet(FileNumber, MyInk, Count)<br />
Temp = MyInk.InkID + MyInk.InkName + MyInk.Weight<br />
lstInk.Items.Add(Temp)<br />
Count = Count + 1<br />
Loop<br />
FileClose(FileNumber)

End Sub
but i have problem with find click event it's not showing any thing in textbox

<code>Private Sub btnFind_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnFind.Click<br />
Dim MyInk As Ink<br />
FileNumber = FreeFile()<br />
FileOpen(FileNumber, "c:\inklist.txt", OpenMode.Random, , , Len(MyInk))<br />
Do While Not EOF(FileNumber)<br />
FileGet(FileNumber, MyInk, )<br />
If MyInk.InkID = txtID.Text Then<br />
Position = Loc(FileNumber)<br />
txtIName.Text = MyInk.InkName  - this is the problem:confused:<br />
txtIWeight.Text = MyInk.Weight  - this is the problem :confused:<br />
Exit Do<br />
End If<br />
Loop<br />
FileClose(FileNumber)<br />
End Sub


any help
wating for your kind help Frown | :(
AnswerRe: Please help Pin
Dave Kreskowiak9-Apr-07 5:06
mveDave Kreskowiak9-Apr-07 5:06 
AnswerRe: Please help Pin
bapu28899-Apr-07 6:27
bapu28899-Apr-07 6:27 
Questionis it possible to write a string from vbscript to console Pin
cppshishu9-Apr-07 1:28
cppshishu9-Apr-07 1:28 
AnswerRe: is it possible to write a string from vbscript to console Pin
andyharman9-Apr-07 3:35
professionalandyharman9-Apr-07 3:35 
AnswerRe: is it possible to write a string from vbscript to console Pin
Dave Kreskowiak9-Apr-07 5:07
mveDave Kreskowiak9-Apr-07 5:07 
QuestionProgramme Question Pin
loksiu019-Apr-07 0:17
loksiu019-Apr-07 0:17 
AnswerRe: Programme Question Pin
Colin Angus Mackay9-Apr-07 0:34
Colin Angus Mackay9-Apr-07 0:34 
QuestionConvert coding VB 5.0 to VB.NET 2003 Pin
Kusal9-Apr-07 0:10
Kusal9-Apr-07 0:10 
GeneralHelp me Pin
kigali8-Apr-07 23:50
kigali8-Apr-07 23:50 
GeneralRe: Help me Pin
Colin Angus Mackay9-Apr-07 0:31
Colin Angus Mackay9-Apr-07 0:31 
GeneralHelp Help on VB.NET Pin
kigali8-Apr-07 23:44
kigali8-Apr-07 23:44 
GeneralRe: Help Help on VB.NET Pin
_mubashir9-Apr-07 3:16
_mubashir9-Apr-07 3:16 
QuestionMove a borderless form Pin
Anybloodyid8-Apr-07 21:44
Anybloodyid8-Apr-07 21:44 
AnswerRe: Move a borderless form Pin
_mubashir8-Apr-07 22:16
_mubashir8-Apr-07 22:16 
AnswerRe: Move a borderless form Pin
The ANZAC8-Apr-07 22:38
The ANZAC8-Apr-07 22:38 
QuestionLPT Pin
Agus Budianto8-Apr-07 20:58
Agus Budianto8-Apr-07 20:58 
AnswerRe: LPT Pin
Dave Kreskowiak9-Apr-07 5:09
mveDave Kreskowiak9-Apr-07 5:09 

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.