Results 1 to 3 of 3

Thread: Deleting/Removing controls at run-time?

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 1999
    Posts
    39

    Post

    Hi, i'm having some problems disabling some controls (removing/deleting them would be fine!) from my program.

    At form_load i'm trying to do
    if app.previnstance then
    disable thiscontrol
    disable thatcontrol
    end if

    problem is winsock controls lack any enable/disable. Can anyone tell me how i would be able to get rid of these controls at run-time? i want them gone (any way they have no effect on the program is good) if another instance of the program is running.

    can someone help me out?

  2. #2
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    You can remove controls from your project in a runtime only if they were added in a runtime. But what you can do, is to set up a flag and then check if the application already running, then do nothing.

    ------------------

    Serge

    Programmer Analyst
    sdymkov@microage.com
    Access8484@aol.com
    ICQ#: 51055819


  3. #3
    Junior Member
    Join Date
    Feb 2000
    Posts
    21

    Post

    Have you tried, instead of trying to remove when you don't need it, trying to add it when you need it with VB6 supported functionality:

    myForm.Controls.Add "Lib.Class", "CtrlName"

    (not sure about the syntax but it looks like it)

    Tipi

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