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. The Lounge
  3. String Format

String Format

Scheduled Pinned Locked Moved The Lounge
15 Posts 8 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.
  • M Offline
    M Offline
    mrlou88
    wrote on last edited by
    #1

    Can anyone tell me why this is not working, just displays 0.00% this.label2.Text=String.Format("{0:p}",fs.Position/Convert.ToInt64(this.progressbar1.Maximum)*100); this.progressbar1.Maximum Contains 152333120 fs.Position is the current byte position in the file.

    A T M 3 Replies Last reply
    0
    • M mrlou88

      Can anyone tell me why this is not working, just displays 0.00% this.label2.Text=String.Format("{0:p}",fs.Position/Convert.ToInt64(this.progressbar1.Maximum)*100); this.progressbar1.Maximum Contains 152333120 fs.Position is the current byte position in the file.

      A Offline
      A Offline
      Anders Molin
      wrote on last edited by
      #2

      Try the programming forums. - Anders My Photos

      WDevs - The worlds first DSP, free blog space, email and more

      1 Reply Last reply
      0
      • M mrlou88

        Can anyone tell me why this is not working, just displays 0.00% this.label2.Text=String.Format("{0:p}",fs.Position/Convert.ToInt64(this.progressbar1.Maximum)*100); this.progressbar1.Maximum Contains 152333120 fs.Position is the current byte position in the file.

        T Offline
        T Offline
        Ted Ferenc
        wrote on last edited by
        #3

        Note Programing questions are not allowed in the longe, but try (fs.Position * 100)/Convert.ToInt64(this.progressbar1.Maximum _"An expert is a person who has made all the mistakes that can be made in a very narrow field."_ - Neils Bohr

        1 Reply Last reply
        0
        • M mrlou88

          Can anyone tell me why this is not working, just displays 0.00% this.label2.Text=String.Format("{0:p}",fs.Position/Convert.ToInt64(this.progressbar1.Maximum)*100); this.progressbar1.Maximum Contains 152333120 fs.Position is the current byte position in the file.

          M Offline
          M Offline
          mrlou88
          wrote on last edited by
          #4

          Sorry, didn't notice a programming forum, thought this was it. But thanks, that worked

          C 1 Reply Last reply
          0
          • M mrlou88

            Sorry, didn't notice a programming forum, thought this was it. But thanks, that worked

            C Offline
            C Offline
            Colin Angus Mackay
            wrote on last edited by
            #5

            You mean you missed the sign at the top of the lounge that reads: Got a programming question? Try the forums [Drop Down List of Programming Forums]


            Do you want to know more?


            Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.

            E 1 Reply Last reply
            0
            • C Colin Angus Mackay

              You mean you missed the sign at the top of the lounge that reads: Got a programming question? Try the forums [Drop Down List of Programming Forums]


              Do you want to know more?


              Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.

              E Offline
              E Offline
              El Corazon
              wrote on last edited by
              #6

              Colin Angus Mackay wrote: You mean you missed the sign at the top of the lounge that reads: Got a programming question? Try the forums [Drop Down List of Programming Forums] it's too small, maybe a larger font size? :rolleyes: _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

              C G 2 Replies Last reply
              0
              • E El Corazon

                Colin Angus Mackay wrote: You mean you missed the sign at the top of the lounge that reads: Got a programming question? Try the forums [Drop Down List of Programming Forums] it's too small, maybe a larger font size? :rolleyes: _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                C Offline
                C Offline
                Colin Angus Mackay
                wrote on last edited by
                #7

                Jeffry J. Brickley wrote: it's too small, maybe a larger font size? AND the sign on the new thread page, where you type the message, that says in bold red letters "Please do NOT post programming questions to this forum."


                Do you want to know more?


                Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.

                L E 2 Replies Last reply
                0
                • C Colin Angus Mackay

                  Jeffry J. Brickley wrote: it's too small, maybe a larger font size? AND the sign on the new thread page, where you type the message, that says in bold red letters "Please do NOT post programming questions to this forum."


                  Do you want to know more?


                  Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.

                  L Offline
                  L Offline
                  Le centriste
                  wrote on last edited by
                  #8

                  No wonder why he cannot get his code to work correctly. He probably misses a lot when reading the documentation. :zzz: -------- "I say no to drugs, but they don't listen." - Marilyn Manson

                  T 1 Reply Last reply
                  0
                  • C Colin Angus Mackay

                    Jeffry J. Brickley wrote: it's too small, maybe a larger font size? AND the sign on the new thread page, where you type the message, that says in bold red letters "Please do NOT post programming questions to this forum."


                    Do you want to know more?


                    Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.

                    E Offline
                    E Offline
                    El Corazon
                    wrote on last edited by
                    #9

                    Colin Angus Mackay wrote: AND the sign on the new thread page, where you type the message, that says in bold red letters "Please do NOT post programming questions to this forum." not red enough... perhaps a nice dripping blood knife slashed font in red? :D you do know I am being facetious right? :~ I saw the signs, both, from day one (which was not that long ago for me). _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                    C 1 Reply Last reply
                    0
                    • E El Corazon

                      Colin Angus Mackay wrote: AND the sign on the new thread page, where you type the message, that says in bold red letters "Please do NOT post programming questions to this forum." not red enough... perhaps a nice dripping blood knife slashed font in red? :D you do know I am being facetious right? :~ I saw the signs, both, from day one (which was not that long ago for me). _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                      C Offline
                      C Offline
                      Colin Angus Mackay
                      wrote on last edited by
                      #10

                      Jeffry J. Brickley wrote: you do know I am being facetious right? <schultz>I know nothing.</schultz>


                      Do you want to know more?


                      Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.

                      E J 2 Replies Last reply
                      0
                      • C Colin Angus Mackay

                        Jeffry J. Brickley wrote: you do know I am being facetious right? <schultz>I know nothing.</schultz>


                        Do you want to know more?


                        Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.

                        E Offline
                        E Offline
                        El Corazon
                        wrote on last edited by
                        #11

                        Colin Angus Mackay wrote: I know nothing. but obviosly more than a few.... _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                        1 Reply Last reply
                        0
                        • L Le centriste

                          No wonder why he cannot get his code to work correctly. He probably misses a lot when reading the documentation. :zzz: -------- "I say no to drugs, but they don't listen." - Marilyn Manson

                          T Offline
                          T Offline
                          Ted Ferenc
                          wrote on last edited by
                          #12

                          Read the documentation? That is the last resort:-O


                          "An expert is a person who has made all the mistakes that can be made in a very narrow field." - Neils Bohr

                          J 1 Reply Last reply
                          0
                          • T Ted Ferenc

                            Read the documentation? That is the last resort:-O


                            "An expert is a person who has made all the mistakes that can be made in a very narrow field." - Neils Bohr

                            J Offline
                            J Offline
                            Jerry Hammond
                            wrote on last edited by
                            #13

                            documentation? Isn't that something you need to cross the border?

                            I Do Whatever My Rice Krispies Tell Me To. Toasty0.com

                            1 Reply Last reply
                            0
                            • C Colin Angus Mackay

                              Jeffry J. Brickley wrote: you do know I am being facetious right? <schultz>I know nothing.</schultz>


                              Do you want to know more?


                              Vogon Building and Loan advise that your planet is at risk if you do not keep up repayments on any mortgage secured upon it. Please remember that the force of gravity can go up as well as down.

                              J Offline
                              J Offline
                              Jerry Hammond
                              wrote on last edited by
                              #14

                              Colin Angus Mackay wrote: I know nothing. understatement or a core truth. You be the judge, ladies and gentlemen. *hehehe*

                              I Do Whatever My Rice Krispies Tell Me To. Toasty0.com

                              1 Reply Last reply
                              0
                              • E El Corazon

                                Colin Angus Mackay wrote: You mean you missed the sign at the top of the lounge that reads: Got a programming question? Try the forums [Drop Down List of Programming Forums] it's too small, maybe a larger font size? :rolleyes: _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                                G Offline
                                G Offline
                                Gary R Wheeler
                                wrote on last edited by
                                #15

                                Nah, just a bigger club to beat him over the head with.


                                Software Zen: delete this;

                                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