Get Progress
My English is translated, Sorry 
This function returns a percentage from 0% to 100% according to the value.
Example:
Example 2 ( Using ProgressBar ):
I used it in a scan file, the maximum is the total of the files and the current is being scanned !
The progress variable will return a percentage value to 100%
She can be utilized to generate large percentage of values.
Credits

This function returns a percentage from 0% to 100% according to the value.
Example:
Code:
Dim progress As Integer = ( Current / 100) / ( Maximum / 100 / 100)
Code:
Dim progress As Integer = ( Progressbar1.Value / 100 ) / ( Progressbar1.Maximum / 100 / 100 )
The progress variable will return a percentage value to 100%
She can be utilized to generate large percentage of values.
Credits
Code:
pDevice (done unintentionally but left what I wanted)

and yes you are right can be optimized.