Advertisement
7_2009-2012 OLE/ COM/ DCOM/ Active-X #225724

Crazy X

This program is dumb but kinda amusing, it's an X that is printed in random places... sorry, I was bored.

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
Upload
Upload
'Constants
Private Const WM_QUERYENDSESSION As System.Int32 = &H11
Private Const WM_CANCELMODE As System.Int32 = &H1F

'And the Sub itself....
Protected Overrides Sub WndProc(ByRef m As Message)
	If m.Msg = WM_QUERYENDSESSION Then
'Check the m, if it's trying to shut down, don't send it. Send a new message cancelling it.
		Dim x As New Message
		x.Msg = WM_CANCELMODE
		MyBase.WndProc(x)
	Else
'Otherwise, just send the message.
		MyBase.WndProc(m)
	End If
End Sub
Original Comments (3)
Recovered from Wayback Machine