nschessnerd 0 Posting Whiz in Training

Hey, I have this code i wrote in vb 2008 express that works fine on vista but not at all on xp

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
        Me.Visible = False
        Dim fw = FindWindow(vbNullString, "Logoff Warning")
        If fw = 0 Then
        Else : Call SendMessage(fw, WM_CLOSE, 0, 0)
        End If
    End Sub

Any ideas?
Im using vb express 2008 in both.

Thanks
Matt

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.