Comments (11)
Hello Christian,
I guess you mean the Powershell ISE.
OK, I understand. This could be done with a manifest. I see the problem that this manifest would have to be different for Windows 10, Windows Server 2016, Windows 8.1 and Windows 7.
Maybe you could try this code at the beginning of your powershell script before opening any window:
Add-Type -Name WinDPI -Namespace Native -MemberDefinition '
[DllImport("SHCore.dll", SetLastError = true)]
public static extern bool SetProcessDpiAwareness(PROCESS_DPI_AWARENESS awareness);
public enum PROCESS_DPI_AWARENESS
{
Process_DPI_Unaware = 0,
Process_System_DPI_Aware = 1,
Process_Per_Monitor_DPI_Aware = 2
}
'
[Native.WinDPI]::SetProcessDPIAwareness([Native.WinDPI+PROCESS_DPI_AWARENESS]::Process_Per_Monitor_DPI_Aware) | Out-Null
If the parameter Process_Per_Monitor_DPI_Aware is not what you want you could try Process_System_DPI_Aware instead.
This should work beginning with Windows 8.1 but I do not know what happens in ISE.
Greetings
Markus
from ps2exe.
Hello chbwien,
you're obviously right. Please give me some time to investigate (it's Corona time and I'm at home working and supporting two little children). And don't expect much, since PS2EXE uses WinForms so the possibilities are limited.
Greetings
Markus
from ps2exe.
from ps2exe.
Hello Christian,
made some tests with scaling and found that the fonts doesn't look god with other scales but the controls scale fine. Using the advanced WinForm features introduced with Creators Update didn't change anything for me.
I enabled visual styles with the new version 1.0.4 so buttons look better. I do not what more I can do. Do you have a special situation or window where the view is problematic?
Greetings
Markus
from ps2exe.
from ps2exe.
Hello Christian,
sorry, I do not see any screenshot.
Are you talking about your own WinForms windows generated by your PowerShell script or about the windows PS2EXE generates?
Greetings
Markus
from ps2exe.
from ps2exe.
Hello Christian,
ok, I understand now. I thought that you were worried about the look of the PS2EXE generated windows.
I'm not sure if we can get what you want because the high DPI support of WinForms are limited.
- How is the look if you execute your script "not compiled" as a PowerShell script?
- Can you transfer your script to WPF windows? Only WPF delivers a good high DPI look.
Greetings
Markus
from ps2exe.
from ps2exe.
from ps2exe.
You're welcome
from ps2exe.
Related Issues (20)
- Syntax errors on executable, but pure code works HOT 4
- I'm hoping to add one feature: a program packager HOT 2
- -iconfile HOT 2
- Options DPIAware gives Script/Wacatac.b!ml virus warning HOT 2
- How to prevent script extraction ? HOT 5
- Why does it make these connections? HOT 2
- Long path prefix not working HOT 2
- Error CS1034: Compiler limit exceeded: Line cannot exceed 16777214 characters HOT 4
- Powershell Core - 7 HOT 6
- The module may have listeners HOT 3
- Issue with HKCU registry in compiled script? HOT 1
- Declaring a parameter as [string] does not pass on value of parameter if [switch] params also declared. HOT 1
- Invoke-ps2exe : 无法将“Invoke-ps2exe”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路 径,请确保路径正确,然后再试一次。 HOT 2
- Add special variables to determine if a script is running in ps2exe or not HOT 2
- Continuous Integration: auto test scripts when PR and Push and auto close of stale issue?
- Console Background, font etc. HOT 7
- Socket detected as malware
- PS2EXE pathing issue after converting to exe HOT 6
- PS2EXE may be sucking up the compiled scripts HOT 4
- ps2exe - Not sure if it is a problem or limitation HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ps2exe.