Some system things
Use this board to post your code snippets - tips and tricks
5 posts
Page 1 of 1
Here are some system things ;P
Battery:
This will show you how many % power you have and if its charging or not:
What you need:
*2 Textboxes
*1 Timer
-Textbox1 is the Power %
-Textbox2 will show if its charging or not
-Double click on the timer and enter this code:
<-------------------->
How to see how much space you got left in your :C : D :E :F
//Show How many Gb and how many mbs
You need 16 Labels.. [or 8 if you only want to know one of mb or gb]
For the C:
Just double click on the form and enter this:
Here is the full code:
GB = 1000000000
MB = 1000000
KB: 1000
<-------------------->
Download the Source:
*It comes with system info + Screen show taker on x interval
-RunarM
Battery:
This will show you how many % power you have and if its charging or not:
What you need:
*2 Textboxes
*1 Timer
-Textbox1 is the Power %
-Textbox2 will show if its charging or not
-Double click on the timer and enter this code:
Code: Select all
and now it should show you how much power and if its charging..TextBox1.Text = ("" & perFull * 100 & "%")
If psBattery.PowerLineStatus = PowerLineStatus.Online Then
TextBox2.Text = ("Charging")
ElseIf psBattery.PowerLineStatus = PowerLineStatus.Offline Then
TextBox2.Text = ("Not charging")
End If
<-------------------->
How to see how much space you got left in your :C : D :E :F
//Show How many Gb and how many mbs
You need 16 Labels.. [or 8 if you only want to know one of mb or gb]
For the C:
Just double click on the form and enter this:
Code: Select all
Thats for Gbs and this is for Mbs:Dim freeSpaceC As Long
freeSpaceC = My.Computer.FileSystem.GetDriveInfo("C:\").AvailableFreeSpace / 1000000000
Label3.Text = freeSpaceC & ".0 GB Left"
freeSpaceC = My.Computer.FileSystem.GetDriveInfo("C:\").TotalSize / 1000000000
Label6.Text = freeSpaceC & ".0 GB Total"
Code: Select all
Now i have already added all 16 labels and it looks like this: freeSpaceC = My.Computer.FileSystem.GetDriveInfo("C:\").AvailableFreeSpace / 1000000
Label11.Text = freeSpaceC & ".0 MB Left"
freeSpaceC = My.Computer.FileSystem.GetDriveInfo("C:\").TotalSize / 1000000
Label12.Text = freeSpaceC & ".0 MB Total"
Here is the full code:
Code: Select all
You see the E: Isnt available [spelled it wrong] thats cause i don't have any CD or Dvd, the F: is my free usb ;) Dim freeSpaceC As Long
freeSpaceC = My.Computer.FileSystem.GetDriveInfo("C:\").AvailableFreeSpace / 1000000000
Label3.Text = freeSpaceC & ".0 GB Left"
freeSpaceC = My.Computer.FileSystem.GetDriveInfo("C:\").TotalSize / 1000000000
Label6.Text = freeSpaceC & ".0 GB Total"
freeSpaceC = My.Computer.FileSystem.GetDriveInfo("C:\").AvailableFreeSpace / 1000000
Label11.Text = freeSpaceC & ".0 MB Left"
freeSpaceC = My.Computer.FileSystem.GetDriveInfo("C:\").TotalSize / 1000000
Label12.Text = freeSpaceC & ".0 MB Total"
Dim FreeSpaceD As Long
FreeSpaceD = My.Computer.FileSystem.GetDriveInfo("D:\").AvailableFreeSpace / 1000000000
Label4.Text = FreeSpaceD & ".0 GB left"
FreeSpaceD = My.Computer.FileSystem.GetDriveInfo("D:\").TotalSize / 1000000000
Label7.Text = FreeSpaceD & ".0 GB Total"
FreeSpaceD = My.Computer.FileSystem.GetDriveInfo("D:\").AvailableFreeSpace / 1000000000
Label13.Text = FreeSpaceD & ".0 MB left"
FreeSpaceD = My.Computer.FileSystem.GetDriveInfo("D:\").TotalSize / 1000000000
Label14.Text = FreeSpaceD & ".0 MB Total"
Dim FreeSpaceF As Long
FreeSpaceF = My.Computer.FileSystem.GetDriveInfo("F:\").AvailableFreeSpace / 1000000000
Label5.Text = FreeSpaceF & ".0 GB left"
FreeSpaceF = My.Computer.FileSystem.GetDriveInfo("F:\").TotalSize / 1000000000
Label8.Text = FreeSpaceF & ".0 GB Total"
FreeSpaceF = My.Computer.FileSystem.GetDriveInfo("F:\").AvailableFreeSpace / 1000000
Label9.Text = FreeSpaceF & ".0 MB left"
FreeSpaceF = My.Computer.FileSystem.GetDriveInfo("F:\").TotalSize / 1000000
Label10.Text = FreeSpaceF & ".0 MB Total"
Dim FreeSpaceE As Long
FreeSpaceE = My.Computer.FileSystem.GetDriveInfo("E:\").AvailableFreeSpace / 1000000000
Label13.Text = FreeSpaceE & ".0 GB left"
FreeSpaceE = My.Computer.FileSystem.GetDriveInfo("E:\").TotalSize / 1000000000
Label14.Text = FreeSpaceE & ".0 GB Total"
FreeSpaceE = My.Computer.FileSystem.GetDriveInfo("E:\").AvailableFreeSpace / 1000000
Label15.Text = FreeSpaceE & ".0 MB left"
FreeSpaceE = My.Computer.FileSystem.GetDriveInfo("E:\").TotalSize / 1000000
Label16.Text = FreeSpaceE & ".0 MB Total"
GB = 1000000000
MB = 1000000
KB: 1000
<-------------------->
Download the Source:
*It comes with system info + Screen show taker on x interval
-RunarM
You do not have the required permissions to view the files attached to this post.
Just another day in my life.
http://www.codexvideos.com
http://www.codexvideos.com
Thanks when CodenStuff told me that code for memory getter, and it showed like 12 digits I needed this too!
wow thanks for sharing this.
5 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023