Jump to content

Recommended Posts

Posted

Hello ..

i have a lot of TUniFrames ... now i change my programm-struktur ..

 

Can i cange a existing TUniFrame  to a TUniForm ?

 

What must i look for?

 

ThanX

Erich

Posted

Hi;

 

First you can change frame's class inside your code you can see something like that

type
  TUniFrame1 = class(TUniFrame)
  private
    { Private declarations }
  public
    { Public declarations }
  end;

Change TUniFrame to TUniForm.

 

You'll see an error because there is no uniGUIForm unit in uses. Change uniGUIFrame to uniGUIForm under uses.

 

add following lines on implementation

function UniFrame1: TUniFrame1; //or your frame's name

under implementation add theese lines


uses
  MainModule, uniGUIApplication;

function UniFrame1: TUniFrame1;
begin
  Result := TUniFrame1(UniMainModule.GetFormInstance(TUniFrame1));
end;

Right click your frame and view as text (or open dfm file). If there is an empty frame you will see something like that

object UniFrame1: TUniFrame1
  Left = 0
  Top = 0
  Width = 320
  Height = 240
  TabOrder = 0
end

delete Width, Height and TabOrder lines and add theese

  ClientHeight = 299
  ClientWidth = 635
  Caption = 'UniForm1'
  OldCreateOrder = False
  MonitoredKeys.Keys = <>
  PixelsPerInch = 96
  TextHeight = 13

save then right click in this and view as Form.

 

Right click your project and view source

 

You see your frame like this

Unit1 in 'Unit1.pas' {UniFrame1: TUniFrame};

Change TUniFrame to TUniForm

 

Build your project.

  • Upvote 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...