Morning all, hope u had a good weekend. Pretty wet around the Bay.
I am doing this for a friend, but in the meantime got interested myself, and
cause I couldnt find an answer picking ur brains.
Have searched the net, but cant find:
How to make a folder invisible for security reasons.
Starting
I have found something which is on our computers called 'Ole1956b.exe' this
is a security program, but there is no information on it anywhere.
Tks Aaron re magic folders. I was aware of that, but am trying to help out a
friend who wants to program these parameters. The closest I have come is a
anyone know how to detect what type of cursor has been used on a button?
eg wrong code:
procedure TCamForm.Pic1Click(Sender: TObject);
ncursor:Tcursor;
begin
ncursor:= (sender as camform).cursor;
---
New Zealand Delphi
why don't you just ditch that speedbutton you are trying to trap the help
cursor on and use another type of button, it's a lot simpler :)
Because I'm trying to get this button into shape as well, but the thought is
there.
As for:
Resources (GDI etc) have nothing to do with the amount of memory
There is some other constraints too which are needed in the res file. I will
give you mine here as an example:
;filename whatever.rc
click wave preload fixed pure "Utopia Close.wav"
;note the above type for wave file
opro wave preload fixed pure "openpro.wav"
CReg wave preload fixed pure
Just my .05c worth... All based on painful assumptions for lack of
sufficient code to make a diagnosis.
--
Aaron@home
Haha, thanks, its nice to wake up to a cheery note. No, I didnt want to
sidetrack any of you too much with mundane programming operations that I
SHOULD be sorting out in my own
Morning all.
I want to pick up a component reference from a sent value, but dont want to
re-write my code to do it.
I guess the normal way would be to:
Txform.alterbuttonstate(sender:tobject);
begin
with sender as tbutton do
begin
font.style:=fsbold;
end;
end;
What I would like to do is:
- New Zealand)
-----Original Message-
From: Alistair George [mailto:[EMAIL PROTECTED]]
Sent: Friday, 30 July 1999 09:04 AM
To: McKenzie, Paul
Subject: RE: [DUG]: sending component references
Depends what "Value: DWord" is ? a button name ? a button caption ?
OK, make it an int
Morning all.
Yesterday day I spent a couple more wasted hours sorting out a problemo in
my software which I eventually chased up to the function call not returning
a bitmap:
function myapp.getaBM(oldBM:tbitmap):tbitmap;
var bitmap:tbitmap
begin
bitmap:=tbitmap.create;
//rest bitmap initialize
What I did was re-assign the bitmap that was passed as the incoming function
paramter.
eg
function Tcamform.SizeFunc(BMap: Tbitmap): Tbitmap;
var
BMPtmp, BMPtmpB: TFastBMP;
wsize, hsize: word;
fval1, fval2: single;
begin
//other code here
BMPtmpB := TfastBMP.CreateFromhBmp(BMap.handle);
Sorry for the plethoria of Q's dudes.
I asked about a JPEG error #36 a while back. I looked for JPEG.pas, but
that's not there, nor can I find anything about JPEG error numbers
elsewhere.
I'm using D3. The error is size related, but if I can get the error
information, then I can figure it out
I am using a variant of bitmap which does not have the .empty property.
On formclose I want to free this item, but there is no valid way to check
its empty property eg
TFastBMP.size/ tbmp.bmHeader.biSize and so on. So Freeing can be an invalid
operation.
So is this valid, or is it leaving an
There is method in my madness. These are global bitmaps and they may or may
not be created/used during the course of the program operation. If you try
to free one that has not been used it makes an error. Maybe it is just a
non-desired property of this particular TFastBMP component.
Cheers,
Al+
KS:Tkeyboardstate;
begin
KS[VK_NUMLOCK]:= VK_NUMLOCK AND (NOT 1);
SetKeyboardState(KS);
How can I turn the VK_NUMLOCK On and Off?
---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
var
KS:Tkeyboardstate;
begin
KS[VK_NUMLOCK]:= VK_NUMLOCK AND (NOT 1);
SetKeyboardState(KS);
end;
That piece above doesn't toggle the state does it? Since the RHS
of the assignment
doesn't refer to the current state at all.
That is: Should the toggle line be
KS[VK_NUMLOCK]
Use win32s.hlp for Window on top find: 'always on top'
Also use Win32s.hlp for Show task bar: 'SHAppBarMessage'
---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website:
Tks for the info on Paramstr. I'll do some more work on it and advise the
simple way, if there is any. Myapp allows only one instance.
There is a really weirdo thing happening on myapp that I have been buggering
around with for the last 3 hours. What happens is that the mainform calls a
modal
Is it because you haven't explicitly set the FrmCapture variable, and you
are using it in your showmodal procedure?
ie) FrmCapture := TFrmCapture.Create(Application);
Jeepers, have a cigar, and I get the dummy of the week award.
Make it:
with TfrmCapture.Create(Application) do
try
Afternoon.
anyone know how to detect minimise and maximise of the window. WM_SIZE is no
good, because the window is only being minimised to taskbar, or maximised to
fullsize, not resized, so the following is not applicable:
procedure WMSize(var Message: TWMSize); message WM_SIZE;
Hi All.
I want to make up a component similar to the faulty Timagelist.
Eg
bitmap:array[0..99] of tbitmap;
Say currently we have 20 items in the array and item number 5 is to be
deleted.
What is needed is that now we have 19 items used in the array and item 6
drops into item 5, item 7 into 6
Cheers all for the info on re-arranging the bitmap (actually it will be a
Gordy TFastBMP) array.
I'm taking the lazy way out at the moment thanks to Chris Crowe with his
AdrockBitmapCollection, but when I get time I'll make my own component.
It never ceases to amaze me the help that one can
Aaron:is the Icelock component on a form or a member of another object?
Thanks, good Q - yes it is a component on the form.
I did a fudge by making a global variable in the onformcreate of Unit1 then
it is passed Ok to unit2; but this is not really what I wanted to
understand - somewhere in the
Eureka!
Found the answer under Public/D3 help.
QUOTE:
Use the public part to Declare data fields you want methods in objects in
other units to access
Declare methods you want objects in other units to access
UNQUOTE
(rugby beer and Delphi dont mix!)
Cheers,
Alistair
I have forgotten; can someone remind me:
I have a component in unit1, where a relevant call is:
IceLock.GetHDSerialNumber;
I need to make the same call in unit2.
The following is not right:
implementation {in unit2}
uses unit1;
{$R *.DFM}
And, yes, I have read the help!
thanks,
Al+
As it turns out, I have been fortunate enough to fall in with the pascal
Twain Guru. Who has written a wrapper for the Twain.H file into Pascal.
Currently it is documentless, and the calls are a bit bizzare, but he has
given me routines to initialize the system which is all I needed to get the
I like the JUST wrap it up - never having done that before.
So if what you are saying is as I read it - I know where the problems in the
C code are occuring and having done a bit of C in my time I could sort it
out. Now with this altered C source, can I JUST create a DLL from it which
will work?
Acht so. That is what I was wondering; if I could do without the C compiler
which I dont have and the project doesnt justify further purchases. I need
to be able to do several changes to the C source and check it as I go along
against the hardware, so I need to have a handle on it at all times.
Hi all. The battle goes on. I have done a lot of work with the Twain
interface only to find that my new USB scanner with all the bells and
whistles seems to have its on damned control code, non-standard Twain,
which means that the user cant set units and so on out of the Acquire page.
I have
Does the Delphi (D3) utilities allow compiling of C source into OBJ file? If
so, a quick example please.
Tks,
Alistair+
---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website:
No. C++Builder allows C++ and Delphi code to be compiled into one app,
and Delphi (3,4) allows pascal to be compiled to an OBJ, but it doesn't
do C out of the box.
Would a DLL be of more use maybe???
What would be ideal is C to PAS source convertor! DLLs I dont like as they
add extra
Hi all. I am trying and getting very frustrated trying to check and see if a
scanner is connected or turned on in my program inteface. There doesnt seem
to be anything in Twain that serves the purpose. Here is what I have done
below 'which should' work, but doesnt. Any ideas?
MciOpen:
Belay that - just found the type for bitmap is integer max 32767
Is there any way I can negate the error without writing a new component?
---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Belay that again! I changed the way the code works, but unfortunately still
getting more errors due to the D3 integer value having problems with
overflow on 600 dpi scan. This gets more tricky - out with the bandaids.
Al+
am missing something. How does 360x270 have the aspect ratio
(is that what you mean by perspective) as 480x220 ?
On 30 Jun 99 at 12:08, Alistair George wrote:
I acquire an image from a scanner, which could be any size, and
it needs to
go into another image where the FRAME size remains
Well I dont think it is just a case of changing images.
Nicely, my Twain/Inteface soft provides a DIB. Also nicely, that goes into
the Timage, when stretch:=true albeit the wrong aspect. Sortof looks like I
going to have to do some scaling using orgsize/destsize and bitmap
manipulation from the
Ahh, I see where ur coming from; it aint that easy - I cant change the Image
size - it is fixed due to interface limitations.
CopyDibIntoImage(TestDib, Image2);
image2.Picture.Bitmap.Height:=clientheight;
image2.Picture.Bitmap.width:=clientwidth;
With the above image2
Sounds brilliant, I'll give it below a shot.
Should not matter which way it is done.
If you change the TImage size first, then image gets cropped and
when set Stretch =True, then see whole image at right ratio.
If you set Stretch= True first, then see whole image (wrong
ratio) and see it
I acquire an image from a scanner, which could be any size, and it needs to
go into another image where the FRAME size remains consistent.
This means that say the acquired image is 480 wide and 220 height the
resulting image retains the perspective but shrinks, or expands the scanned
image. For
Hi all.
I am setting up a scanner software which requires a function
setimagesource(hwnd) before the acquire. Currently, I have no scanner to
test the function on.
Q: In this case would it be valid to get the handle, and unless the source
changes, write that value to the registry, and use it on
Thanks Wade, but thats Win 95 specific.
If you want to select a directory, what's wrong with using
SHBrowseForFolder?
The following works, and doesnt use another component, but I HATE using
Cancel!:
procedure TCamForm.SetDIR1Click(Sender: TObject);
begin
setdir1.Tag := 1; {use the tag for a
With ShowWindow(Application.Handle, SW_HIDE), I am unsure of where to put
this in my code. It won't work inthe oncreate for the form but it
does work
in a button or something. Any suggestions where to put it?
Do the following in your project file eg myapp.dpr (I use a tray icon in the
Whoops, that wasnt showmain you wanted, it was a popup menu item. In the
events page of your tray icon use click event and call the click proc
'Popmenu' use code like the following:
procedure TPRForm.Popmenu(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
I have asked a similar question, where in my app I use TImageList and
TtreeView, the problem was the treeview failed to show images. Alistair
told me that it was ComCtl32.dll version problem.
This time I was reported that, in a customer's machine, when viewing
the icon files *.ico in
I Have to do a whole stack of files and directories ??
Richard
I've been toying with the idea of making a freeware duplicator program which
doesnt do a diskcopy as such, which slows replication down. There is a whole
heap of stuff:
http://sunsite.icm.edu.pl/delphi/
One Ive picked up looks
Hi Juan.
Here is what I do for a shareware nag. Your mainform needs to be opened, but
you can have it hidden until the window of interest is, as would be in your
case, timed out.
Dont worry about complete blocks, I have cut out some registration code, so
there might be an incorrect balance of
Good question - case of me learning more every day. Thanks for bring that to
my attention.
Al+
Why do you draw to a Bitmap and then draw the bitmap to the form.
Can't you just draw the JPEG direct to the form since in both cases
you're drawing to a TCanvas. Hide the form borders (Should the
This might give you a starting point:
The color depth of a canvas is calculated by multiplying
the number of bits per pixel that is required for a
given canvas by the number of planes the canvas uses.
You can find the color depth of a canvas in by using the
following code:
Weird thing is that the errors occur everytime on a Win95 laptop we have
here (and the clients Win95 machines) but not the Win98 machines that we
have tried (with the same modem init strings, port settings etc).
Win 98 is much better for serial coms, but you could try playing around with
one
Reminds me - need to ask Borland to include a serial port component in
Delphi 5 or 6. Damm fustrating not having one built in...
You'd be lucky! I was on their case years ago on their DOS C compiler for
this.
---
New
You could try TFastBMP which I wrote about some time back - its free and
really good.
The URL is under GFody at the bottom of my web page below.
Alistair Grant George
http://members.xoom.com/A_George/CamSnap
---
New
Rohit you probably already know this, but if you havent rebooted you can
reinstigate all your previous registry settings as they are backed up on
each Windows entry:
Use the following batch. Restart in MSDOS mode - DONT REBOOT!
@echo off
echo Simple registry backup.
echo Windows 98 automatically
Jeremy there are DTMF chips to do this function BUT from what I gather you
are having a play, so lets see.how about using your sound card with
Electret mic stuck onto the handpiece?? Use Delphi to decode the frequencies
and write your own lookup tables; should be a piece of cake for a man of
ShotInTheDark Paul but did you read my mail before on compatibility
with desktop settings?
Cheers,
Al+
Anyone help with this one ?
I have a quick report that works fine except on a particular machine
running Win95 the speedbutton glyphs are missing on the
Have you set the HelpContext under the components properties? Also you must
set the application.helpfile property.
Has anyone got an example of how to get this going?
No events seem to fire when this border icon is selected.
Make Outlook Express as your 'default simple MAPI' and it should work ok.
Cheers.
I hope someone can point me in the right direction.
Does anyone know if Delphi can hook into Outlook Express
messaging. I can do
this ok with Outlook 97/98 (Mapi) but I can't find any info about Outlook
Only run 95 and 98 here. Have seen it happen maybe twice, but have done it
just now, and seems OK.
I've seen a couple of apps cause this... I didn't knwo the cause but
now I suspect that they are D3 apps ;)
---
New
Hi all. We have had discussions on fonts, and form sizes under different
screen resolutions, but here is a new one to me, which caught me out. Worthy
of noting down for your future developments if you havent considered this
aspect:
QUOTE:
Hi there: Since not all users (including me) don't run the
James its most likely you already know this and want context-sensitive help
right?
But the standard way of stopping form minimise is to design your mainform
without minimize, but this stops context-sensitive help, which is either an
inherant problem with Windows, or Delphi form component.
Cheers,
Pat maybe the probs with the icon handle, by not pre-allocating it?. try the
following;
function AddIcon(FileName:string; FileIndex:word):integer;
var FileCon:hicon;
begin
FileCon:=ExtractAssociatedIcon(hInstance,PChar(FileName),FileIndex);
if
Behalf Of Shen Dongbo
How do I unsubscribe from this list ?
Follow me - the DB group that we were going to have hasnt eventuated so its
goodbye from me too.
Go to URL http://www.delphi.org.nz/
and unsubscibe there.
Regards to all,
Alistair George
Here is a little bit of code I wrote that may be useful, it does what you
want anyway:
var Pstate:word;
procedure TCamForm.PopMsgS(PSentstate: word; SMsg: string);
var
p: TPoint;
begin
if PSentstate = Pstate then exit;
DynaMenu.caption := SMsg; //just use a menuitem here
I am trying to do a file association just to get the apps icon associated
with a special file type I create. It worked once, but since then (I double
checked by removing the reg entries) it wont make these .jps files appear
with the associated icon. Anyone see why?
r := TRegistry.Create;
Actually, my call to Execute file is a morph of ShellExecute, so it returns
a handle:
myhandle:=ExecuteFile('mailto:[EMAIL PROTECTED]?subject='+regstring, '',
'',SW_SHOWNOACTIVATE);
while (waitforsingleobject(myhandle,infinite)=WAIT_OBJECT_0)
and not(escape) do application.ProcessMessages;
I gave you an example, but I see why you ask. To make it clearer eg for a
key in the mainform.keydown
//to trap escape
if Key = VK_ESCAPE then
Key = 0;
I expected for a mouse event on a menu the following would work:
procedure TMainForm.Menu1Click(Sender: TObject);
begin
sender:=nil;
end;
program it myself, but why
re-invent the wheel?
There are no examples in D3 for this and to save anyone trouble, would you
be able to point me to a demo resource which does this?
tks,
Alistair George
---
New Zealand Delphi
Well RAW didnt work, but heres some useless information that you could
categorise under the 'Jammy' type:
if bitmap.PixelFormatpf24bit then bitmap.PixelFormat:=pf24bit;
{ripleys believe it or not - works}
Alistair+
---
This should be a piece of cake, but I cant find any way to detect the
movement of a mainform apart from using a messy movedhoriz:=Mainform.left,
movedvert:=mainform.top to locate the windows position, then check it
against the values from time to time.
Theres gotta be a better way??
Whats
I need to set a callback function with a Windows call, but cant figure out
how to point to a function in my program. For example
Callback(hwnd, fpProc);
Where fpProc is Address of the callback function.
Say my function in current proceedure is
Tmainform.beeper:boolean;
begin
end;
right thru to the latest.
Cheers,
Alistair George+
---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
,
Alistair George+
My ICQ below:
ICQ #
29003462
it.
If there is sufficient interest I will post the results here
in a week.
Cheers,
Alistair George+
Pse forget; found that it was the assigning of
JPEG image.
Tks,
Alistair+
{Writing}
for f := 0 to
ImageList2.Count-1 do
begin ImageList2.GetBitmap(f,
bitmap);
MYJPEG.Assign(bitmap);
MYJPEG.SaveToStream(theMemStream);
if theMemStream.Size 0 then
begin size :=
theMemStream.Size;
theFileStream.Write(size,
SizeOf(size));
theMemStream.Seek(0,
Thanks to Dennis for info on Window handle. From
your info, it seems I will have to alter the API call which is the offender. It
is
CapCreateWindow(params., and it may prove to be the only viable
solution instead of how I did it following...
In fact, it is not the API which is
CreateWindow('', WS_CHILD or
WS_VISIBLE, 0, 0, panel1.Width,
panel1.Height, panel1.Handle, 0);
Makes a window, but on some computers
there is no control over the window unless HwndC is destroyed. EG a minimise of
mainform still leaves the Child floating on desktop.
It is dependent on
Had another idea; you will have to search for it
though.
I have forgotten, but there is a Windows API call
to get the handle of each window on the desktop. By doing this, you will be able
to refresh each one.
Sorry I misconstrued your requirement - thought you
meant the desktop itself.
Is it still Sunday??
To kick it off, I have problems with
handles.
I have created a handle to a Panel and the
handle hasnt been destroyed properly by my superbly coded program.
Next time after it crashes I try to re-instate
the windows handle: hwndC, the handle is able to be initialised,
Hi on the offchance someone has seen this
before:
I have written some software which takes a
canvas from an Image, or the windows handle and pops it onto the
clipboard.
Works nice on 2 machines, but my latest
high-flying AMD K6 will not under any circumstances allow the frame on the
Can someone enlighten me
This is just a component for saving a bitmap
picture and displaying recognised filetypes right?
Why I ask is that the filetypes of save include
GIFin the component, but if you try to save a GIF then an error
occurs.
I suspect that one has to use a 3rd party or
buf:array[0..255] of char;
ln:integer;
begin
ln:=sizeof(buf);
wnetgetuser(nil,buf,ln);
label.caption:=strpas(buf);
end;
Can someone show me how to use this? What is the lpszLocalName parameter
set
to when connecting to a Windows 95 peer to peer network?
In this case, the answer is nil.
Place a global counter in the onevent handler, inc
the event eachtime an instance occurs and dec the
event each time a loop is completedin a for.. or while.. loop, which
keeps running till the loop is zeroed, in the same eventhandlerproc.
I have an event that can be triggered many times.
Suck it and see; if the resolution of the machine is significantly greater
than the incoming events, all should be well and good.
Cheers.
A flag implies a line of code that says
//No, flag should be getting the number of events var flag:integer;
x.onevent(blabla)
begin
flag:=flag+1;
if
Sorry, that would have been a help - ActiveX.
Alistair
//I added Registry,ShlObj,OLE2,ComObj to
uses clause, but the first line
Advice pse:
with a PAS source, compiled then as a component. Later alter PAS source and
want component to reflect the change. I understood that by deleting the DCU
file the component would be rebuilt with the changes in PAS source, but this
doesnt appear so.
Whats the quickest way to do this
Hi Yanbo;
It aint easy. I have worked with that one too. There are some freeware
components which help to do Simple MAPI, but depending on Win 95/98
configuration the freeware prods are not totally reliable.
However there must be some way to do it with OLE, as if you right click a
file, then you
Yea, thats just it mailto:[EMAIL PROTECTED] works fine, but there are more
complications when dealing with attachments under the Win 95 bonnet; if you
care to look at WIN32S hlp you will see what I mean.
Al+
---
New
The Windows message to applications for shutdown is WM_close or
WM_ENDSESSION.
Hence I would interrogate for this message in the formclosequery proc of
your
program, and carry out the necessary actions according to the state of
WM_close.
Try the code out below and put a break on the wm_close line
James my penny worth. If you dont, you are liable, if you do, you are less
liable.
It is much more prevalent in the States than here, but unfortunately we are
following suit where unscrupulous characters can take money from legitimate
manufacturers, even by misuse of a product unless it is
First thing I'd suggest is you check the BIOS settings for the printer port.
Try various configurations, eg EPP ECP, and in particular check that the IRQ
if any, is not assigned to any other device.
It sounds hellova like you have a sharing problem with the hardware as the
problems you are
Sounds like you have the parameters wrong. Herewith an old reference that I
had lying around:
function WinExecAndWait32(FileName:String; Visibility :
integer):integer;var zAppName:array[0..512] of char;
zCurDir:array[0..255] of char; WorkDir:String;
StartupInfo:TStartupInfo;
can anyone point me to resource on how to make a .drv (driver in this case a
printer driver)
Cheers,
Al+
---
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website:
Aw, common,we all make mistakes, mostly not so glamorous though.
WHO (!!) can drink NOW ??!! I say we take a linching party to Auckland
airport to get John Hart when the A.B.'s fly back to NZ !! that
isIF he
even comes back...I Wouldn't .sob sob sob sob sob
Getting back on topic:
301 - 392 of 392 matches
Mail list logo