Calculator - Printable Version +- QB64 Phoenix Edition (https://qb64phoenix.com/forum) +-- Forum: QB64 Rising (https://qb64phoenix.com/forum/forumdisplay.php?fid=1) +--- Forum: Code and Stuff (https://qb64phoenix.com/forum/forumdisplay.php?fid=3) +---- Forum: Programs (https://qb64phoenix.com/forum/forumdisplay.php?fid=7) +---- Thread: Calculator (/showthread.php?tid=677) |
Calculator - SierraKen - 07-24-2022 Two years ago I made this calculator which has animated buttons using your mouse or keyboard. Today I decided to add the Copy and Paste buttons to it. Before you could click your number or do Ctrl-C to copy it in the clipboard but I never added a way to paste a clipboard number into your screen until today. You can copy from any program and paste it to the calculator, or copy from the calculator and paste it to itself. Tell me what you think, thanks. (Code deleted with an update below.) RE: Calculator - SierraKen - 07-24-2022 I added a 17 digit limit to the Paste, if it's beyond that the number will revert to 0. RE: Calculator - Coolman - 07-25-2022 interesting. thank you for sharing this code. it would be necessary to enlarge the display fonts and there is a latency time when clicking. RE: Calculator - OldMoses - 07-25-2022 I've been using your button beveling algorithm ever since you first posted the calculator. I just like that look. RE: Calculator - James D Jarvis - 07-25-2022 (07-25-2022, 09:34 AM)Coolman Wrote: interesting. thank you for sharing this code. it would be necessary to enlarge the display fonts and there is a latency time when clicking. change the delay in the press handling code and that stops being a problem. It's "_delay .25" and the lag vanished on my system with "_delay .03" RE: Calculator - bplus - 07-25-2022 This is probably causing problems too: Code: (Select All) Do While _MouseInput The way to poll the mouse is While _Mouseinput: Wend ' poll mouse then Code: (Select All) mousex = _MouseX RE: Calculator - Coolman - 07-25-2022 (07-25-2022, 01:05 PM)James D Jarvis Wrote:(07-25-2022, 09:34 AM)Coolman Wrote: interesting. thank you for sharing this code. it would be necessary to enlarge the display fonts and there is a latency time when clicking. indeed. thank you RE: Calculator - SierraKen - 07-25-2022 Thanks for your input guys. I changed the font to Arial font size 18 and 14 for the Help Page. When I tried the _DELAY at .03 it often was doubling the number when I clicked a button, or tripling, or more. So I it seems to work fine with me at .2. I did what B+ said and changed the mouse commands and it seems to work a little bit better. B+, I've always gotten that mouse code from the Wiki pages. But I will try to use While/Wend instead, thanks. I also added some better code to keep the limit of digits from going off the screen. Here is the update: (Code deleted again, go to Page 2 for the update.) RE: Calculator - Kernelpanic - 07-25-2022 The program is great and the graphics are excellent. I see the point of such programs in that you learn a lot and that it's fun. You learn the most when you have fun. I once wrote a program about financial mathematics in QuickC 2.5, it ran under MS-DOS in Win95. Later I realized parts of it in HTML. Since it was an intranet with IE as the browser, I could use VBScript. It was the better script language, unfortunately MS wasn't as violent as in other things. - Fucking javascript! Unfortunately I couldn't use the Form-2-Controls (ActiveX) they looked as real as in the "Calculator". Good program! I need now . . . what . . . RE: Calculator - SierraKen - 07-25-2022 Thanks! Wow I never really got into C much myself, mostly always stuck with different variations of BASIC since the 80's. Although I did make many websites in html and a little bits of C, Visual Basic, etc. |