How to Clear a Form in the IDE and more...


Thanks for the info. But I already know that.

But I am not able to detect as to which Module/Form is active in the IDE. How can I detect that in the first place?

When adding a form I have to add complete structure like this:


object Form2: TScriptForm
  Caption = 'Form2'
  ClientHeight = 296
  ClientWidth = 444
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'Tahoma'
  Font.Style = []
  OldCreateOrder = False
  Position = poDesigned
  SaveProps.Strings = (
    'Visible=False')
  PixelsPerInch = 96
  TextHeight = 13
  object Panel1: TPanel
    Left = 8
    Top = 8
    Width = 241
    Height = 49
    Caption = 'Panel1'
    TabOrder = 8
  end
end


Here is the code that I am using at present for testing. This is hard coded at present.

IDEEngine1.Files[1].LoadFormFromString(FormContent);
IDEEngine1.Designer.Update;


Here again the IDE is not getting update properly. I have to switch to another module or form and back to see the updates. How to solve this problem?

Regards,

Yogesh