hi
I have the following simple form which allows the user to select and view an image. However currently all images are set to stretch to fit the space given. I want to be able to resize the image in proportion to fit inside the space.
Any help would be great.
Here's the code:
edit: vbcode tags not working for some reasonCode:Private Sub Dir1_Change() File1.Path = Dir1.Path 'Update files. End Sub Private Sub Drive1_Change() Dir1.Path = Drive1.Drive 'Update directory path. End Sub Private Sub File1_Click() If Right(File1.Path, 1) <> "\" Then Label1.Caption = File1.Path & "\" & File1.FileName Else 'If root directory Label1.Caption = File1.Path & File1.FileName End If frmPhoto.Open.Picture = LoadPicture(Label1.Caption) End Sub Private Sub cmdSave_Click() If Right(File1.Path, 1) <> "\" Then pic = File1.Path & "\" & File1.FileName Else 'If root directory pic = File1.Path & File1.FileName End If frmEmployee.txtPhoto.Text = pic '-----Add notice to lblNotice on frmMain frmMain.lblNotice.Caption = "" frmMain.lblNotice.Caption = "Photo Added" Unload Me End Sub
... and the form:




Reply With Quote