Results 1 to 7 of 7

Thread: UI difference between bundled app and running from thinAir

Hybrid View

  1. #1

    UI difference between bundled app and running from thinAir

    I get different styles of controls when I bundle my app:

    Click image for larger version. 

Name:	ThinBasicUIDifferences.PNG 
Views:	55 
Size:	43.4 KB 
ID:	9821

    On the left you'll see the way it looks when run from a bundled an app.

    On the right is how it looks when run from ThinAir.

    Is there an easy way to maintain consistency across both ways of running the program? (i.e. make them both look the same)

    This is on a Windows 7 computer.

    *Brian

  2. #2
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    51
    Posts
    8,338
    Blog Entries
    2
    Rep Power
    10
    Yes, it's a bug.

    Bundled executables are produced adding themed manifest in the executable produced by thinBundle.
    So the operating system (Windows) creates windows and controls in themed layout.

    When you execute a script from inside thinAir, the script is executed by the thinBasic.exe executable that has no manifest file inside.
    The operating system (Windows) does not find the theme inside the manifest so it creates windows and controls using unthemed layout.

    I will add theme manifest inside thinBasic.exe to uniform the layout.

    Reference: https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx

    Thanks
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  3. #3
    Very good! Thanks for the explanation. It's not a huge deal to me, but it does mean I have to use the bundled app to generate all training documentation. I'm also having trouble with fonts changing as I run the code on different machines, but I think that's a separate issue.

    *Brian

  4. #4
    I'm wondering if you have any ideas for how to prevent the sizes of things from changing in my GUI windows between computers. Here are three screen captures on three different computers - all running Windows 7. Each window shows differences in font size and widget size that are giving me problems. I can't accurately size the text fields for each chunk of text on my GUI when I don't know how big the text will be on a user's computer.

    I'm using the latest Beta of TB (not that this would fix my problem). All three of these screen captures are from running the exact same bundled executable.

    I'm setting the font size in my code for most of the text elements in the window. For example, like this :

          
    Global hCourierNew16Bold            As Long Resource = Font_Create("Courier New", 16, %FONT_BOLD)
    
    Control Add Label,   CBHNDL, %ID_LargePowerLabel, "Power"                                , 200,  25,  80, 30
    Dialog Send          (Win_GetDlgItem(CBHNDL, %ID_LargePowerLabel)), %WM_SETFONT, hCourierNew16Bold, 0  
    Control Set Color    CBHNDL, %ID_LargePowerLabel, %POWER_COLOR, -1
    
    So, why the differences, and more importantly, what can be done to make this UI look exactly the same no matter what machine it runs on? Any ideas?

    *Brian

    Click image for larger version. 

Name:	Computer1_BriansLaptop.PNG 
Views:	32 
Size:	50.5 KB 
ID:	9849

    Click image for larger version. 

Name:	Computer2.PNG 
Views:	28 
Size:	35.1 KB 
ID:	9850

    Click image for larger version. 

Name:	Computer3.PNG 
Views:	28 
Size:	38.7 KB 
ID:	9851

  5. #5
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    51
    Posts
    8,338
    Blog Entries
    2
    Rep Power
    10
    Yes, that's a problem.
    UI module is not DPI aware, something I need to work on.

    How is font dpi configured in your different computers?
    https://www.google.com/search?q=wind...YsDhRJ40G8tGM:
    www.thinbasic.com | www.thinbasic.com/community/ | psch.thinbasic.com
    Win10Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

  6. #6
    And of course, 30 minutes after posting my problem, I solve it. Yes, we both thought of the same thing.

    The difference was exactly that - some machines were configured for "Medium 125%" and the others for "Smaller 100%".

    I'm assuming there's no way for my code to be able to detect which setting a user has set on their system is there? If there were, I could adjust all of the font sizes so that everything stayed the same.

    For now, I'm just going to ask all my users to set their machines to the 100% option if they want things to look "right". Good enough.

    *Brian

Similar Threads

  1. Replies: 4
    Last Post: 27-11-2008, 17:12
  2. Replies: 5
    Last Post: 10-09-2008, 16:38
  3. difference between .tbasic and .tbasicc
    By sandyrepope in forum Console
    Replies: 4
    Last Post: 22-05-2008, 23:29
  4. what's the difference
    By sandyrepope in forum UI (User Interface)
    Replies: 3
    Last Post: 14-01-2008, 23:17

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •