Delphi Pages Forums  

Go Back   Delphi Pages Forums > Search Forums

Lost Password?

Showing results 1 to 50 of 198
Search took 0.12 seconds.
Search: Posts Made By: rojam
Forum: General 08-23-2019, 06:14 PM
Replies: 3
Views: 2,321
Posted By rojam
Have you tried using TClientDataSet? I believe...

Have you tried using TClientDataSet? I believe it can read and write to an XML file and you get the benefit of being able to hit the data as a table.
Check out: ...
Forum: General 06-12-2019, 12:43 PM
Replies: 2
Views: 6,545
Posted By rojam
Is Form2 guaranteed to exist when you close...

Is Form2 guaranteed to exist when you close Form1? Can Form2 be closed on its own? How many instances of Form2 can be open at the same time?

The answer to these questions will determine the best...
Forum: General 05-28-2019, 04:41 PM
Replies: 1
Views: 7,132
Posted By rojam
if you want a group of buttons to work in concert...

if you want a group of buttons to work in concert then lookup the speedbutton's GroupIndex property, if you simply want a button to toggle down or up every time the user clicks it, then just toggle...
Forum: General 04-24-2019, 01:16 PM
Replies: 5
Views: 9,959
Posted By rojam
Since you want all the applications to have a...

Since you want all the applications to have a unique message number for MRS_WinIdentify, you should be registering the message using the windows RegisterWindowMessage function from all your...
Forum: General 03-17-2019, 03:35 PM
Replies: 7
Views: 9,181
Posted By rojam
Some of those old web sites are still around. ...

Some of those old web sites are still around.



