forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Enable/Disable Window

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Advanced VDS 5 Source Code
View previous topic :: View next topic  
Author Message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Jul 26, 2003 7:40 pm    Post subject: Enable/Disable Window Reply with quote

Need to enable, disable, or check the status of a window? Use this code
below Smile :

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
View user's profile Send private message Visit poster's website
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Sun Jul 27, 2003 1:57 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Advanced VDS 5 Source Code All times are GMT
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 can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group