The DPF file is, in fact, a unit. For form-based window applications, its job is to create the main form (and other autocreated forms) and call Application.Run.
For console applications, you can put any code you want after the 'begin'.
Try File | New | Other | Console Application.
As for your...
I want to remove trailing spaces from text inside a table. Outside of a table, I use FindText:=" ^p",ReplaceText:="^p", but as the delimiter for cell data is not a paragraph mark, I don't know how to phrase it.
Cheers
I want to search and replace in MS Word using their special characters to indicate the edge of a table cell. ^p stands for a paragraph, but that does not work (regardless of what RTF looks like).
Cheers
Aside from using a DBMS-specific command (e.g. LOAD) and INSERTing data from other tables, you have to insert things one row at a time.
However, you can use query parameters instead of composing the text lexagraphically:
with ThisQuery do
begin
SQL.Text := 'INSERT INTO ' + TableName + '...
While you are searching, insure the correct result:
DecodeDate(DateTimePicker1.DateTime, ThisYear, ThisMonth, ThisDay);
sMonth := IntToStr(ThisMonth);
if ThisMonth < 10 then
sMonth := '0' + sMonth;
Cheers
I do things like
SetLength(ThisString, 1000);
// call an API function that stuffs something in PChar(ThisString)
SetLength(ThisString, StrLen(PChar(ThisString)));
Cheers
I don't understand why you need two (2) try..except blocks.
while not RS.EOF do
begin
try
ItemList.LoadFromFile(SomeFile);
// do other things
except
// don't care what went wrong
end
RS.MoveNext;
end;
Cheers
If you are asking how to communicate between forms, try treating the form as a class (which it is).
Add a property to the form class itself:
type
TForm2 = class(TForm)
... // stuff that the IDE automatically puts in
private
function GetSelectedValue : String;
public...
You also might want to put the keyword "private" at the top so it would look something like this:
type
TModule = class(TObject)
private
StudentName: string;
....
The "TObject" thing is implicit, but I like to put it in to make it clear what I am descending from.
Another...
http://www.intsysr.com/dtdchart.htm has one.
It looks great, but my irrational aversion to Java (and VB) will be my downfall <s>.
If you find a different one (i.e. native Windows), please let me know.
Cheers
I've seen suggestions to have two different log-ins.
You also could try to have two different desktop icons and specify the profile in each (I think that different profiles can have different connection configurations).
Cheers
Note that MS-SQL will return .IsNull = False for VarChar fields even when the column has never has anything assigned to it; you have to check .AsString <> ''.
(Also note that FieldByName is a function and uses parentheses not square brackets)
Cheers
One rarely calls event handlers directly.
I think you would assign a method to the OnMouseDown event handler that stores the most recent click to some TForm fields, and then reference those fields in the DragDrop event handler.
Alternatively, you can use the Windows API to get the mouse...
I assume you cannot modify the other application.
You can get the handle of the other application using Windows.FindWindow(). Then you can iterate through the child windows using Windows.GetWindow(). Windows.GetClassName() can identify the edit, and you can SetWindowText to it.
Cheers
You can test for BDE in a launcher app and, if it is present, call your real application.
One way to test is to explicitly load the BDE DLL (IDAPI32.DLL, I think) using Windows.LoadLibrary.
Cheers
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.