Delphi Pages Forums  

Go Back   Delphi Pages Forums > Search Forums

Lost Password?

Showing results 1 to 50 of 500
Search took 0.16 seconds.
Search: Posts Made By: andyho
Forum: General 09-26-2003, 12:02 AM
Replies: 4
Views: 2,769
Posted By andyho
RE: Get Temp Path that don't like short file name format

Winprocs is the old Delphi 1 name of that unit - since Delphi 2 it was merged into windows. However normally Delphi has a unit alias, so it will find winprocs under the new name as well. So maybe...
Forum: General 09-24-2003, 01:08 AM
Replies: 3
Views: 1,538
Posted By andyho
RE: After drawing on a TPicture, i wan't to resize it and draw...

Yes, you need a new one, as the TBitmap it encapsulates cannot be resized. But you don't need to recreate the TPicture, just assigning image1.picture.bitmap:=NIL will do the trick. However that will...
Forum: General 09-15-2003, 06:54 AM
Replies: 2
Views: 716
Posted By andyho
RE: Unicode between Win98 & Win2K...plz HELP...URGENT

The problem is: with Win'98 you created the text in the 8bit charset for arabic (codepage 125x). But you Win2k does not have this codepage as the standard 8bit codepage (maybe it's not an arabic...
Forum: General 09-10-2003, 05:53 AM
Replies: 1
Views: 1,135
Posted By andyho
RE: Civil to Hebrew Calendar

Yes, I have. Take a look into my TMoon component, that one includes the hebrew and the chinese calendar as well.

http://www.delphipages.com/result.cfm?ID=1173



Bye,
Andy

If it helped...
Forum: General 09-05-2003, 12:54 AM
Replies: 1
Views: 815
Posted By andyho
RE: Anti-Spam

Using the "remove" lists is no good idea, because many use it to verify the email address - and once your email is verified it becomes worth much more for the spammer. Also many spams list a remove...
Forum: General 09-05-2003, 12:48 AM
Replies: 1
Views: 759
Posted By andyho
RE: Component Writing In delphi

The ugly alternative would be to use 10 properties named size1, size2 etc. - the object inspector cannot handle array properties, so these cannot be published.

Instead of using an array you can...
Forum: General 08-11-2003, 02:04 AM
Replies: 5
Views: 6,373
Posted By andyho
RE: color of a string grid cell

Alternatively to the OnDrawCell event you can also use one of the many enhanced stringgrid components, including several freeware one. This becomes useful of you have more then one grid which needs...
Forum: General 08-06-2003, 02:24 AM
Replies: 3
Views: 773
Posted By andyho
RE: actions with outside application

Many standard EMail application are MAPI-Servers - MAPI is the Microsoft Mail-API. But it's some work to enable your email application to serve as a MAPI server - there are some components around,...
Forum: General 08-06-2003, 01:16 AM
Replies: 3
Views: 773
Posted By andyho
RE: actions with outside application

I can answer part 2 of your question: what you need to create is a MAPI server, and then register it as being the active one. Then your software will come up with EVERY email sending request,...
Forum: General 08-05-2003, 02:22 AM
Replies: 2
Views: 980
Posted By andyho
RE: Preventing component from reverse engineering

What do you mean about cracking? If you deliver your component without source code it is not possible to get the source code from the DCU file anymore. That part is save. But: I think all serious...
Forum: General 08-05-2003, 02:16 AM
Replies: 3
Views: 798
Posted By andyho
RE: Pointer or Variable or what??

Then the inherited forms would be the best way. You can do it with one pointer as well, but then it gets more ugly:

var
InvoiceForm: TForm;
begin
if english then
...
Forum: General 08-05-2003, 12:41 AM
Replies: 4
Views: 3,121
Posted By andyho
RE: how can I free TStringList Result in a function ???

