问题描述
大家好,我是代码项目的新手,但我在这里找不到任何内容.就是这样我想创建一个使窗口屏幕无边框和全屏的应用程序.我喜欢在窗口模式下播放,以方便进行制表键切换等操作.因此,我想了解我可以学到的方法.
我想知道的原因是因为我知道这是可能的:
这是在AHK中用于黑人行动的代码,但是我不想在AHK中进行,我想在自己的应用程序中使用自己的UI进行操作,并在此过程中进行一些学习. >
Hey guys, I''m new to code project but I couldn''t find anything on here. so here it is. I would like to create an application for making a windowed screen borderless and fullscreen. I like playing in windowed mode for easy alt tabbing etc. So I would like to find out what I can learn to achieve this.
The reason I would like to know is because I know it is possible:
this is the code to do it for black ops in AHK, But I don''t want to do it in AHK, I want to do it in my own application with my own UI and do some learning on the way.
width = 1680
height = 1010
ifexist %A_AppData%\BlackOps Windowed Borderless Mode\settings.ini
{
IniRead, width, %A_AppData%\BlackOps Windowed Borderless Mode\settings.ini,Settings,Width
IniRead, height, %A_AppData%\BlackOps Windowed Borderless Mode\settings.ini,Settings,Height
}
Start:
gui +alwaysontop
gui font, s10
gui add, text, section x15 y15, Width:
gui add, edit, ys-2 w50 vWIDTH, %width%
gui add, text, x+20 ys, Height:
gui add, edit, ys-2 w50 vHEIGHT, %height%
gui font, s12
gui add, button, xs y+15 h30 default, Set BlackOps to Borderless
gui font, s7
gui add, checkbox, y+15 vSave Checked, Save settings
gui font, s7 cGray
gui add, text,, writes to an ini file to:`n%A_AppData%\BlackOps Windowed Borderless Mode\
gui show, ,BlackOps Borderless Windowed Tool by piXelman, modified by Scarystuff
Return
ButtonSetBlackOpstoBorderless:
Gui Submit
Gui Destroy
if (width = "" or height = "") {
msgbox 48, BlackOps Borderless Windowed Mode, Width/Height must not be blank!
Goto Start
}
if (save = 1) {
ifnotexist %A_AppData%\BlackOps Windowed Borderless Mode
FileCreateDir %A_AppData%\BlackOps Windowed Borderless Mode
IniWrite, %width%, %A_AppData%\BlackOps Windowed Borderless Mode\settings.ini,Settings,Width
IniWrite, %height%, %A_AppData%\BlackOps Windowed Borderless Mode\settings.ini,Settings,Height
}
IfWinExist Call of Duty®: BlackOps ; find BlackOps if it is running
{
WinActivate Call of Duty®: BlackOps ;activate the window
WinMove,Call of Duty®: BlackOps,,0,0,1680,1010 ; resize it to 1600x1024 (modify to match resolution set in BlackOps config)
WinSet Style, -0x800000 ;fix border
WinSet Style, -0xC00000 ;noborder
ExitApp
} else {
MsgBox 5,BlackOps Borderless Windowed Mode, Call of Duty®: BlackOps is not running! Start it up and hit Retry
IfMsgBox Retry
Goto Start
ExitApp
}
其中包括一个GUI和其他东西.
但是,是的,IDK如果该代码可以帮助解决任何问题,
要点:在窗口中时,没有人知道如何使应用程序(如黑色操作)进入全屏无边框模式.使用C#偏好.但是vb或c ++都可以(尽管我知道所有c ++都没有)
为任何帮助加油! :D
That includes a GUI and stuff.
But yeah, IDK if that code helps with anything but.
Main point:: Does anyone know how to make an application (like black ops) go to fullscreen borderless, when in windowed. using c# pref. but vb or c++ are fine (I know sh*t all c++ though)
Cheers for any help!! :D
推荐答案
这篇关于c#为不同的应用程序创建Windows无边界应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!