delphi-6

Proper handling of modal window “Minimize” behavior

馋奶兔 提交于 2020-06-10 15:22:14
问题 I have the following issue: we're building a rather large application (win32, Delphi 6 Enterprise). In several part of the application, modal windows are used, usually containing the detail of the selection of the main window. We included a modification of the handling of the WM_SYSCOMMAND messages so that, if the window is modal, then a SW_SHOWMINNOACTIVE message will be sent to the application's main window. This causes the whole application to be minimized instead of just the modal form.

Proper handling of modal window “Minimize” behavior

邮差的信 提交于 2020-06-10 15:22:10
问题 I have the following issue: we're building a rather large application (win32, Delphi 6 Enterprise). In several part of the application, modal windows are used, usually containing the detail of the selection of the main window. We included a modification of the handling of the WM_SYSCOMMAND messages so that, if the window is modal, then a SW_SHOWMINNOACTIVE message will be sent to the application's main window. This causes the whole application to be minimized instead of just the modal form.

How to encode base64 in Delphi 6? [duplicate]

怎甘沉沦 提交于 2020-01-14 02:35:05
问题 This question already has answers here : Binary to Base64 (Delphi) (2 answers) Closed 6 years ago . I need to encode a pdf document to base64 in Delphi6. Can anyone help me? 回答1: You can use the EncdDecd unit that is supplied with Delphi. The function you need is EncodeStream . You simply need to create two streams, one for input and one for output. If you are working with files then you should create TFileStream instances. Once you have your two file streams created, all you need is:

How to get elements by name in Delphi Chromium Embedded?

情到浓时终转凉″ 提交于 2019-12-29 01:40:08
问题 To get a particular DOM node embedded in the current web document from a TChromium instance, using its ID, you use ICefDomDocument.getElementById(). But how do you find elements by the NAME attribute? Javascript has the document.getElementsByName() method and TWebBrowser (that wraps IE) has a similar call, but I can't figure out how to do this with TChromium. I need to find some DOM elements that have NAME attributes but no ID attributes. I searched the ceflib unit and did not see anything

Delphi 6. How to set idTelnet.Connect timeout for early return on no connection

喜你入骨 提交于 2019-12-25 16:50:28
问题 Calling idTelnet.Connect normally connects to the remote device instantaneously. But, if the remote device does not respond, then the call to idTelnet.Connect does not return. It waits for a response from the remote device. This hangs the entire application. How can I set a timeout so that idTelnet.Connect returns within nn ms regardless of whether a connection has been established or not? 回答1: if the remote device does not respond, then the call to idTelnet.Connect does not return. Yes, it

Delphi 6 TDateTimePicker Windows Visual Theme support via Manifest

北城以北 提交于 2019-12-25 06:54:38
问题 As per my previous question (Delphi 6 support for toolbar and menu icons with alpha channel transparency), we are updating a legacy application developed in Delphi 6 to support Windows Visual Themes by including a Manifest. This has worked well and we have the majority of controls adopting the Windows visual theme correctly. However, we do have a problem with TDateTimePicker behaving in a slightly odd manner. We have the form colour set to white (RGB 255/255/255) and the input box for

Converting TurboPower Lockbox 2 to LockBox 3

不想你离开。 提交于 2019-12-24 01:02:02
问题 I am currently in the process of converting a project (that uses encryption) from Delphi 6 to XE. This project uses the old Delphi Encryption Compendium which does not work in XE. So I figured that I would swap from that component set to LockBox. There are two versions of LockBox - 2 and 3. I have no problems with using the LockBox2 in Delphi 6. I though that I would use LockBox3 in XE, but the problem that I have is that I cannot get the same results when used with ExFile demo program (from

Delphi 6 IDE and apps working on windows 7 64 bit?

蹲街弑〆低调 提交于 2019-12-22 10:56:23
问题 I have a commercial app that is developed with Delphi 6. Ive been developing under windows xp 32 bit, but am about to get a new development machine with Windows 7 64 bit. Will Delphi 6 install and work in the new environment ? The developed app also uses the BDE, on vista I couldnt get it to work at all, which meant my customers had to remain on windows xp. I dont want this to be the case for windows 7. Does the BDE have any problems working with windows 7 ? (or is it best to use

Passing nil as a parameter in place of a TComponent

删除回忆录丶 提交于 2019-12-20 05:42:12
问题 I've come across some code that's throwing an exception (EIntfCasterror Cast not supported) when it passes nil to a constructor expecting a TComponent, like so: obj := SomeClass.Create(nil); The unit this is in does not contain a form and even TForm requires a TComponent be passed to it when you call its constructor. What should I pass in place of nil if anything exists or is there a way to get it to accept nil. Thank you. Also, I don't have the source code which calls the method this is in,

How do I get screen coordinates of the DBGrid cell

微笑、不失礼 提交于 2019-12-19 07:58:10
问题 I want to show popup button or fancy message (with coloured background, etc) just under right-bottom corner of particular cell of the current row. For now I only figured how to get grid coordinates: x = DBGrid.DataSource.DataSet.RecNo y = DBGrid.Columns[index] There is also TCustomGrid.CellRect, which would do what I want, but it's protected and I don't want to inherit and create another component class. One crazy workaround I can think of is to save TRect-s in onDrawColumnCell event to some