Close the form

In this category you can exchange your programming questions and solutions.
Post Reply
cvirus
Posts: 88
Joined: Tue Jan 12, 2010 8:33 pm

Close the form

Post: # 967Post cvirus
Mon Sep 17, 2012 2:43 pm

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.

Marco
Site Admin
Posts: 246
Joined: Sat Sep 15, 2018 8:41 pm

Close the form

Post: # 968Post Marco
Mon Sep 17, 2012 3:23 pm

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

cvirus
Posts: 88
Joined: Tue Jan 12, 2010 8:33 pm

Close the form

Post: # 969Post cvirus
Mon Sep 17, 2012 3:37 pm

Great, thanks, i cant belive that was so easy :-[

Post Reply