Your code will give an access violation once the caller tries to access the return value, as what you write is exactly the same as an result.free - you only have two pointers pointing to the same...
Forum: General 08-05-2003, 12:38 AM
Replies: 4
Views: 3,121
Posted By andyho
RE: how can I free TStringList Result in a function ???

If your function creates an object it cannot free it, as then it would do virtually nothing. With such a function you have to give the caller the task of freeing the object. I would recommend to...
Forum: General 08-04-2003, 06:52 AM
Replies: 3
Views: 798
Posted By andyho
RE: Pointer or Variable or what??

As the two QuickReports are nearly identical I would recommend to use either inherited forms - e.g. inheriting the german one from the english one and exchange all captions in that one; or...
Forum: General 08-04-2003, 12:50 AM
Replies: 1
Views: 717
Posted By andyho
RE: Why Would Tmemorystreem Please help me

Both the TMemoryStream and the TFileStream should behave identical in your code, as you only use the methods from the base class TStream. What might be a difference is that when you fill a...
Forum: General 08-04-2003, 12:37 AM
Replies: 2
Views: 647
Posted By andyho
RE: Active newsgroup for Delphi??

How about comp.lang.pascal.delphi.misc and the other groups in that hierachy? I stopped reading them quite some time ago because they had *too* much traffic to be useful. The other good choice was...
Forum: General 08-04-2003, 12:33 AM
Replies: 1
Views: 728
Posted By andyho
RE: Delphi 7 Problems with component.

This error message sounds like that component isn't D7 compatible yet - all of the design* units are only available at design time, thus they cannot be used during the compile for the executable. You...
Forum: General 06-05-2003, 12:23 AM
Replies: 5
Views: 1,895
Posted By andyho
RE: TJPEGImage component V1.3a

This can only happen if you drop the component on the form, and then remove the jpgimg from the uses statement (normally the Delphi IDE will add this automatically to the uses list). Then the DFM...
Forum: General 04-23-2003, 06:46 AM
Replies: 3
Views: 896
Posted By andyho
RE: Nice looking stringrid - Freeware

The question is what do you mean by "not nice"? Do you need more functions for the text display, like Fonts, Colors, Alignment? Do you need Bitmaps for the cells? Do you need special editing...
Forum: General 04-14-2003, 05:40 AM
Replies: 3
Views: 2,391
Posted By andyho
RE: Getting Sunrise,Moonrise, Sunset and Moonset timings

Take a look at my TMoon component http://www.delphipages.com/result.cfm?ID=1173 . That one has all those functions - not in the component itself, that one only displays the moon phase, but in the...
Forum: General 04-11-2003, 07:25 AM
Replies: 3
Views: 1,494
Posted By andyho
RE: Week function?

See my answer in a thread just two days ago: http://www.delphipages.com/threads/thread.cfm?ID=86902&G=86830

The function from the DateUtils unit MrBaseball meant is EncodeDateWeek.

Bye,
...
Forum: General 04-10-2003, 05:20 AM
Replies: 8
Views: 1,402
Posted By andyho
RE: Date problem!

Delphi 6 has a new unit called DateUtils which contains many functions around TDatetime. Thus the one you want is done by

label1.caption:=FormatDateTime(EncodeDateWeek(year,week,1))

Notice that...
Forum: General 04-08-2003, 01:15 AM
Replies: 3
Views: 742
Posted By andyho
RE: Include text

The first part is simple:

const
search = 'Hello my name is Adam!!!';

var
p: integer;

p:=pos(search,memo1.text);
if p>0 then
Forum: General 04-08-2003, 01:02 AM
Replies: 2
Views: 1,157
Posted By andyho
RE: Saving StringGrid to file

No, there is no other way then to go through the cells yourself. You can only use an enhanced grid which already implements such a function, for example my TStringAlignGrid which has a SaveToFile...
Forum: General 03-30-2003, 11:06 PM
Replies: 1
Views: 984
Posted By andyho
RE: Multiple Programmer program

