Different behaviour DeskTop and Device

Discussion in 'Questions (Windows Mobile)' started by HARRY, Feb 22, 2008.

  1. HARRY

    HARRY Active Member Licensed User

    Hi,

    I found the following different behaviour for DeskTop and Device. When I in the coding, executed because of an event on Form2, sets the focus on a control on Form1:

    - the Desktop stays on Form2

    - the Device shows Form1 again.

    Is this caused by Basic4PPC or Microsoft?

    The program attached illustrates the 'problem'.

    Harry
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Basic4ppc handles the form navigation on the desktop.
    The solution is to first show the form you want and only then set the focus:
    Code:
    Form1.Show
    TextBox1.Focus
     
  3. HARRY

    HARRY Active Member Licensed User

    Erel,

    I only wanted to share this experience with others. The solution is simple, as soon as you know the cause. It took me quite some time to find the cause in a, for me, rather complicated program, because that branche of the program was only used in case of user input errors.

    Harry
     
Loading...