View previous topic :: View next topic |
Author |
Message |
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Jul 26, 2003 7:40 pm Post subject: Enable/Disable Window |
|
|
Need to enable, disable, or check the status of a window? Use this code
below :
Code: | #################################
# Enable/Disable Window #
# Copyright © 2003 FreezingFire #
# Use at your own risk #
# Free to use in your own code #
#################################
# Specify window to enable or disable
%%Window = "Untitled - Notepad"
# This must be "TRUE" or "FALSE"
%%Enabled = "FALSE"
# Begin Advanced Code
%H = @strdel(@winexists(%%Window),1,1)
LOADLIB user32.dll
%a = @lib(user32,EnableWindow,BOOL:,INT:%H,BOOL:%%Enabled)
# The following is to test if window is enabled or disabled
%b = @lib(user32,IsWindowEnabled,BOOL:,INT:%H)
if @not(@zero(%B))
info The window is enabled
else
warn The window is disabled
end
FREELIB user32.dll
exit |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team
Last edited by FreezingFire on Fri Jan 09, 2004 10:31 pm; edited 1 time in total |
|
Back to top |
|
|
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Sun Jul 27, 2003 1:57 am Post subject: |
|
|
Just a note, dialog controls such as buttons, edit boxes etc. are considered to be
windows too and if you know their window handle value, you will be able to enable or
disable them using this code too, even if they are owned by a non-VDS dialog. |
|
Back to top |
|
|
|
|
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 can attach files in this forum You can download files in this forum
|
|