I have a Delphi program that creates HTML files. Later when a button is pressed a TWebBrowser is created and a WebBrowser.Navigate causes the html page to display.
Is there anyway to set the WebBrowser "default directory" so it will always be the location of the Delphi executable not the HTML file?
I do not want to set the Base value ...
I recently acquired a Metrologic Barcode scanner (USB port), as everyone already knows it works as a keyboard emulator out of the box.
How do I configure the scanner and my application so that my app can process the barcode data directly? That is, I don't want the user to focus on a "Text field" and then process the data when the KeyPre...
I use the following emailing function with Eudora. For some reason the attachment file name is renamed to be something else. How can I make sure the attachment file name remains intact?
function SendMailMAPI(const Subject, Body, FileName, SenderName, SenderEMail,
RecepientName, RecepientEMail: String) : Integer;
var ...
I'm reading a component from a stream, and want to be able to specify the Owner property.
var TComponent : comp;
stream.Seek(0, soFromBeginning);
comp := stream.ReadComponent(nil);
Who owns comp, and how can I change it? I'd hoped the parameter to readComponent would be the owner, but it seems to do something totally different!...
Delphi 2010
When reading from file using readLn procedure, by default i get unicode string converted from code page 1251 (code page of windows).
How can i change this and read from file in other code page, in 1252 or UTF16 ?
...
I want to clean a list box by checking it against two other list boxes.
Listbox1 would have the big list of items
Listbox2 would have words I want removed from listbox1
Listbox3 would have mandatory words that have to exist for it to remain in listbox1
Below is the code I've got so far for this, it's VERY slow with large lists.
//...
I am trying to use the MakeColor method in the GDIPAPI unit but the conversion from int to byte is not returning me the correct value.
Example
var
argbStr: string;
A, R, G, B: Byte;
begin
argbStr := 'ffffcc88';
A := StrToInt('$' + Copy(AValue, 1, 2));
R := StrToInt('$' + Copy(AValue, 3, 2));
G := StrToInt('$' + ...
I have made the question "community wiki" - it is subjective.
I have upgraded to Delphi 2009 because of unicode support. I have found the anonymous methods a very interesting and useful language feature, I can't say the same about generics. The generics seemed important for me before the upgrade to Delphi 2009, but I have never used the...
Hi!
I'm developing an Inno Setup installer and I need to manage an IIS server from my delphi code. I've googled how to add/remove ISAPI filters and how to create a virtual folder. However, I still need to be able to add/remove/list ISAPI extensions and create/remove websites. So my question is how can I do that?
...
I need my application to connect to my web server's MySQL database, what is the best option for this. Perfered Data aware Component.
I tried zeos 7, but I keep getting the error: SQL error: Client does not support authentication protocol requested by server; consider upgrading MySQL client and have not been able to fix it.
Thanks
-Br...
I'm using a form with an IdTCPServer on it managing strings from the client with a AThread.connection.readln/writeln system. The string handling works and that isn't the problem.
The thing is, the form with the server on it hangs and will not load, but it still managed all the clients connected to it so it IS running but it just doesn't...
Let me preface this by saying I'm fairly new to Unit Testing, Mocks, Stubs, Etc...
I've installed Delphi-Mock-Wizard. When I select a unit and "Generate Mock", a new unit is created but it's very basic and not anything what I understand Mocks to be.
unit Unit1;
(** WARNING -
AUTO-GENERATED MOCK! Change this
unit if you ...
We're currently converting a Delphi 2007 project to Delphi 2010. We were already using Unicode (via WideStrings and TNT Unicode Controls).
I was expecting to replace all Wide functions, e.g. WideUpperCase, with their equivalent, e.g. UpperCase, but they do not work the same way. For example, WideUpperCase works differently from UpperCas...
I'm trying to return content from maps.google.com from within Delphi 2006 using the TIdHTTP component.
My code is as follows
procedure TForm1.GetGoogleMap();
var
t_GetRequest: String;
t_Source: TStringList;
t_Stream: TMemoryStream;
begin
t_Source := TStringList.Create;
try
t_Stream := TMemoryStream.Create;
try
...
I have a MDIForm with a MenuBar and a StatusBar. When I create a childform and position it with "Align = alBottom" the form goes out off the screen area and mainform scrollbars are activated. How to position the childform just over the StatusBar?
...
Hi In Delphi I've managed (!) to add a column to a TcxGrid table view that appears as a hyperlink (instead of a simple string). To do this, you simply edit 'properties' of the column and choose 'hyperlink'. The cell now shows a hyperlink style (underlined) but I canot for the life of me see how to:
Get the cursor to change to the 'hand...
In Delphi 2007 you can store a UTF8 string in a WideString and then pass that onto a Win32 function, e.g.
var
UnicodeStr: WideString;
UTF8Str: WideString;
begin
UnicodeStr:='some unicode text';
UTF8Str:=UTF8Encode(UnicodeStr);
Windows.SomeFunction(PWideChar(UTF8Str), ...)
end;
Delphi 2007 does not interfere with the contents...
Hi everyone!
First, I'm very new in Delphi and COM, but I should build COM application in Delphi. I read a lot of articles and notes on the internets, but COM and COM in Delphi are still not clear to me.
My sources - http://www.everfall.com/paste/id.php?wisdn8hyhzkt (about 80 lines).
I try to make a COM Interface and Impl class - it w...
I played with attributes and assumed that they are inherited but it doesn't seem so:
type
[MyAttribute]
TClass1 = class
end;
TClass2 = class(TClass1)
end;
TClass2 doesn't have the Attribute "MyAttribute" although it inherits from Class1. Is there any possibility to make an attribute inheritable? Or do I have to go up the cl...
I have a file that was written with the following Delphi declaration ...
Type
Tfulldata = Record
dpoints, dloops : integer;
dtime, bT, sT, hI, LI : real;
tm : real;
data : array[1..armax] Of Real;
End;
...
Var:
fh: File Of Tfulldata;
I want to analyse the data in the files (many MB in size) using Python if poss...