Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. conditions problem

conditions problem

Scheduled Pinned Locked Moved C#
questionhelp
23 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N nidhelp

    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!

    J Offline
    J Offline
    J4amieC
    wrote on last edited by
    #21

    I'll continue to help when you eliminate txtspk from your posts. Go click the modify link on the above and type in English, and i'll check back very soon.

    1 Reply Last reply
    0
    • N nidhelp

      u r v detailed n i cld follow >> you are very detailed and i could follow =) do u understand my "english" or do i have to type properly? sorry if you didnt.

      M Offline
      M Offline
      mav northwind
      wrote on last edited by
      #22

      Generally, this kind of !33tspeek is not really welcome here. On the one hand it gives us the impression of talking to a 14-year old, on the other hand it's rather rude if people take their time to answer your problems and you don't even spend enough time to write properly. mav

      N 1 Reply Last reply
      0
      • M mav northwind

        Generally, this kind of !33tspeek is not really welcome here. On the one hand it gives us the impression of talking to a 14-year old, on the other hand it's rather rude if people take their time to answer your problems and you don't even spend enough time to write properly. mav

        N Offline
        N Offline
        nidhelp
        wrote on last edited by
        #23

        yes ok i understand now.. i just thought that people would understand !33tspeek easily.. so sorry about it..

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups