<\Jericho> 0 Newbie Poster

I'm trying to open a text file in a rich text box, but when I use the

OpenFileDialog.ShowDialog()

function it says: "refrance to a non shared member requires a object refrance"
even though I've uesd

imports system.IO

if I sound like an idiot, Its because I'm learning.

My code so far:

Imports System.IO

Public Class Form1

    Dim oReader As StreamReader

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        OpenFileDialog.ShowDialog()

    End Sub
End Class
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.