copying tabpage and all its items

Posted on 2005-04-22
Last Modified: 2010-04-23
hi all,

I have a tabpage with several labels and textboxes, which are filled by results of a MySql-query.  
For each row of the result of that query I need to create another tabpage, with the same characteristics as the first one.

thanks in advance
Question by:ardixiv
    LVL 16

    Expert Comment

    Create a usercontrol that has all your tab elements on it.

    dim row as datarow
    Dim tp as System.Windows.Forms.TabPage
    Dim uc as MyTabPageUserControl
    for each row in dataset1.mytablename
         tp = New System.Windows.Forms.TabPage
         uc = New MyTabPageUserControl
         uc.TextBox1.Text = "test"
         uc.dock =  = System.Windows.Forms.DockStyle.Fill

    For databinding/adapter info:
    LVL 16

    Accepted Solution


    should be


    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now