Visual Horrific!

Feb 13, 2007 07:18

You know you're tired when you blame an inability to sleep on bad kernel32 reference. Okay, so I'm not quite THAT tired yet, but I've had worse mixups. And just for kicks, lets make some sweet visual basic! Bonus points if you can find the one thing that would error on compile.

Public Class Kyle1
    Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
    Dim EnergyLevel As Integer, Caffeine As Integer
    Private Sub CheckSleepLevel()
        If Me.EnergyLevel < 30 Then
            MessageBox.Show("You really should be asleep..", "Hey..", MessageBoxButtons.Okay, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly, False)
        ElseIf Me.Caffeine < 10 Then
            'GET SOME SLEEP!
        End If
        Me.Sleep(3600000)
    End Sub

Aren't the colours pretty? They're annoying, too.. Especially when you press one wrong button and half of everything turns green, the forum won't display, and it no longer compiles. Fun! Memory leaks are better, though. Whoo!

geekrant

Previous post Next post
Up