Click here to Skip to main content
15,898,993 members
Home / Discussions / C#
   

C#

 
Questionneed help or advice... [modified] Pin
TheCardinal13-Oct-06 21:12
TheCardinal13-Oct-06 21:12 
AnswerRe: need help or advice... Pin
mav.northwind13-Oct-06 21:56
mav.northwind13-Oct-06 21:56 
AnswerRe: need help or advice... Pin
Nader Elshehabi14-Oct-06 2:59
Nader Elshehabi14-Oct-06 2:59 
GeneralRe: need help or advice... Pin
TheCardinal14-Oct-06 3:38
TheCardinal14-Oct-06 3:38 
GeneralRe: need help or advice... Pin
mav.northwind14-Oct-06 6:08
mav.northwind14-Oct-06 6:08 
GeneralRe: need help or advice... Pin
Nader Elshehabi14-Oct-06 6:46
Nader Elshehabi14-Oct-06 6:46 
GeneralRe: need help or advice... Pin
TheCardinal14-Oct-06 17:54
TheCardinal14-Oct-06 17:54 
GeneralRe: need help or advice... Pin
Nader Elshehabi14-Oct-06 18:09
Nader Elshehabi14-Oct-06 18:09 
Well, you can use generics;P

Or much simpler, this:
private void SelectTabToView(string sWhatTab)
        {
            switch (sWhatTab.ToUpper()) {
                case "HOME":
                {
                    FrmHome frm = new FrmHome();
                    WhatFormToLoad(Frm);
                    break;
                }
                case "BILLING":
                {
                    FrmBilling frm = new FrmBilling();
                    WhatFormToLoad(Frm);
                    break;
                }
                case "INVENTORY":
                {
                    FrmInventory frm = new FrmInventory();
                    WhatFormToLoad(Frm);
                    break;
                }
            }
        }

private void WhatFormToLoad(Form MyForm)
{
    MyForm.MdiParent = this;
    MyForm.Dock = DockStyle.Fill;
    MyForm.Show();
    //
    this.pnlCompositeCon.Controls.Clear();
    this.pnlCompositeCon.Controls.Add(MyForm);
    this.txtCurrentLoadedForm.Text = MyForm.Name.ToUpper();
}



RegardsRose | [Rose]

GeneralRe: need help or advice... Pin
TheCardinal14-Oct-06 18:45
TheCardinal14-Oct-06 18:45 
Questionhtml parsing Pin
kerrywes13-Oct-06 19:30
kerrywes13-Oct-06 19:30 
QuestionCreate controls form text file? Pin
greyzz13-Oct-06 16:20
greyzz13-Oct-06 16:20 
AnswerRe: Create controls form text file? Pin
Nader Elshehabi13-Oct-06 17:32
Nader Elshehabi13-Oct-06 17:32 
GeneralRe: Create controls form text file? Pin
greyzz13-Oct-06 18:20
greyzz13-Oct-06 18:20 
GeneralRe: Create controls form text file? Pin
Nader Elshehabi14-Oct-06 2:52
Nader Elshehabi14-Oct-06 2:52 
QuestionAutomatic capitalization in VS2003 ? Pin
digsy_13-Oct-06 11:30
digsy_13-Oct-06 11:30 
AnswerRe: Automatic capitalization in VS2003 ? Pin
Wjousts13-Oct-06 11:53
Wjousts13-Oct-06 11:53 
GeneralRe: Automatic capitalization in VS2003 ? Pin
digsy_13-Oct-06 12:06
digsy_13-Oct-06 12:06 
GeneralRe: Automatic capitalization in VS2003 ? Pin
Kevin McFarlane13-Oct-06 12:47
Kevin McFarlane13-Oct-06 12:47 
QuestionHandling encryption at the application level Pin
kennk13-Oct-06 11:16
kennk13-Oct-06 11:16 
QuestionI cannot establish a connection to pop3 server !!! Pin
mohadcs13-Oct-06 11:12
mohadcs13-Oct-06 11:12 
QuestionDoc File Display Pin
Syed Shahid Hussain13-Oct-06 10:58
Syed Shahid Hussain13-Oct-06 10:58 
AnswerRe: Doc File Display Pin
Nader Elshehabi13-Oct-06 12:35
Nader Elshehabi13-Oct-06 12:35 
GeneralRe: Doc File Display Pin
Syed Shahid Hussain13-Oct-06 20:38
Syed Shahid Hussain13-Oct-06 20:38 
Questioncreating prime events for a control Pin
Nadia Monalisa13-Oct-06 9:24
Nadia Monalisa13-Oct-06 9:24 
AnswerRe: creating prime events for a control Pin
Wjousts13-Oct-06 10:34
Wjousts13-Oct-06 10:34 

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.