-
Notifications
You must be signed in to change notification settings - Fork 0
Class Desktop
Kristian Virtanen edited this page Oct 14, 2024
·
8 revisions
The Desktop class enables retrieving the dimensions of the primary screen and allows setting the desktop wallpaper.
-
Desktop.Width -
Gets the width of the primary screen (desktop) in pixels.
-
Desktop.Height -
Gets the height of the primary screen (desktop) in pixels.
-
Desktop.SetWallpaper(path_or_url) -
Sets the desktop wallpaper to the specified file path or URL..
TextWindow.WriteLine(Desktop.Width)
TextWindow.WriteLine(Desktop.Height)
Desktop.SetWallpaper("path_to_image")
// Create an alias for the SmallBasicOpenEditionDll namespace
using SB = SmallBasicOpenEditionDll;
static class SB_Program
{
static void Main()
{
dynamic sbUrl = "path_to_new_image";
SB.TextWindow.WriteLine(SB.Desktop.Width);
SB.TextWindow.WriteLine(SB.Desktop.Height);
SB.Desktop.SetWallpaper(sbUrl);
}
}