Posted: Tue Jan 03, 2017 4:57 am Post subject: How to make a Form unclickable?
Hi,
I have a Form which is always on top and has the BorderStyle "bsNone". There are no buttons and the Form only shows some information. The user can not interact with it.
I would like to make the Form unclickable (or click-transparent) which means that when I click on the Form, the click goes through the form to something which is behind it.
The problem is that the Form is for a game in fullscreen mode where you can not see the mouse icon. (For example in Skyrim you only see the mouse in the menu.) But when the mouse is over the window the mouse icon is displayed and a click deactivates the game window.
I already managed to hide the mouse icon (set cursor to crNone) but the Form is still clickable.
I had the idea to make an click event which activates the game window when I click on the Form. But I have no idea how I can write this in lua. This would just be a solution if nothing else works
How can I do this?
Thanks!
1.On form click hide form for 40ms(whatever time)
2.When the form Hides.
3.Include a simple script to execute mouse click again.
4.When the 40ms is up show form again.
Thts one way to approach this I know of no way in LUA to Keep the mouse behind the form.
function ClickThru()
store_pos = Base_Over_Form.Left -- glabal variable Needed to be read in other function
Base_Over_Form.Left = -10000 ---- MOve Offscreen -- needs work Doesnt apply to your problem tho
mouse_event(MOUSEEVENTF_LEFTDOWN)
mouse_event(MOUSEEVENTF_LEFTUP)
FormReturnTimer.Enabled = true --- Timer Activated to rerun form back
end
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