Hi,
i have a bmp-image, which has the same size as the desktop. What is the easiest way in MacroScheduler to display it fullscreen without border?
Matthias
show image fullscreen without border
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Hi,
Try this:
Replace d:\desktop.bmp with the path to your bitmap file.
This example captures the screen and displays it. It can be very confusing, because effectively it "freezes" the screen for 10 seconds. Clicking on it does nothing for 10 seconds:
Be careful if you replace the Show>Dialog1 with a modal Show. You might not be able to get out of the dialog and you will get stuck. That's why I've gone with a non-modal show and a 10 second delay, so I know this script will end. You might want a loop and an OnEvent KEY_DOWN action so that you can stop the display with a key press.
Please note that these examples will only work with 9.1 as they use the dialog handle variable. In prior versions you will need to use FindWindow to determine the handle of the dialog. Search forums for FindWindow for examples. Or just make sure you're running 9.1 - much easier!
Try this:
Code: Select all
GetScreenRes>w,h
Dialog>Dialog1
Caption=MyDialog
Width=10
Height=10
Top=0
Left=0
Image=d:\desktop.bmp,0,0,w,h
EndDialog>Dialog1
Let>style=0
LibFunc>user32,SetWindowLongA,sres,DIALOG1.HANDLE,-16,style
LibFunc>user32,ShowWindow,sres,DIALOG1.HANDLE,3
Show>Dialog1
Wait>10
This example captures the screen and displays it. It can be very confusing, because effectively it "freezes" the screen for 10 seconds. Clicking on it does nothing for 10 seconds:
Code: Select all
GetScreenRes>w,h
ScreenCapture>0,0,w,h,d:\desktop.bmp
Dialog>Dialog1
Caption=MyDialog
Width=10
Height=10
Top=0
Left=0
Image=d:\desktop.bmp,0,0,w,h
EndDialog>Dialog1
Let>style=0
LibFunc>user32,SetWindowLongA,sres,DIALOG1.HANDLE,-16,style
LibFunc>user32,ShowWindow,sres,DIALOG1.HANDLE,3
Show>Dialog1
Wait>10
Please note that these examples will only work with 9.1 as they use the dialog handle variable. In prior versions you will need to use FindWindow to determine the handle of the dialog. Search forums for FindWindow for examples. Or just make sure you're running 9.1 - much easier!
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?