|
#23
|
||||
|
||||
|
I don't understand the basics are here https://docs.microsoft.com/en-us/win...ideocontroller in the WMI class, because used DX structures, also I think that only the primary vga that is used is of interest.
Code:
Name_GPU.Text = "GPU Name : " & GPU_Name()
Ram_Adapter.Text = "VGA Memory : " & Format_Bytes(AdapterRAM)
...
Private Function GPU_Name() As String
'Info GPU
Dim Name_GPU As String = ""
Dim GPU As New ManagementObjectSearcher("SELECT Name FROM Win32_VideoController")
For Each Info_GPU As ManagementObject In GPU.Get()
Try
Name_GPU = Info_GPU("Name").ToString()
Exit For
Catch ex As Exception
Name_GPU = "?"
End Try
Next
Return Name_GPU
End Function
Private Function AdapterRAM() As String
'Info GPU
Dim Adapter_RAM As String = ""
Dim GPU As New ManagementObjectSearcher("SELECT AdapterRAM FROM Win32_VideoController")
For Each Info_GPU As ManagementObject In GPU.Get()
Try
Adapter_RAM = Info_GPU("AdapterRAM").ToString()
Exit For
Catch ex As Exception
Adapter_RAM = "?"
End Try
Next
Return Adapter_RAM
End Function
Private Function Format_Bytes(ByVal Bytes_Convert As String) As String
Dim Total_Convert As Double
Try
Select Case Bytes_Convert
'Case Is >= 1073741824 'GB
' Total_Convert = CDbl(Bytes_Convert / 1073741824) 'GB
' Return FormatNumber(Total_Convert, 2) & " GBytes"
Case Is >= 1048576 'To 1073741823
Total_Convert = CDbl(Bytes_Convert / 1048576) 'MB
Return FormatNumber(Total_Convert, 0) & " MBytes"
Case 1024 To 1048575
Total_Convert = CDbl(Bytes_Convert / 1024) 'KB
Return FormatNumber(Total_Convert, 0) & " KBytes"
Case 0 To 1023
Total_Convert = Bytes_Convert 'Bytes
Return FormatNumber(Total_Convert, 0) & " Bytes"
Case Else
Return ""
End Select
Catch
Return ""
End Try
End Function
__________________
≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈ ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈ « I Mediocri Imitano, I Geni Copiano, Dio Crea & Distrugge » (Io Ridefinisco & Perfeziono le Loro Opere Rendendole Uniche) ![]() ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈ ≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈≈ « Mediocrities Imitate, Genius Copy, God Creates & Destroys » (I Reconsider & Improve Their Works, Rending Them One And Only)
Last edited by felice2011; 31-05-2020 at 03:33. |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Nero Plugin to burn mdf/mds images | Kall | CD/DVD Software & Utilities | 6 | 09-11-2007 02:29 |
| REQUEST : SDF plugin and AHX tool | --=FamilyGuy=-- | DC Games | 4 | 20-04-2007 13:13 |
| is there a a gamecube plugin to 3d studio max | gamesmell | GameCube Games | 1 | 12-03-2004 23:54 |
| FlaskMPEG & Panasonic Plugin: Plugin has "Fatal Error" | dan | CD/DVD Software & Utilities | 1 | 15-11-2000 16:23 |