delphi

Image not displaying in ms word after converting it from Bitmap to RTF (but displaying in wordpad)

Hi, I am trying to convert a bitmap file to rtf using Delphi 2007. I used below code for conversion. function BitmapToRTF(pict: TBitmap): string; var bi, bb, rtf: string; bis, bbs: Cardinal; achar: ShortString; hexpict: string; I: Integer; begin GetDIBSizes(pict.Handle, bis, bbs); SetLength(bi, bis); SetLength(bb, bbs)...

Table Is Busy??!!

Short Time Ago, I Asked A Question About Sorting A Table And Mr. Tim Jarvis Answered Me Nice. I Searched The Keywords Given By Him And Found This Procedure In This Site. But When I Used This Procedure The Error "Table Is Busy" Raised. How Can I Solve This Problem? Thanks. ...

Making object model available via Automation in Delphi: what’s the easiest way?

We’re rewriting a calculation core from scratch in Delphi, and we’re looking for ways to let other people write code against it. Automation seems a fairly safe way to get this done. One use we’re thinking of is making it available to VBA/Office, and also generating a .NET assembly (based on the Automation object, that's easy). But the...

Check if object inherits from generic class

I have a generic list class: TMyObjectlist<T: TMyObject> = class(TObjectList<T>); and a derived list class: TMyDerivedObjectList = class(TMyObjectList<TMyDerivedObject>); I want to check if an instance MyList of TMyDerivedObjectList inherits from TMyObjectList, however: MyList.InheritsFrom(TMyObjectlist<TMyObject>) returns False...

Register custom form in delphi 2010 with ToolApi

Hi, I have custom form which is descendant from TForm. I used ToolApi to register custom module and add it to repository. So far so good. But when I click on File->New I can see my category with icon for my custom form but it is disabled. Icon is grayed and I cannot select it to create my custom form from menu and add it to project. ...

What are the pros/cons of Delphi Prism 2010/2011?

Have you developed much with Delphi Prism 2010 or 2011? If so, what are your chief complaints? I can't seem to find much critique on the relatively new releases. What do you use it for? .NET apps on Windows? On a different OS? What do you like best about it? Thanks! ...

Delphi ITE: when can resource IDs change?

I'm looking into Delphi ITE (Integrated Translation Environment) to add multi-language support in my app. I'm concerned about validity issues for resource DLLs, which is generated by ITE. In other words, when it is safe to deploy already compiled resource DLL, if main application was recompiled or (possibly) changed. Questions: If I j...

Whats the difference in terms of memory usage (clean up, etc) of Delphi Interface and C# interfaces

I am a Delphi programmer and trying to get some stuff done with C# here. Does interfaces in C# works in the same way as in Delphi - you don't need to worry in freeing it as it is freed when its out of scope. ...

how to connect microsoft crm with delphi?

hi i want connect to microsoft crm with delphi 7 or 2007 wsdl = http://crm/mscrmservices/2007/crmservice.asmx my code token := CrmAuthenticationToken.Create; token.OrganizationName := 'test'; token.AuthenticationType := 0; service := GetCrmServiceSoap(); customer := contact3.Create; customer.salutation := 'test'; custome...

Problem with TImage and TScrollBox

I am working with delphi. I have one scroll box in which I am putting TImage control. Now I wanted to zoom the image rendered into TImage control. So, I am using stretchDraw method of TCanvas. My code is - if sbZoom.Down then begin rct := imgmain.Picture.Bitmap.Canvas.ClipRect; rct := Rect(rct.Left * 2,rct.Top * 2,rct.R...

EDOM Parse Error (invalid character was found in text)/ Korean characters Problem

How I can fix this? Tdm = class(TDataModule) HTTP: TIdHTTP; XMLDoc: TXMLDocument; ... var sStory: String; ... sStory:= GetHTTP('http://localhost/MultiPlay_PHP/contentlesson.php'); begin xmlDoc.XML.Text := sStory; xmlDoc.Active :=true; StartItemNode := XMLDoc.DocumentElement.ChildNodes.First; ANode := StartItemNo...

Highlight selection even when tree is not focused

Hi, I use simultaneously several TVirtualStringTree on the same form. If a tree has a selected node, but the focus is currently on another tree, the selection is highlighted with a pale gray color. Is there a simple way to have the selection of an unfocused TVirtualStringTree highlighted with the usual selction color (blue on my compu...

Delphi conditional compiling

Hello there, I need to know if is there any option to compile a delphi project only if the source or any used unit, package etc has been changed. If this is not possible, second alternative : Is there any option to generate exactly the same binary compiling two times the same project. Thanks. Edit: The usage is for a hash based WebUp...

Scaling pixelvalues for printing

I'm trying to find some sense in some old code related to printing. When drawing a form to the printer, every size and position property get multiplied by a scale factor. The factor is calculated by the following code: { Printer device-specific information } FXScale := (GetDeviceCaps(Printer.Handle, LOGPIXELSX)/96) - ...

Problem converting bmp to jpg using TJpegImage Component

I have a bmp file and am trying to convert it to jpeg format. The jpeg created using the following code loses a lot of clarity. I have tried tweaking many settings to no avail. Does anyone have a function which will convert a bmp file to a jpeg? var Bmp: TBitmap; Jpg: TJPEGImage; begin Bmp := TBitmap.Create; Jpg := TJPEGIma...

Why TCategoryPanel.controls[i].className always "TCategoryPanelSurface?

On a form I put down 1 x TCategoryPanelGroup object and added 3 TCategoryPanel to it. In a routine, I need to go through each of TCategoryPanel and through each object onto those panel to produce an output. So, here is the code ... why into the second FOR instead of giving me classname of each component (i.e. TButton, TLabel, etc) it gi...

How To Scroll a TStringGrid dynamically?

Hello, I am working in the Borland C++Builder IDE, using VCL controls. I am trying to get a TStringGrid component to scroll down to a row and highlight that row, based on user input in a different form. I have the highlight portion done, but I can't figure out how to scroll the grid down to the correct row. Anyone here know? ...

Best HTML encoder for Delphi?

Seems like my data is getting corrupted when using HTTPapp.HTMLEncode( string ): String; HTMLEncode( 'Jo&hn D<oe' ); // returns 'Jo&am' This is not correct, and is corrupting my data. Does anyone have suggestions for VCL components that work better? Other than spending my time encoding all the cases http://en.wikipedia.org/wiki/Lis...

Binary version of StringReplace

I'm trying to run AnsiStrings.StringReplace on a RawByteString holding a blob of data, some of which needs to be replaced. It would work, except that inside StringReplace it converts my string to a PAnsiChar, and so the search ends up bailing out as soon as it hits the first #0 byte inside the blob. I'm looking for a routine that works...

ObjectPascal identifier naming style on other languages

I learned to program with delphi, and i always liked the object pascal code style, looks very intuitive and clean. When you look at the variable declaration, you know what are you dealing with.. A fast summary: Exception E EMyError Classes and Types T TMyClass Fields in classes f fVisible Events On OnMouseDown Pointer types...