Try:
There is a global Tprinter object called Printer.
Printer.PrinterIndex := Printer.Printers.IndexOf('PrinterName');
If you wanted to be clever, you could put all of the printers in the Printer.Printers string list into a list box. and then do something like:
ListBox.Items :=...
Turbopower has a component called onGuard that does this and much more. You can see the number of users, You can create trial and demo programs limited by time, number of uses, number of network users, etc. I think it's about $200. I don't know how they do the code for this though.
Since StringList is derived from TStrings you will be able to do the following:
//declare a string list in your class
SL : TStringList;
procedure myForm.Create(Sender : TObject);
begin
SL := TStringList.Create;
SL.Add('String1');
SL.Add('String2');
SL.Add('String3');
//now sub your...
This may be easy but I've poured through the dbGrids.pas and grids.pas files to no avail.
Anyone know how to read the buffered text in the TDBGrid for the current column? I tried to access through the SelectedField.AsString property but that just shows the old field data, not the current text...
I've heard (I'm not completely sure) that to take advantage of multi-processor machines, one must write his/her program utilizing threads for processor intensive operations. The thread scheduler will assign a processor for running that thread. If you do not use threads in other words, multi...
First, I would say that TList is appropriate for holding objects, not an array, but that's my own opinion. The other thing I like to do is use class funtions (static). Here's an example.
type
TMyForm = class(TForm)
...
class Function Execute(AOwner : TComponent) : tModalResult;
end...
I have a requirement to add a TField in memory to an in-memory TQuery. This TQuery component is not on a data module.
The code follows: Note AField is defined as TField;
qCorrect:= TQuery.Create(nil);
with qCorrect do begin
Name := 'qCorrect';
AutoCalcFields := False;
DataBaseName :=...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.