Form size problem on PC?

Discussion in 'Bug Reports' started by agraham, Jul 4, 2007.

  1. agraham

    agraham Expert Licensed User

    Apologies if this is a known issue but I have just joined.

    I have an B4PPC application that displays perfectly on my Axim X30 but when I run the same source code on my PC the right hand side of the display is missing. On investigation a screen capture of the PC shows that the display area on the PC is only 229 pixels wide by 266 high

    The PC Designer shows the form width property as 240 and the height property as 266 but it is obviously not displaying the full width on the PC.

    Stranger still a screen capture of the Designer shows that it is allowing me to place controls visible within a 239 pixel wide by 269 pixel high area - confimed by placing a control at the bottom right and adding its' top and left properties to its' height and width.

    Are these inconsistencies a known issue? I am running Vista Home Premium on the PC and 2003 SE on the Axim.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Can you post a screen shot?
     
  3. agraham

    agraham Expert Licensed User

    Hi Erel

    Two screenshots attached in the zip file. Sould be obvious from the titles which is which.

    EDIT : :sign0161:Stupid me - its' obvious from the picture content anyway
     

    Attached Files:

    Last edited: Jul 4, 2007
  4. Erel

    Erel Administrator Staff Member Licensed User

    Looks like your windows form settings include a small margin for the forms (maybe it is Vista default?).
    A workaround will be to change the screen size parameter.
     
  5. agraham

    agraham Expert Licensed User

    I tried the same app. under XP Home on my laptop - screenshots enclosed.

    Well its' different but...

    The XP designer still has the same layout size of 239 x 269 as under Vista. Not surprising as it is in the top left of the form and doesn't fill it so can be drawn whatever size is needed. I can only assume that you are requesting to draw the area this size.

    The XP running app has a drawing area of 237 (nearly there) x 276 (that's 10 extra!) pixels though both forms are drawn the same size (245 x 322) by both OS's. So I guess you are defining the external form size and accepting whatever client area comes with it without allowing for varying non-client area sizes
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    The drawable area on a standard device matches 239*269 pixels.
    As you see there are small differences depending on the user setup.
     
  7. agraham

    agraham Expert Licensed User

    Ok, I know I'm being pedantic but the actual drawing area on both the Visual Studio emulator and my Axim X30 is 240 x 268 pixels. Maybe they are both non-standard but at least they match!

    I want the development environment on the PC to match what I will see on the device which, as per your suggestion above, I can achieve by setting different screen sizes.
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    I see your point and now I think we owe you one pixel ;)
     
  9. agraham

    agraham Expert Licensed User

    Thanks for taking it graciously Erel.

    You are unfortunate that, many years ago, I used to lead a software team developing an Operating System and applications for early PDAs and getting things positioned consistently on screen between applications and OS utilities was important to get the right "feel" of the device. After all these years I am still sensitive to such things!
     
  10. agraham

    agraham Expert Licensed User

    A quick follow up comment to wrap up the thread.

    To get a runtime view on the PC of 240 x 320 I need to set the screen size in the PC Designer to 243 x 313 on XP and 251 x 322 on Vista. The Designer on the device is fine of course as that is running on the target.

    Changing the screen size in the PC Designer is only a workaround and not a fix as this changes the form size in the Designer. Although the runtime size is now correct on the PC, and will match the device, those runtime views (and Design time view on the device) doesn't quite match that in the PC Designer. The width in Vista and the height in XP are quite a lot off.

    Although I bought B4PPC to actually develop on the device I actually intend to do the layout and initial coding on the PC and refine on the device so matching the Designer view to the device is quite important (to me anyway :))

    Please don't these comments as criticism. I like B4PPC and it lets me work on the device and in a .NET sort of way that looks something like Visual Studio. I've found nothing else to match it. In some ways it is better than VS for small jobs being quick and easy to use. I think that it has potential for further improvements (but still has some rough edges!)
     
  11. RandomCoder

    RandomCoder Well-Known Member Licensed User

    I agree that the PC view should match the Device without needing to tweak it.

    Almost all my coding is done on the device, and I often find that when the code is run on the PC it looks nowhere near as good.
    One of the most recent examples of this was my EditableTable whereby I spent a lot of time lining the TextBox up perfectly with the Table Cell but then on the PC the TextBox position was out of place :(

    Regards,
    RandomCoder.
     
  12. Erel

    Erel Administrator Staff Member Licensed User

    I understand it and agree.
    When you run Basic4ppc on the desktop, it uses the .Net Framework and all the sets of windows controls. There are some small differences that prevent it from being a perfect match.
    Still, if you like you can use Microsoft standalone emulator (search the forum, it was discussed) to see how it will look exactly.
    There are also advantages of targeting the full framework and not an emulator as the debugging is much faster (compared to debugging with an emulator or device with Visual Studio).
     
  13. agraham

    agraham Expert Licensed User

    Yes, it's inevitable that there will be visual differences in the controls between the PC and device but it is still desirable to have the client area on the PC runtime to match the layout area in the PC Designer to match the client area on the device. That they don't is my concern.

    The control differences matter less to me. If TextBoxes line up on the PC runtime then they will line up on the device, even if they look different.
     
    Last edited: Jul 5, 2007
Loading...