Click here to Skip to main content
15,889,281 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: How to save an image in access Pin
mirzamujib2-Jun-09 4:09
mirzamujib2-Jun-09 4:09 
AnswerRe: How to save an image in access Pin
mindserve2-Jun-09 2:47
mindserve2-Jun-09 2:47 
GeneralRe: How to save an image in access Pin
mirzamujib2-Jun-09 4:14
mirzamujib2-Jun-09 4:14 
AnswerRe: How to save an image in access Pin
mindserve2-Jun-09 3:18
mindserve2-Jun-09 3:18 
GeneralRe: How to save an image in access Pin
mirzamujib2-Jun-09 4:17
mirzamujib2-Jun-09 4:17 
GeneralRe: How to save an image in access Pin
mirzamujib2-Jun-09 20:51
mirzamujib2-Jun-09 20:51 
GeneralRe: How to save an image in access Pin
mirzamujib2-Jun-09 22:55
mirzamujib2-Jun-09 22:55 
AnswerRe: How to save an image in access Pin
mindserve2-Jun-09 23:49
mindserve2-Jun-09 23:49 
Add two buttons to the form1, one picture box and one label
Follow the code for the names of the controls.
Also add openfiledialog to the application from the toolbox. it is named dlgOpen

Then add this code to the form1
-------------------------------------------
Class Form1

Private Sub lblPhotoFileBefore_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblPhotoFileBefore.Click

End Sub

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

1: lblPhotoFileBefore.Text = ""
2: Photo.Image = Nothing
End Sub
Private Sub ShowPhoto()
1: If lblPhotoFileBefore.Text <> "" Then
2: Try
3: Photo.Image = Image.FromFile(lblPhotoFileBefore.Text)
4: Catch ex As Exception
5: MessageBox.Show(ex.Message, "Error Loading Photo", MessageBoxButtons.OK, MessageBoxIcon.Error)
6: End Try
7: Else
8: Photo.Image = Nothing
9: End If


End Sub


Private Sub btnLoadPhoto_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLoadPhoto.Click
1: Try
2: If dlgOpen.ShowDialog = Windows.Forms.DialogResult.OK Then
3: lblPhotoFileBefore.Text = dlgOpen.FileName

4: Call ShowPhoto()
5: End If


6: Catch ex As Exception
7: MessageBox.Show(ex.Message, "Error Opening Photo", MessageBoxButtons.OK, MessageBoxIcon.Error)
8: End Try
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub
End Class
GeneralRe: How to save an image in access Pin
mirzamujib3-Jun-09 22:40
mirzamujib3-Jun-09 22:40 
QuestionExcel template is getting opened unncecssarily--- vb.net 2008 Pin
Pankaj Garg1-Jun-09 21:37
Pankaj Garg1-Jun-09 21:37 
GeneralRe: Excel template is getting opened unncecssarily--- vb.net 2008 Pin
Kschuler2-Jun-09 5:51
Kschuler2-Jun-09 5:51 
Question[Message Deleted] Pin
beginneronly1-Jun-09 19:58
beginneronly1-Jun-09 19:58 
AnswerRe: master of the codes! help me on my project please!? Pin
Christian Graus1-Jun-09 20:15
protectorChristian Graus1-Jun-09 20:15 
GeneralRe: master of the codes! help me on my project please!? Pin
_Damian S_1-Jun-09 20:17
professional_Damian S_1-Jun-09 20:17 
GeneralRe: master of the codes! help me on my project please!? Pin
Christian Graus1-Jun-09 20:21
protectorChristian Graus1-Jun-09 20:21 
RantRe: master of the codes! help me on my project please!? Pin
CARPETBURNER2-Jun-09 0:19
CARPETBURNER2-Jun-09 0:19 
GeneralRe: master of the codes! help me on my project please!? Pin
Jon_Boy2-Jun-09 1:47
Jon_Boy2-Jun-09 1:47 
General[Message Deleted] Pin
beginneronly1-Jun-09 20:41
beginneronly1-Jun-09 20:41 
GeneralRe: master of the codes! help me on my project please!? Pin
Christian Graus1-Jun-09 20:45
protectorChristian Graus1-Jun-09 20:45 
GeneralRe: master of the codes! help me on my project please!? Pin
beginneronly1-Jun-09 21:05
beginneronly1-Jun-09 21:05 
GeneralRe: master of the codes! help me on my project please!? Pin
Christian Graus1-Jun-09 21:51
protectorChristian Graus1-Jun-09 21:51 
General[Message Deleted] Pin
beginneronly1-Jun-09 20:44
beginneronly1-Jun-09 20:44 
GeneralRe: master of the codes! help me on my project please!? Pin
Christian Graus1-Jun-09 20:47
protectorChristian Graus1-Jun-09 20:47 
GeneralRe: master of the codes! help me on my project please!? PinPopular
Dalek Dave1-Jun-09 21:20
professionalDalek Dave1-Jun-09 21:20 
GeneralRe: master of the codes! help me on my project please!? Pin
Christian Graus1-Jun-09 21:25
protectorChristian Graus1-Jun-09 21:25 

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.