How Do I detect a graphics card by vendor Name?

R

rspercy

I am using a splash screen to detect a video card and once detected it
should write it to the registry. Next time I boot-up the program I shouldnt
see the splash screen.
 
O

Onur Güzel

I am using a splash screen to detect a video card and once detected it
should write it to the registry. Next time I boot-up the program I shouldnt
see the splash screen.

You can get the VGA card name using WMI. WMI is manipulated by
referencing System.Management.dll from .NET tab in add reference
dialog. Then Use that to get VGAcard name:

////////////////
Try
Dim vganame As String
Dim searcher As New ManagementObjectSearcher _
("root\CIMV2", "SELECT * FROM Win32_VideoController")

For Each queryObj As ManagementObject In searcher.Get()

' Your Vga card name will be found and
' assigned to "vganame" variable.
vganame = queryObj.GetPropertyValue("Name").ToString)

Next
Catch err As ManagementException

MessageBox.Show(err.Message)

End Try
\\\\\\\\\\\\\\\\\\\\


Once you've found the VGA card name, you can write its name to the
required registry key using "My.Computer.Registry.SetValue" method:
http://msdn.microsoft.com/en-us/library/hh5f7328(VS.80).aspx

After writing, you can validate and get that key using,
My.Computer.Registry.GetValue method
http://msdn.microsoft.com/en-us/library/wzw8xe3w(VS.80).aspx

And finally, you are ready to handle that information in next launch
of your program not to show splash screen again, necessarily in Form's
Load event.

Onur Güzel
 
A

Andrew Morton

Onur said:
You can get the VGA card name using WMI. WMI is manipulated by
referencing System.Management.dll from .NET tab in add reference
dialog. Then Use that to get VGAcard name:

And don't forget that there could be more than one video card.

Andrew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top