vcl

Compile Delphi component package (bpl) for different Delphi versions

Hello. The situation is the following. Typically I use RAD Studio 2010 for Delphi development. I have some components I would like to redistribute in binary form (*.bpl without source). But I would like people to be able to use them despite of their Delphi version. But, for example, dcu files can be used only by compiler version, which...

DBGrid->OnColExit() focus fails

void __fastcall TUsers::DBGColExit(TObject *Sender) { Ado->ExecSQL(); AQ4->Close();AQ4->Open(); } after changing content of Table for AQ4 (Ado Query) and reload AQ4 DBG (DBGrid) reloads content too. but I'm still on not Exit from my Col (Column) (and row) and then when I press on Selected+1 after reload row it selects second r...

Administrator rights request

I've got error if I don't run my program "As Administrator" Access violation ... in module ... etc... Got error when trying to work with my ini file. How to avoid error or make a request Administrator rights. (using C++Builder6 , but Delphi code is readable for me too) working with ini by default TIniFile *FormCllient; FormCl...

Video component for delphi 2010

I'm moving a project from D7 to D2010 (and from XP to Win 7). I use a freeware video component to bring in video from a webcam (Video for Windows) and take a snapshot. Before I look to port this to 2010, I was wondering if anyone knew of a cheap video component that is 2010 compatible? ...

Delph/Builder drag and drop with image, image disappears when leaving control

I have a tree control that implements drag and drop. I use an overridden OnStartDrag() to get my own TDragObjectEx that shows an image while dragging. This works perfectly within the tree control, but as soon as I leave the tree control the image disappears. The cursor stays though. I tried implementing OnDragOver, to reset the image...

VCL - drawing a room

I am still trying to draw a floorplan (in BCB 6). I already asked a few questions. As a result of http://stackoverflow.com/questions/2040160/seeking-floorplan-design-vcl-toolbar I bought the TMC components. http://stackoverflow.com/questions/2053958/looking-for-non-rectangular-panel-vcl-component got me close, but not quite there. So,...

Change CheckBox state without calling OnClick Event

I'm wondering so when I change state of CheckBox CheckBox->Checked=false; It calls CheckBoxOnClick Event , how to avoid it ? ...

ActiveX in Delphi blocking VCL thread

Running into kind of a strange problem: I'm using delphi 6.0 and trying to integrate a third party activex control which connects to a server, streams and renders video (no visibility into this control). The control has a frame rate setting from 1 - 30 and if i set this to a small value like 1, the VCL thread seems to block for a secon...

how to set the tabwidth of the listbox portion of a TComboBox in Delphi

You can easily achieve a multicolumn effect in a listbox by setting the TabWidth property of TListbox. For example, http://delphi.about.com/cs/adptips2000/a/bltip1200_3.htm I need to do the same in the drop down list of a ComboBox, but comboboxes don't publish any TabWidth property. Any ideas? ...

TSQLConnection connection editor dialog at run time ?

If I double click a TSQLConnection at design time I get a dbExpress connections dialog allowing me to select connections or create new ones. Is there anyway to use that connections dialog at run time ? I would love to present it to my users so they can select a connection. That particular dialog looks more useful to me than PromptDataS...

How to set custom ticks on a TTrackBar in Delphi 2010?

I tried to set the tick style to tsManual, the min and max position to 1 and 100 respectively and add ticks at 9, 19, 79 and 89 and no ticks are shown at all except the detault first and last which the control automatically shows. I tried other values and none are ever shown. My code is: TrackBar1.TickStyle := tsManual; TrackBar1.Min :=...

AnimateWindow Slide

I want my form slide down and back to position with slide animation, how to make correct AnimateWinows, if it real for sure ... void __fastcall TUsers::BitBtn1Click(TObject *Sender) { if (!pressed) { Height=700; //AnimateWindow(Handle, 500, AW_CENTER | AW_SLIDE | AW_VER_POSITIVE); pressed=true; } else { p...

Grid : Scrolling Scrollbar

Hello. I've got DBGrid (I guess in this question it doesn't matters DBGrid or StringGrid) Delphi or C++Builder I need automatic redrawing when I scrolling my Grid right when I pressed key down and start scrolling (not when I key up) And I also request for mouse Scrolling. T_T C++Builder 6 ... so poor ... ...

Distribute keypresses between parent form and child control

Sometimes a keystroke on a form can have different recipents, depending on the state of the application. See the following sample: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, Buttons; type TForm1 = class(TForm) private ListView1...

How do I hide an inherited __published property in the derived class in a VCL component?

I have created a new VCL component based on an existing VCL component. What I want to do now is set the Password and Username properties from an ini file instead of the property inspector. Robert Dunn Link I read on the delphi forum above you cannot unpublish a property and that the only workaround is to redeclare the property as read-...

Using EnterCriticalSection in Thread to update VCL label

I'm new to threads. I'm using a 3rd party library that uses threads which at times call a procedure I've provided. How do I update update a TLabel.Caption from my procedure when its called by the thread? If I've called InitializeCriticalSection elsewhere, is it as simple as EnterCriticalSection(CritSect); GlobalVariable := 'New ...

What is the best method for implementing mouse wheel activity in Delphi VCL forms?

As a long time user of Delphi 7, I've rolled my own mouse wheel handling in a few controls but lately I've noticed that some recent applications only need the mouse cursor to be placed over a control (e.g. a list box or tree view) for the mouse wheel activity to cause that control to scroll. This feels nice (as opposed to having to click...

Delphi - form within form

For aesthetic reasons, I want to show a form on top of another form, just as if it were a component, say like a TPanel. It should resize with the parent, move around as th eparent is drageed by its title bar, etc. ----------------------------- | main form component 1 | ----------------------------- | main | the 'embedded' | ...

TDBGrid selected row index : How to get

How to get Selected row index in DBGrid ? so Im using ADOQuery -> DataSource -> DBGrid ...

How to prevent form from being activated when the users clicks on it?

I have a main form and non-modal autocomplete form. How can I prevent the autocomplete form from being activated by the user, when the user clicks on the list in the autocomplete form? So, basically I want the autocomplete form the receive the mouse click message when the users clicks, but to never become active, because it causes probl...