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 


Disable window's resize & minimize events

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Advanced Help for VDS 5 & Up
View previous topic :: View next topic  
Author Message
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 169
Location: Spain

PostPosted: Fri Jun 09, 2006 6:57 pm    Post subject: Disable window's resize & minimize events Reply with quote

Hi Very Happy

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
View user's profile Send private message Visit poster's website
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Sat Jun 10, 2006 4:14 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 169
Location: Spain

PostPosted: Sat Jun 10, 2006 9:20 am    Post subject: Reply with quote

Thanks ShinobiSoft... Wink

...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
View user's profile Send private message Visit poster's website
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Sat Jun 10, 2006 11:44 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 169
Location: Spain

PostPosted: Sun Jun 11, 2006 4:17 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
kOt
Contributor
Contributor


Joined: 19 Jan 2004
Posts: 89
Location: Fyffe, AL

PostPosted: Sun Jun 11, 2006 5:07 pm    Post subject: Reply with quote

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 Very Happy

_________________
Visual Dialogscript 5
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 169
Location: Spain

PostPosted: Sun Jun 11, 2006 5:16 pm    Post subject: Reply with quote

Hi kOt. Thank you very much...

...Yes, it is certain, but... Crying or Very sad 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 Question Exclamation
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sun Jun 11, 2006 5:19 pm    Post subject: Reply with quote

If the main window is not allowed to react to events at all, you can try "dialog showmodal" to display the child window. After closing the child window, the parent one will become available to the user again.
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
uvedese
Contributor
Contributor


Joined: 21 Jan 2006
Posts: 169
Location: Spain

PostPosted: Sun Jun 11, 2006 6:02 pm    Post subject: Reply with quote

That is perfect... Shocked

thank you very mach Skit3000 Worship

I never understood command "DIALOG SHOWMODAL"... until now

Thanks
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Tue Jun 13, 2006 7:05 pm    Post subject: Reply with quote

Glad to've been of service Smile
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Advanced Help for VDS 5 & Up 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