Search Results

Search found 2119 results on 85 pages for 'clipboard pictures'.

Page 2/85 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Need Help Setting Transparent Image to Clipboard

    - by AMissico
    I need help setting a transparent image to the clipboard. I keep getting "handle is invalid". Following is the specific code with the complete working project at ftp://missico.net/ImageVisualizer.zip. This is an image Debug Visualizer class library, but I made to run as executable for testing. (Note that window is a toolbox window and show in taskbar is set to false.) I was tired of having to perform a screen capture on the toolbox window, open with an image editor, and then deleting the background added due to the screen capture. So I thought I would quickly put the transparent image onto the clipboard. Well, the problem is...no transparency support for Clipboard.SetImage. Google to the rescue...not quite. This is what I have so far pulled from a number of sources. See the code for the main reference. My problem is the "invalid handle" when using CF_DIBV5. I imagine the problem is related to BITMAPV5HEADER and CreateDIBitmap. Any help from you GDI/GDI+ Wizards would be greatly appreciated. public static void SetClipboardData(Bitmap bitmap, IntPtr hDC) { const uint SRCCOPY = 0x00CC0020; const int CF_DIBV5 = 17; const int CF_BITMAP = 2; //'reference //'http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/816a35f6-9530-442b-9647-e856602cc0e2 IntPtr memDC = CreateCompatibleDC(hDC); IntPtr memBM = CreateCompatibleBitmap(hDC, bitmap.Width, bitmap.Height); SelectObject(memDC, memBM); using (Graphics g = Graphics.FromImage(bitmap)) { IntPtr hBitmapDC = g.GetHdc(); IntPtr hBitmap = bitmap.GetHbitmap(); SelectObject(hBitmapDC, hBitmap); BitBlt(memDC, 0, 0, bitmap.Width, bitmap.Height, hBitmapDC, 0, 0, SRCCOPY); if (!OpenClipboard(IntPtr.Zero)) { throw new System.Runtime.InteropServices.ExternalException("Could not open Clipboard", new Win32Exception()); } if (!EmptyClipboard()) { throw new System.Runtime.InteropServices.ExternalException("Unable to empty Clipboard", new Win32Exception()); } //IntPtr hClipboard = SetClipboardData(CF_BITMAP, memBM); //works but image is not transparent //all my attempts result in SetClipboardData returning hClipboard = IntPtr.Zero IntPtr hClipboard = SetClipboardData(CF_DIBV5, memBM); //because if (hClipboard == IntPtr.Zero) { // InnerException: System.ComponentModel.Win32Exception // Message="The handle is invalid" // ErrorCode=-2147467259 // NativeErrorCode=6 // InnerException: throw new System.Runtime.InteropServices.ExternalException("Could not put data on Clipboard", new Win32Exception()); } if (!CloseClipboard()) { throw new System.Runtime.InteropServices.ExternalException("Could not close Clipboard", new Win32Exception()); } g.ReleaseHdc(hBitmapDC); } } private void __copyMenuItem_Click(object sender, EventArgs e) { //'Applications that I have verified can paste the clipboard custom data format PNG are: //' Word 2003 //' Excel 2003 using (Graphics g = __pictureBox.CreateGraphics()) { IntPtr hDC = g.GetHdc(); MemoryStream ms = new MemoryStream(); __pictureBox.Image.Save(ms, ImageFormat.Png); ms.Seek(0, SeekOrigin.Begin); Image imag = Image.FromStream(ms); // Derive BitMap object using Image instance, so that you can avoid the issue //"a graphics object cannot be created from an image that has an indexed pixel format" Bitmap img = new Bitmap(new Bitmap(imag)); SetClipboardData(img, hDC); g.ReleaseHdc(); } }

    Read the article

  • Need Help Setting an Image with Transparent Background to Clipboard

    - by AMissico
    I need help setting a transparent image to the clipboard. I keep getting "handle is invalid". Basically, I need a "second set of eyes" to look over the following code. (The complete working project at ftp://missico.net/ImageVisualizer.zip.) This is an image Debug Visualizer class library, but I made the included project to run as an executable for testing. (Note that window is a toolbox window and show in taskbar is set to false.) I was tired of having to perform a screen capture on the toolbox window, open the screen capture with an image editor, and then deleting the background added because it was a screen capture. So I thought I would quickly put the transparent image onto the clipboard. Well, the problem is...no transparency support for Clipboard.SetImage. Google to the rescue...not quite. This is what I have so far. I pulled from a number of sources. See the code for the main reference. My problem is the "invalid handle" when using CF_DIBV5. Do I need to use BITMAPV5HEADER and CreateDIBitmap? Any help from you GDI/GDI+ Wizards would be greatly appreciated. public static void SetClipboardData(Bitmap bitmap, IntPtr hDC) { const uint SRCCOPY = 0x00CC0020; const int CF_DIBV5 = 17; const int CF_BITMAP = 2; //'reference //'http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/816a35f6-9530-442b-9647-e856602cc0e2 IntPtr memDC = CreateCompatibleDC(hDC); IntPtr memBM = CreateCompatibleBitmap(hDC, bitmap.Width, bitmap.Height); SelectObject(memDC, memBM); using (Graphics g = Graphics.FromImage(bitmap)) { IntPtr hBitmapDC = g.GetHdc(); IntPtr hBitmap = bitmap.GetHbitmap(); SelectObject(hBitmapDC, hBitmap); BitBlt(memDC, 0, 0, bitmap.Width, bitmap.Height, hBitmapDC, 0, 0, SRCCOPY); if (!OpenClipboard(IntPtr.Zero)) { throw new System.Runtime.InteropServices.ExternalException("Could not open Clipboard", new Win32Exception()); } if (!EmptyClipboard()) { throw new System.Runtime.InteropServices.ExternalException("Unable to empty Clipboard", new Win32Exception()); } //IntPtr hClipboard = SetClipboardData(CF_BITMAP, memBM); //works but image is not transparent //all my attempts result in SetClipboardData returning hClipboard = IntPtr.Zero IntPtr hClipboard = SetClipboardData(CF_DIBV5, memBM); //because if (hClipboard == IntPtr.Zero) { // InnerException: System.ComponentModel.Win32Exception // Message="The handle is invalid" // ErrorCode=-2147467259 // NativeErrorCode=6 // InnerException: throw new System.Runtime.InteropServices.ExternalException("Could not put data on Clipboard", new Win32Exception()); } if (!CloseClipboard()) { throw new System.Runtime.InteropServices.ExternalException("Could not close Clipboard", new Win32Exception()); } g.ReleaseHdc(hBitmapDC); } } private void __copyMenuItem_Click(object sender, EventArgs e) { using (Graphics g = __pictureBox.CreateGraphics()) { IntPtr hDC = g.GetHdc(); MemoryStream ms = new MemoryStream(); __pictureBox.Image.Save(ms, ImageFormat.Png); ms.Seek(0, SeekOrigin.Begin); Image imag = Image.FromStream(ms); // Derive BitMap object using Image instance, so that you can avoid the issue //"a graphics object cannot be created from an image that has an indexed pixel format" Bitmap img = new Bitmap(new Bitmap(imag)); SetClipboardData(img, hDC); g.ReleaseHdc(); } }

    Read the article

  • c# catch clipboard changes, wont work if form minimized to tray

    - by AnyM
    Hi .. i have a problem using the "Catch Clipboard Events code" found on this link : http://stackoverflow.com/questions/621577/clipboard-event-c/2487582#2487582 the code works great only if the form stays in the foreground, not minimized to tray BUT: if you add a notifyicon and minimize the form to tray and turn the showintaskbar to false (so that you only have an icon in the tray), the program wont catch any clipboard changes anymore ... even if you maximize the form back, it wont work again ...you have to restart the program .. any idea on how to solve this issue !? how can i catch clipboard changes, even if the form is minimized into the tray !? any help is really appreciated ... Thanks

    Read the article

  • Clipboard Debugging

    - by Jake Pearson
    In the olden times of .NET 1.1, I could use the SoapFormatter to find out exactly what was getting serialized when I copied an object into the clipboard. Fast forward to 2010, and I tried to do the same trick. It turns out the SoapFormatter does not support generics. Is there an alternative way to find out exactly what binary objects are serialized into the clipboard? For example lets say I have this class: public class Foo { public List<Goo> Children; } If I send an instance of it to the clipboard, I would like to take a look at what is in the clipboard to see if it's children list was included or not. Update: I was finally able to find the over copied field with the debugger. Visual Studio did it's job.

    Read the article

  • Copy filename to clipboard

    - by Charles Roper
    I am looking for a Windows utility that can copy the currently selected filename, including the path, to the clipboard, ideally through the right-click menu. Some degree of flexibility would be useful, like the ability to copy just the filename, path+filename, filename minus extension, etc. This isn't essential, though, as long as it can copy the path+filename. Must be compatible with XP, Vista and Win7. Free and/or open source would be ideal. Thanks!

    Read the article

  • clipboard addon to remove text formatting

    - by Frank Schwieterman
    I was just wondering if anyone know of a Windows application that will remove formatting from any text in the clipboard? So if I copy something from word into another document, the content is pasted as the original text without formatting. I want this to work no matter what application I paste into.

    Read the article

  • Clipboard feature in Windows

    - by iceman
    In Opensuse 11.0 Linux we can select any piece of text anywhere(browser, emacs..) and its in the clipboard and then we can paste it with the middle mouse click. How can i get similar functionality in Windows Xp?

    Read the article

  • Show contents of the windows clipboard

    - by PsiX
    How can I see what the Windows clipboard currently contains without using the paste operation? I don't want the "pasted-to" application to perform any actions on the clipboard (e.g. formatting text, converting). Is there a tool which shows the clipboard's objects and their format (CF_BITMAP, CF_TEXT, etc.) and content (in simple bytes e.g.)?

    Read the article

  • getting rich text from the X clipboard

    - by intuited
    How can rich text be obtained from the X clipboard? For example, if you copy some text from a web browser and paste it into kompozer, it pastes as HTML, with links etc. preserved. However, xclip -o for the same selection just outputs plain text. I'd like to pull the HTML out and into a text editor.

    Read the article

  • ssh -x : howto get clipboard?

    - by Gupu User
    Hello! I'm connected to a server via ssh -x and my only way to get text out of the system is the x clipboard (unless i want to take thousends of screenshots and OCR over it). I can not execute any programs on the other machine, because i don't have access. How can I achive this?

    Read the article

  • Copying info from the device manager to the clipboard

    - by user12816
    I have a Logitech webcam, which I can plug into my Windows XP machine via USB. When I open the Device Manager, I can select the webcam and choose Properties--Driver--Driver Details. This gives me the following list of driver filenames: C:\Program Files\Common Files\logishrd\WUApp32.exe [25 more filenames...] C:\WINDOWS\TWAIN_32\QuickCam\reset.wav My question is, is there any way to copy this list to the clipboard? Copying it by hand is a drag.

    Read the article

  • Synchronized Clipboard?

    - by Boris_yo
    Evernote, Dropbox, Xmarks and what not. Many know these but is there a software that can synchronize clipboard between devices? For what you might be asking? Here is for what: Sometimes I want URL that I see on my desktop/laptop computer to enter into laptop's/smartphone's browser but unless I save that URL to .TXT file, email URL or save to Evernote there is no other way to directly do that. So is there such software already?

    Read the article

  • JavaScript add to clipboard with additional text

    - by Kemo
    I know how to add to clipboard with JavaScript, but what I want now is TechCrunch clipboard trick; when someone copies some text ( ctrl+c, right click copy, clicking on a copy link on-site ), additional text is added to the clipboard ( like "this text was copied from ... ). I know they use Tynt, but don't really know is this a feature you get with it or custom coded?

    Read the article

  • How to make a simple clipboard monitor in python

    - by envy
    Hi! I was wondering how to make a simple Clipboard Monitor in python, for GUI I'm using PyGTK. I found gtk.clipboard class and all that but I couldn't find any solution to get the "signals" to trigger the event when the clipboard content has changed :( Any ideas? Thanks you! :)

    Read the article

  • Selecting pictures with Jquery and Javascript

    - by Axschech
    I'm testing out a layout on a website using 3 pictures here: Schechterbusiness.info the left button works, making it go through the pictures. But I can't figure out how to get the right button to work, which is supposed to scroll through the other way. I know there's probably a way to do it with arrays but I can't wrap my brain around it. Halp! Code to scroll through pictures: $('#fryLink').click(function() { $('#hide').hide(); $('#img').hide(); count++; if(count == 1) { $('#img').attr("src","images/fry.png"); } else if(count == 2) { $('#img').attr("src","images/bender.png"); } else if(count == 3) { $('#img').attr("src","images/zoidberg.png"); } $('#img').show("fade"); if(count > 2) { count = 0; }

    Read the article

  • How to store and retrieve pictures using PHP?

    - by user1276898
    I am building a webpage using PHP to search within my database. I am able to do a query and get the data to show on my page. I also have a picture that is related to each record. Let's say something like a picture ID for each employee. I am wondering what is the best way to store and retrieve pictures in order to get it show using PHP. Is there a way to store all the pictures in the subfolder like " image" and retrieve the pictures using PHP? I tried to search around on the internet, but I get confused. Also, when I type something in the search box and click the button, is there a way to keep the input in the search box without erasing it? Thank you very much.

    Read the article

  • What is the most efficient way to scan in thousands of pictures? [closed]

    - by leora
    My parents have a number of really large albums and the pictures are starting to face in a lot of cases so we thought it would be a good idea to scan in all the pictures and move them to online albums. The issue is that the task is daunting given that there are thousands of pictures. Are there any services or ideas on how to scan in albums of pictures that won't take up hundreds of man hours for me?

    Read the article

  • cannot paste words with pictures in ms word 2010

    - by user23950
    Is there any option that will correct this? I'm pasting my assignment with some pictures in it in ms word 2010 from a webpage but it doesn't seem to be showing the picture that is copied along with the words. When I try to right click and see the paste options. The only option that I can see is text. Please help.

    Read the article

  • Directly paste clipboard image into gmail message

    - by Frank Meulenaar
    I would like to be able to directly paste my clipboard image into a Gmail message. I could then just do alt-print screen, go to Gmail compose and press ctrl-v to embed a screenshot, for instance. I'm not talking about embedding a image from disk into my email; that's easily done. I want to skip the step where I have to save it to disk first. Eudora/Thunderbird support this. There's a program that does this, it's at picturepaste.com, but it's paid (and and the website uses Javascript for no obvious reasons). You can see the demo movie there if it's not clear what I would like. I would like to find a free alternative, or make one myself, but I have no clue how picturepaste works.

    Read the article

  • Is there a browser extension which can copy a webpage snippet/clip/scnapshot to clipboard

    - by Yuriy Kulikov
    I have to save links to web pages into a google drive document. What I want is to copy simple webpage snippet, similar to the one this G+ extension button does, to clipboard. One picture and page title as a link. I was looking for many days now and I still couldn't find anything which does the same thing. In the end the thing I came up with is to hit the G+ button and copy contents of the popup. I am wondering if anybody knows how can this be done right? Thanks in advance, BR, Yuriy

    Read the article

  • How to resolve problematic vnc/xming clipboard interaction?

    - by frankc
    I often have both a VNC client window and several X windows open (via Xming) at the same time on my Windows XP desktop. When this happens, the X windows, especially emacs and firefox, often lock up or behave erratically. I am pretty sure I have narrowed this down to contention over the clipboard. I wasn't really able to find any options controlling this behavior in either Xming or VNC. Is there a solution to this problem? Right now, I have to close VNC when I am actively using emacs...

    Read the article

  • Use Ultracopier / Teracopy with Ditto Clipboard Manager

    - by drrtyrokka
    I really like the tool Ultracopier because of the copy acceleration and additional details on Windows. Also the ability to pause the copy is really helpful. Additionally I want to use a clipboard manager such as Ditto. The problem here is, when I run Ditto, my system won't use the Ultracopy tools for copiying anything It uses the windows default. How can I use the advantages of both tools? Is there any similar tool (perhaps a single tool) which gives me these options?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >