delphi-xe

How can I display a form for set configuration before the main form?

孤者浪人 提交于 2020-02-02 11:55:11
问题 in my project i have two form's(form1,form2), form1 is configuration form. i want to show Form1 and when we click Button1 then show Form2 and free(Release) Form1. how can to i do this? i use this code. but this project start and then exit automatically.A Friend said because the application message loop never start, and application terminates because main form does not exist. how i can to solve this problem? uses Unit2; {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin

How can I display a form for set configuration before the main form?

假装没事ソ 提交于 2020-02-02 11:53:22
问题 in my project i have two form's(form1,form2), form1 is configuration form. i want to show Form1 and when we click Button1 then show Form2 and free(Release) Form1. how can to i do this? i use this code. but this project start and then exit automatically.A Friend said because the application message loop never start, and application terminates because main form does not exist. how i can to solve this problem? uses Unit2; {$R *.dfm} procedure TForm1.Button1Click(Sender: TObject); begin

Debug information {$D+} increases the size of my EXE with 6MB

戏子无情 提交于 2020-02-01 04:45:05
问题 Delphi documentation says that "Debug information [...] it does not affect the size or speed of the executable program." However, when I activate Debug information (in Project Options -> Linker) my EXE goes from 1.8MB to 7MB. What am I doing wrong? Note: I suppose that the 'Debug information' under 'Linking' is the same as 'Debug information' under 'Compiling' since they have the same compiler directive ( {$D} ). 回答1: Your assumption is incorrect. Compiling with debug information means that

What could explain the difference in memory usage reported by FastMM or GetProcessMemoryInfo?

非 Y 不嫁゛ 提交于 2020-01-23 11:08:16
问题 My Delphi XE application is based on a single EXE using a local server DLL created by RemObjects and uses a lot of memory for a specific operation until it generates an exception saying there are not enough memory. So I'm trying to understand why and where this is happening so I placed various steps throughout my code where I report on memory usage. The problem is that I'm getting very different information based on the method used to get memory usage information: If I use the method

Math for slow image zoom

六眼飞鱼酱① 提交于 2020-01-21 07:25:11
问题 I have an .bmp image with a comic book layout. Currently my code works like this. If I right click and hold down mouse button i can draw a marquee type box around one of the frames on the comic book page. When I release the button it will zoom into that frame. But its instant. And I would like for it to have an animation effect. Thus instead of going and setting the values of PicRect to the "END VALUE" PicRect.Left PicRect.right PicRect.top PicRect.bottom as seen in code below, I need a way

Append TFDMemTable data into one XML file

与世无争的帅哥 提交于 2020-01-16 01:54:27
问题 Is there any way to save all the database records and structures for multiple queries into one XML file? What I did is: procedure CopyRecords(Sender: TObject); begin try TFDQuery.SQL.Text := 'SELECT * FROM SAMPLE_TABLE1'; TFDQuery.FetchOptions.Unidirectional := False; TFDQuery.Open; TFDQuery.FetchAll; TFDmemtable.Data := DM.qry_SQL.Data; TFDmemtable.First; while not TFDmemtable.Eof do begin TFDmemtable.Edit; TFDmemtable.Post; TFDmemtable.Next; end; TFDmemtable.SaveToFile('C:\Test.xml', sfXML)

Can't install Topaz SigPlus ActiveX control under Delphi XE. Have error messages

我的未来我决定 提交于 2020-01-15 12:42:40
问题 I'm installing Topaz's SigPlus ActiveX control http://www.topazsystems.com/Software/download/sigplusactivex.htm under Delphi XE Pro under Windows 7 x64. This activeX control installs fine under Delphi 7. I'm following these basic instructions http://topazsystems.com/Software/download/delphihowto.pdf After clicking on OK in the final instruction, I get these errors under the 'Structure' panel Failed to find standard type 'IInterface' at line 81 (81:5) Failed to find standard type 'IInterface'

Show message when Tform2 is created?

不打扰是莪最后的温柔 提交于 2020-01-15 03:51:08
问题 I want to when Tform2 is created then show a message to user. I use this code, but not work well. procedure TForm1.Button1Click(Sender: TObject); var a:TForm2; begin if a=nil then begin a := TForm2.Create(Self); a.Show; end else begin showmessage('TForm2 is created'); end; end; 回答1: That's because you declare a as a local variable. Each time you enter TForm1.Button1Click this variable will be brand new and uninitialized even though there might still be a Form2. That means that the check for

Saving and Loading Treeview using XML

筅森魡賤 提交于 2020-01-13 04:11:40
问题 Note Sorry in advance for the long post, I though it would be best to put as much information on as possible rather than fill the gaps when needed. Note although I have tagged this as Delphi as well and do own and still use Delphi XE I am now using Lazarus as my primary IDE, I simply cannot afford to purchase the newer Delphi versions and now Lazarus is becoming more stable it makes sense to me to make the switch to Lazarus. For this question I have included a zip attachment with project

Saving and Loading Treeview using XML

女生的网名这么多〃 提交于 2020-01-13 04:11:08
问题 Note Sorry in advance for the long post, I though it would be best to put as much information on as possible rather than fill the gaps when needed. Note although I have tagged this as Delphi as well and do own and still use Delphi XE I am now using Lazarus as my primary IDE, I simply cannot afford to purchase the newer Delphi versions and now Lazarus is becoming more stable it makes sense to me to make the switch to Lazarus. For this question I have included a zip attachment with project