Click here to Skip to main content
15,889,595 members
Home / Discussions / C#
   

C#

 
QuestionPassing a reference to a volatile value Pin
PIEBALDconsult3-Jan-10 16:49
mvePIEBALDconsult3-Jan-10 16:49 
AnswerRe: Passing a reference to a volatile value Pin
Luc Pattyn3-Jan-10 17:04
sitebuilderLuc Pattyn3-Jan-10 17:04 
GeneralRe: Passing a reference to a volatile value Pin
PIEBALDconsult4-Jan-10 3:10
mvePIEBALDconsult4-Jan-10 3:10 
GeneralRe: Passing a reference to a volatile value Pin
PIEBALDconsult7-Jan-10 4:23
mvePIEBALDconsult7-Jan-10 4:23 
GeneralRe: Passing a reference to a volatile value Pin
Luc Pattyn7-Jan-10 4:30
sitebuilderLuc Pattyn7-Jan-10 4:30 
QuestionQuick way to switch the scopes of 2 code blocks? Pin
sherifffruitfly3-Jan-10 16:22
sherifffruitfly3-Jan-10 16:22 
AnswerRe: Quick way to switch the scopes of 2 code blocks? Pin
PIEBALDconsult3-Jan-10 16:23
mvePIEBALDconsult3-Jan-10 16:23 
QuestionTrying to open a new tab(User control embedded) Pin
xEvOx3-Jan-10 14:44
xEvOx3-Jan-10 14:44 
right my aims are to create a kind of wizard , i dont know how to use the wizard class so i thought of some quick code for it and it didnt work *sigh* anyway so i have a tabcontrol on the gui (DotNetbar) and then once i open the first user control and on the first one call back to form1 with a public void for example :

public void SetPage(int PageNum)
        {
            if (PageNum == 1)
            {
                Page1 page1 = new Page1();
                page1.Dock = DockStyle.Fill;
                page1.AutoSize = true;
                TabItem item = this.tabControl1.CreateTab("");
                item.AttachedControl.Controls.Add(page1);
                this.tabControl1.SelectedTab = item;
                Application.DoEvents();
            }
            if (PageNum == 2)
            {
                Page2 page2 = new Page2();
                page2.Dock = DockStyle.Fill;
                page2.AutoSize = true;
                TabItem item = this.tabControl1.CreateTab("");
                item.AttachedControl.Controls.Add(page2);
                this.tabControl1.SelectedTab = item;
                Application.DoEvents();
            }
            if (PageNum == 3)
            {
                Page3 page3 = new Page3();
                page3.Dock = DockStyle.Fill;
                page3.AutoSize = true;
                TabItem item = this.tabControl1.CreateTab("");
                item.AttachedControl.Controls.Add(page3);
                this.tabControl1.SelectedTab = item;
                Application.DoEvents();
            }
           if (PageNum == 4)
            {
                ErrorPage error = new ErrorPage();
                error.Dock = DockStyle.Fill;
                error.AutoSize = true;
                TabItem item = this.tabControl1.CreateTab("");
                item.AttachedControl.Controls.Add(error);
                this.tabControl1.SelectedTab = item;
                Application.DoEvents();
            }
            if (PageNum == 5)
            {
                FinishPage finish = new FinishPage();
                finish.Dock = DockStyle.Fill;
                finish.AutoSize = true;
                TabItem item = this.tabControl1.CreateTab("");
                item.AttachedControl.Controls.Add(finish);
                this.tabControl1.SelectedTab = item;
                Application.DoEvents();
            }
        }


so the command on the form would be SetPage(1); for page 1 but for another on user control i would have it :
Form1 form = new Form1();
form.SetPage(3);
Application.DoEvents();

But it seems to not be loading, any help ? or anyone can point me to using the wizard as google for me doesent pull any help on it or unless i am searching it wrong , searching : c# code using wizard class ,


Anyway thanks for your time guys !

Jed
Questionwhere i can learn the basic of class - as simple as i can (C#) Pin
E_Gold3-Jan-10 9:17
E_Gold3-Jan-10 9:17 
AnswerRe: where i can learn the basic of class - as simple as i can (C#) Pin
Luc Pattyn3-Jan-10 11:03
sitebuilderLuc Pattyn3-Jan-10 11:03 
Questionsending Form to User Control that has written in another project Pin
jojoba20103-Jan-10 4:38
jojoba20103-Jan-10 4:38 
AnswerRe: sending Form to User Control that has written in another project Pin
Dimitri Witkowski3-Jan-10 4:49
Dimitri Witkowski3-Jan-10 4:49 
QuestionRe: sending Form to User Control that has written in another project Pin
jojoba20103-Jan-10 22:28
jojoba20103-Jan-10 22:28 
AnswerRe: sending Form to User Control that has written in another project Pin
Dimitri Witkowski3-Jan-10 22:31
Dimitri Witkowski3-Jan-10 22:31 
QuestionOpenGL in C# and Visual Studio 2005/2008 Pin
Patrick Skelton3-Jan-10 4:34
Patrick Skelton3-Jan-10 4:34 
AnswerRe: OpenGL in C# and Visual Studio 2005/2008 Pin
harold aptroot3-Jan-10 4:47
harold aptroot3-Jan-10 4:47 
GeneralRe: OpenGL in C# and Visual Studio 2005/2008 Pin
Patrick Skelton3-Jan-10 4:59
Patrick Skelton3-Jan-10 4:59 
GeneralRe: OpenGL in C# and Visual Studio 2005/2008 Pin
harold aptroot3-Jan-10 5:55
harold aptroot3-Jan-10 5:55 
AnswerRe: OpenGL in C# and Visual Studio 2005/2008 Pin
Patrick Skelton3-Jan-10 6:16
Patrick Skelton3-Jan-10 6:16 
GeneralRe: OpenGL in C# and Visual Studio 2005/2008 Pin
harold aptroot3-Jan-10 6:25
harold aptroot3-Jan-10 6:25 
AnswerRe: OpenGL in C# and Visual Studio 2005/2008 Pin
Pete O'Hanlon3-Jan-10 9:32
mvePete O'Hanlon3-Jan-10 9:32 
AnswerRe: OpenGL in C# and Visual Studio 2005/2008 Pin
Patrick Skelton3-Jan-10 22:31
Patrick Skelton3-Jan-10 22:31 
QuestionEvent Handler Pin
AlexB473-Jan-10 0:06
AlexB473-Jan-10 0:06 
AnswerRe: Event Handler Pin
DaveyM693-Jan-10 0:33
professionalDaveyM693-Jan-10 0:33 
GeneralRe: Event Handler Pin
AlexB473-Jan-10 4:05
AlexB473-Jan-10 4:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.