じ☆ve冰风 发表于 2026-8-2 09:18:44

Hide Game Window's Border, Close/Alt+F4 canceler

Made this for a request and sharing it here in case anyone else needs it.

Even with all the hates, there still seems to have quite a demand for this.

Just to clarify in case some one started to post something negative about this:

I know, taking away close button is cruel and not fun. I don't like this type of game myself, nor will i ever play this kind of game. But this script is made on demand for those who wanted the hate of their players.
 Those who tries to build a game with no returns, doesn't want their player to quit without save and exit. etc etc..


What it Does:

This script takes away the user's ability to exit the window using the close button/clicking the logo/using Alt + F4.

This script also fully hides the "border" of the game window, making it border-less.

IMPORTANT NOTE: This script can do nothing about the "Task Manager Close"/"Pull The Plug" options.

How it Works:

Plug & Play, simply paste this script below Material and above Main.

Compatiblity:

Should work with other scripts unless they modify the window border/class using win32api.

Terms of Use:

Feel free to use it any way you like for both commercial/free games.

Script:

Spoiler                Code:       
#==============================================================================# ■ Meow Face Exit Canceler#------------------------------------------------------------------------------# Hide Game Window's Border, Disable Close Button and Alt + F4#==============================================================================# How to Use:# Plug & Play, Put this script below Material and above Main#==============================================================================MF_GPPSA = Win32API.new('kernel32', 'GetPrivateProfileStringA', 'PPPPLP', 'L')MF_FW = Win32API.new('user32', 'FindWindow', 'pp', 'l')MF_SCL = Win32API.new('user32', 'SetClassLong', 'lil', 'i')MF_SWL = Win32API.new('user32', 'SetWindowLong', 'iii', 'i')MF_TITLE = " " * 256MF_GPPSA.call('Game','Title','',MF_TITLE,256,".\\Game.ini")MF_TITLE.delete!(" ")MF_HWND = MF_FW.call('RGSS Player', MF_TITLE)MF_SCL.call(MF_HWND, -26, 0x0200)MF_SWL.call(MF_HWND, -16, 0x14000000)








本贴来自国际rpgmaker官方论坛作者:MeowFace处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/hide-game-windows-border-close-alt-f4-canceler.44846/
页: [1]
查看完整版本: Hide Game Window's Border, Close/Alt+F4 canceler