Press_ALT_F4 Posted October 18, 2013 Share Posted October 18, 2013 Hi, sry for my english. i create a form with the form-editor (3.39) and save it as dfm. now i will write a script and load the saved form with the script. how can i do this? and a other question, its there everywhere german tutorial or something? i want learn more about database and fromfunctions. hope for answer bye Quote Link to comment Share on other sites More sharing options...
FHannes Posted October 18, 2013 Share Posted October 18, 2013 You can't load a form from a DMF file. You have to convert it into script code. The form designer can do this for you. There are no German tutorials here, but maybe there are on German forums where SCAR is also used. The database functions are documented here. They all come with examples on how to use them. You will need to know how to use SQLite3 though. Quote Link to comment Share on other sites More sharing options...
Press_ALT_F4 Posted October 19, 2013 Author Share Posted October 19, 2013 (edited) Hi, thanks for answer i have opened the dfm with the scar, it shows code like: object Form1_1: TForm Left = 653 Top = 331 Caption = 'Form1' ClientHeight = 383 ClientWidth = 380 Color = clWindow Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False PixelsPerInch = 96 TextHeight = 13 object Button1: TButton Left = 100 Top = 284 Width = 120 Height = 36 Caption = 'Dr'#252'ck mich' TabOrder = 0 end object ListBox1: TListBox Left = 8 Top = 7 Width = 328 Height = 240 ItemHeight = 13 TabOrder = 1 end end how can i object use in the script? i have it changed like this: procedure TestForm_Init; begin testform := CreateForm; with testform do begin Left := 653; Top := 331; Caption := 'Form1'; ClientHeight := 383; ClientWidth := 380; Color := clWindow; Font.Charset := DEFAULT_CHARSET; Font.Color := clWindowText; Font.Height := -11; Font.Name := 'Tahoma'; Font.Style := []; OldCreateOrder := False; PixelsPerInch := 96; //TextHeight := 13; end; end; this works i must change it everytime or can i use the "object-code" directly? i hope for answer bye Edited October 19, 2013 by Freddy Quote Link to comment Share on other sites More sharing options...
FHannes Posted October 19, 2013 Share Posted October 19, 2013 You have to change it every time, but as I said, use the tool in the form designer to convert the dfm file directly to SCAR code. It will give you a very clean result. Just open the DFM file in the form designer and press the Code tab at the bottom to open the code view. Quote Link to comment Share on other sites More sharing options...
Press_ALT_F4 Posted October 21, 2013 Author Share Posted October 21, 2013 wow very big thanks thats very nice i havent seen the code-tab before sorry. bye Quote Link to comment Share on other sites More sharing options...