Delphi

Delphi - Change Fields definitions of a TClientDataSet that has data

南笙酒味 提交于 2020-01-06 14:06:15
问题 I'm creating FieldDefs at runtime for a TClientDataSet . Still at runtime I want to remove all FieldDefs . I'm saving TClientDataSet physically to a disc file. I tried removing existing FieldDefs using the following code so I could add new ones. But it didn't work: with fDataSet do begin Active := False; DisableControls; FieldDefs.Clear; Fields.Clear; EnableControls; end; After executing this code, FieldDefs and Fields count are 0 , but if I close and reopen the disc file , FieldDefs and

Delphi - Change Fields definitions of a TClientDataSet that has data

这一生的挚爱 提交于 2020-01-06 14:05:51
问题 I'm creating FieldDefs at runtime for a TClientDataSet . Still at runtime I want to remove all FieldDefs . I'm saving TClientDataSet physically to a disc file. I tried removing existing FieldDefs using the following code so I could add new ones. But it didn't work: with fDataSet do begin Active := False; DisableControls; FieldDefs.Clear; Fields.Clear; EnableControls; end; After executing this code, FieldDefs and Fields count are 0 , but if I close and reopen the disc file , FieldDefs and

Select and load txt file to android application (Delphi-XE5)

北城以北 提交于 2020-01-06 13:59:10
问题 I would like to browse SD card, select dir and file and load txt file to my Android application created by Delphi XE5. Is any standart component or methods for this ? Like OpedFileDialog ? 回答1: There is no equivalent for TOpenFileDialog on Android. It's not part of the operating system, and is not available from the Component Palette when targeting Android. You can see this by viewing the form in the designer, and then checking the Dialogs tab in the Component Palette; all of the components

Selection of Forms just after program execution

拈花ヽ惹草 提交于 2020-01-06 12:43:39
问题 My Environment: C++ Builder XE4 on Windows7 pro(32bit) I would like to select two forms automatically just after the user execute the software. I have two forms as follows. FormStart : normally this shows up after program execution FormOther : this shows up when user specify run-time-parameter (e.g. /useOther) When FormOther is shown, FormStart is not necessary to be shown. I added following code in FormShow() of the TFormStart TFormStart::FormShow(TObject *Sender) { if (useOther) { FormOther

Ideas for storing e-mail messages in a Delphi client server application

只愿长相守 提交于 2020-01-06 12:42:39
问题 There are many suggestions here and there for storing e-mail messages. Somehow what I am doing is writing an Outlook addin to send emails from inbox/sent folders directly to my application. So only what is really interesting is saved. And I decide where to save it. Imagine this case: I recieve an email from a customer. It's up to me to decide whether I should save it on the customer or on the order 24 that that customer did. So this is why I am doing the add in, and not some automatic storing

make tcp server socket class for android with Delphi Xe5

我的梦境 提交于 2020-01-06 12:40:10
问题 project files on: https://drive.google.com/file/d/0BxODt2IJsmR8cUQ4cVltbWFzYUk/edit?usp=sharing here is the my running codes ........... try soket1:=TJServerSoket.JavaClass.init((8090)); //adres:=soket1.iNetAdres.ip; memo1.Lines.Add('Port: '+inttostr(soket1.Port)); except on E:Exception do memo1.Lines.Add('Port Açılamadı: '+E.Message); end; try memo1.Lines.Add('ip: '+jstringtostring((soket1.iNetAdres.Host))); except on E:Exception do memo1.Lines.Add('ip bigisi alınamadı: '+E.Message); end; ..

make tcp server socket class for android with Delphi Xe5

对着背影说爱祢 提交于 2020-01-06 12:38:32
问题 project files on: https://drive.google.com/file/d/0BxODt2IJsmR8cUQ4cVltbWFzYUk/edit?usp=sharing here is the my running codes ........... try soket1:=TJServerSoket.JavaClass.init((8090)); //adres:=soket1.iNetAdres.ip; memo1.Lines.Add('Port: '+inttostr(soket1.Port)); except on E:Exception do memo1.Lines.Add('Port Açılamadı: '+E.Message); end; try memo1.Lines.Add('ip: '+jstringtostring((soket1.iNetAdres.Host))); except on E:Exception do memo1.Lines.Add('ip bigisi alınamadı: '+E.Message); end; ..

Delphi TrackBar On Stop

天涯浪子 提交于 2020-01-06 10:56:49
问题 I am making a basic music player and am using a TTrackBar as the progress in the song. As well I want to make it so u can drag the bar and fast forward the song. Currently I have an OnChange event with the following line: MediaPlayer1.position := TrackBar1.value... (with proper casting) but what happens is that it skips the song along as I drag making a choppy sound as it plays the song at certain random points along the way. What I really want is for when the user stops dragging the song

Are objects reference counted in Windows-targeted Delphi applications, and if so, what is its purpose?

强颜欢笑 提交于 2020-01-06 09:55:51
问题 Given the following answer to a related question (https://stackoverflow.com/a/22086392/1420752) are objects reference counted in Windows-targeted Delphi applications? I.e.: Q1A does the following object have a reference count of 2 after the second statement? o1 := TMyObject.Create; o2 := o1; Q1B Following on from the above, will assigning o1 to nil drop the reference count to 1? o1 := nil; Q1C Again following on, will assigning o2 to nil drop the reference count to 0? o2 := nil; Q1D Moving

Brand new installed Delphi XE freezes without reason (it is QC 90864 Delphi bug)

余生长醉 提交于 2020-01-06 08:19:37
问题 I finally upgraded to Delphi XE. The second time when I compile a project in Delphi XE, as soon as I hit the BUILD button the IDE freezes. Nothing can stop its agony except 'End Task'. What should I do? This is a fresh installation from the original CD. No single 3rd party plugin/VCL has been installed. Edit 1: The last change I did was to remove some of the pre-installed packages such as DBs and Rave. Edit 2: I realized the if freezes also when I use 'compile'. The last message it shows in