Hi there,
how can I insert (paste) an image from clipboard into the current document?
Best regards,
cew
Insert image from clipboard
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Insert image from clipboard
Hi, cew.
You may use:HTH
You may use:
Code: Select all
ctrl.DoVerb(NULL, "ExecuteCommand", dataIn("Paste"), NULL, 0);
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 213
- Joined: Tue Feb 01, 2011 8:14 am
Re: Insert image from clipboard
I tried the following code:
But it just happens nothing.
The keyboard shortcut for "paste" works fine.
Code: Select all
object vDataOut = null;
sdiViewer.DoVerb(null, "ExecuteCommand", "Paste", out vDataOut , 0);
The keyboard shortcut for "paste" works fine.
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Insert image from clipboard
Hi, cew.
We have found one problem with it is - if your program captures the mouse then this method won't work in current release, for example, in C# when you call this code in the your button click handler because C# captures the mouse when you press left mouse button on the form button, before calling of your button-click-handler. Possible workaround for form button:We will fix this issue in the next build.
HTH.
We have found one problem with it is - if your program captures the mouse then this method won't work in current release, for example, in C# when you call this code in the your button click handler because C# captures the mouse when you press left mouse button on the form button, before calling of your button-click-handler. Possible workaround for form button:
Code: Select all
private void button1_Click(object sender, EventArgs e)
{
}
private void button1_MouseCaptureChanged(object sender, EventArgs e)
{
DoPaste();
}
private void button1_KeyUp(object sender, KeyEventArgs e)
{
DoPaste();
}
private void DoPaste()
{
try
{
object dataIn = "Paste";
object dataOut;
axCoPDFXCview1.DoVerb(null, "ExecuteCommand", dataIn, out dataOut, 0);
}
catch (Exception ex)
{
;;
}
}
HTH.
PDF-XChange Co. LTD (Project Developer)
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.
-
- User
- Posts: 213
- Joined: Tue Feb 01, 2011 8:14 am
Re: Insert image from clipboard
Oh yes, TH!Vasyl-Tracker Dev Team wrote: HTH.

Best regards,
cew
-
- Site Admin
- Posts: 5223
- Joined: Tue Jun 29, 2004 10:34 am
Re: Insert image from clipboard

If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.
Best regards
Tracker Support
http://www.tracker-software.com
Best regards
Tracker Support
http://www.tracker-software.com