Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Thread Tools Search this Thread
Old 11-03-2009
Join Date: Feb 2009
Posts: 96
VB.net question

i have to create a structure out of a supplied not pad file
the note pad file is something like

and a rich text box section

using the above information how can i access the fields that are in that form with out a visible delimiter and each field is on its own line as well as how do i access the richtextbox info at the same time ?
there is one delimiter between records which is /// not between the fields themselves. How do i use that as well.

sorry about the noob question but our book sucks and the prof is not very knowledgable about vb.net since he was thrown in as a stop gap.

Reply With Quote
Old 12-03-2009
Join Date: Apr 2008
Posts: 2,001
Re: VB.net question

Why don't you use MS-Access instead of notepad... Using Access is much similar, and you will have to create a DNS from ADmin tools to connect access to VB.NET... Google around for some time to find out how... Is quite easy...!
All the best!
Reply With Quote
Old 12-03-2009
Join Date: Apr 2008
Posts: 1,948
Re: VB.net question

Code for Creating a Structure

Structure Employee
'declaring a structure named Employee
Dim EmpName As String
Dim EmpDesignation As String
Dim EmpCity As String
Dim EmpSal As Double
Dim EmpId As Integer
'declaring five fields of different data types in the structure
End Structure

Sub Main()
Dim san As New Employee()
'creating an instance of Employee
san.EmpName = "Sandeep"
san.EmpDesignation = "Software Developer"
san.EmpCity = "Sydney"
san.EmpSal = 60000
san.EmpId = 2707
'assigning values to member variables
WriteLine("EmpName" + " " + san.EmpName)
WriteLine("EmpDesignation" + " " + san.EmpDesignation)
WriteLine("EmpCity" + " " + san.EmpCity)
WriteLine("EmpSalary" + " " + san.EmpSal.ToString)
WriteLine("EmpID" + " " + san.EmpId.ToString)
'accessing member variables with the period/dot operator
End Sub

End Module
Reply With Quote
Old 12-03-2009
Join Date: Feb 2009
Posts: 96
Re: VB.net question

the data is preset i was given a txt file with the data on it... I cant change the data on the file. I need to know how to seperate the fields that im given if the delimeter is a hard return? I cant find info on that anywhere.
Reply With Quote
Old 12-03-2009
Join Date: Feb 2008
Posts: 194
Re: VB.net question

As per my knowledge, you need to call the file, load it in your form and set the fields to get the data from your concerned file; and finally use it as per your requirement.

Note: Remember that you need to close that file when you are done.
Reply With Quote

  TechArena Community > Software > Software Development

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads for: "VB.net question"
Thread Thread Starter Forum Replies Last Post
Question about SanDisk sansa Clip Zip playlists question VARIJ Portable Devices 8 27-01-2012 01:14 PM
PCI-E 2.0 Question fochdion Monitor & Video Cards 1 26-08-2010 08:59 PM
.pst question bac15 Windows Software 2 03-03-2009 07:09 PM
USB 3 Question bigboy Hardware Peripherals 3 16-12-2008 08:05 PM
Question with AGP 8x Maximus() Monitor & Video Cards 4 06-10-2008 06:12 PM

All times are GMT +5.5. The time now is 03:20 PM.