Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-12

Inheritance of forms under WinCE

2 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

User

If I use inheritance of forms under WinCE I can not view correctly the application and it do not work correctly, is it not possible to use inheritance of forms under WinCE.

My application:

unit Unit1;
{$mode objfpc}{$H+}
interface

uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,

  ComCtrls;
type
  { TFormCustom }
  TFormCustom = class(TForm)
  StatusBar1: TStatusBar;
  private
  { private declarations }
  public
  { public declarations }
  end;
var
  FormCustom: TFormCustom;
implementation
initialization
  {$I unit1.lrs}
end.
unit Unit2;
{$mode objfpc}{$H+}
interface

uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, Unit1,

  StdCtrls;
type
  { TForm1 }
  TForm1 = class(TFormCustom)
  Label1: TLabel;
  private
  { private declarations }
  public
  { public declarations }
  end;
var
  Form1: TForm1;
implementation
initialization
  {$I unit2.lrs}
end.
program project1;
{$mode objfpc}{$H+}

uses

  {$IFDEF UNIX}{$IFDEF UseCThreads}
  cthreads,
  {$ENDIF}{$ENDIF}
  Interfaces, // this includes the LCL widgetset
  Forms
  { you can add units after this }, Unit1, Unit2;
begin
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.Run;
end.

Best regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20081214/3002148f/attachment.html

Reply by email

User
to User

Hi again, I solved the problem.

The problem was that the status bar was located at the top, I put the status bar at the bottom and now the project runs correctly.

2008/12/14 User

Show quoted text 92 lines
If I use inheritance of forms under WinCE I can not view correctly the application and it do not work correctly, is it not possible to use inheritance of forms under WinCE. My application: unit Unit1; {$mode objfpc}{$H+} interface uses Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, ComCtrls; type { TFormCustom } TFormCustom = class(TForm) StatusBar1: TStatusBar; private { private declarations } public { public declarations } end; var FormCustom: TFormCustom; implementation initialization {$I unit1.lrs} end. unit Unit2; {$mode objfpc}{$H+} interface uses Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, Unit1, StdCtrls; type { TForm1 } TForm1 = class(TFormCustom) Label1: TLabel; private { private declarations } public { public declarations } end; var Form1: TForm1; implementation initialization {$I unit2.lrs} end. program project1; {$mode objfpc}{$H+} uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} Interfaces, // this includes the LCL widgetset Forms { you can add units after this }, Unit1, Unit2; begin Application.Initialize; Application.CreateForm(TForm1, Form1); Application.Run; end. Best regards.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.lazarus.freepascal.org/pipermail/lazarus/attachments/20081214/9d97427e/attachment.html

Reply by email