Recent

Author Topic: KOL CE - Close Application, VGA Screen ?  (Read 8201 times)

Nibbler

  • New Member
  • *
  • Posts: 11
KOL CE - Close Application, VGA Screen ?
« on: November 08, 2008, 04:21:06 am »
Hello World ! I'm new in the PDA world ... I still don't have my own PDA, just the emulator but I'm trying to get some fun with Lazarus & KOL CE  :D

I have two issues :

- How can I really terminate the app when the user press the [X] close button ? I can really terminate the app doing Form.Close inside another button handler or inside a timer... but not with the form [X] button  :? tried in the OnClose event or OnQueryEndSession but it doesn't work  :cry:  :oops:

- I use the WM6 VGA image inside the emulator. But ScreenWidth and ScreenHeight return 240x320 instead of 480x640... how can I get the full VGA screen / form ?

Cheers,
Nibbler.

yuriy_sydorov

  • Full Member
  • ***
  • Posts: 158
RE: KOL CE - Close Application, VGA Screen ?
« Reply #1 on: November 10, 2008, 12:37:17 pm »
Pocket PC is designed to minimize applications via [X] button by default. Users can install extra tools to close applications via [X] button.
I recommend to leave [X] button behavior up to end-user. Just add 'Exit' menu item or button to your application...

You need to mark your application as hi-res aware to enable true VGA mode. See KOL-CE.rc file for more info.

Nibbler

  • New Member
  • *
  • Posts: 11
KOL CE - Close Application, VGA Screen ?
« Reply #2 on: November 11, 2008, 12:25:12 am »
Hello Yury, first let me thank you and congratulate you for KOL CE !  8)

1°) I know that [X] is designed by default to minimize the app ... yet I really want to close the app instead :roll:. Is it possible to intercept the OnCloseQuery or OnMinimize to know that the [X] was clicked and then close the app ? how ?

2°) I uncommented "HI_RES_AWARE CEUX {1}" in KOL-CE.rc, compiled the package, uninstalled then installed it again, build my app again ... but it is still unaware of the VGA resolution ... what I'm doing wrong ?  :(

Thank you for your help !

yuriy_sydorov

  • Full Member
  • ***
  • Posts: 158
KOL CE - Close Application, VGA Screen ?
« Reply #3 on: November 11, 2008, 10:41:00 am »
1. I did not investigate in this area. Probably you need to catch some message. Also you can change [X] button to [OK] button for you form. Look to the code of ShowModal method for details how to do that.

2. Try to create new .rc file with HI_RES_AWARE line only and link this file to your app using {$R xxxx.rc} directive.

Nibbler

  • New Member
  • *
  • Posts: 11
KOL CE - Close Application, VGA Screen ?
« Reply #4 on: November 11, 2008, 07:58:44 pm »
1°) I tried to add SHDoneButton(Form.Handle, SHDB_SHOW) to show the [OK] button instead of [X] ... yet when I click on the [OK] button nothing happens ?  :(

2°) Creating a new .rc file and linking it with $R directive works fine  8)
Yet the font is absolutely not adapted so all the controls look terrible as shrank, with a huge font inside  :( Do you have some magic trick / property in KOL CE to adapt the font size and have a quite WYSIWYG GUI ?  :roll:  8)

yuriy_sydorov

  • Full Member
  • ***
  • Posts: 158
KOL CE - Close Application, VGA Screen ?
« Reply #5 on: November 11, 2008, 08:21:17 pm »
You need to handle messages as done in message handler attached by ShowModal.

There is no "magic trick" yet, but I plan to add scaling functionality. You need to design controls with larger sizes or scale all controls on a form in runtime using own code.

Nibbler

  • New Member
  • *
  • Posts: 11
KOL CE - Close Application, VGA Screen ?
« Reply #6 on: November 12, 2008, 11:50:55 am »
Thank you Yury, looking forward for the scaling functionality !  :D

Yet, in the meantime, I would like to reduce the size of the font ... and it doesn't work  :(  (it works at design time in lazarus ... but not inside the device). Do I am missing something ?

Thanks again for your help and this wonderful add on to lazarus   8)

yuriy_sydorov

  • Full Member
  • ***
  • Posts: 158
KOL CE - Close Application, VGA Screen ?
« Reply #7 on: November 12, 2008, 05:52:02 pm »
You see fonts in 96 dpi in design time. But on VGA device you have 192 dpi. That's why fonts looks different in designer and VGA device.
The best solution is to design form for 320x240 resolution and perform 2x size scaling in runtime.
If I will have some spare time this week, I will add easy support for VGA resolution.

Venca

  • New Member
  • *
  • Posts: 13
Re: KOL CE - Close Application, VGA Screen ?
« Reply #8 on: March 17, 2009, 09:26:33 am »
Hi Yury,
Did you  settle a matter of VGA already?

Vasek
8^)

 

TinyPortal © 2005-2018