Support Forums > General Board

How about something completely different


Having sparked an interesting discussion wrt buttons, labels, maybe life in general, it got my mind wondering in different directions. Anyway, I thought, what about a series of simple  puzzles that can be entertaining if you have a few minutes to spare. So, how about 'programming charades'?

I've thought of a few. I've sort of obfuscated the text in the following. The idea is to guess which well known film it refers to. No prizes, other than realising I'm maybe wasting my time, but possibly so are you. If you want to run the code, then create a form1 in visual designer for winfbe, with a single button1 and copy the following in the text editor.

--- Code: ---''
''  Remove the following Application.Run code if it used elsewhere in your application.

function rev() as string
   dim j as Integer
   dim ns as string
   while j <len( "anx" )
      ns=ns +chr (not asc(mid("",j+1,1)))
end function
Function Form1_Button1_MouseDown( ByRef sender As wfxButton, ByRef e As EventArgs ) As LRESULT
   form1.Button1.Font = New wfxFont("Segoe UI",48,FontStyles.Normal,FontCharset.Ansi)
   form1.Button1.Text = rev()
   form1.Button1.TextAlign = ButtonAlignment.topLeft
   Function = 0
End Function

Function Form1_Button1_MouseUp( ByRef sender As wfxButton, ByRef e As EventArgs ) As LRESULT
   form1.Button1.TextAlign = ButtonAlignment.bottomright
   Function = 0
End Function
--- End code ---

(You'll have to set events for button1 in the toolbox for mousedown and mouseup)

anyone else want to play?


[0] Message Index

Go to full version