Author Topic: Close application from other than main form  (Read 976 times)

scott.clark

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Close application from other than main form
« on: August 11, 2017, 12:31:19 PM »
using 3.99w

How can I close the application for a form other than MainForm?  I tried using ExitApplication() but get an exception.  I don't want the Exit button on the main screen.

Thanks

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5260
    • View Profile
    • AdvancedHMI
Re: Close application from other than main form
« Reply #1 on: August 11, 2017, 01:40:49 PM »
Try

MainForm.Close

In the secondary form

scott.clark

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Re: Close application from other than main form
« Reply #2 on: August 11, 2017, 05:21:47 PM »
Very nice,  Thank you.