Discussion:
How to hide usercontrol
(too old to reply)
Steven
2006-01-13 03:24:37 UTC
Permalink
Dear All,

I develop a vb usercontrols, When user insert this component at windows form
or powerpoint, I want to know how to hide this usercontrols? this control
has not hide function! I want to use Move function move this control to
screen outside! but this control has not move function, If we use API
movewindow function, How to re-back older position!

anyone tell me how to know it? thanks!

Best Regards
Steven
--
Best Regards
Steven
Andy DF
2006-01-13 08:26:24 UTC
Permalink
Have you tried UserControl1.Visible = False?

Andy
Post by Steven
Dear All,
I develop a vb usercontrols, When user insert this component at windows form
or powerpoint, I want to know how to hide this usercontrols? this control
has not hide function! I want to use Move function move this control to
screen outside! but this control has not move function, If we use API
movewindow function, How to re-back older position!
anyone tell me how to know it? thanks!
Best Regards
Steven
--
Best Regards
Steven
Michael C
2006-01-15 04:48:58 UTC
Permalink
Post by Andy DF
Have you tried UserControl1.Visible = False?
The container that holds the control needs to supply the Visible property I
presume. In Steven's case he is using a container that doesn't. In that case
I'd just use an API to show/hide/move it.

Michael
Jim Carlock
2006-01-15 10:53:42 UTC
Permalink
I developed a vb usercontrol. When a user inserts this
component at windows form or powerpoint, I want to
know how to hide the control?
The easiest way involves putting the control inside a Picture
Box control, then exposing the PictureBox methods (.Move,
.Visible, et al as needed) and mapping those exposed
methods to the PictureBox.

'Public subroutine inside control.
'Add height and width if desired to make control resizable.
Public Sub Move(x As Long, y As Long)
Call PictureBox1.Move(x, y)
End Sub

Public Property Get Visible() As Boolean
Visible = PictureBox1.Visible
End Property
Public Property Let Visible(yVisibility As Boolean)
PictureBox1.Visible = yVisibility
End Property

Hope that helps.

Jim Carlock
Post replies to the newsgroup.
Michael C
2006-01-15 12:42:04 UTC
Permalink
Post by Jim Carlock
The easiest way involves putting the control inside a Picture
Box control, then exposing the PictureBox methods (.Move,
.Visible, et al as needed) and mapping those exposed
methods to the PictureBox.
I'm not sure that would be the best method though.

Michael

Richard Jalbert
2006-01-14 23:25:15 UTC
Permalink
Post by Steven
Dear All,
I develop a vb usercontrols, When user insert this component at windows form
or powerpoint, I want to know how to hide this usercontrols? this control
has not hide function! I want to use Move function move this control to
screen outside! but this control has not move function, If we use API
movewindow function, How to re-back older position!
anyone tell me how to know it? thanks!
Best Regards
Steven
One method I used was to change itse coordinates so it would be
"off-screen".


**********************************************************************
***@sympatico.ca

Dog thinks: they feed me, they take care of me: they are gods.
Cat thinks: they feed me, they take care of me: I am god.
http://www3.sympatico.ca/richmann/
http://www.geocities.com/richmannsoft/
**********************************************************************
Loading...