Author Topic: [InForm Demo] ClickTheVoid  (Read 1324 times)

0 Members and 1 Guest are viewing this topic.

Offline FellippeHeitor

  • QB64 Developer
  • Forum Resident
  • Posts: 2825
  • Let it go, this too shall pass.
    • QB64.org
[InForm Demo] ClickTheVoid
« on: June 05, 2018, 03:12:12 PM »
The sample in the attachment showcases the detection of clicks inside a picturebox control, the use of BeginDraw/EndDraw methods as well as the use of the SetFrameRate method.

Notice that even though the track bar allows you to set the frameRate up to 1000 frames per second (minimum is 30, maximum is not capped), the real refresh rate will be capped by your system resources. On my end, the maximum I could observe with this program was ~92fps.

Compile it, run it and then click the black picturebox control.

PS: Distributing a program that uses the InForm library requires you to ship your own .bas and .frm files and any extra files your program uses as well as the extra files you will find in the zip below. They are:

  • falcon.h: c++ library to render fonts without clipping glitches.
  • InForm/InForm.ui: the library itself.
  • InForm/xp.uitheme: the rendering engine with Windows XP's imagery for controls.
  • InForm/InFormVersion.bas: where the current version of the library is defined.

However, if you distribute a compiled binary, you don't need to ship any of these files, as none are needed at runtime.
« Last Edit: June 05, 2018, 04:18:55 PM by FellippeHeitor »

Offline bplus

  • Forum Resident
  • Posts: 6303
  • What could possibly go wrong?
Re: [InForm Demo] ClickTheVoid
« Reply #1 on: June 06, 2018, 10:08:12 AM »
Dang! I am only getting max of 72 or so, though I can see it start at higher numbers.

Offline FellippeHeitor

  • QB64 Developer
  • Forum Resident
  • Posts: 2825
  • Let it go, this too shall pass.
    • QB64.org
Re: [InForm Demo] ClickTheVoid
« Reply #2 on: June 06, 2018, 10:13:10 AM »
Try setting the frame rate to maximum and click clear so it'll reset the counter and give a more realistic number.

Offline bplus

  • Forum Resident
  • Posts: 6303
  • What could possibly go wrong?
Re: [InForm Demo] ClickTheVoid
« Reply #3 on: June 06, 2018, 10:37:21 AM »
Yes, did that.( intel core i5 7th gen) with browser on

Offline johnno56

  • Forum Resident
  • Posts: 999
  • Live long and prosper.
Re: [InForm Demo] ClickTheVoid
« Reply #4 on: June 06, 2018, 08:21:58 PM »
Yeah. I cranked mine up to the max fps and got 81. But, I did notice, if I did nothing the fps count would increment automatically by one after a few seconds.
(IntelCore i5-4460 CPU @ 3.2GHz x 4)

J
Logic is the beginning of wisdom.