https://github.com/psulek/dotscreen
DotScreen is library to get information about system screens in applications without dependency on WinForms or WPF.
https://github.com/psulek/dotscreen
console desktop screen winforms wpf
Last synced: about 1 month ago
JSON representation
DotScreen is library to get information about system screens in applications without dependency on WinForms or WPF.
- Host: GitHub
- URL: https://github.com/psulek/dotscreen
- Owner: psulek
- License: mit
- Created: 2023-01-26T20:32:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-09T12:35:06.000Z (over 2 years ago)
- Last Synced: 2025-06-02T13:11:45.343Z (about 1 year ago)
- Topics: console, desktop, screen, winforms, wpf
- Language: C#
- Homepage:
- Size: 37.1 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DotScreen
**DotScreen** is library to get information about system screens in applications without dependency on WinForms or WPF.
> Primary console/library projects will benefit using this library as they dont want direct dependency on Winforms nor WPF
### Install
Install nuget package - [ScaleHQ.DotScreen](https://www.nuget.org/packages/ScaleHQ.DotScreen/)
or via *dotnet CLI*:
```bash
dotnet add package ScaleHQ.DotScreen --prerelease
```
### API
Class `ScaleHQ.DotScreen.Screen.Screen` has almost all properties matching `System.Windows.Forms.Screen`.
There is only difference in namespace, instead of `System.Windows.Forms` there is `ScaleHQ.DotScreen.Screen`.
```c#
foreach (var screen in ScaleHQ.DotScreen.Screen.AllScreens)
{
string deviceName = screen.DeviceName;
Rectangle bounds = screen.Bounds;
Rectangle workingArea = screen.WorkingArea;
// rest...
}
```
In **DotScreen** there are some additions to `Screen` class:
- ScaleFactor (double)
- WorkingAreaScaled (RectangleD)
- BoundsScaled (RectangleD)
- SystemVirtualScreen (Rectangle)
- SystemVirtualScreenScaled (RectangleD)
- MultiMonitorSupport (bool)
- IsProcessDPIAware (bool)
- ...
> There is not need to add \ or \ into project (csproj) file when using DotScreen
### Remark
This library is port of [WpfScreenHelper](https://www.nuget.org/packages/WpfScreenHelper).
It avoids dependencies on Windows Forms and WPF libraries.