What control will let me put a calculator on my form?
Printable View
What control will let me put a calculator on my form?
A custom control ... :-)
What do you mean by putting calculator on your form?
If you need to use calculator from VB just add button and Sell it to calc.exe
Iouri Boutchkine
[email protected]
Yes, if you are satisfied with the Windows Calculator, Iouri's method is quite good. You can grab the calculator's handle using the
hWindow = FindWindow(vbNullString, "Calculator")
Once you have the handle of a window, you can do so many things with it. For example, set it always on top, and position it at a precise location over your form. Then it will appear as if it is on your form.
One problem is What to do if the user changes the mode to Scientific (or vice versa). The size will change and you will lose the alignment of the calculator on your form.
The solution is to remove the option altogether from the menu.
If this idea appeals to you, then go on, we'll tell you how to remove the option form the menu, if you don't already know.