Problem With Form Size

Discussion in 'Questions (Windows Mobile)' started by RandomCoder, Sep 4, 2008.

  1. RandomCoder

    RandomCoder Well-Known Member Licensed User

    Maybe I'm just a little rusty having not played with B4PPC for a few weeks, but this problem seems to have got the better of me....

    I have one Form that is hidden using it's visible property, this is accessible via the taskbar (my application is used on the desktop only!)
    At a set time I want to display another Form much like a message box but with added options/controls.
    This I've been able to do easily enough but for some reason I cannot change its size :confused:
    The Form always occupies the same area as the first hidden Form would occupy. Setting the Form Height and Width does nothing.
    I've tried refreshing the Form afterwards but this has no effect. As I am already using the door library to remove the control box I have also tried using this to set the Form height and Width but still no joy.

    Are my problems due to having the first Form hidden and if so how can I overcome this?
    I've tried Setting the Form screen size in the IDE but this affects both Forms :(

    What I would like to acheive is a pop up message box with custom controls that will allow the user to accept, cancel or be reminded in x amount of days.

    If needed I can attach my code but as I'm using several libraries I thought it best to ask the question first as am sure to have overlooked something really simple.

    Regards,
    RandomCoder
     
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. agraham

    agraham Expert Licensed User

    This is normal behaviour. All the B4ppc forms in an app are the same size. If you want more flexibility on the desktop then try my FormExDesktop library http://www.basic4ppc.com/forum/addi...formexdestop-controlsexdesktop-libraries.html

    Note that despite what it implies in the help you can no longer mix standard Forms and FormExs in an app. You used to be able to when I originally wrote the library but changes in B4ppc over time mean that the first Form shown, even after a FormEx, becomes the main form and the app closes when that form is closed.

    When the latest version of B4ppc is released I will be releasing a new version fully compatible with modules so I will update the help then, once I have characterised the behaviour properly.

    EDIT :- Damn (again :)!) Erel got in while I was composing a reply.
     
    Last edited: Sep 4, 2008
  4. RandomCoder

    RandomCoder Well-Known Member Licensed User

    Thanks guys.

    Guess its about time I upgraded to the next version ;) but will this mean that I need to place my existing code into modules :sign0148: or are modules just an added feature that can be used if desired?

    Regards,
    RandomCoder
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    The new (beta) version is backwards compatible. All your code will appear in the main module and you can continue to work as usual.
     
  6. RandomCoder

    RandomCoder Well-Known Member Licensed User

    Thats great news, thanks Erel!

    ##### New subscription on its way :sign0060: #####

    Regards,
    RandomCoder
     
  7. RandomCoder

    RandomCoder Well-Known Member Licensed User

    Using FormExDesktop....

    I'm now trying to move my app across to use the FormExDesktop library as suggested above, but after adding a FormEx Object called AdvancedProperties I seem unable to use the Form I created within the IDE.

    I've tried AdvancedProperties.New1("FormName") which has added the Form from the IDE but none of the controls that were placed within it. Where have I gone wrong?

    Regards,
    RandomCoder.

    PS, Still waiting for PayPal to process my payment, then I'll be bang up to date :sign0060:
     
  8. agraham

    agraham Expert Licensed User

    Does the demo work for you? There is a lot of detail in there showing how to do a lot of things with a FormEx.

    You do realize that FormEx replaces, not enhances, a standard form! If the form shows without controls it sounds as though you have started the app with Formname.Show (from which all the controls have been stolen) and not AdvancedProperties.Run.
     
  9. RandomCoder

    RandomCoder Well-Known Member Licensed User

    With a little more experimentation I have found where I am going wrong....
    Instead of using the normal FormName.Show this needed to be replaced by AdvancedProperties.Run so as to call up the new extended form.

    Regards,
    RandomCoder
     
  10. RandomCoder

    RandomCoder Well-Known Member Licensed User

    Agraham your far too quick for me ;)
    I'm sure there will be plenty more hurdles for me to jump yet so I'm sure that I will be needing your help in the non too distant future.

    Thanks,
    RandomCoder
     
  11. RandomCoder

    RandomCoder Well-Known Member Licensed User

    Agraham,

    Is there a reason why my applicatoin is erroring with the following message...
    I feel that it has something to do with the image buttons that were added using the IDE as these seem to be the only things that fail to display correctly when I ignore the error.
    I should also mention that I am still on version 5.8 at the moment (work laptop) whilst I await for my upgrade to be processed. Not sure if this could also be affecting things?

    Regards,
    RandomCoder
     
  12. agraham

    agraham Expert Licensed User

    It is the image buttons, but it will only happen if the button has its Transparent property set True. When an image button is transparent it tries to copy its background from a CEnhancedForm object type, which is what a B4ppc form is, which it expects to be sitting on, rather than a Form object type, which is what a FormEx is, that it is actually sitting on.

    I am afraid that there is no work around for this as a normal Form treats its background image entirely differently to a CEnhancedForm due to the existence of the Forelayer on a CEnhancedForm.
     
  13. RandomCoder

    RandomCoder Well-Known Member Licensed User

    Thanks for the swift reply.

    LAST QUESTION (hopefully!)

    Am I able to use a normal B4PPC Form in combination with other FormEx Forms (if that makes sense :confused:)
    I only really need to use a FormEx so as to make a custom message box whilst all other Forms could remain standard B4PPC ones.

    Regards,
    RandomCoder
     
  14. agraham

    agraham Expert Licensed User

    Yes, as long as the main form is a normal form. From the amended help file I will post with the next version.
     
  15. agraham

    agraham Expert Licensed User

    A trap you may fall into is that a FormEx behaves differently when closed to a normal Form. See the section in the demo "Closing events - makes it more like B4PPC" at line 382
     
  16. RandomCoder

    RandomCoder Well-Known Member Licensed User

    Thanks for your help Agraham its very appreciated!

    Regards,
    RandomCoder
     
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