CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 1999
    Location
    Switzerland
    Posts
    398

    Show ActiveX as Icon on Form

    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?

    Leica Geosystems - when it has to be right

  2. #2
    Join Date
    Apr 2000
    Location
    Southampton, UK
    Posts
    329

    Re: Show ActiveX as Icon on Form

    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




    TimCottee
    I know a little about a lot of things and a lot about very little.

    Brainbench MVP For Visual Basic
    http://www.brainbench.com

    MCP, MCSD, MCDBA, CPIM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured