Results 1 to 11 of 11

Thread: Calc within my App

  1. #1

    Thread Starter
    Fanatic Member pvbangera's Avatar
    Join Date
    Sep 2001
    Location
    Mumbai, India
    Posts
    961

    Calc within my App

    hi all,

    i want to call calc or any other app within my mdi form.

    pls guide

    regards,

    prakash

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Again , here
    VB Code:
    1. Process.Start("Calc.exe")

  3. #3

    Thread Starter
    Fanatic Member pvbangera's Avatar
    Join Date
    Sep 2001
    Location
    Mumbai, India
    Posts
    961
    but, will it show it as mdi child form???

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by pvbangera
    but, will it show it as mdi child form???
    No, it runs in different spots usually , you should've mentioned this earlier . If you want to bound it in your form , I believe you have to use some API Functions .

    VB Code:
    1. Dim sinfo As New ProcessStartInfo("calc.exe")
    2. sinfo.WindowStyle = ProcessWindowStyle.Normal
    3. Process.Start(sinfo)

  5. #5

    Thread Starter
    Fanatic Member pvbangera's Avatar
    Join Date
    Sep 2001
    Location
    Mumbai, India
    Posts
    961
    the code is not working. it shows me the calc in different window

  6. #6
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Reading, UK
    Posts
    870
    Why don't you just make your own calculator form? You can include it in whatever projects you want then and in whatever way.
    www.vb-tech.com
    .Net Freelance Development
    http://weblog.vb-tech.com/nick
    My blog

  7. #7
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    Originally posted by pvbangera
    the code is not working. it shows me the calc in different window
    I don't get why you'd want a calculator inside a MDI lol.....anyways it's not that easy so it's faster to make your own
    \m/\m/

  8. #8
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by pvbangera
    the code is not working. it shows me the calc in different window
    Sure , it does but you didn't explain what you want to do exactly . Anyhow , you need to use couple of API Functions (SetWindowPos API (not sure of the name) , GetWindowRect ...etc ) .

  9. #9
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by PT Exorcist
    I don't get why you'd want a calculator inside a MDI lol.....anyways it's not that easy so it's faster to make your own
    What if he wants the scientific for complex calculations ?? Sure this would sucks to write it again . Always make use of the available things around you .

  10. #10
    yay gay PT Exorcist's Avatar
    Join Date
    Apr 2002
    Location
    . . . my reason of shame
    Posts
    2,729
    Sorry, it is still no valid reason for HAVING to put the calculator INSIDE of the program. The result of whatever calculations he does is equal both if the calc.exe is being used outside or inside his form. If you want to manipulate the result given by the calculation it's exactly the same to have it inside and outside of your program. It's not having it inside that will turn it into a easy-to-use full OOP class..both ones have to use win api to do it.
    \m/\m/

  11. #11
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Originally posted by PT Exorcist
    Sorry, it is still no valid reason for HAVING to put the calculator INSIDE of the program. The result of whatever calculations he does is equal both if the calc.exe is being used outside or inside his form. If you want to manipulate the result given by the calculation it's exactly the same to have it inside and outside of your program. It's not having it inside that will turn it into a easy-to-use full OOP class..both ones have to use win api to do it.
    Plus , MS might think this illegal .. ........

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