Xojo Conferences

Platforms to show: All Mac Windows Linux Cross-Platform

Required plugins for this example: MBS Picture Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Picture/Screenshot/Screenshot
This example is the version from Sun, 17th Mar 2012.
Project "Screenshot.rbp"
Class Window1 Inherits Window
End Class
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class Window2 Inherits Window
Control Timer1 Inherits Timer
ControlInstance Timer1 Inherits Timer
EventHandler Sub Action() details End EventHandler
End Control
EventHandler Sub Open() left=500 End EventHandler
Sub details() dim q as picture dim x as integer dim y,w,h as integer w=width h=height 'x=min(max(0,system.mousex-w/4),screen(0).width-150) 'y=min(max(0,system.mousey-h/4),screen(0).height-150) x=system.mousex-w/4 y=system.mousey-h/4 if lastx<>x or lasty<>y then lastx=x lasty=y q=ScreenshotRectMBS(x,y,w/2,h/2) if q<>Nil then graphics.drawpicture q,0,0,w,h,0,0,q.width,q.height end if end if End Sub
Property Protected lastx As integer
Property Protected lasty As integer
End Class
Class App Inherits Application
EventHandler Sub Open() dim c,i as integer dim w as Window1 c=ScreenCount-1 for i=0 to c w=new Window1 w.backdrop=ScreenshotDisplayMBS(i) w.Title="Screen "+str(i) next window2.show End EventHandler
End Class
End Project

See also:

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Picture Plugin.

MBS Xojo Plugins