What you need is a version management software - then every programmer in the team can check out the file he/she want's to work at, and once finished check it in again and then it will show up for...
Forum: General 03-26-2003, 05:01 AM
Replies: 9
Views: 2,000
Posted By andyho
RE: Test string for non print char

The easiest way is to use a TStringlist for that as that one has everything built in already.

var
l: TStringlist;
f: TFileStream;
i: integer;
begin
l:=NIL; f:=NIL;
try
...
Forum: General 03-26-2003, 04:53 AM
Replies: 9
Views: 2,000
Posted By andyho
RE: Test string for non print char

How do you read them then? By reading character by character with the read command? That'd be a very slow way. Try to consider the TFileStream class, that can speed up file reading significantly...
...
Forum: General 03-26-2003, 04:46 AM
Replies: 2
Views: 717
Posted By andyho
RE: How to avoid time-out?

That's not so easy to do. Your functions should not hang-up - maybe you better search for that problem first. What you can do is put the action into a thread, then launch this thread and let the main...
Forum: General 03-26-2003, 04:44 AM
Replies: 9
Views: 2,000
Posted By andyho
RE: Test string for non print char

Pos is no help, as what you need is something like NotPos(SetOfChar). If the problem is speed then delete won't help, you need to minimize string operations as those cost most time due to all the...
Forum: General 03-26-2003, 03:55 AM
Replies: 9
Views: 2,000
Posted By andyho
RE: Test string for non print char

Well, the easiest version is like this:

function OnlyValidChars(const s:string):string;
var
i: integer;
begin
result:='';
for i:=1 to length(s) do
if s[i] in...
Forum: General 03-21-2003, 12:57 AM
Replies: 1
Views: 786
Posted By andyho
RE: TThread

Well, you can put some actions into the background by putting them into a separate thread. However what does NOT work is to put visual stuff into a thread - the VCL itself is not thread-safe, so...
Forum: General 03-20-2003, 12:17 AM
Replies: 6
Views: 2,781
Posted By andyho
RE: Memo and speed

How do you load the text file into the memo? If you do it line-by-line (or how you added the gauge) then the delay is simply that after every line added the memo want to redraw itself, which takes...
Forum: General 03-07-2003, 12:30 AM
Replies: 3
Views: 1,276
Posted By andyho
RE: Weekdays?

You want to have all the weekdays of the current week? Then you can do the following:

calculate the date when the current week starts. In DateUtils (since Delphi 6) it has a ready-made function...
Forum: General 02-27-2003, 05:42 AM
Replies: 1
Views: 1,223
Posted By andyho
RE: Hint Font

You need to subclass the THintWindow to one which has the changed font. Then you can use the application.OnShowHint event and in case your special edit is the one which triggers the hint you have to...
Forum: General 02-26-2003, 02:32 AM
Replies: 1
Views: 766
Posted By andyho
RE: Tags in images?

These information isn't stored in the file itself, thus you cannot access it by reading the file - but it's stored by the OS inside the file system, similar with e.g. the filename or the file size.
...
Forum: General 02-15-2003, 12:20 PM
Replies: 4
Views: 4,050
Posted By andyho
RE: How to declare private variable in Unit?

The four visibilities private/protected/public/published are only available in classes, which can be a TForm like in your visual units, or a component, or a plain object. As "protected" only makes...
Forum: General 02-12-2003, 01:55 AM
Replies: 3
Views: 836
Posted By andyho
RE: Classes in Delphi

Of course it's similar with VB, VB uses some concepts of object oriented programming as well.

Every time you create an object it's a new instance, totally independent of the other instances...
Forum: General 02-12-2003, 01:41 AM
Replies: 3
Views: 910
Posted By andyho
RE: Scope of variables and the purpose of the second unit

I (gladly) forgot all the VB I once knew :-)

