View previous topic :: View next topic |
Author |
Message |
uvedese Contributor
Joined: 21 Jan 2006 Posts: 169 Location: Spain
|
Posted: Fri Jun 09, 2006 6:57 pm Post subject: Disable window's resize & minimize events |
|
|
Hi
I'm working in an application that it has activated the property "resize". When I present/display a child window I need that the main window does not respond to the events "resize" or "minimize".
Somebody knows how to disable events "resize" or "minimize"? ... Using API...? Help...
A bad "solution" is this:
Code: |
option decimalsep,.
dialog create,Main Window,310,400,300,150,resizable
DIALOG ADD,TEXT,txt1,16,117,,,resize me
dialog show
dialog create,Child Window,500,400,100,100,smallcap
dialog show
:evloop
repeat
wait .01
%a = @winactive()
if @equal(%a,Main Window)
window activate,Child Window
end
%e = @event()
until %e
goto %e
:close
exit
:resize
window position,Main Window,310,400,300,150
goto evloop
|
Thanks
_____________________
Good codes
visit uVeDeSe: http://www.uvedese.es
Last edited by uvedese on Wed Apr 02, 2008 8:50 pm; edited 1 time in total |
|
Back to top |
|
|
ShinobiSoft Professional Member
Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Sat Jun 10, 2006 4:14 am Post subject: |
|
|
Try this uvedese,
Code: |
dialog create,Parent Window,-1,0,300,300,RESIZABLE
dialog show
dialog create,Child,-1,0,250,250,RESIZABLE,SMALLCAP
dialog show
:Evloop
wait event
REM Parse the event and the dialog that it came from into separate variables.
parse "%E;%D",@event(D)
goto %E
:RESIZE
if @zero(%D)
dialog select,0
REM Handle the resizing of the "Parent Window" here
end
goto Evloop
:CLOSE
exit
|
_________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
Back to top |
|
|
uvedese Contributor
Joined: 21 Jan 2006 Posts: 169 Location: Spain
|
Posted: Sat Jun 10, 2006 9:20 am Post subject: |
|
|
Thanks ShinobiSoft...
...but I do not want that the position and size of the main window can be modified. It is possible to be blocked and unblocked window?
thanks again
_______________
Good codes
______________
uVeDeSe |
|
Back to top |
|
|
ShinobiSoft Professional Member
Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Sat Jun 10, 2006 11:44 pm Post subject: |
|
|
Hi uvedese,
Can you please be more specific about what you are doing or wanting?
Let me see if I have this right:
1) You are creating a parent window that is resizable, but you don't want
it to be resized or moved. Is this only when the child window is visible?
2) Do you also want the child window to be resizable? _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
Back to top |
|
|
uvedese Contributor
Joined: 21 Jan 2006 Posts: 169 Location: Spain
|
Posted: Sun Jun 11, 2006 4:17 pm Post subject: |
|
|
ShinobiSoft:
Pardon not to express to me and by my bad English
Just the option 1:
Quote: | You are creating a parent window that is resizable, but you don't want
it to be resized or moved. Is this only when the child window is visible? |
And the answer is "yes"
thanks in advance |
|
Back to top |
|
|
kOt Contributor
Joined: 19 Jan 2004 Posts: 89 Location: Fyffe, AL
|
Posted: Sun Jun 11, 2006 5:07 pm Post subject: |
|
|
What about this
Code: |
:RESIZE
IF @WINEXISTS("ChildWinNameHere")
Goto Evloop
END
|
That would work as long as your child window didn't resize
I THINK _________________ Visual Dialogscript 5 |
|
Back to top |
|
|
uvedese Contributor
Joined: 21 Jan 2006 Posts: 169 Location: Spain
|
Posted: Sun Jun 11, 2006 5:16 pm Post subject: |
|
|
Hi kOt. Thank you very much...
...Yes, it is certain, but... already the sizes of the main window could have been modified being visible the child window.
How to do so that the main window cannot be modified of size while child window is visible |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
Back to top |
|
|
uvedese Contributor
Joined: 21 Jan 2006 Posts: 169 Location: Spain
|
Posted: Sun Jun 11, 2006 6:02 pm Post subject: |
|
|
That is perfect...
thank you very mach Skit3000
I never understood command "DIALOG SHOWMODAL"... until now
Thanks |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
Back to top |
|
|
|