[3.0] Invisible or disabled control cannot be activated-VBForums
Results 1 to 5 of 5

Thread: [3.0] Invisible or disabled control cannot be activated

  1. #1

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    [3.0] Invisible or disabled control cannot be activated

    I'm deriving a class from Form.

    In my project i've designed 2 subclasses of this class (using the form designer as you would subclass the Form class).

    In one form i'm trying to show the other one modelly, but i get the following error message: "Invisible or disabled control cannot be activated" when trying to either set the active control of the calling form to be the new form, or trying to set a control on my model form to be active.

    Hope that made sense, any help would be much appreciated.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  2. #2
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,224

    Re: [3.0] Invisible or disabled control cannot be activated

    Are those controls you try to activate disabled or hidden at the time?
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

  3. #3

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    Re: [3.0] Invisible or disabled control cannot be activated

    That's what i'm having trouble with. I'm not sure how a form (or any control) determines whether it's active or not. I've tried calling things like Activate() on the Form before trying to set it as the active control but nothing seems to make a difference.

    I think the problem is that it determines whether it's active/disabled or not using windows APIs using it's internal handle, rather than a simple boolean private member. The problem is that at no point do i show any form (even the one that's doing the Show(ModelForm) call) since i'm using a graphics library (XNA) to render all controls.
    This is definatly the root of the problem, but i'm not sure how to get round it.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  4. #4
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,224

    Re: [3.0] Invisible or disabled control cannot be activated

    That's obviously the problem... You have no form shown, thus none of the controls is visible.
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

  5. #5

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    Re: [3.0] Invisible or disabled control cannot be activated

    So what i'm asking is, how do i get round that, or don't i?
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.