formEXdesktop.dll and threading.dll

Discussion in 'Questions (Windows Mobile)' started by Byak@, Aug 12, 2008.

  1. Byak@

    Byak@ Active Member Licensed User

    if i'm use

    formex.new1("main")
    formex.run

    , threading.firethreadevent doesnot work.
    but if im use

    main.show

    all work right.why?:confused:

    im use formexdesktop 1.1
     
  2. Cableguy

    Cableguy Expert Licensed User

    I may be off on this, but if I understand correctly, the RUN method is for forms, created using the new2 method...
    for using an already existing form, created in the basic4ppc designer, you need to use the show method from the controlsex lib....
    But then again, I may be a bit of...

    NeverTheLess, do remember that Agraham states in is overview of the threading dll, that you should not use threading while interacting with screen objects like controls...
     
  3. Byak@

    Byak@ Active Member Licensed User

    thread doesn't use controls, i'm know it.

    no,run metod used in new1 and new2 metods.
    i'm use new1 metod.

    with and without formex thread work but with formex doesnot work threading.firethreadevent metod.

    help!
     
  4. agraham

    agraham Expert Licensed User

    You are correct, neither does the firedebugevent work.:sign0013:

    The thread is in fact running fine but B4ppc is not processing the events. B4ppc events run on the thread of the the main GUI form so that they can safely manipulate GUI controls. To safely process events the B4ppc code needs to know the Form that owns the GUI. Unfortunately I cannot at the moment tell the B4ppc code that a FormEx is that form as the .NET typing system won't allow it. This is because the B4ppc code expects a form that is higher in the inheritance chain than the normal Form that a FormEx uses. You are allowed to assign down the chain but not up so I cannot assign a FormEx as the main form and so get cross-thread events to work.

    There is at least one way to arrange for this necessary cross thread marshalling but I need to think about it to get the most elegant and consistent solution.
     
  5. agraham

    agraham Expert Licensed User

  6. Byak@

    Byak@ Active Member Licensed User

    good work!!!
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice