Results 1 to 14 of 14

Thread: [RESOLVED] Help - design view for classes

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2006
    Posts
    7

    Resolved [RESOLVED] Help - design view for classes

    Hi!

    I'm very new to VB and have ran into my first problem. I am trying to change the design layout of some classes, but I cannot open them in design view - only the first one is visible. I've tried everything I can think of, but can only design the first class and none of the others.
    I got the code from someone else who I know is also learning and I just pasted the code into the form1.vb page.

    Thanks to anyone that can help!
    Last edited by Iainn; May 2nd, 2006 at 10:42 AM.

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,383

    Re: Help - design view for classes

    classes don't have a design view unless they are derived directly from containercontrol.

    the classes that do this are

    System.Windows.Forms.Form
    System.Windows.Forms.PropertyGrid
    System.Windows.Forms.UpDownBase
    System.Windows.Forms.UserControl

    since you are just starting out.. that probably doesn't make too much sense to you, so why don't you tell us what you are trying to accomplish, and then we can help you better.

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2006
    Posts
    7

    Re: Help - design view for classes

    I have 4 classes which use Inherits System.Windows.Forms.Form. However, I can only design the layout of the first one. The others just don't show up. When I run my program, everything works fine, I just can't alter the design of the 3 other classes.
    Visual Studio .NET 2003/.NET Framework 1.1

  4. #4
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,383

    Re: Help - design view for classes

    post the entire code from one of your forms that is not working.

  5. #5

    Thread Starter
    New Member
    Join Date
    May 2006
    Posts
    7

    Re: Help - design view for classes

    I also included the extension file as well, if you are trying to run it. It is 'A' I am working with, although that's not important.
    Attached Files Attached Files
    Visual Studio .NET 2003/.NET Framework 1.1

  6. #6
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,383

    Re: Help - design view for classes

    It works ok for me.

    I created a new project, and added a reference to KnobControl.dll from the controla folder in your zip file. then I took your code and pasted it into a blank .vb file, and i am able to switch between code view and design view no problem.
    Attached Images Attached Images  

  7. #7

    Thread Starter
    New Member
    Join Date
    May 2006
    Posts
    7

    Re: Help - design view for classes

    Yes, I can do that too. But how can I change the design layout for the other pipes? Also, thanks for your speedy replies!
    Visual Studio .NET 2003/.NET Framework 1.1

  8. #8
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,383

    Re: Help - design view for classes

    I guess maybe I am not sure what you are unable to do?

    are you saying you want to be able to modify the layout of the actual knobcontrol that you added to the form?

  9. #9

    Thread Starter
    New Member
    Join Date
    May 2006
    Posts
    7

    Re: Help - design view for classes

    Ah, no. If you run the program, you can select 4 different things from the menu. If you select any of them, they load no problem. However, I cannot edit any of the layouts, excluding pipe 1, in the design view. No other ones can be edited.
    Visual Studio .NET 2003/.NET Framework 1.1

  10. #10
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,383

    Re: Help - design view for classes

    You only posted the code for Pipe1 though...

  11. #11

    Thread Starter
    New Member
    Join Date
    May 2006
    Posts
    7

    Re: Help - design view for classes

    ???

    There are 8 classes in the txt file, each with full code.



    All I want is to change the layout of Pipes 2 and 3 (and also the panel which is not shown). I cannot do this graphically, as they do not show up in the design view.
    Visual Studio .NET 2003/.NET Framework 1.1

  12. #12
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,383

    Re: Help - design view for classes

    ahhhhh.. I see now.

    Well you can't do that

    You need to make a seperate .vb file for each form. Then you will be able to modify the layout of each form.

    Infact unless the class itself is inside another class (nested classes), its is generally bad practice to have more than 1 class in a .vb file.

    It makes it very cluttered and hard to work with especially on big projects.

  13. #13

    Thread Starter
    New Member
    Join Date
    May 2006
    Posts
    7

    Re: Help - design view for classes

    Quote Originally Posted by kleinma
    ahhhhh.. I see now.

    Well you can't do that

    You need to make a seperate .vb file for each form. Then you will be able to modify the layout of each form.

    Infact unless the class itself is inside another class (nested classes), its is generally bad practice to have more than 1 class in a .vb file.

    It makes it very cluttered and hard to work with especially on big projects.
    Yes, I have now got it to work! Many thanks for persevering with me! I owe you a drink or 2 man. In fact, make it 3!
    Visual Studio .NET 2003/.NET Framework 1.1

  14. #14
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,383

    Re: Help - design view for classes

    Nice. I like Rolling Rock and yuengling

    And I'm not even from PA... go figure


    You can mark the thread resolved in the thread tools above, so people know this has been sorted out.

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