Powershell
Add(Memo,15031198,378,63)
{
Left=550
Top=160
Align=5
Strings=#25:Установка маштаба экрана.|
ScrollBars=3
}
Add(MainForm,2953706,63,56)
{
Caption="Screen Scaling"
}
Add(ComboBox,6230396,119,56)
{
Left=15
Top=30
Width=130
Height=21
Align=2
Strings=#4:100%|5:125% |5:150% |5:175% |
Text=""
link(onClick,5006580:doString,[])
}
Add(FormatStr,5006580,189,63)
{
DataCount=1
Mask="$source = @’\r\n [DllImport("""user32.dll""", EntryPoint = """SystemParametersInfo""")]\r\n public static extern bool SystemParametersInfo(\r\n uint uiAction,\r\n uint uiParam,\r\n uint pvParam,\r\n uint fWinIni);\r\n‘@\r\n$apicall = Add-Type -MemberDefinition $source -Name WinAPICall -Namespace SystemParamInfo –PassThru\r\n$apicall::SystemParametersInfo(0x009F, %1, $null, 1)"
link(onFString,357619:doConsoleExec,[])
}
Add(WinExec,357619,245,49)
{
FileName="powershell"
Mode=0
Point(doConsoleExec)
Point(onConsoleResult)
Point(onConsoleError)
link(onConsoleResult,108940:doWork2,[])
link(onConsoleError,108940:doWork3,[(305,76)])
}
Add(Charset,14483954,322,63)
{
link(onCharset,15031198:doAdd,[])
}
Add(HubEx,108940,301,63)
{
link(onEvent,14483954:doCharset,[])
}
Add(MainForm,2953706,49,63)
{
Width=296
Height=147
}
Add(InlineCode,13133648,147,70)
{
WorkPoints=#7:doScale|
Code=#15:unit HiAsmUnit;|0:|9:interface|0:|21:uses kol,Share,Debug;|0:|4:type|28: THiAsmClass = class(TDebug)|7: public|47: procedure doScale(var dt:TData; idx:word);|5: end;|0:|73:function SystemParametersInfo(uiAction,uiParam:cardinal; pvParam:pointer;|39: fWinIni:cardinal) : cardinal; stdcall;|0:|14:implementation|0:|82:function SystemParametersInfo; external 'user32.dll' name 'SystemParametersInfoA';|0:|30:procedure THiAsmClass.doScale;|5:begin|51: SystemParametersInfo(159, ToInteger(dt), nil, 1);|4:end;|0:|4:end.|
}
Add(ComboBox,6230396,98,63)
{
Width=280
Height=21
Align=2
Strings=#4:100%|5:125% |5:150% |5:175% |
Text=""
link(onClick,13133648:doScale,[])
}
Add(Memo,15031198,91,126)
{
Top=21
Width=280
Height=87
Align=5
Strings=#25:Установка маштаба экрана.|
ScrollBars=3
}
Add(MainForm,2953706,70,105)
{
link(onCreate,14663730:doRead,[])
}
Add(Memo,12829330,287,77)
{
Left=550
Top=160
Align=5
ScrollBars=3
}
Add(Registry,14663730,126,119)
{
HKey=1
Key="Control Panel\Desktop"
Value="LogPixels"
DataType=0
link(onRead,9807490:doGetIndex,[])
}
Add(StrList,9807490,182,91)
{
Strings=#2:96|3:120|3:144|3:192|0:|
Point(doGetIndex)
Point(onGetIndex)
link(onGetIndex,11596985:doGetString,[])
}
Add(StrList,11596985,231,70)
{
Strings=#6:100 % |6:125 % |6:150 % |6:200 % |0:|
Point(doGetString)
Point(onGetString)
link(onGetString,12829330:doAdd,[])
}
Add(MainForm,2953706,21,105)
{
}
Add(WebBrowser,7714425,91,105)
{
Left=200
Top=180
Visible=1
URL="ms-settings:display"
}
Проверено на
- Windows 10 (x64)
- Hiasm v4.05 build 186 (delphi)