How can I create an invisible control, like the timer?
Printable View
How can I create an invisible control, like the timer?
When u create a control , in the Activex control project , u select the usercontrol u want to make invisible and set it's invisible at runtime property to true
Faisal
The user control has a property called InvisibleAtRuntime. Set this property to true, and the control will be visible during design time, but not run time.
Shrog
thanx, that worked fine. it looks weird on the control palette without an icon though. do u know how to associate the control with an icon?
You can set the icon through the toolboxbitmap property
Yes, Faisalkm is right, you can use the ToolBoxBitmap property of the control. The only problem here is that the allowable bitmap is very, very small. The picture is a 16x15 pixel bitmap, and VB will automatically use the color on the outer edge of the bitmap as a transparent color. This means that you actually only have 15x14 pixels to work with.
Shrog
well, is there an other way to do it then. how have they done it for the timer control?
No, I'm afraid that's all we have to work with. Believe me, I've looked for ways of getting bigger pictures in there, but those bastards will not allow it for some or other reason.
The timer control is built into VB, so they can do anything they like. But the ToolBoxBitmap we can use must be small. If you use a bigger one, VB will resize it automatically to make it smaller, often with some loss of quality.
I suspect that ActiveX controls written in other langauges may not have this limitation. Does anyone know?
Shrog
Hi
I think Shrog is right. The Microsoft Rascals won't alllow anything above that. MAy be u can create it in VC
Faisal