delphi

Can I turn the Capslock light on/off on individual keyboards?

I have a single pc with multiple keyboards, all the capslock lights turn on/off synchronously. (so if one user/keyboard turns on the capslock, everybody types in caps) I was thinking about saving each keyboard's capslock status in flags but I just realized that the lights won't correspond for each user/keyboard's capslock status. I ju...

Delphi IDE - Access violation in module 'rtl70.bpl'

Hi. I have and old AV that hunts me. It appears randomly (often but not always) when I switch between projects (close current project and double click a different DPR file to load it) or when I close Delphi (7). So it appears daily but not that offten and I can live with it. However, in the last few days it started to be really annoying...

Delphi plugin framework

Hello, I want to design Delphi plugin framework. There are three options: 1. DLL 2. BPL 3. COM interface Every option has some disadvantage. DLL - Promblem with MDI apllication, forms from plugin cannot be embeded to the host exe - mdi application. BPL - Every *.bpl plugin and *.exe host application must be compiled with the same versi...

Borderless TForm with drop shadow

I have made a TForm derivative that acts like the drop down part of a combo, or a hint window, or a popup menu - a temporary thing. It has no caption - its BorderStyle is set to bsNone. The form is displayed non-modally using Show, having set its position. To make it stand out, it needs a drop shadow around its border. However, a conseq...

Delphi DLL created from parented to calling application

Hello, I have an application that I make a call to a DLL function that creates and returns a form. I get a whole bunch of errors when I try to parent this new form to the main form in the application. Is that a common error / problem or is there not an issue with parenting in this case. And as far as I have learned a form create...

Tips on troubleshooting an EStackoverflow exception in the Delphi IDE

I'm running Delphi 2009. When I try to view a form in the form editor I keep getting a stack overflow. So I did what anyone else would do. I used Delphi to debug itself or rather another instance of the IDE. So I know where the overflow is occuring I just don't know what to do about it. There is a custom component on this form that is i...

Delphi Loadlibrary returns 0 (LastErrorcde=3221225616) What does this mean ?

Hey, I need to use a 3rd party dll in our main app. When I staticly link to the provided DLL it works ok and I can the DLLs exported functions. But we don't want our main app dependend on this dll on startup so I tried to dynamicly load the DLL when I need it : DLLHandle := LoadLibrary('3rdparty.dll'); ret := GetLastError(); if DLLHandl...

How to code a property editor for integer with min/max values?

Edit: original question below, but I revise it now that I have some code to post.... I am created an editbox which only accepts an integer as input. I didn't use a TMaskEDit because I want to derive a bunch of others from it (only accepts float, and both float & integer with min/max properties). Here's my code. I think the problem is t...

Consume XML from Delphi 7

I need to get book information from isbndb.com trough XML service using this link http://isbndb.com/api/books.xml?access_key=12345678&index1=isbn&value1=9780321635345. Any Idea how to do that in delphi? ...

TImage does not seem to support Jpeg in D7 (free edition)??

procedure TmainForm.FormCreate(Sender: TObject); var img : TImage; pic:TPicture; begin pic := TPicture.create(); pic.LoadFromFile('my_picture.jpg'); img := Timage.create(Self); img.Picture := pic; end; ... "Project MyProect.exe raised exception class EInvalidGraphic with message 'Unknown picture extension (.jpg)'"...

Passing complex information via COM to C# from Delphi code

For various reasons, such as protecting investment, etc. I need to pass a series of complex records (numerous fields and records) back and forth between Delphi and a C# program. I guess I should be using IEnumVariant, but don't seem to able to design this with the typelibrary designer. Any help would be appreciated. Thanks Update I g...

What are csClickEvents and csCaptureMouse exactly?

I'm trying to understand the ControlStyle property in Delphi 2007, but I'm having trouble grasping the csClickEvents and csCaptureMouse attributes. According to specifications, csCaptureMouse makes the control capture mouse events when it is clicked, whereas csClickEvents enables the control to receive and answer to mouse clicks. It als...

Working with database in the OnExecute event (Indy)

Hi , i have a server with these codes : procedure TFrmMain.TCPServerExecute(AContext: TIdContext); begin Res := DoRegister(Name,Family,Username,Password); end; function TFrmMain.DoRegister(Name,Family,Username,Password:string): bool; var Qry: TSQLQuery; begin Qry := TSQLQuery.Create(nil); try Qry.SQLConnection := FrmCon...

Where to find string constant srStandard in Delphi 2007?

Specification of RegisterComponents does not indicate in which unit the constant srStandard (the name of the 'Standard' category in the tool palette) can be found. ...

How to install classes or units like components in Delphi 2007?

I'm writing a package in Delphi 2007 containing a component and several classes. I want to "install" the classes as well as the components. To be more precise: when a component is installed, the unit is somehow registered such that it is not necessary to add its path to the search path in the project. I would also like to do this with a...

How to access data from an XHTML file and use it in a Delphi Program

I am currently writing an application that needs to pull data from an XHTML file. the file is called toon.xhtml and below is its formatting: <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="/_layout/character/sheet.xsl"?><page globalSearch="1" lang="en_us" requestUrl="/character-sheet.xml"> ...

How can I use "is" to check or an exact class (not a descendant)?

TBase = class(TObject) ... TDerived = class(Tbase) ... if myObject is TBase then ... can I code this somehow and have it return false if myObject is of class TDerived? ...

Gecko XPCOM usage vs WebKit

I need to embed a web browser in C++ application. As well, I need to reach its javascript methods from Delphi components. I know that for FF there is Gecko with XPCOM. Is there something like this for WebKit? ...

Delphi : How to make cells' texts in TStringGrid center aligned?

It seems something obvious to have. I want the texts to be in the center of the cell, but for some reason I can't find it in properties. How can I do this? ...

Delphi - Create instance of subclass

I have a class defined as: TfraFrame = class(TFrame); then I have several subclasses all inherting from this, such as: TfraUsers = class(TfraFrame); TfraGroups = class(TfraFrame); TfraMenus = class(TfraFrame); In my main form i have declared variables as: var fraUsers: TfraUsers; fraGroups: TfraGroups; fraMenus: TfraMenus; ...