Simple example with 2 units with one public procedure used into the second one. It works same for procedures, variables, types, constants - everything...
Forum: General 02-12-2003, 01:21 AM
Replies: 6
Views: 962
Posted By andyho
RE: simple date and time question!!!!!

var
mydate, increment: TDateTime;
const
days:integer = 0;
begin
mydate:=EncodeDate(2003,12,2)+Encodetime(8,22,15,0);
increment:=EncodeTime(17,1,11,0)+days;
mydate:=mydate+increment;...
Forum: General 02-12-2003, 01:07 AM
Replies: 3
Views: 836
Posted By andyho
RE: Classes in Delphi

Maybe you better read the relevant parts of the online help or the language reference. An example without much praticual use:

type
TMyObject=class(TObject)
public
value: integer; ...
Forum: General 02-12-2003, 01:04 AM
Replies: 3
Views: 910
Posted By andyho
RE: Scope of variables and the purpose of the second unit

Both questions are related. To make a variable global you need to declare it in the interface section of a unit, then it can be accessed by other units. And for any other unit to access it this unit...
Forum: General 02-04-2003, 12:49 AM
Replies: 2
Views: 13,557
Posted By andyho
RE: How to clone an object ??

There is no real clone functionality built in into Delphi. The problem is that as soon as an object contains pointers (i.e. strings, sub-objects, dynamically allocated memory, handle to windows...
Forum: General 01-29-2003, 12:17 AM
Replies: 2
Views: 1,500
Posted By andyho
RE: How can I check brightness of a color??

That algorithm doesn't take into account that blue is much more dark then green, so taking all there color channels with the same weight is not the best way to do it. Better you do it with the...
Forum: General 01-29-2003, 12:08 AM
Replies: 1
Views: 918
Posted By andyho
RE: Calling a C++ DLL with a parameter as a pointer

To get the actual data to where a pointer is pointing you can use the ^ - thus e.g. char(mypointer^) is the data at that place interpreted as a character.

Bye,
Andy

If it helped please...
Forum: General 01-28-2003, 12:26 PM
Replies: 2
Views: 948
Posted By andyho
RE: troubles with Try..Except statement

There are two reasons why it doesn't raise the exception. First it's as already mentioned because the optimizer kills the code for the R variable because it's not used at all - you can change that by...
Forum: General 01-27-2003, 04:32 AM
Replies: 11
Views: 1,760
Posted By andyho
RE: Free method that doesn't work

But that's not the correct way, it is only the indication that the Free is called a second time. You should set it NIL after you free it (first time!), then a second call of free will not hurt (as...
Forum: General 01-27-2003, 03:42 AM
Replies: 2
Views: 1,341
Posted By andyho
RE: Help!! Where can I download Delphi 1.0?

There is no legal way to download Delphi 1 - Borland did not put it into their "museum" of antique software yet, only some Turbo Pascal versions. And it's no longer included with the newest Delphi...
Forum: General 01-27-2003, 03:13 AM
Replies: 11
Views: 1,760
Posted By andyho
RE: Free method that doesn't work

assigned won't help in that case, as assigned is nothing else then a check if it's not NIL.

You should always set the variable to NIL after free'ing it, thus do a

ts_Devise.Free;...
Forum: General 01-26-2003, 01:45 PM
Replies: 2
Views: 1,807
Posted By andyho
RE: WeekOfTheYear function problems...

It works as designed. This is a feature of the week definition adopted by the ISO. The first week of a year is that week which contains at least 4 days, and the week starts of Monday. Thus if January...
Forum: General 01-24-2003, 04:46 AM
Replies: 2
Views: 933
Posted By andyho
RE: Intersecting lines

Your code need a few extensions, as it will fail to work when one of the lines is horizontal (y1=y2), then it will result in a "Division by Zero" exception, even though the two lines might meet at...
Showing results 1 to 50 of 500

 
Forum Jump

All times are GMT. The time now is 12:28 PM.


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