How to get Motherboard name in VB.net?

1k views Asked by At

My program needs an upgrade and I was looking for the Motherboard name and Maker(Developer).

And here's the problem there is WMI what is offered almost everywhere, and it lines up with Console.Writeline, what i want to do is to get the Label to show the same thing what i get with WMI.

The solution what was offered by Thorster Dittmar, did not work, I tried that at the beginning:

Cannot refer to an instance member of a class from within a shared method or shared member initializer without an explicit instance of the class.

1

There are 1 answers

1
Thorsten Dittmar On

It's a bit hard to understand your question, but what I read from it is:

You want to display information you get via WMI in a Label, but the output so far is on the Console?

Well, use the following steps:

  1. Create a Windows Forms application
  2. Place Label on form
  3. Copy code that accesses WMI to Form_Load event handler
  4. Instead of Console.WriteLine(xyz) do label1.Text = xyz

That should be it. If that doesn't answer your question, please edit your question so it becomes clearer what you want.