|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
VB Express 2005 open help
I just started programming with VB today and I'm trying to open and list the names of files in a text field here's my code so far. I'm getting the error:
"Reference to a non-shared member requires an object reference." Declaraitons: Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Open As New System.Windows.Forms.OpenFileDialog() Dim namegetter As System.IO.FileStream Open.Filter = "All files (*.*)|*.*" Open.CheckFileExists = True Open.Title = "Open" Open.ShowDialog(Me) Try Open.OpenFile() namegetter = System.IO.FileInfo.Open(Open.FileNames) TextBox1.Text = namegetter.Name() Catch ex As Exception ' Do nothing on Exception End Try End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click End Sub End Class I have 3 Buttons and a Text Box. I'm not sure what I am doing wrong or what I should be doing. Help would be appreciated, Thanks. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > VB Express 2005 open help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|