Recent

Author Topic: KOL-CE - compact applications for WinCE  (Read 113992 times)

aji

  • New Member
  • *
  • Posts: 13
KOL-CE - compact applications for WinCE
« Reply #15 on: October 28, 2007, 10:39:53 pm »
Thanks to everyone!
I tried to remove the path references and removed the separate Free Pascal installation, but got the same errors. So again I removed Lazarus completely, deleted the Lazarus and Free Pascal directories, restarted the computer and reinstalled Lazarus and the crossarm version.
Everything compiled to a WIN32 application, so I tried the Wince version. I added the environment paths in Windows and compiled to a 54kb application (only one component)!

Thanks again!

kakarotv5

  • New Member
  • *
  • Posts: 42
KOL-CE - compact applications for WinCE
« Reply #16 on: October 30, 2007, 11:31:42 pm »
How I add a text in new line?

I do it for example:

Code: [Select]

KOLMemo1.Add('Hello' + #13 + 'This is a newline');


But I obtain this:

(http://i8.tinypic.com/6bogmft.jpg)

EDIT: I have solved this with:

Code: [Select]

KOLMemo1.Add('Hello' + #13#10 + 'This is a newline');
I have installed:
Lazarus-0.9.23-fpc-2.1.5-win32
Lazarus-0.9.23-fpc-2.1.5-cross-arm-wince-win32

I do not have a PDA but I use the Microsoft Windows Mobile 5.0 MSFP Emulator Images and Microsoft Windows Mobile 6 Emulator

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3541
KOL-CE - compact applications for WinCE
« Reply #17 on: October 31, 2007, 10:08:24 am »
Free Pascal comes with a constant that represents a line end on all platforms, use that instead:

'Hello' + LineEnding + 'This is a newline'

grexos

  • Newbie
  • Posts: 4
KOL-CE - compact applications for WinCE
« Reply #18 on: November 01, 2007, 08:42:09 pm »
Hi! i have small problem with kol-ce. Every build is successfull but.. my aplication has only one form and after compile have over 1MB and harder problem is in wince. if i run my aplicaion on my PDA i dont see form. ony name of program is visible. do you now where is the error ? thx

yuriy_sydorov

  • Full Member
  • ***
  • Posts: 152
KOL-CE - compact applications for WinCE
« Reply #19 on: November 02, 2007, 12:34:56 am »
Set form's defaultSize and defaultPosition to True.
Turn on "Strp symbols..." option and you should have exe 40-50KB.

Chainfire

  • New Member
  • *
  • Posts: 28
KOL-CE - compact applications for WinCE
« Reply #20 on: November 07, 2007, 09:37:57 pm »
Hey, great work, I'm still having some problems though.

I create a project with form and KOLProject, KOLForm, KOLApplet, defaultSize/Position = True, and a few components that have the correct anchors set. However, when opening on my PPC, everything stays the same size/position as design time, instead of correctly scaling to screen size. In other words, it looks like the anchors don't work. Solution?

yuriy_sydorov

  • Full Member
  • ***
  • Posts: 152
KOL-CE - compact applications for WinCE
« Reply #21 on: November 08, 2007, 09:52:49 am »
You need to use the following trick to make anchors work:
Put borderless panel on a form. Do not align the panel. Then place all your gui to this panel.
Then align the panel to caClient using code in OnCreate event handler for a form.

Chainfire

  • New Member
  • *
  • Posts: 28
KOL-CE - compact applications for WinCE
« Reply #22 on: November 08, 2007, 02:46:02 pm »
Thanks, works like a charm. Convert one of my pet projects from LCL-CE to KOL-CE with only minor inconveniences. If you care to check it out: WMWifiRouter. Next up is KaiserTweak, but it will probably be quite a bit more work :)

yuriy_sydorov

  • Full Member
  • ***
  • Posts: 152
KOL-CE - compact applications for WinCE
« Reply #23 on: November 08, 2007, 04:40:58 pm »
Congratulations :) You can add link to WMWifiRouter to KOL-CE wiki :)

mrmath

  • New Member
  • *
  • Posts: 13
KOL-CE - compact applications for WinCE
« Reply #24 on: November 12, 2007, 02:18:28 am »
Quote from: "Chainfire"
Hey, great work, I'm still having some problems though.

I create a project with form and KOLProject, KOLForm, KOLApplet, defaultSize/Position = True, and a few components that have the correct anchors set. However, when opening on my PPC, everything stays the same size/position as design time, instead of correctly scaling to screen size. In other words, it looks like the anchors don't work. Solution?


On the KOLForm component, set defaultposition and defaultsize both to true.

I've found that when my form is 204 high by 319 wide, it's the exact size that it will be when it's maximized on my landscape device.  I'm only sharing that so you can see where you'll be able to place your components on the form.

mrmath

  • New Member
  • *
  • Posts: 13
KOL-CE - compact applications for WinCE
« Reply #25 on: November 12, 2007, 02:19:49 am »
I feel really stupid, and it's not the first time in my life.  I can't figure out what code I'm supposed to put in the menu click to exit my application.  On my physical phone, I can always run task manager, but on my emulator, I don't have task manager.

Farshad

  • New member
  • *
  • Posts: 9
KOL-CE - compact applications for WinCE
« Reply #26 on: November 12, 2007, 07:41:45 am »
Quote from: "mrmath"
I can't figure out what code I'm supposed to put in the menu click to exit my application.


Application.Terminate;

yuriy_sydorov

  • Full Member
  • ***
  • Posts: 152
KOL-CE - compact applications for WinCE
« Reply #27 on: November 12, 2007, 08:56:23 am »
Quote from: "Farshad"
Quote from: "mrmath"
I can't figure out what code I'm supposed to put in the menu click to exit my application.


Application.Terminate;

It is not LCL. :)

You need to call Form.Close;

mrmath

  • New Member
  • *
  • Posts: 13
KOL-CE - compact applications for WinCE
« Reply #28 on: November 12, 2007, 03:08:46 pm »
Quote from: "Farshad"
u
Application.Terminate;


See, that's why I feel stupid about it.  I tried that, and it won't compile:

unit1.pas(58,14) Error: Identifier not found "Application"

mrmath

  • New Member
  • *
  • Posts: 13
KOL-CE - compact applications for WinCE
« Reply #29 on: November 12, 2007, 03:16:48 pm »
Quote from: "yury_sidorov"

You need to call Form.Close;


I thought for sure that would work, but I get:

unit1.pas(58,10) Error: identifier idents no member "close"
unit1.pas(58,15) Error: Illegal expression