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
G

glennPattonWork3

@glennPattonWork3
About
Posts
6.2k
Topics
794
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Email from Linkedin today
    G glennPattonWork3

    Hmmm, I have a link to the article I wrote on my LinkedIn page and have seen several of :bob: parents look at it, do you?

    The Lounge

  • I need to convert a string to a float....
    G glennPattonWork3

    Old question now solved!

    C# visual-studio data-structures question

  • Been a bit quiet recently but...
    G glennPattonWork3

    After today I am thinking of moving in!

    The Lounge question

  • Been a bit quiet recently but...
    G glennPattonWork3

    First Dilbert, Now :bob:

    The Lounge question

  • Been a bit quiet recently but...
    G glennPattonWork3

    Ahh.....Nutz!

    The Lounge question

  • Been a bit quiet recently but...
    G glennPattonWork3

    Hi All, I am still here! I have not really posted much recently (I have asked the odd question in despartion) but... still like to read the lounge and the Daily email. The last few there has been no selection of conversation, is it still a thing? Daily CCC is back (I think) never made any headway, also I miss Moive Quote of The Day... ah memories. You young whipper snappers get off my lawn! ;)

    The Lounge question

  • Just take my money
    G glennPattonWork3

    But does it come with a 'Dead Flesh' keyboard?

    The Lounge javascript com

  • Ladder Logic any experts here?
    G glennPattonWork3

    Thanks alot, but that since has died a death. I'll give you the full story, my previous employer had a system for moving moulds on a conveyor belt, this was not used as it wasn't powerful enough to move the moulds (also the rollers were linked with silicon belts, rather than a chain drive). So the unit was preposed to be upgraded as they had bought next door and were going to expand into. At which point it was moved with haste not allowing me to follow through what was connected to what and dumped. In sorting through the mess I found some interesting details such as the PLC and three phase power unit were connected incorrectly all the interconnecting cables were blue and no idents on them. Jumped ship due to that and another unconnected issue when I was offered a better job else where.

    The Lounge question announcement

  • Microsoft, do you know how many people are complaining?
    G glennPattonWork3

    I have Win11 & Win10 machines and use them both for different things, I also use(d) Office XP (with an update to open docx & xlsx). I got into the habit of using them (also my Mum, not very technical!) could use it fine. One day Win11 updates and bang splat it stops working, it will open and you can view the document touch any key, click any mouse button and it closes. Why? So I have to conned into an Orfice365 subscription (I did try OpenOffice but had issues).

    The Lounge com data-structures question discussion

  • Ah, woe is my simple Application
    G glennPattonWork3

    Hi All, Everyone I sure has at one time or another just quickly knocked together an application to solve a problem. It gets seen and feature creep sets in and before you know it your simple app is a monster of hastily added features bordering on spaghetti code. You end up afraid to change bits incase that throws off something else (in my case timing to the serial port(!) so you wait until everyone has gone home to test the changes they want hasn't caused the system to break. Just done that, appears to work. I am starting to think it's Indiana Jones and the boulder. So come Tuesday it should software wise work. :confused:

    The Lounge help

  • A friend sent me this little MP4
    G glennPattonWork3

    I'm not picky a regular size would be just as easy!

    The Lounge design com graphics iot question

  • Okay Microsoft. Uncle!
    G glennPattonWork3

    The bird works for, used to use Eudora but when Qualcomm made open source dev stopped and T-Bird was the only non-M$ mail client (had a nasty experience with Outlook Express) also it runs on Linux the same!

    The Lounge design com graphics iot

  • Two Things
    G glennPattonWork3

    Nice to hear from an old hand. :), good luck!

    The Lounge com question

  • There are many gotos, but these ones are mine
    G glennPattonWork3

    Try writing Assembly with out them (the fabled JMP!). They are a tool that get misused (kinda like the powered screw driver).

    The Lounge

  • I need to convert a the string of a Text box to a Value
    G glennPattonWork3

    Sort of I had to:

    decimal.TryParse(weightTxt.Text, out decimal value);

    as I was messing with a floating point number, haven't coded in Windows for a while, man it shows!

    C# question help

  • I need to convert a the string of a Text box to a Value
    G glennPattonWork3

    Hi, This is the code I have been trying to get all afternoon!

    private void button1_Click(object sender, EventArgs e)
    {
    float ForceVal = 0;
    //MessageBox.Show(weightTxt.Text);
    //ForceVal = Convert.ToDecimal(weightTxt.Text);

    	//int.TryParse(weightTxt.Text, out int value);
    	decimal.TryParse(weightTxt.Text, out decimal value);
       //  MessageBox.Show(value.ToString());
         if (value > 1000)
         {
             MessageBox.Show("Here!");
         }
         MessageBox.Show(value.ToString());
     
    	          
    }
    

    I think that should do it. I'm hacking together a test program that interfaces to a Phidget load cell in trying to measure a value that needs to converted to Newtons from Grams (I think!). I hate the fact I wasted so much time trying to get the value to be used out of a darned label. I haven't really done much Windows code (I'm an embedded guy really) since VS2008 was the new kid on the block and times like these it shows! :sigh:

    C# question help

  • I need to convert a the string of a Text box to a Value
    G glennPattonWork3

    Thanks, that appears to work! :-D

    C# question help

  • I need to convert a the string of a Text box to a Value
    G glennPattonWork3

    You are right, but even if make 1234 it still returns a 0...

    C# question help

  • I need to convert a the string of a Text box to a Value
    G glennPattonWork3

    Hmmm, I'm reading back a sensor, it's giving values all over the show!

    private void button1_Click(object sender, EventArgs e)
    {
    //int value = 0;

    // MessageBox.Show(textBox1.Text);

    if (int.TryParse(textBox1.Text, out int value))
    {
       
        if (value > 1000)
        {
            MessageBox.Show("Here!");
        }
        MessageBox.Show(value.ToString());
    }
    
    MessageBox.Show(value.ToString());
    

    }

    value is taken as 0, despite textBox1.Text having 1234.56...

    C# question help

  • I need to convert a the string of a Text box to a Value
    G glennPattonWork3

    Hi All, Stupid Question time. If a value is read to a textbox it is a String, to convert it to a value in the past I have done:

    int Value = 0;
    Value = Convert.ToInt16(textBox1.Text)

    I'm sure of it and then done maths and operations on the Value such as:

    if(Value > 1000)
    {
    MessageBox.Show("Here!");
    }

    But it won't run in VS2022 it returns a System.Format.Exception error. What have I done? Glenn

    C# question help
  • Login

  • Don't have an account? Register

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