Locations of visitors to this page


Vista: Get WinSat Info

Onteora Software

Ken Tucker's Blog

About the author

Author Name is someone.
E-mail me Send mail

Recent posts

Recent comments

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

Vista: Get WinSat Info

Vista: Get WinSat Info



Windows Vista has a performance index for your hardware.  The scores range from 1(worst) to 5.9(best).  If your application uses a lot of graphics you might get poor performance on a computer with a graphics score of 1.  You can use this number to scale back on the graphics to improve your apps performance.  This example gets displays the scores in the forms paint event.  For this example add a reference to the WinSat 1.0 type library in the com tab.


Imports WINSATLib
Imports System.Text

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
        Dim ws As New CQueryWinSAT
        Dim sbInfo As New StringBuilder

        For x As Integer = 0 To 4
            Dim info As IProvideWinSATAssessmentInfo = ws.Info.GetAssessmentInfo(x)
            sbInfo.Append(info.Title & vbCrLf)
            sbInfo.Append(info.Description & vbCrLf)
            sbInfo.Append(info.Score & vbCrLf & vbCrLf)
        Next

        e.Graphics.DrawString(sbInfo.ToString, Me.Font, Brushes.Black, 0, 0)
    End Sub
End Class

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Categories: VB | Vista
Posted by Ken Tucker on Wednesday, March 21, 2007 10:12 PM
Permalink | Comments (1) | Post RSSRSS comment feed

Related posts

Comments

Julius Friedman us

Monday, April 14, 2008 10:06 AM

Julius Friedman

Awesome find.. I wish it was faster but its cool and it saves me time from having to interop manually ... Nice FIND!!!

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

Friday, August 29, 2008 11:29 PM