delphi

How to use windows IME in delphi?

I have several keyboards and they type in different TMemos. In english, everything works fine, but in Korean the keystrokes get sent to the IME before it sends it to my onKeypress (which handles/identifies the different keyboards), so I can't exactly tell which keyboard it came from before that. I don't exactly know how to use WinApi, b...

Delphi 7 Enterprise or Delphi 2010 Professional

At work I have used Delphi 6 & 7 Enterprise for several years. A few years back, I bought a personal copy of Turbo Delphi Professional. Because of this I am eligible for Delphi 2010 Professional upgrade. But I am not eligible for Delphi 2010 Enterprise upgrade though. Is it worth buying Delphi 2010 Professional Upgrade or should I look...

Is C# project file diarrhea the norm?

A C# programmer rewrote a Delphi 6 program (no GUI, just files-in-files-out grinding, about 50 procedures and functions totaling less than 1200 lines == 57kb keystrokes) that lives as a single .DPR file. He delivered a project containing 58 files (52 of them .CS files) in 13 folders nested to various degrees, totaling over 330kb. Is th...

Getting the string name of an interface using Delphi RTTI

I have proved that I can get the name of an interface from its GUID using Delphi 2010 (eg IMyInterface converted to the string 'IMyInterface'. I'd like to achieve this in Delphi 7 (for compatibility). Is this possible? Or are there fundamental compiler limitations. ...

Delphi - Installed components lost

Hi guys, a few days ago I've setup my dev environment (delphi 2009 on a VM with win 7 and a user on a domain), installed my components (jedi's, devExpress, ADS an so on). Today I start my machine, opening delphi - and what must I see? Every installed componenet isn't there any more. Could it be that there's something wrong with the domai...

How to detect end of Right drag of TControl ?

edit: VCL has no problem around right dragging and the sample program below works perfect. A mouse gesture utility causes the problem. (Perhaps it hooks & intercept WM_RBUTTONUP event...) I want to detect end of right-dragging on the control. For left-dragging, I can use MouseUp event, but it doesn't occur after right dragging. On th...

Suggtestions for sending e-mail notifications from a 2 tier application with client potentially not connected to the internet.

I have to add e-mail notifications to a client server application. Notifications happen as the user do some particular action on the client UI. If I had a middle tier or a service running at server I can imagine how to do it: 1) I simply create a DB tables with "pending notifications" 2) as a user does an action that generates a noti...

Setting THotKey to VK_NEXT results in "NUM 3" being displayed

A very simple test case: procedure TForm3.btnCopyClick(Sender: TObject); begin HotKey2.HotKey := HotKey1.HotKey; end; Press "PgDn" key in the first THotKey and "Page Down" is displayed. Click the ==> button and the second THotKey will display "Num 3". Similar things happen if modifiers (Shift etc) are pressed. The behaviour also...

to retrieve stringlist items in memo from table POS_CatBreakDownValue into tchecklistbox

hi... i have a problem on how to retrieve the items in memo from table into tchecklistbox...before this i do the procedure to insert the items that have been checked into memo in tbl POS_CatBreakDownValue..but now i want to know how to retrieve items from table and automatic check in tchecklistbox...thanks..here my procedure to insert t...

Sharing a folder programmatically and revoking it. (Delphi 7)

Hi How does one programmatically create a UNC share from a known directory? How does one revoke it programmatically? I don't want the user to fiddle with the Share dialog. Additional info such as changing the share name, comment, user limit is also welcomed. Thanks SoulBlade (Using Delphi 7) ...

Problem in fillRgn function

Hello All, I am working with delphi. After I got a solution of this problem, Now I want the boundary of that combined region. Is there any easy solution? Thank You. Edit: Boundary means the outer most points of region. My region is a polygon region and I want the points of that polygon. ...

Delphi stack misalignment + com marshalling = wrong marshalling

This is not exactly a straight-out question because I have just solved it, but more like "am I getting it right" type of question and a reminder for those who might get stuck into that. Turns out, Delphi does not align variables on stack and there are no directives/options to control this behavior. Default COM marshaller on my XP SP3 se...

Is it possible to bring a ChildForm on front of another maximized ChildForm without de-maximizing?

I have 2 different types of child forms. One type is my main child form, and the other type is like a NOTE in MS Outlook (which is always active in the MDI form). When my main child form is maximized and I create a new NOTE child form (TNoteForm.Create(self).Show), the active maximized child loses its maximized size state and resizes to...

Mimic outside click on a popup menu

You know how in a popup menu if you click outside of the menu the popup disappears? Well I would like to reproduce that. Currently I am having a panel created with some components on it when a button is clicked. The panel and sub components go away when you click a certain button on the panel. However I want it to go away if you click ...

Is a dynamic array automatically deallocated when it goes out of scope?

in this example procedure foobar; var tab:array of integer; begin setlength(tab,10); end; is the array destroyed or the memory is leaking? ...

No Unicode-version HTML Tidy for Delphi?

I downloaded the latest version (TidyPas_Delphi2010.zip) from the official homepage (http://sourceforge.net/projects/curlpas/files/). But to my surprise, there are full of AnsiString in the unit instead of string(UnicodeString). Does anybody use this? No Unicode version? Thanks ...

how to wordwrap the button text?

i have created dynamic button with code below, the button caption is too long so i have to change the size of the caption to fit the button width but the wordwrap seen to be not function at all. var Reg: TRegistry; lstKey, lstSubKey : TStringList; sKeyName, sSubKeyName : string; i, j, iSize, iSize2, iTop, iSpace, iComp : integ...

Confusion with CreatePolygonRgn

I am working with delphi. I have an array of points which are continues as shown in image. Then I give this array to CreatePolygonRgn and create the region say rgn1. rgn1 := CreatePolygonRgn(tmpary1[0],Count,WINDING); Then I fill the region and show it on my TImage control as shown in image. The problem is from the left si...

Passing a reference to a TObjectDictionary<TKey, TValue>.TValueEnumerator

Hi All, I am trying to use Delphi 2010's TObjectDictionary generic. I would like to pass an enumerator of the Values property of that generic class, and the compiler doesn't seem to want to let me... Example: TAttributeStates = class(TInterfacedObject, IAttributeStates) private FStates: TObjectDictionary<TPatchAttribute, TAttr...

Bypass OutputDebugString in Delphi 7?

I'm wondering if it's possible to bypass the OutputDebugString? I'd like the OutputDebugString output showing up in DebugView and not in the internal Delphi Event Viewer window. But i can't find a way to tell Delphi not to swallow the OutputDebugString. Any ideas? regards ...