|
-
Feb 1st, 2001, 06:32 AM
#1
Thread Starter
New Member
Hi,
I really need some help on this.
I'm trying to insert a picture from clipboard into an OLE Object field and then save it into a database ( which I made using Microsoft Access 97). I found an example on how to do it but unfortunately it doesn't work. Will anybody please tell me how to fix this code ? I'm using Visual Basic 6.0
--------------------------------------------------
Private Sub Form_Load()
Data1.DatabaseName = "..\..\DB\novelty.mdb"
End Sub
' Data1 is the name of the Data Control
' novelty.mdb is the name of my database
Private Sub cmdPaste_Click()
' Pastes data from clipboard into
' Picture field represented by
' OLE Container control olePicture.
' Allow only embedded (not linked) data.
olePicture.OLETypeAllowed = vbOLEEmbedded
If olePicture.PasteOK = True Then
olePicture.Paste
Else
MsgBox "The information on the clipboard can't be pasted.", vbExclamation
End If
End Sub
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
|