Solved - perfecnt counter

Posted on 2012-09-08
Last Modified: 2012-09-18
hello there,
I would like to create a percent counter..
I have two counter that check for file size. if file size is bigger then 1MB then
Big.Text += 1
if file size is smaller than 1MB then
Small.Text += 1
how can I have a percentage that show like %95 etc.. ?
Question by:XK8ER
    LVL 43

    Assisted Solution

    VB isn't my main language so this is air code

    dim i as integer, s as string
    i = 95
    s = "%" + i.ToString()

    should result in s being %95
    LVL 33

    Accepted Solution

    This will depend on what the number is a percentage of.  I presume the ratio involves Big.text and Small.text, but are you looking for those to be percentages of each other, percentages of some total value (total number of files, total file size, etc), or something else.  

    It's also possible you're asking how to show Big.text and Small.text as percentage values.  In that case what you want is the FormatPercent function, but you may want to divide your numbers by 100 first.

    This question can be answered better if it's stated more clearly.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
    Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now