https://www.swissdelphicenter.ch/en/tipsindex.php //Norton AntiVirus warns about this site as a known dangerous site - they were probably hacked...
Forum: General 03-15-2019, 01:01 PM
Replies: 7
Views: 9,181
Posted By rojam
if not (key in...

if not (key in [#48..#57,VK_BACK,VK_TAB,VK_CLEAR,VK_RETURN,VK_DELETE,VK_END,VK_HOME,VK_INSERT,VK_ESCAPE]) then
key = #0;
You'll most likely still want most other special keys to work within your...
Forum: General 02-25-2019, 09:35 PM
Replies: 7
Views: 9,181
Posted By rojam
You may also want to allow the backspace key and...

You may also want to allow the backspace key and the Del Key in case the user mistypes the number he wants.

But there should be a better way to do this, can't confirm that all versions of Delphi...
Forum: General 09-30-2018, 11:11 PM
Replies: 1
Views: 7,418
Posted By rojam
Rather than basing the flow of your code to an...

Rather than basing the flow of your code to an exception, you can get a reference to MS Word via code that doesn't cause and exception:

type
TForm1 = class(TForm)
Button1: TButton;
...
Forum: General 09-19-2018, 12:50 PM
Replies: 2
Views: 7,268
Posted By rojam
If DB Components are attached to the same...

If DB Components are attached to the same datasource/(query-table), then yes, it will act this way. How else would you expect them to act???
Forum: General 09-06-2018, 11:32 PM
Replies: 4
Views: 5,462
Posted By rojam
You need to include the original code for us to...

You need to include the original code for us to try to figure it out. The revised code could help also.
Forum: General 08-31-2018, 12:43 PM
Replies: 5
Views: 7,561
Posted By rojam
If you are connecting to a remote database, I...

If you are connecting to a remote database, I wouldn't keep an active connection to the database. Do the connection, run the operation (query, update, insert) and disconnect.

If you still want to...
Forum: General 08-21-2018, 12:39 AM
Replies: 4
Views: 4,513
Posted By rojam
Since you don't keep a reference to the...

Since you don't keep a reference to the resoucestream in your shortened approach, there's no way to free it.
Forum: General 08-20-2018, 05:36 PM
Replies: 4
Views: 4,513
Posted By rojam
I suppose you can use "Smart Pointers" to create...

I suppose you can use "Smart Pointers" to create an Interface. That way, when the Interface goes out of reference, it is automatically garbage collected. You can look an an implementation of a...
Forum: DB-Aware 08-14-2018, 03:49 PM
Replies: 1
Views: 12,253
Posted By rojam
What directory does your database sit on? Do you...

What directory does your database sit on? Do you have WRITE access to that directory?
Forum: General 08-09-2018, 12:43 PM
Replies: 2
Views: 2,603
Posted By rojam
Here...

Here (https://en.wikibooks.org/wiki/Algorithm_Implementation/Checksums/Verhoeff_Algorithm#Pascal/Delphi) is an implementation of the verhoeff algorithm in Delphi.

You could call this function from...
Forum: General 07-12-2018, 12:50 PM
Replies: 8
Views: 2,308
Posted By rojam
The code you have above will fail miserably if...

The code you have above will fail miserably if you have a multi-user database (such as MySQL, Oracle, MSSQL, Postgres). Even if it's not currently designed as a multi-user interface, you would have...
Forum: VCL 07-02-2018, 08:11 PM
Replies: 4
Views: 2,364
Posted By rojam
the split code would be something like this...

the split code would be something like this (untested)

procedure TForm1.SplitFile(const TheFile: String);
var
maxSplitPart: Integer;
InFS: TFileStream;
OutFS: TFileStream;
I: Integer;...
Forum: VCL 07-02-2018, 01:16 AM
Replies: 4
Views: 2,364
Posted By rojam
I believe that D7 can handle files that large...

I believe that D7 can handle files that large using TFileStream. To ensure, Check the definition of a TFileStream property such as Position and ensure it is defined as an Int64. (I don't have D7...
Forum: General 06-12-2018, 05:09 PM
Replies: 6
Views: 1,821
Posted By rojam
try implementing a log in page as detailed here. ...

try implementing a log in page as detailed here.

https://www.thoughtco.com/display-a-login-password-dialog-1058469
Forum: VCL 06-11-2018, 07:13 PM
Replies: 2
Views: 2,212
Posted By rojam
I believe the first issue can be fixed by...

I believe the first issue can be fixed by changing

ItmIndx := lstProdOD.items[lstProdOD.ItemIndex]; //you are always selecting the SAME item, ItemIndex returns the index of the selected row
to
...
Forum: General 05-04-2018, 03:24 PM
Replies: 1
Views: 1,318
Posted By rojam
I assume you actually mean overload, not...

I assume you actually mean overload, not override. Overload allows two (or more) functions/procedures to have the same name but having different signatures (parameter list). A DLL exports its...
Forum: General 04-26-2018, 01:03 PM
Replies: 11
Views: 2,007
Posted By rojam
try running the command "GetCurrentDir" somewhere...

try running the command "GetCurrentDir" somewhere within the code you posted above and see if the returned value is the same as the directory you are attempting to delete. If so, that may be why you...
Forum: General 04-15-2018, 01:40 AM
Replies: 2
Views: 1,401
Posted By rojam
Drop a TApplicationEvents on your form, and...

Drop a TApplicationEvents on your form, and select the OnDeactivate Event to know when the application loses focus.
Forum: General 04-15-2018, 01:36 AM
Replies: 2
Views: 1,162
Posted By rojam
simply use the DBGrid's OnMouseUp (don't use...

simply use the DBGrid's OnMouseUp (don't use OnMouseDown) to check if the X value of the Mouse Click is within the gutter of the DBGrid.


procedure TForm1.DBGrid1MouseUp(Sender: TObject; Button:...
Forum: General 01-31-2018, 04:00 PM
Replies: 6
Views: 1,883
Posted By rojam
You can't use parameters in the SELECT portion of...

You can't use parameters in the SELECT portion of a query. You'll have to concatenate that portion of the query, then you can use parameters for the WHERE portion of the query.

V1 := 'SELECT...
Forum: General 11-13-2017, 08:19 PM
Replies: 2
Views: 2,519
Posted By rojam
what you need is StringToColor...

what you need is StringToColor (http://docwiki.embarcadero.com/Libraries/XE3/en/Vcl.Graphics.StringToColor)
There's also ColorToString...
Forum: General 11-02-2017, 08:03 PM
Replies: 6
Views: 3,766
Posted By rojam
No wonder you are losing the font data. All you...

No wonder you are losing the font data. All you are doing is saving RichEdit1.Text to your database. RichEdit1.Text only contains the text contained within the RichEdit1, none of the formatting.
...
Forum: General 11-01-2017, 02:33 PM
Replies: 8
Views: 3,328
Posted By rojam
OpenDialog has an overloaded method, not sure it...

OpenDialog has an overloaded method, not sure it is included in Delphi5, but you can give it a try.

call OpenDialog1.Execute with the Handle of the form you want to stay up front.

if...
Forum: General 10-31-2017, 07:10 PM
Replies: 8
Views: 3,328
Posted By rojam
Can you please explain again what the problem is...

Can you please explain again what the problem is and what you are attempting to do. At best, it seems you are attempting to execute OpenDialog1, so what issue are you having?

Also, the code you...
Forum: General 10-30-2017, 07:47 PM
Replies: 5
Views: 2,633
Posted By rojam
Try this function TForm1.FindLastSlash(const...

Try this

function TForm1.FindLastSlash(const Value: String): Integer;
var
I: Integer;
begin
Result := -1;
I := Length(Value);
While I > 0 do
begin
Forum: General 10-26-2017, 02:37 PM
Replies: 3
Views: 2,161
Posted By rojam
Can you give us the structure of your tables, the...

Can you give us the structure of your tables, the database (I'm assuming you mean database when you mention table) and which components you are using to connect to them? Also which version of Delphi...
Forum: General 10-24-2017, 02:10 PM
Replies: 4
Views: 2,489
Posted By rojam
You didn't mention which database you are using,...

You didn't mention which database you are using, but you can read here (https://dev.mysql.com/doc/refman/5.7/en/fixed-point-types.html) why what you did wouldn't work with MySQL.

From that page:
Forum: General 10-05-2017, 02:37 PM
Replies: 2
Views: 1,967
Posted By rojam
I haven't tested this code, but the basic premise...

I haven't tested this code, but the basic premise is to use a regular expression to match the domain and to add it to another StringList, returning the StringList with the matched values. Make sure...
Forum: General 09-12-2017, 04:09 PM
Replies: 3
Views: 3,119
Posted By rojam
You really need to rethink your logic, this time...

You really need to rethink your logic, this time remembering you are attempting to have a multi-threaded process.

In procedure ThreadEmail.Execute, you set up IdSMTP, Pool, SSHandler, the push...
Forum: General 09-11-2017, 04:19 PM
Replies: 3
Views: 3,119
Posted By rojam
What happens if you change the execute method to...

What happens if you change the execute method to FIRST check to see if the thread is terminated and only create the INDY components if there's an item in the Queue:


procedure...
Forum: General 08-25-2017, 07:57 PM
Replies: 4
Views: 3,067
Posted By rojam
What you are looking for is a global keyboard...

What you are looking for is a global keyboard hook and you would have to implement that in a DLL and call the DLL from your application. Just google

global keyboard hook example

and there are...
Forum: General 08-07-2017, 07:22 PM
Replies: 2
Views: 4,904
Posted By rojam
Don't use a FDTable, use a query component...

Don't use a FDTable, use a query component instead and select the substring of gms_verb.

substr(gms_verb, 1, <#of char to return>)

set the sql property of the query to something like:

select...
Forum: General 06-07-2017, 02:44 PM
Replies: 19
Views: 7,245
Posted By rojam
Not sure which version of Delphi you're using,...

Not sure which version of Delphi you're using, but if you have XE2 or better, are you sure you have the correct dlls. If you are compiling for x64, then you need the x64 version of the dlls, or x86...
Forum: General 06-05-2017, 04:04 PM
Replies: 3
Views: 5,612
Posted By rojam
How to you intend to implement something like...

How to you intend to implement something like this? You have an INFINITE number of idle moments within your application (not quite infinite but you get the idea), do you intend to launch an...
Forum: General 05-26-2017, 04:05 PM
Replies: 19
Views: 7,245
Posted By rojam
Google restricts access to email from less secure...

Google restricts access to email from less secure apps. Most likely your application is considered by Google as a less secure app. There's a google e-mail setting your software users will need to...
Forum: General 04-10-2017, 03:12 PM
Replies: 3
[SOLVED] DOS Output
Views: 3,019
Posted By rojam
Which version of GetDOSOutput are you using? The...

Which version of GetDOSOutput are you using? The one found here (http://delphidabbler.com/tips/61)? If you want to update the memo as output is received, you'll need to convert this FUNCTION to a...
Forum: General 02-27-2017, 02:07 PM
Replies: 5
Views: 3,109
Posted By rojam
Your function is flawed. A function MUST...

Your function is flawed.

A function MUST return a value.

1) if '(FldDest.DataType=ftBoolean)' evaluates FALSE, then your function never sets Bool thus FldDest.AsBoolean:=Bool; is...
Forum: VCL 02-19-2017, 08:10 PM
Replies: 4
Views: 2,656
Posted By rojam
What I provided does not in any way stop you from...

What I provided does not in any way stop you from saving the changes to a file like you were before.

All I pointed out was that you didn't need to save it to file and then reload from the file.
Forum: VCL 02-17-2017, 01:55 PM
Replies: 4
Views: 2,656
Posted By rojam
You don't have to save the Memo to file to allow...

You don't have to save the Memo to file to allow the combobox to update it's contents.


ComboBox1.Items.Assign(Memo1.Lines);


ComboBox1.Items and Memo1.Lines are both TStrings so you can...
Forum: General 02-06-2017, 02:58 PM
Replies: 2
Views: 2,360
Posted By rojam
Have you tried to replace TMemoryStream with...

Have you tried to replace TMemoryStream with TFileStream? You can create the FileStreams in the Temp directory.
Forum: General 02-01-2017, 08:14 PM
Replies: 7
Views: 2,126
Posted By rojam
Yes it can handle these features - but so can...

Yes it can handle these features - but so can RichEdit...


TRichView can save the file to rtf, and it also can save the file as a rvf format that TRichView defines. As to exporting to PDF, they...
Forum: General 02-01-2017, 01:52 PM
Replies: 7
Views: 2,126
Posted By rojam
I agree with Norrit, but I have TRichview and if...

I agree with Norrit, but I have TRichview and if you have questions about whether it handles something particular, I may be able to tell you, and I can tell you that the tool is definitely maintained...
Forum: General 01-13-2017, 04:18 PM
Replies: 7
Views: 3,096
Posted By rojam
That is because you are just subtracting one time...

That is because you are just subtracting one time from another and displaying the result as a TTime variable itself.
Try something like

uses ..., DateUtils;

...

var
m: Int64;
...
Forum: General 01-13-2017, 03:23 PM
Replies: 7
Views: 3,096
Posted By rojam
You do realize that both times would probably...

You do realize that both times would probably NEVER be EQUAL. A TTime variable keeps the time down to the millisecond, so if the application doesn't request the time at exactly the correct...
Forum: General 01-12-2017, 09:05 PM
Replies: 7
Views: 3,096
Posted By rojam
Sorry, but it is very difficult to understand...

Sorry, but it is very difficult to understand your statement.

Please try to better explain what

"and time left 2 minutes to take 11:00:00 of system time"

means.

does 11:00:00 mean...
Showing results 1 to 50 of 198

 
Forum Jump

All times are GMT. The time now is 08:40 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.