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
T

thomforum

@thomforum
About
Posts
9
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Automatic insertion of try catch block
    T thomforum

    Dave -- Tell me one instance where you wouldn't prefer placing a try/catch in a method. cheers

    C#

  • Automatic insertion of try catch block
    T thomforum

    Calla -- Yup I am using VS 2005. But I want it automated. How will I trigger it ? cheers

    C#

  • Automatic insertion of try catch block
    T thomforum

    Dear All -- Forgive me if I am being greedy. Upon writing a function header say "Private void FntName()" is there a way the two curly braces and the try catch block is automatically inserted. :) cheers

    C#

  • Change the properties of the controls
    T thomforum

    Luc -- My apologies, on not seeing your first post. Well, that covers my requirement. cheers

    C# csharp

  • Change the properties of the controls
    T thomforum

    Luc -- Say you have 100 textboxes or controls to be hidden acc. to choice, then will you write 100 statements or probably even more ? cheers

    C# csharp

  • Change the properties of the controls
    T thomforum

    Dear All -- Go through the code below. Pour in your valuable suggestions. 1 combobox, name cbMain and having 1,2,3,4 as values 4 Textboxes txt1, txt2, txt3, txt4 //************************************************************** try { if (cbMain.SelectedItem.ToString() == "1") { txt2.Hide(); txt3.Hide(); txt4.Hide(); } else if (cbMain.SelectedItem.ToString() == "2") { txt2.Show(); txt3.Hide(); txt4.Hide(); } else if (cbMain.SelectedItem.ToString() == "3") { txt2.Show(); txt3.Show(); txt4.Hide(); } else if (cbMain.SelectedItem.ToString() == "4") { txt2.Show(); txt3.Show(); txt4.Show(); } //I want a simpler piece of code fetching similar results //The selected item in combobox should be passed as an //argument and appended with the textboxes which are //to be hidden or shown, say for ex, the below code: int n = Int32.Parse(cbMain.SelectedItem.ToString()); for (int i = 1; i <= n; i++) { //("txt" + i).Show(); //What line will make the trick } for (int i = n+1; i <= cbMain.Items.Count; i++) { //("txt" + i).Hide(); //What line will make the trick } } catch (Exception ex) { MessageBox.Show(ex.Message); } cheers

    C# csharp

  • Change the properties of the controls
    T thomforum

    Dear All -- I have a form in c#, consisting of say 1 combobox and 4 textboxes. Combobox will have values from 1 to 4 and the name of the textboxes be txt1, txt2,.. txt4. Depending on the value chosen in combobox, the txtboxes should hide or show. Is something like the below code possible. for (int i = 0; i < n; i++) { (TextBox)("txt" + i).Hide; } or is there some other better way of doing the same. Sorry, if the subject name is not in lines with the body/matter. cheers

    C# csharp

  • Code behind File System Watcher
    T thomforum

    All -- I thank everybody for dropping in and letting me know the various aspects. I still couldnt figure out why the trouble is happening. I can successfully watch a folder and get the file changed/created/deleted notifications, but when I try opening a file in UG(Unigraphics CAD App) (The next line in code is opening a file in a CAD Application) it throws out an error "Attempt to read or write protected memory." Hence I am forced to use timer. But timer is not a true solution. Probably I can send in the code and a small file to be opened in CAD, but I am dubious, whether somebody will have the CAD App. Code : C# CAD APP: UG NX 5 Thanks and Cheers Thomas

    C# algorithms question

  • Code behind File System Watcher
    T thomforum

    Hello All -- I am trying to watch a folder for any changes to it. I am integrating my code with a CAD application to make modifications to a model depending on the changes occuring in the watched folder. So, to watch a folder I make use of filesystemwatcher. But when I do that, there are some problems occuring with CAD Application. Without filesystemwatcher this works perfectly fine. Now I use timer to see any changes in that folder. Searching over the net, many told that there are some bugs in filesystemwatcher. Does anybody have the code that is behind FileSystemWatcher ? Thanks, Thomas.

    C# algorithms question
  • Login

  • Don't have an account? Register

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