Results 1 to 7 of 7

Thread: Problems with TabControl

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2012
    Posts
    9

    Problems with TabControl

    HI guys and gals

    i am new to the forum and new to VB actualy only been doing vb for 2 weeks now, most the time i can get help from google and other sources but i am having problems finding what my problem is.

    I have started a project that will help troubleshoot for customers and when i started the project i had not thought a head and now need to add Tabcontrol to my project.

    As i said i am very new to this so please bare with me.

    When i put in the tabcontrol none of my code works but when i undo everything until before i put the tabcontrol in my code works.

    Let me know if you want me to past my code in.

    Thanks for any help anyone can give me on this.

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,929

    Re: Problems with TabControl

    Welcome to VBForums

    Thread moved from the 'Application Deployment' forum (which is for questions about installing/distributing your software) to he 'VB.Net' (VB 2002 and later) forum

    For the benefit of others, er1k84's profile says VB 2010

  3. #3
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,711

    Re: Problems with TabControl

    I would paste the code here so that we could help you out a little bit. Just paste the part that isn't working, before and after. Otherwise, we really don't know how to help you.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  4. #4
    PowerPoster kaliman79912's Avatar
    Join Date
    Jan 2009
    Location
    Ciudad Juarez, Chihuahua. Mexico
    Posts
    2,593

    Re: Problems with TabControl

    are you putting your tab control on top of your form? where are your original controls?
    More important than the will to succeed, is the will to prepare for success.

    Please rate the posts, your comments are the fuel to keep helping people

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: Problems with TabControl

    If I had to guess, which I do, I'd say that you added the TabControl and then you cut and pasted your existing controls from the form into the TabPages. If so then you will have detached all your event handlers. When you create, for instance, a Click event handler for a Button, the IDE generates a method and adds a Handles clause to it to specify that it gets executed when the Button's Click event is raised. If you cut the Button, which is akin to deleting it, then the Handles clause is removed. If you then paste the Button, the Handles clause does not come back. The method still exists but it no longer handles the event.

    To prevent this happening, do NOT cut and paste. Move your controls from one container to another either by dragging and dropping on the design surface or else by using the Document Outline window. That way your controls are never removed so the Handles clauses are never removed.

    If the deed has already been done then there is a way to fix it. Open the Properties window and click the Events button at the top. Select a control and then, for each event you want handled, select the appropriate method from the adjacent drop-down list. Do that for each control and it will restore all your Handles clauses.

    If that's not what happened then I've just wasted my time and you will need to provide a FULL and CLEAR description of EXACTLY what you did and EXACTLY what happened.

  6. #6

    Thread Starter
    New Member
    Join Date
    Mar 2012
    Posts
    9

    Re: Problems with TabControl

    jmcilhinney

    perfect thats exactly what i did i have done what you suggested an all is working thanks again guys and sorry it took so long to get back to you.

    On another issue not sure if i should raise it here or on another thread but after compiling the project it works fine on windows 7 32bit and 64 bit but will not work on server 2003 or xp clients have not checked vista yet, i have verified that .net 4 is installed and i can tell you that i do not get an error message when installing apart from the icon that i have given the project does not appear and is a blank icon on the desktop. When i try to run the program it will try to start i see the service in the task manager and after a while it will error out and crash. I can see the memory usage go from 20,000K to 70.000k.

    Any ideas or would be most welcome

    and thanks again for all your help to a new programmer

  7. #7
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,299

    Re: Problems with TabControl

    Quote Originally Posted by er1k84 View Post
    On another issue not sure if i should raise it here or on another thread but after compiling the project it works fine on windows 7 32bit and 64 bit but will not work on server 2003 or xp clients have not checked vista yet, i have verified that .net 4 is installed and i can tell you that i do not get an error message when installing apart from the icon that i have given the project does not appear and is a blank icon on the desktop. When i try to run the program it will try to start i see the service in the task manager and after a while it will error out and crash. I can see the memory usage go from 20,000K to 70.000k.
    Look at the title of this thread. That will tell you whether this new question belongs in this thread. One thread per topic and one topic per thread.

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