Click to See Complete Forum and Search --> : Show ActiveX as Icon on Form


Markus W.
March 20th, 2001, 07:44 AM
I am writing a VB ActiveX control. The control shall be showed as an icon (e.g. the MSComm control icon) when it is placed on a form and shall be invisible at runtime. Any sample, idea or tip how to do that?

TimCottee
March 20th, 2001, 07:58 AM
All you need to do is set the InvisibleAtRuntime property of the UserControl to True. This will hide it at runtime. In addition you need to set the picture property to the icon you require, or include a picture box or text etc. It is also a good idea to add some code in the resize event of the control to ensure that its dimension remain constant e.g.

private Sub UserControl_Resize()
With UserControl
.Width = 300
.Height = 300
End With
End Sub