|
| | |||||||
| Tablet PC Developers Show off your work while discussing with others how to create ink enabled applications. |
| | LinkBack | Thread Tools |
| |||
| Transparent Form, Solid InkOverlay? Hi, I am trying to create a transparent form with solid InkOverlay in C# using Visual Studio. I placed an inkoverlay on top of the form so I can write stuff on it. However, now I want to make the form transparent, but I also want the controls and the ink drawn on the inkoverlay to be solid. Is there a way to do this? I've tried to use opacity, but that just makes everything transparent. I've tried a few other things such as attaching the overlay to a panel, setting the transparencyKey, etc, but nothing works. Any help would be appreciated =). Thanks! |
| |||
| RE: Transparent Form, Solid InkOverlay? WPF is the only framework that we ship, that makes this scenario "easy". <Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" WindowStyle="None" AllowsTransparency="True" Background="#789A"> <InkCanvas Background="Transparent" Opacity="1.0"> <InkCanvas.DefaultDrawingAttributes> <DrawingAttributes Width="7" Height="7" Color="Purple" /> </InkCanvas.DefaultDrawingAttributes> </InkCanvas> </Window> I say "easy" in quotes because you'll have to take responsibility to draw all your own chrome (titlebar, close button etc). But still it's much easier than dealing with UpdateLayeredWindow() in Win32. http://msdn2.microsoft.com/en-us/library/ms633556.aspx AFAIK winforms doesn't offer any help for doing per-pixel alpha compositing with UpdateLayeredWindow. As you've discovered, it only offers whole-window opacity ala SetLayeredWindowAttributes. WPF may or may not work for you. It's great if everything you're doing is available natively within WPF. It's not so great if you're say, trying to collect ink over IE or some other hosted Win32 or WinForms content or controls. Still, even for that kind of scenario, I've seen some people go the route where they create a new top-level window with WPF (borderless, chromeless, AllowsTransparency=True) to do the ink collection. They just keep its size and position in sync with the underlying Win32/Winforms app window... messy, but it works. :-) HTH, -S "Alz" wrote: > Hi, I am trying to create a transparent form with solid InkOverlay in C# > using Visual Studio. > > I placed an inkoverlay on top of the form so I can write stuff on it. > However, now I want to make the form transparent, but I also want the > controls and the ink drawn on the inkoverlay to be solid. Is there a way to > do this? I've tried to use opacity, but that just makes everything > transparent. I've tried a few other things such as attaching the overlay to > a panel, setting the transparencyKey, etc, but nothing works. Any help would > be appreciated =). > > Thanks! |
| Bookmarks |
| Thread Tools | |
| |
| | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem Ink over Transparent Form | CJ | Tablet PC Developers | 0 | 11-28-2008 09:16 PM |
| Access 2007 Transparent Form | scott w t | Windows Vista | 0 | 05-16-2008 07:10 AM |
| InkOverlay and Word | Matt Ray | Tablet PC Developers | 3 | 07-25-2007 03:20 PM |
| Re: InkOverlay | Kendal Goodrich | Tablet PC Developers | 1 | 05-06-2007 07:31 AM |
| InkOverlay Handle Leak? | JasonG | Windows XP Tablet PC Newsgroup | 3 | 02-22-2005 08:16 AM |
| New To Technology Questions? | Do You Need Help with Your Computer or Device? | Do You Need Help with this site? |