Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Victor Friedman
  Where is Victor Friedman?
 Moscow
 Russia
 Victor Friedman
 To: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 Tags
Subject: RE: Docking a form
Thread ID: 396016 Message ID: 396095 # Views: 35 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Forms
Date: Wednesday, January 22, 2014 8:26:11 PM         
   


> > Hello all!
> >
> > Is there a way to prevent a docked form from being undocked?
> > Seems that the Movable property (as well as many others) have no effect when the form is made dockable.
> > I need the form to always hang there, at the right side of the _SCREEN, and make sure users cannot move or close it.
> > Is there any way to do it?
> >
> > Thanks in advance!
> >
> > --Vick
>
>
> I like Vilhelm's SetWindowRgn() solution, very creative.
> As for a worse alternative, you could perhaps use a Toolbar containing something like a Container, see also the sample pasted below.
>
>
>
> hth
> -Stefan
>
>
>
>
> CREATE CURSOR test (col1 Int, col2 Int)
> LOCAL i
> FOR i = 1 TO 1000
> 	INSERT INTO test VALUES (i, i*10)
> ENDFOR
> GO TOP IN test
> 
> PUBLIC oToolbar
> oToolbar = CREATEOBJECT('TestBar')
> oToolbar.Dock(2)
> oToolbar.Show()
> RETURN
> 
> DEFINE CLASS TestBar as Toolbar
> 	ADD OBJECT x as FormContent
> 
> 	PROCEDURE MouseDown(nButton, nShift, nXCoord, nYCoord)
> 		NODEFAULT
> 	ENDPROC
> 	PROCEDURE DblClick
> 		NODEFAULT
> 	ENDPROC
> ENDDEFINE
> 
> DEFINE CLASS FormContent as Container
> 	Width = 200
> 
> 	PROCEDURE Init
> 		This.Height = _screen.Height - 20
> 		This.myGrid.Height = This.Height - This.myGrid.Top - 10
> 	ENDPROC
> 
> 	ADD OBJECT myLabel as Label WITH ;
> 		Left = 5, Top = 10, ;
> 		Caption = "TestLabel", AutoSize = .T. 
> 	ADD OBJECT myTextBox as TextBox WITH ;
> 		Left = 5, Top = 35, Width = 190, ;
> 		Value = "testTextbox"
> 	ADD OBJECT myGrid as Grid WITH ;
> 		Left = 5, Top = 65, Width = 190
> ENDDEFINE
> 


Another solution could be using a toolbar, but instead of a container with a grid, have a bunch of textboxes imitate a grid.
Anyway, now I know that what I need is unachievable using standard VFP methods (which, in my opinion, is rather strange).
So I will need to find a workaround in any case.

Thanks though! ;-)

-Vick

ENTIRE THREAD

Docking a form Posted by Victor Friedman @ 1/22/2014 10:00:26 AM
RE: Docking a form Posted by Borislav Borissov @ 1/22/2014 10:13:49 AM
RE: Docking a form Posted by Victor Friedman @ 1/22/2014 10:17:28 AM
RE: Docking a form Posted by Koen Piller @ 1/22/2014 10:39:10 AM
RE: Docking a form Posted by Koen Piller @ 1/22/2014 10:39:19 AM
RE: Docking a form Posted by Victor Friedman @ 1/22/2014 2:56:05 PM
RE: Docking a form Posted by Victor Friedman @ 1/22/2014 2:57:40 PM
RE: Docking a form Posted by Vilhelm-Ion Praisach @ 1/22/2014 11:48:30 AM
RE: Docking a form Posted by Koen Piller @ 1/22/2014 12:32:52 PM
RE: Docking a form Posted by Vilhelm-Ion Praisach @ 1/22/2014 2:07:42 PM
RE: Docking a form Posted by Victor Friedman @ 1/22/2014 3:00:42 PM
RE: Docking a form Posted by Vilhelm-Ion Praisach @ 1/22/2014 3:18:18 PM
RE: Docking a form Posted by Pete Sass @ 1/22/2014 4:15:58 PM
RE: Docking a form Posted by Victor Friedman @ 1/22/2014 4:23:05 PM
RE: Docking a form Posted by Koen Piller @ 1/22/2014 6:27:18 PM
RE: Docking a form Posted by Victor Friedman @ 1/22/2014 6:54:37 PM
RE: Docking a form Posted by David Mustakim @ 1/22/2014 7:21:25 PM
RE: Docking a form Posted by Victor Friedman @ 1/22/2014 8:20:06 PM
RE: Docking a form Posted by David Mustakim @ 1/22/2014 8:52:57 PM
RE: Docking a form Posted by Victor Friedman @ 1/22/2014 9:02:26 PM
RE: Docking a form Posted by Pete Sass @ 1/22/2014 9:45:37 PM
RE: Docking a form Posted by Koen Piller @ 1/22/2014 8:33:04 PM
RE: Docking a form Posted by Victor Friedman @ 1/22/2014 8:34:32 PM
RE: Docking a form Posted by Victor Friedman @ 1/22/2014 8:59:09 PM
RE: Docking a form Posted by David Mustakim @ 1/22/2014 9:05:50 PM
RE: Docking a form Posted by Victor Friedman @ 1/22/2014 9:14:22 PM
RE: Docking a form Posted by Pete Sass @ 1/22/2014 7:11:14 PM
RE: Docking a form Posted by Victor Friedman @ 1/22/2014 8:22:16 PM
RE: Docking a form Posted by Pete Sass @ 1/22/2014 9:29:43 PM
RE: Docking a form Posted by Victor Friedman @ 1/22/2014 9:33:50 PM
RE: Docking a form Posted by Pete Sass @ 1/22/2014 9:42:08 PM
RE: Docking a form Posted by Victor Friedman @ 1/22/2014 9:49:39 PM
RE: Docking a form Posted by David Mustakim @ 1/22/2014 10:03:36 PM
RE: Docking a form Posted by Pete Sass @ 1/22/2014 10:20:13 PM
RE: Docking a form Posted by David Mustakim @ 1/22/2014 11:14:06 PM
RE: Docking a form Posted by Pete Sass @ 1/22/2014 11:43:19 PM
RE: Docking a form Posted by David Mustakim @ 1/22/2014 10:03:38 PM
RE: Docking a form Posted by David Mustakim @ 1/22/2014 10:03:41 PM
RE: Docking a form Posted by Stefan Wuebbe @ 1/22/2014 7:19:20 PM
RE: Docking a form Posted by Victor Friedman @ 1/22/2014 8:26:11 PM