Page 1 of 1

Close the form

Posted: Mon Sep 17, 2012 2:43 pm
by cvirus
Hello Admin and thanks for the reply in the mp3 app.

I want to close a form from a main menu but i tried in a sub the function exit and closeform but with no success.

I navigate to all threads in the forum but no luck either, so? my question is: How can i close a form from a menu or button onclick? ;D

P.s And also how to prevent that the form could be resized by the user.

Close the form

Posted: Mon Sep 17, 2012 3:23 pm
by Marco
two solutions in one example
best regards

object myform as form
  object m as mainmenu
    object exapp as menuitem
      caption="Exit"
      onclick=closeapp
    end object
  end object
    borderstyle=bssingle`nosizeable form
  showmodal
end object

sub closeapp
  `shut down application
  end
end sub

Close the form

Posted: Mon Sep 17, 2012 3:37 pm
by cvirus
Great, thanks, i cant belive that was so easy :-[