|
-
Nov 15th, 1999, 02:09 AM
#1
Thread Starter
Frenzied Member
Hi,
This is something I dont understand.. AT ALL.
I even have a example I cant figure it out ( the guy wrote it WAY above me)
So could someone give me a SIMPLE example of how to open a BMP file from the computer ( so that the user picks the file)
Help please?
-
Nov 15th, 1999, 03:00 AM
#2
Sure. Add Microsoft CommonDialog Control, PictureBox and Command Button to your form. Change the AutoSize property of the PictureBox to TRUE. Put this code on Button's Click event:
Code:
Private Sub Command1_Click()
Dim strPath As String
On Error Resume Next
With CommonDialog1
.Filter = "Bitmap Files (*.bmp)|*.bmp"
.ShowOpen
If Err.Number = cdlCancel Then Exit Sub
strPath = .FileName
End With
Picture1.Picture = LoadPicture(strPath)
End Sub
Regards,
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819
-
Nov 15th, 1999, 03:35 AM
#3
Addicted Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|