Results 1 to 3 of 3

Thread: Hiding Controls at Runtime

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2003
    Location
    UK
    Posts
    6

    Hiding Controls at Runtime

    Hi,

    I'm fairly new to making ActiveX controls but not to VB so I have a pretty fair understanding of how stuff works.

    What I'm trying to do is have a control that shows at design-time with a border round it, and is not visible, but interactive at run-time, much like the Image control.

    I've tried putting code in various control events which have worked to an extent but I can never get the border to show again when I go back to design-time after testing the control.

    Any help would be much appreciated.

    --
    GeekSession

  2. #2
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    Have a look at this :

    VB Code:
    1. Private Sub UserControl_Show()
    2.     If Ambient.UserMode = True Then
    3.         MsgBox "Run-time"
    4.     Else
    5.         MsgBox "Design Time"
    6.     End If
    7. End Sub


    Has someone helped you? Then you can Rate their helpful post.

  3. #3
    Banned
    Join Date
    Jul 2003
    Location
    New delhi
    Posts
    143
    to manipulate the property of the control you can take the help of custom property like ambient

    or you can create property page.
    Biswajit das

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