Results 1 to 9 of 9

Thread: How do I create an invisible control (like the timer)?

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2000
    Location
    Sweden
    Posts
    38
    How can I create an invisible control, like the timer?

  2. #2
    Fanatic Member faisalkm's Avatar
    Join Date
    Oct 2000
    Location
    Germany
    Posts
    752

    Talking Invisible control

    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
    Faisal Muhammed
    Homepage:I Started making it in 1994 ...Still Under Construction
    Using

    Visual Basic 6.0 Enterprise SP5
    Embedded Visual Basic 3.0
    SQL Server 2000
    Windows 2000 Proff
    Delphi 6.0


    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

  3. #3
    Addicted Member Shrog's Avatar
    Join Date
    Aug 1999
    Location
    Darkest Africa
    Posts
    186

    Cool Here's how...

    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

  4. #4

    Thread Starter
    Member
    Join Date
    Oct 2000
    Location
    Sweden
    Posts
    38
    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?

  5. #5
    Fanatic Member faisalkm's Avatar
    Join Date
    Oct 2000
    Location
    Germany
    Posts
    752

    Talking

    You can set the icon through the toolboxbitmap property
    Faisal Muhammed
    Homepage:I Started making it in 1994 ...Still Under Construction
    Using

    Visual Basic 6.0 Enterprise SP5
    Embedded Visual Basic 3.0
    SQL Server 2000
    Windows 2000 Proff
    Delphi 6.0


    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

  6. #6
    Addicted Member Shrog's Avatar
    Join Date
    Aug 1999
    Location
    Darkest Africa
    Posts
    186

    Bitmap

    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

  7. #7

    Thread Starter
    Member
    Join Date
    Oct 2000
    Location
    Sweden
    Posts
    38
    well, is there an other way to do it then. how have they done it for the timer control?

  8. #8
    Addicted Member Shrog's Avatar
    Join Date
    Aug 1999
    Location
    Darkest Africa
    Posts
    186

    Unhappy Alas, alak...

    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

  9. #9
    Fanatic Member faisalkm's Avatar
    Join Date
    Oct 2000
    Location
    Germany
    Posts
    752

    Talking

    Hi

    I think Shrog is right. The Microsoft Rascals won't alllow anything above that. MAy be u can create it in VC

    Faisal
    Faisal Muhammed
    Homepage:I Started making it in 1994 ...Still Under Construction
    Using

    Visual Basic 6.0 Enterprise SP5
    Embedded Visual Basic 3.0
    SQL Server 2000
    Windows 2000 Proff
    Delphi 6.0


    Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.

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