CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Calculator

  1. #1
    Join Date
    Nov 2000
    Location
    IL, U.S.A.
    Posts
    218

    Calculator

    What control will let me put a calculator on my form?


  2. #2
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: Calculator

    A custom control ... :-)




  3. #3
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Calculator

    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]
    Iouri Boutchkine
    [email protected]

  4. #4
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: Calculator

    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.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured