Imports System Imports System.IO Imports System.Data.OleDb Imports System.Windows.Forms.VisualStyles.VisualStyleElement.TaskbarClock Imports System.Collections Public Class Form1 Dim dateiauswahl As String Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load Location = New Point(0, 0) curdir = My.Application.Info.DirectoryPath End Sub Private Sub option1_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles option1.CheckedChanged If option1.Checked = False Then Exit Sub End If dateiauswahl = "Bilder (*.jpg;*.bmp)|*.jpg;*.bmp|" & " Alle Dateien (*.*)|*.*" ofd() wahl = 1 End Sub Private Sub option2_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles option2.CheckedChanged If option2.Checked = False Then Exit Sub End If dateiauswahl = "Programme (*.exe; *.com)|*.exe;*.com|" & " Alle Dateien (*.*)|*.*" ofd() wahl = 2 End Sub Private Sub option3_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles option3.CheckedChanged If option3.Checked = False Then Exit Sub End If dateiauswahl = "Text (*.txt;*.rtf)|*.txt;*.rtf|" & " Alle Dateien (*.*)|*.*" ofd() wahl = 3 End Sub Private Sub ofd() Dim ofd As New OpenFileDialog ofd.InitialDirectory = "W:\Videothek\Bilder" ofd.Filter = dateiauswahl 'ofd.Filter = "Bilder (*.jpg;)|*.jpg;*.com|" & ' " Alle Dateien (*.*)|*.*" ofd.Title = "Browser wählen" If ofd.ShowDialog() = DialogResult.OK Then Text13.Text = ofd.FileName Else Text13.Text = " ******* Nicht gewählt ****" End If End Sub Private Sub CodeErscheinung_Click(sender As System.Object, e As System.EventArgs) Handles CodeErscheinung.Click Form2.Show() End Sub End Class