Agregar archivos de proyecto.

This commit is contained in:
2026-05-14 09:52:12 +02:00
parent 3a8fc53e4e
commit f8102dd7f1
78 changed files with 34070 additions and 0 deletions

26
sistema.vb Normal file
View File

@@ -0,0 +1,26 @@
Imports System.Windows.Forms
Imports System.Reflection
Public Class sistema
Public Shared Function EstadoBateria() As String
Try
Dim t As Type = GetType(System.Windows.Forms.PowerStatus)
Dim pi As PropertyInfo() = t.GetProperties()
Dim i As Integer
Dim sEstado As String = ""
For i = 0 To pi.Length - 1
Dim propval As Object = pi(i).GetValue(SystemInformation.PowerStatus, Nothing)
sEstado &= pi(i).Name & " = " & propval.ToString & vbCrLf
Next i
Return sEstado
Catch ex As Exception
Throw
End Try
End Function
Public Shared Function PorcentajeBateria() As Integer
Dim power As PowerStatus = SystemInformation.PowerStatus
Dim percent As Single = power.BatteryLifePercent * 100
Return percent
End Function
End Class