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