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

Visual Basic

 
GeneralRe: Declare variable at runtime?? Pin
royrana6-Apr-05 23:59
royrana6-Apr-05 23:59 
GeneralCOM property from VB Pin
Anonymous5-Apr-05 22:50
Anonymous5-Apr-05 22:50 
GeneralRe: COM property from VB Pin
Dave Kreskowiak6-Apr-05 2:19
mveDave Kreskowiak6-Apr-05 2:19 
GeneralUsing Access 2003 Methods Pin
dpagka5-Apr-05 19:29
dpagka5-Apr-05 19:29 
GeneralRe: Using Access 2003 Methods Pin
Dave Kreskowiak6-Apr-05 2:17
mveDave Kreskowiak6-Apr-05 2:17 
Generalopen ascii file Pin
toto_plg5-Apr-05 19:03
toto_plg5-Apr-05 19:03 
GeneralRe: open ascii file Pin
Christian Graus5-Apr-05 19:44
protectorChristian Graus5-Apr-05 19:44 
GeneralRe: open ascii file Pin
dpagka5-Apr-05 20:03
dpagka5-Apr-05 20:03 
Use the following Code. Put an AsciiFile.txt with the data
2 4
3 40
42 56
in the applications path

Imports System.IO
Public Class Form1
Inherits System.Windows.Forms.Form


#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents ListView1 As System.Windows.Forms.ListView
Friend WithEvents ColumnHeader1 As System.Windows.Forms.ColumnHeader
Friend WithEvents ColumnHeader2 As System.Windows.Forms.ColumnHeader
<system.diagnostics.debuggerstepthrough()> Private Sub InitializeComponent()
Me.Button1 = New System.Windows.Forms.Button
Me.ListView1 = New System.Windows.Forms.ListView
Me.ColumnHeader1 = New System.Windows.Forms.ColumnHeader
Me.ColumnHeader2 = New System.Windows.Forms.ColumnHeader
Me.SuspendLayout()
'
'Button1
'
Me.Button1.Location = New System.Drawing.Point(200, 232)
Me.Button1.Name = "Button1"
Me.Button1.TabIndex = 0
Me.Button1.Text = "Button1"
'
'ListView1
'
Me.ListView1.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1, Me.ColumnHeader2})
Me.ListView1.Location = New System.Drawing.Point(8, 8)
Me.ListView1.Name = "ListView1"
Me.ListView1.Size = New System.Drawing.Size(264, 192)
Me.ListView1.TabIndex = 1
Me.ListView1.View = System.Windows.Forms.View.Details
'
'ColumnHeader1
'
Me.ColumnHeader1.Width = 120
'
'ColumnHeader2
'
Me.ColumnHeader2.Width = 135
'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(292, 266)
Me.Controls.Add(Me.ListView1)
Me.Controls.Add(Me.Button1)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)

End Sub

#End Region

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim str1 As String

Dim i As Integer = -1
Dim SReadLine As Stream
SReadLine = File.OpenRead(Application.StartupPath & "\AsciiFile.txt")
Dim SrReadLine As StreamReader = New StreamReader(SReadLine, _
System.Text.Encoding.ASCII)
SrReadLine.BaseStream.Seek(0, SeekOrigin.Begin)
While (SrReadLine.Peek() > -1)
i += 1
str1 = SrReadLine.ReadLine().ToString
Dim str2() As String = str1.Split()
Me.ListView1.Items.Add(str2(0))
Me.ListView1.Items(i).SubItems.Add(str2(1))

End While
SrReadLine.Close()
End Sub
End Class
GeneralRe: open ascii file Pin
Christian Graus5-Apr-05 20:05
protectorChristian Graus5-Apr-05 20:05 
GeneralProducing xml file from schema Pin
nitin_ion5-Apr-05 18:16
nitin_ion5-Apr-05 18:16 
GeneralRe: Producing xml file from schema Pin
Christian Graus5-Apr-05 18:39
protectorChristian Graus5-Apr-05 18:39 
GeneralRe: Producing xml file from schema Pin
nitin_ion5-Apr-05 20:14
nitin_ion5-Apr-05 20:14 
GeneralRe: Producing xml file from schema Pin
Christian Graus5-Apr-05 20:17
protectorChristian Graus5-Apr-05 20:17 
GeneralRe: Producing xml file from schema Pin
nitin_ion5-Apr-05 20:23
nitin_ion5-Apr-05 20:23 
GeneralRe: Producing xml file from schema Pin
Christian Graus5-Apr-05 20:26
protectorChristian Graus5-Apr-05 20:26 
GeneralRe: Producing xml file from schema Pin
nitin_ion5-Apr-05 20:29
nitin_ion5-Apr-05 20:29 
GeneralProblem with databound combobox Pin
kutz95-Apr-05 12:50
kutz95-Apr-05 12:50 
QuestionHow to use &quot;Joins&quot; in Crystal Reports. Pin
eshban2845-Apr-05 12:13
eshban2845-Apr-05 12:13 
AnswerRe: How to use &quot;Joins&quot; in Crystal Reports. Pin
vertig07308-Apr-05 4:05
vertig07308-Apr-05 4:05 
GeneralExchange using VB.NET Pin
Ryan McCauley5-Apr-05 11:26
Ryan McCauley5-Apr-05 11:26 
GeneralRe: Exchange using VB.NET Pin
Anonymous5-Apr-05 11:42
Anonymous5-Apr-05 11:42 
GeneralRe: Exchange using VB.NET Pin
Ryan McCauley5-Apr-05 12:01
Ryan McCauley5-Apr-05 12:01 
GeneralRe: Exchange using VB.NET Pin
Anonymous5-Apr-05 17:39
Anonymous5-Apr-05 17:39 
GeneralVB6 supported until 2008 Pin
David Crow5-Apr-05 11:22
David Crow5-Apr-05 11:22 
GeneralRe: VB6 supported until 2008 Pin
Christian Graus5-Apr-05 13:03
protectorChristian Graus5-Apr-05 13:03 

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.