New topic in Getting Started: Hiding main window before screenshot?
ChrisR - Tue Apr 01, 2008 7:33 am <http://forums.realsoftware.com/viewtopic.php?t=13292> I know this has been covered before and I've had this working earlier but for some reason it just won't anymore! I can now take a screen shot and display it, the problem is my programs main window (window1) is also clearly captured in the screen shot. The line "window1.visible = false" (should?) execute before the capture and hide the window but it doesn't appear to be doing that, so I'm not sure what I'm doing wrong? The code below executes when BevelButton1 is pressed. BevelButton1 sits in window1. Help! Code: dim screenshot as picture screenshot = NewPicture( w, h, 32 ) window1.visible = false     '// Hide the window before taking the screenshot window1.fullscreen = true          '// Has to be full screen or canvas won't pick up the entire screen screenshot = Graphicshelpers.CaptureScreen( false) canvas1.width = w              '// make canvas fullscreen size canvas1.height = h Canvas1.backdrop = screenshot     '// drop in the picture bevelbutton1.visible = false         '// hide button1 canvas1.visible = true             '// Display the canvas.. window1.visible = true             '// .. inside the window bevelbutton2.left = w - bevelbutton2.width   '// place button2 lower rhs of screen bevelbutton2.top = h - bevelbutton2.height bevelbutton2.visible = true         '// display button2 lower RHS of screen
-- Over 900 classes with 18000 functions in one REALbasic plug-in. The Monkeybread Software Realbasic Plugin v8.1. <http://www.monkeybreadsoftware.de/realbasic/plugins.shtml> [email protected]
