Results 1 to 1 of 1

Thread: VB-Paste an Image into anouther Program

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2002
    Location
    In my Mind
    Posts
    6

    VB-Paste an Image into anouther Program

    The code below will open an Edit program and Paste the selected image into it


    VB Code:
    1. Public SelectedFile as String
    2.  
    3. Dim OpenFile As String
    4. Dim ReturnValue
    5.  
    6.    
    7.                 Clipboard.Clear                                                     ' Clear Clipboard.
    8.                 Clipboard.SetData LoadPicture(SelectedFile)             ' Get bitmap.
    9.                 Me.WindowState = 1                                              'Minimize The program
    10.                 OpenFile = (frmOptions.txtEditPath.Text)                 'Get the path and name of the program for edit
    11.                 ReturnValue = Shell(OpenFile, vbNormalFocus)        'Shell the program to open and give it focus
    12.                 AppActivate ReturnValue                                         ' Activate the Program
    13.                 SendKeys "^{v}", True                     'Sends the key strokes Ctl+v to the Edit program the v must be lower case

    Where 'SelectedFile' is the path as a 'String' to the image file you wish to edit.


    Works with VB6 Running Xp Pro and Paint Shop Pro
    Last edited by F0zzy; Dec 7th, 2003 at 03:14 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width