Mioplanet Documentation Center
Resources and Help
HomeProductsMioScriptJavaScriptTechNotesPHP
   Home | MioScript | screen... SEARCH    

screen...

  Functions
screen.copyTo.ID
screen.desktop.height
screen.desktop.left
screen.desktop.top
screen.desktop.width
screen.getPixel
screen.height
screen.monitor.count
screen.monitor.height
screen.monitor.left
screen.monitor.top
screen.monitor.width
screen.resolution.restore
screen.resolution.set
screen.width

  MioScript Reference
> Statements
app...
browser...
dialog...
disk...
draw...
extern...
filename...
keyboard...
menu...
mio...
mouse...
num...
path...
pushButton...
reg...
RS232...
sci...
screen...
shortcut...
sound...
str...
system...
time...
var...
window...

screen...

Language: MioScript
Product: MioFactory


Functions to get information about the monitors connected to the computer, and do screen captures.

Screen Capture


screen.copyTo.ID
screen.getPixel

Desktop


screen.desktop.left, screen.desktop.top, screen.desktop.width, screen.desktop.height

Monitors


screen.width, screen.height
screen.monitor.count
screen.monitor.left, screen.monitor.top, screen.monitor.width, screen.monitor.height

Set Resolution


It is possible to set the resolution for a monitor.
This can be useful to increase the refresh rate of full screen video or animation.

screen.resolution.set, screen.resolution.restore




MioScript Sample Code

// This sample create one window per monitor
// and right information about each monitor.

event.load

    // Scan monitors and create a window for each one of them
    for(&index, 0, screen.monitor.count())
        &this = window.create()
        window.&this.autoClose(false, false)
        window.&this.pos.now(
            screen.monitor.left(&index), screen.monitor.top(&index),
            screen.monitor.width(&index), screen.monitor.height(&index)
        )
        &w=window.&this.width()
        &h=window.&this.height()

        draw.&this.rect = 0,0,&w, &h, 0
        draw.&this.text.ex(50,50,&index": "&w"*"&h, "verdana", 30, num.rgb(255,255,255))
        draw.&this.text.ex(
            50,75,"x:"window.&this.left()", y:"window.&this.top(), "verdana", 
            30, num.rgb(180,180,180)
        )

        draw.&this.paint
    for.next
event.end

// Close the application when the user click on a window

event.mouse:click
    for(&index, 0, var.array.count(mon))
        window.&mon[&index].visible(false)
    for.next
    app.close()
event.end