Click here to Skip to main content
15,912,756 members
Home / Discussions / C#
   

C#

 
GeneralRe: conditions problem Pin
nidhelp4-Aug-05 18:41
nidhelp4-Aug-05 18:41 
GeneralRe: conditions problem Pin
J4amieC4-Aug-05 22:39
J4amieC4-Aug-05 22:39 
GeneralRe: conditions problem Pin
nidhelp4-Aug-05 23:24
nidhelp4-Aug-05 23:24 
GeneralRe: conditions problem Pin
J4amieC4-Aug-05 23:46
J4amieC4-Aug-05 23:46 
GeneralRe: conditions problem Pin
nidhelp5-Aug-05 0:02
nidhelp5-Aug-05 0:02 
GeneralRe: conditions problem Pin
mav.northwind5-Aug-05 2:59
mav.northwind5-Aug-05 2:59 
GeneralRe: conditions problem Pin
nidhelp7-Aug-05 15:14
nidhelp7-Aug-05 15:14 
GeneralRe: conditions problem Pin
nidhelp5-Aug-05 0:00
nidhelp5-Aug-05 0:00 
I need to clarify this...

My code WAS like this:
private void button3_Click(object sender, System.EventArgs e)
{
if(Validate(textBox4.Text))
{
if (tabControl1.TabPages.Contains(tabPage6)) {
}
else
{
tabControl1.TabPages.Add(tabPage6); }
}
else
{
// show invalid username dialogbox
}
}

// Conditions to determine whether a tab page is to be displayed when Go button is clicked
private bool Validate(string Val)
{
if(Val!="")
{
if(Val.Length==9||Val.Length==12)
{
return true;
}
else
return false;
}
else
return false;
}

I donno how to edit my codes with the codes u gave me to make my app run..
can u teach me what's going on?

In fact, I also need to open a tab page if the text input is made up of 12 digits..
Therefore, a tab page should open when the text input is \d{12} OR [sSfF]\d{7}[a-zA-Z]..
The user is allowed to key in anything he wishes but the tab page will not open if what he entered doesnt meet the conditions set..

Thank you!
GeneralRe: conditions problem Pin
J4amieC5-Aug-05 0:18
J4amieC5-Aug-05 0:18 
Generalabout finding forms Pin
papyrus_lei4-Aug-05 16:34
papyrus_lei4-Aug-05 16:34 
GeneralRe: about finding forms Pin
Mohamad Al Husseiny4-Aug-05 17:15
Mohamad Al Husseiny4-Aug-05 17:15 
GeneralRe: about finding forms Pin
papyrus_lei4-Aug-05 17:25
papyrus_lei4-Aug-05 17:25 
GeneralRe: about finding forms Pin
Mohamad Al Husseiny4-Aug-05 17:27
Mohamad Al Husseiny4-Aug-05 17:27 
GeneralRe: about finding forms Pin
Mohamad Al Husseiny4-Aug-05 17:47
Mohamad Al Husseiny4-Aug-05 17:47 
GeneralRe: about finding forms Pin
papyrus_lei4-Aug-05 18:02
papyrus_lei4-Aug-05 18:02 
GeneralRe: about finding forms Pin
Mohamad Al Husseiny4-Aug-05 18:05
Mohamad Al Husseiny4-Aug-05 18:05 
QuestionExcluding xsd files from documentation Pin
David Wong4-Aug-05 11:22
David Wong4-Aug-05 11:22 
GeneralSaving new Word docs directly to SQL Server. Pin
roccom4-Aug-05 11:08
roccom4-Aug-05 11:08 
GeneralRe: Saving new Word docs directly to SQL Server. Pin
Mohamad Al Husseiny4-Aug-05 12:05
Mohamad Al Husseiny4-Aug-05 12:05 
GeneralRe: Saving new Word docs directly to SQL Server. Pin
Peter Vertes5-Aug-05 4:18
Peter Vertes5-Aug-05 4:18 
GeneralAdd MySQL to he setup Project Pin
Jassim Rahma4-Aug-05 10:42
Jassim Rahma4-Aug-05 10:42 
GeneralAccessing the Administrator password Pin
MrEyes4-Aug-05 10:19
MrEyes4-Aug-05 10:19 
GeneralRe: Accessing the Administrator password Pin
Mohamad Al Husseiny4-Aug-05 12:50
Mohamad Al Husseiny4-Aug-05 12:50 
GeneralWinForms: programatically created control will not paint Pin
SebbaP4-Aug-05 9:36
SebbaP4-Aug-05 9:36 
GeneralRe: WinForms: programatically created control will not paint Pin
Rob Graham4-Aug-05 9:48
Rob Graham4-Aug-05 9:48 

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.