Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Fullscreen window?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
podstanar
Advanced Cheater
Reputation: 4

Joined: 02 May 2012
Posts: 82
Location: Flatland

PostPosted: Thu Sep 23, 2021 4:17 am    Post subject: Fullscreen window? Reply with quote

Hey, i was wondering can we get a true fullscreen behavior for some windows, like memory viewer? That means hiding window's title bar and drawing over taskbar. Basically same behaviour as Chrome's or Win explorer's F11 mode. Smile
_________________
Singularity is nearer.
Back to top
View user's profile Send private message
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1055
Location: 0x90

PostPosted: Thu Sep 23, 2021 6:25 am    Post subject: This post has 1 review(s) Reply with quote

In the Cheat Table Lua Script place this code:
Code:

local mv = getMemoryViewForm()
local scrHeight = getScreenHeight()
local scrWidth = getScreenWidth()

function fsMode()
  if not mv.visible then mv.visible = true end
  mv.BorderStyle = "bsNone"
  mv.Width = scrWidth
  mv.Height = scrHeight - 40
  mv.Left = 0
  mv.Top = 0
end

function nMode()
  if not mv.visible then mv.visible = true end
  mv.BorderStyle = "bsSizeable"
  mv.Width = 1024
  mv.Height = 786
  mv.Left =  scrWidth / 4
  mv.Top =  scrHeight / 4
end


Add an auto assembler script to Cheat Engine and set the hotkey to F11 (since it's the most commonly used one for this feature).

Set the script to this code:
Code:

[ENABLE]
{$LUA}

fsMode()

{$ASM}
[DISABLE]
{$LUA}

nMode()


Now you can use F11 to Enable/Disable full-fullscreen mode. Smile
Back to top
View user's profile Send private message
Birdi
Expert Cheater
Reputation: 0

Joined: 08 Jun 2020
Posts: 122
Location: Migrating

PostPosted: Thu Sep 23, 2021 9:03 am    Post subject: Reply with quote

I just wanted to add onto what LeFixer offered:
Mainform hotkey and menuitem to toggle it, if that's easier somehow.

Code:

state = false

function addMenuItems(caption,clickFunction)
  local caption = caption or 'NewMenuItem1'
  local parent = getMainForm().Menu.Items
  for i=0,parent.Count-1 do
    if parent[i].Caption == caption then return end
  end
  FSmenuitem = createMenuItem(parent)
  parent.add(FSmenuitem)
  FSmenuitem.Caption = caption
  FSmenuitem.OnClick = clickFunction
end

function toggleFullscreen()
  if state then
    fsMode()
  else
    nMode()
  end
  state = not state
end

function fsMode()
  local mv = getMemoryViewForm()
  local scrHeight = getScreenHeight()
  local scrWidth = getScreenWidth()
  if not mv.visible then mv.visible = true end
  mv.BorderStyle = "bsNone"
  mv.Width = scrWidth
  mv.Height = scrHeight - 40
  mv.Left = 0
  mv.Top = 0
end

function nMode()
  local mv = getMemoryViewForm()
  local scrHeight = getScreenHeight()
  local scrWidth = getScreenWidth()
  if not mv.visible then mv.visible = true end
  mv.BorderStyle = "bsSizeable"
  mv.Width = 1024
  mv.Height = 786
  mv.Left =  scrWidth / 4
  mv.Top =  scrHeight / 4
end

createHotkey(toggleFullscreen,VK_F11)
setGlobalDelayBetweenHotkeyActivation(1000)
addMenuItems('Toggle Fullscreen',toggleFullscreen)


This only solves the OP's desire to make one given window (Memory Viewer) fullscreen, rather than any given one, though, so it may be worth looking into making it apply to the "active window" if possible; I'm not sure.

I'll also note that this currently forces the Memory Viewer to pivot to your Main monitor (1) if you use multiple, then change to Fullscreen.

I'll look into it if I find time/remember, but key functions to implement would be something of
Code:

getWindowlist()
findWindow(classname OPTIONAL, caption OPTIONAL)
getWindow(windowhandle, command)
getForegroundWindow()

and work from there.

_________________
Trying to learn!

Add me on Discord if you want hands-on help: Birdi#0007
Back to top
View user's profile Send private message Visit poster's website
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1055
Location: 0x90

PostPosted: Thu Sep 23, 2021 9:31 am    Post subject: Reply with quote

Nice addition Birdi Smile. I am certain my script only targeted the Memory Viewer Window. Nevertheless, your additions are very much welcome. Thank you.
Back to top
View user's profile Send private message
podstanar
Advanced Cheater
Reputation: 4

Joined: 02 May 2012
Posts: 82
Location: Flatland

PostPosted: Thu Sep 23, 2021 4:39 pm    Post subject: Reply with quote

Thanks! Anyway, it doesn't seem to work completely, taskbar is still drawn above the window. Also, yes, i'm using my 2nd monitor, so that seems to be the issue too Sad
_________________
Singularity is nearer.
Back to top
View user's profile Send private message
Birdi
Expert Cheater
Reputation: 0

Joined: 08 Jun 2020
Posts: 122
Location: Migrating

PostPosted: Thu Sep 23, 2021 11:02 pm    Post subject: Reply with quote

I'm not sure how CE would be able to change the taskbar for you, but you can select "Always Hide in Desktop Mode" in Taskbar settings so it's hidden in Fullscreen.
_________________
Trying to learn!

Add me on Discord if you want hands-on help: Birdi#0007
Back to top
View user's profile Send private message Visit poster's website
LeFiXER
Grandmaster Cheater Supreme
Reputation: 20

Joined: 02 Sep 2011
Posts: 1055
Location: 0x90

PostPosted: Sun Sep 26, 2021 6:15 am    Post subject: Reply with quote

Replacing this section will hide/show the taskbar
Code:

-- Add this function
function ShowWindow(HWND, Cmd)
 return executeCodeLocalEx('User32.ShowWindow', HWND, Cmd)
end

-- Replace with this code
function toggleFullscreen()
  local hwnd = FindWindow('Shell_TrayWnd')
  if hwnd ~= nil then
    if state then
      ShowWindow(hwnd, 0)
      fsMode()
    else
      ShowWindow(hwnd, 1)
      nMode()
    end
    state = not state
  end
end
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites