QB64.org Forum

QB64 Team Software => InForm-based programs => Topic started by: FellippeHeitor on June 05, 2018, 03:12:12 pm

Title: [InForm Demo] ClickTheVoid
Post by: FellippeHeitor 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:


However, if you distribute a compiled binary, you don't need to ship any of these files, as none are needed at runtime.
Title: Re: [InForm Demo] ClickTheVoid
Post by: bplus 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.
Title: Re: [InForm Demo] ClickTheVoid
Post by: FellippeHeitor 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.
Title: Re: [InForm Demo] ClickTheVoid
Post by: bplus on June 06, 2018, 10:37:21 am
Yes, did that.( intel core i5 7th gen) with browser on
Title: Re: [InForm Demo] ClickTheVoid
Post by: johnno56 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