Here is code to use open file dialog control in a windows based application.
Put a File dialog control on the form and a button and add the below code in the button click event.
OpenFiledialog.Filter = "Image Files*.jpg;*.gif;*.bmp;*.png;*.jpegAll Files*.*"
OpenFiledialog.InitialDirectory = "C:\"
OpenFiledialog.FilterIndex = 1
OpenFiledialog.Title = "Open File"
If (OpenFiledialog.ShowDialog() = Windows.Forms.DialogResult.OK) Then
thumb = OpenFilephoto.FileName
Picturephoto.Image = Image.FromFile(thumb)
End If
http://www.dotnetspider.com/resources/22420-Open-File-Dialog-Control.aspx
Element Naming Techniques in ASP.NET
15 years ago

No comments:
Post a Comment