PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: How about something completely different  (Read 921 times)


  • Senior Member
  • ***
  • Posts: 409
How about something completely different
« on: August 28, 2018, 07:54:52 PM »

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: [Select]
''  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

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

anyone else want to play?
« Last Edit: August 29, 2018, 04:03:38 PM by raymw »