Delphi

How to implement a close button on every tab of TTabControl in Delphi XE3 FireMonkey 2?

醉酒当歌 提交于 2020-01-15 11:39:11
问题 I am trying to create a browser-style TabControl with a small close button on every tab in FireMonkey FM2. Since there are no TTabsheet and TPageControl components in FM2, I could not use the answer from "How to implement a close button for a TTabsheet of a TPageControl". This code gives too many undeclared functions and variables that are not longer supported in FM2, I guess. I don't want to use any third-part components because you never know if they are going to support the next version of

Update Text Inside Page With Image

邮差的信 提交于 2020-01-15 11:08:10
问题 I am working with Delphi7 and TEmbeddedWB. I have some difficulty to update text of a page in twebbrowser. Because that webpage contains images. So Complete Html code is <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">'#$D#$A' <HTML> <HEAD>'#$D#$A' <META content="text/html; charset=windows-1252" http-equiv=Content-Type>'#$D#$A' <META name=GENERATOR content="MSHTML 8.00.7601.17514"> </HEAD>'#$D#$A' <BODY>'#$D#$A' <DIV align=center><**IMG '#$D#$A'src="file:///C:/Program%20Files

Update Text Inside Page With Image

╄→尐↘猪︶ㄣ 提交于 2020-01-15 11:08:09
问题 I am working with Delphi7 and TEmbeddedWB. I have some difficulty to update text of a page in twebbrowser. Because that webpage contains images. So Complete Html code is <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">'#$D#$A' <HTML> <HEAD>'#$D#$A' <META content="text/html; charset=windows-1252" http-equiv=Content-Type>'#$D#$A' <META name=GENERATOR content="MSHTML 8.00.7601.17514"> </HEAD>'#$D#$A' <BODY>'#$D#$A' <DIV align=center><**IMG '#$D#$A'src="file:///C:/Program%20Files

How to get volume level in current sample? Delphi 7

浪子不回头ぞ 提交于 2020-01-15 10:09:45
问题 On Delphi 7 I am running this code with NewAC Audio library. I am having short wav file, 44.100 kHz, mono, 16 bit. unit Main; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ACS_Classes, ACS_DXAudio, ACS_Wave, ACS_Misc, ACS_Types, StdCtrls; type TForm1 = class(TForm) AudioProcessor1: TAudioProcessor; WaveIn1: TWaveIn; DXAudioOut1: TDXAudioOut; OpenDialog1: TOpenDialog; Button1: TButton; Button2: TButton; procedure AudioProcessor1GetData(

The Master/Detail Behavior

隐身守侯 提交于 2020-01-15 09:57:08
问题 I use Delphi 7 + Zeos + MySQL, and I got a problem when I try to post Master table, the Details datasets are posted first, raising a referencial integrity exception in data base, 'couse details tables needs the ID of the Master table. Can I revert this behavior? Can I persist the master table before the details? 回答1: I think it's just the way TDataSet work. If you have unposted detail records, master. Post forces them to Post if I remember correctly. So I am guessing you have something like:

Delphi Enums to Variant as varInteger instead of varUInt32

别来无恙 提交于 2020-01-15 09:21:30
问题 Delphi enumeration values are natively defined as unsigned integers - 1, 2 or 4 bytes, depending on the setting of MINENUMSIZE. I have a case where we are using Variants to transfer data of different data types between applications. All other data types work nicely, but now we realised that the expectation from other applications is that the enumerated values should be signed integers instead of unsigned (and some are really validating this). Is there a way to configure the automatic variant

Delphi Enums to Variant as varInteger instead of varUInt32

假如想象 提交于 2020-01-15 09:21:02
问题 Delphi enumeration values are natively defined as unsigned integers - 1, 2 or 4 bytes, depending on the setting of MINENUMSIZE. I have a case where we are using Variants to transfer data of different data types between applications. All other data types work nicely, but now we realised that the expectation from other applications is that the enumerated values should be signed integers instead of unsigned (and some are really validating this). Is there a way to configure the automatic variant

Clicking relative link goes to about:<relative link> which does not show wanted page

馋奶兔 提交于 2020-01-15 09:17:12
问题 I am using version 14.67.9 of TembeddedWB in a project in delphi 2007. I use TembeddedWB in combination with loadfromstring. That all works like I want it to but when clicking on a link in the page it goes to a page I am not expecting. If for instance the page is on a particular IMDB result site and one clicks on the link the browser goes to about:/title/tt1041829/. I guess I forgot to set some extra property or I am doing something else wrong. If somebody here can point me in the right way i

How do I marshal a stream for COM

瘦欲@ 提交于 2020-01-15 08:31:34
问题 I am consuming a COM object written in Delphi that requires a Stream. The interface generated by VS requests a parameter of type "object" comReader.LoadFromStream(object stream) When I use a FileStream or MemoryStream I get an "Invalid argument"-exception. How do I marshal a stream for COM consummation? 回答1: I think you should create wrapper for .Net Stream that implements COM IStream interface See this article (There is partly implementation) 回答2: Edit I found this interesting answer: How do

How do I marshal a stream for COM

此生再无相见时 提交于 2020-01-15 08:31:26
问题 I am consuming a COM object written in Delphi that requires a Stream. The interface generated by VS requests a parameter of type "object" comReader.LoadFromStream(object stream) When I use a FileStream or MemoryStream I get an "Invalid argument"-exception. How do I marshal a stream for COM consummation? 回答1: I think you should create wrapper for .Net Stream that implements COM IStream interface See this article (There is partly implementation) 回答2: Edit I found this interesting answer: How do