Another newbie question: How to refere to the active form?

Discussion in 'Questions (Windows Mobile)' started by yildi, Nov 17, 2007.

  1. yildi

    yildi Member Licensed User

    Hi,

    My question is probably very stupid by I have not been able to locate this information in the help, neither in my searches on this forum.

    How can I make reference to the active form?

    I have two forms in my applet and I would be able to get the height/width of the form which is shown on the screen. I was creating a global variable that I was planning to update each time I change the form on the screen but I have thought that maybe there is a more natural way to do it.

    Is there a variable or a method that refers to the active form?

    Thanks again for your help!

    Regards,

    Murat
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    No, you will need to track it yourself.
    You could use the Control keyword to make it simpler.
    BTW, both forms will always have the same size (on the device).
    Screen orientation changes affect all forms.
    In your case you could check the size of a specific form.
     
  3. yildi

    yildi Member Licensed User

    Thank you Erel!

    Very nice trick. I was not sure if the size change was not specific to the shown form. This trick will make my code simpler!

    Regards,

    Murat
     
Loading...