Re: [lazarus] GetKeyState

2008-02-03 Thread SteveG

SteveG wrote:

Vincent Snijders wrote:

SteveG schreef:
Just a note on the GetKeyState function from LclIntf - causes 
exception when used within a dll (mine anyway) -

same call direct (thru 'use Windows') works ok
Not sure as yet to report this as a bug, still doing eliminations in 
my own code




Do you use the interfaces unit in your dll? Otherwise you cannot use 
LCL  units.


Note that using the interfaces unit in the DLL gets you into 
different problems, because the global variables from the LCL are not 
shared between the DLL and the main program.


Vincent
Not using Interfaces currently (didnt know I needed it) - do I place 
it in the main unit only, or within each unit that 'uses' an Lcl 'uses' ?
Dont know if its relevant, but I use cmem within my App and Dll (seems 
to be the only way to get them to work)


How would I determine which functions are affected by the 'globals' 
problem - will it just not work, or give exceptions ?
I currently use a shared memory block between my app and dll (still 
looking for a x-platform for that) - is there a 'simple'ish way to 
make use of this to circumvent Lcl problems in the dll ?


Just tested with Interfaces in main unit, - fixes GetKeyState within 
DLL - Thanks Vincent :)



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] GetKeyState

2008-02-03 Thread SteveG

Vincent Snijders wrote:

SteveG schreef:
Just a note on the GetKeyState function from LclIntf - causes 
exception when used within a dll (mine anyway) -

same call direct (thru 'use Windows') works ok
Not sure as yet to report this as a bug, still doing eliminations in 
my own code




Do you use the interfaces unit in your dll? Otherwise you cannot use 
LCL  units.


Note that using the interfaces unit in the DLL gets you into different 
problems, because the global variables from the LCL are not shared 
between the DLL and the main program.


Vincent
Not using Interfaces currently (didnt know I needed it) - do I place it 
in the main unit only, or within each unit that 'uses' an Lcl 'uses' ?
Dont know if its relevant, but I use cmem within my App and Dll (seems 
to be the only way to get them to work)


How would I determine which functions are affected by the 'globals' 
problem - will it just not work, or give exceptions ?
I currently use a shared memory block between my app and dll (still 
looking for a x-platform for that) - is there a 'simple'ish way to make 
use of this to circumvent Lcl problems in the dll ?


Thanks - SteveG

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] GetKeyState

2008-02-03 Thread SteveG
Just a note on the GetKeyState function from LclIntf - causes exception 
when used within a dll (mine anyway) -

same call direct (thru 'use Windows') works ok
Not sure as yet to report this as a bug, still doing eliminations in my 
own code


SteveG

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Determining Crossplatform functions

2008-02-01 Thread SteveG

Thanks guys - this smooths things out for me a lot

Hess, Philip J wrote:

GetKeyState is in LclIntf unit, available on all platforms.

Look in LclIntf for cross-platform equivalents of Win API functions.

Thanks.

-Phil


-Original Message-
From: SteveG [mailto:[EMAIL PROTECTED]
Sent: Fri 2/1/2008 7:50 AM
To: lazarus@miraclec.com
Subject: [lazarus] Determining Crossplatform functions
 
Could anybody tell me if GetKeyState (and family) is cross platform or 
not ? - if not, is there a cross platform equivalent?


I know that it is ultimately connected to the winapi, but does fpc/laz 
redirect to suit platforms ?


On this note, is it at all possible to know which functions are 
x-platform and those not ? - ie if they pass thru 'this' unit/chain, 
they are ok, else not.


Thanks

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

  


_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Determining Crossplatform functions

2008-02-01 Thread SteveG
Could anybody tell me if GetKeyState (and family) is cross platform or 
not ? - if not, is there a cross platform equivalent?


I know that it is ultimately connected to the winapi, but does fpc/laz 
redirect to suit platforms ?


On this note, is it at all possible to know which functions are 
x-platform and those not ? - ie if they pass thru 'this' unit/chain, 
they are ok, else not.


Thanks

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] IntraWeb

2008-01-16 Thread SteveG



Marco van de Voort wrote:

On Thu, Jan 17, 2008 at 12:50:42AM +1000, SteveG wrote:

Just wondering if there has been any advance on an 'IntraWeb' interface at 
all ?


and secondly - is it at all possible to use a (licenced) copy of Intraweb 
itself within Lazarus ?



I'm not aware of any attempts. Indy works though (9 and 10)

But if you don't have full intraweb source for each an every component
(including parts in Delphi that FPC/Laz don't implement), then there is no
chance at all.

Maybe a quick AtoZed would give an idea?


Good idea - will contact AtoZed re: usage in FPC / Laz - Thanks

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] IntraWeb

2008-01-16 Thread SteveG
Just wondering if there has been any advance on an 'IntraWeb' interface 
at all ?


and secondly - is it at all possible to use a (licenced) copy of 
Intraweb itself within Lazarus ?


Thanks

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Dialog window in Init Final Section

2008-01-08 Thread SteveG
Anybody know of a cross platform way of showing a message dialog within 
the Initialization and/or Finalization of a unit ?


What I am after is an alert message if a dll fails to load / unload in 
the Init / Final section of the main unit. (GUI app)


Cant use ShowMessage as message loop not running yet (?), and writeln 
wont be seen if started from shortcut.


Thanks
SteveG

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] FPC unit in Lazarus

2007-12-08 Thread SteveG

John wrote:



just to be pedantic, fpcmkcfg.exe   (note first c in fpcmkcfg)


Very true - caught myself on that one originally as well - damn cut and 
paste :)



Isn't it in the bin\ subdirectory under the INSTALL_PREFIX dir ?
you can run fpcmkcfg.exe -d basepath=c:\directory\of\your\choice,
so you shouldn't have to do 5.


Ah - this is what I didnt do - I just ran fpCmkcfg.exe without any path 
specs - so had to edit the file manually (step 5 is history)


Wouldn't the basepath usually be the "grandparent" dir of the one in 
which fpcmkcfg lives ? In which case, this would be a useful switch to 
add to fpcmkcfg ?





6 - within Lazarus / Enviroment / Environment options
compiler path= c:\pp\fpc.exe
FPC source directory = c:\FPC (as suits your SVN download)


make install also makes a copy of the source under the compiler 
directory, in this case c:\pp.

Is one preferable to the other ?


I dont seem to have any source files (.pp / .pas) under the 'built' 
folders and Lazarus wont accept the 'c:\pp' directory structure

but worked ok with the SVN layout of the orig FPC.
Would make more sense to have them in 'c:\pp' as well, so possibly I 
have missed something else as well ?






_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] FPC unit in Lazarus

2007-12-07 Thread SteveG

Steps to use FPC svn build within Lazarus (Windows)

1 - Have a current Lazarus working binary installed (requires access to 
GNU utilitys within the c:\lazarus\fpc\?.?.?\bin\i386-win32 folder)


2 - Set system Path to include c:\lazarus\fpc\?.?.?\bin\i386-win32

3 - Download SVN copy from FPC (http://svn.freepascal.org/svn/fpc/trunk)
  - save to local folder (eg. c:\FPC)

4 - Build FPC
  - cd \FPC
  - make clean all
  - cd compiler
  - make cycle
  - cd ..
  - make install INSTALL_PREFIX=c:\directory\of\your\choice (eg. c:\pp)
  - run c:\pp\fpmkcfg.exe (to create fpc.cfg)

5 - edit c:\pp\fpc.cfg to incorporate pathings
  - all non-commented lines beginning with '-Fu' and '-FD'
for example
 '-Fu/units/$FPCTARGET/' -> -'Fuc:\pp\/units/$FPCTARGET/'

6 - within Lazarus / Enviroment / Environment options
compiler path= c:\pp\fpc.exe
FPC source directory = c:\FPC (as suits your SVN download)
Make path= c:\lazarus\fpc\?.?.?\bin\i386-win32\make.exe

7 - Do FULL clean and build of Lazarus


NOTES -
I believe these steps worked for me, but needs testing.

Are the GNU utilitys available seperately as a group/package, or a list 
of necessary files available ?

(this would change Steps 1 & 2 & 6)

Is it possible to have the fpmkcfg.exe program create the pathing within 
the cfg file (saves editing) - or did I do something wrong here ?

(this would eliminate Step 5 completely)

If somebody(s) could help / verify all of this, I will add it to the wiki.


Vincent Snijders wrote:

SteveG schreef:


If I can use FPC (svn) and compile myself, is there a method /
application which will extract the necessary files from the FPC build
and create a tree structure to suit Lazarus?

Or is there a reference describing how to edit Lazarus pathings to use
the FPC build directly ?



make install INSTALL_PREFIX=c:\directory\of\your\choice

in the environment options, set the compiler path to 
c:\directory\of\your\choice\fpc.exe


run c:\directory\of\your\choice\fpmkcfg.exe

Optional: write this down in the wiki for future reference after testing.

Vincent

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] FPC unit in Lazarus

2007-12-04 Thread SteveG

If I can use FPC (svn) and compile myself, is there a method /
application which will extract the necessary files from the FPC build
and create a tree structure to suit Lazarus?

Or is there a reference describing how to edit Lazarus pathings to use
the FPC build directly ?

Thanks

Vincent Snijders wrote:


SteveG schreef:

Awhile ago I found that the following 2nd line 
(C:\lazarus\fpc\2.2.1\source\rtl\objpas\fmtbcd.pas) causes problems 
when using database access units in a dll. (note the space at front of 
line)


{$r+,q+,s+}
{ $r-,q-,s-}

Removing the space fixes the problem for me, though may cause others 
yet unknown.


Question 1 - How would I determine if this has been fixed without 
downloading a full snapshot ?.
I can use the WebSvn interface to check Lazarus source, but not the 
fpc used by Lazarus (which I am assuming to be different to the 
current FPC source - patches etc).



FPC 2.2.1 is from the fixes_2_2 branch, unmodified.



Question 2 - How could I fix this for myself ?
I have the latest svn from FPC, compiled ok - but how do I use this 
with Lazarus? - paths etc are all different - and will this negate any 
Laz specific patches applied by the Laz developers ?



We don't apply any specific patches at this moment.

Vincent

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] FPC unit in Lazarus

2007-12-03 Thread SteveG
Awhile ago I found that the following 2nd line 
(C:\lazarus\fpc\2.2.1\source\rtl\objpas\fmtbcd.pas) causes problems when 
using database access units in a dll. (note the space at front of line)


{$r+,q+,s+}
{ $r-,q-,s-}

Removing the space fixes the problem for me, though may cause others yet 
unknown.


Question 1 - How would I determine if this has been fixed without 
downloading a full snapshot ?.
I can use the WebSvn interface to check Lazarus source, but not the fpc 
used by Lazarus (which I am assuming to be different to the current FPC 
source - patches etc).


Question 2 - How could I fix this for myself ?
I have the latest svn from FPC, compiled ok - but how do I use this with 
Lazarus? - paths etc are all different - and will this negate any Laz 
specific patches applied by the Laz developers ?


If this is already covered in a wiki or similar - sorry - please point 
me to the link.


Thanks - SteveG

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Program Execute

2007-11-24 Thread SteveG

This does the job for now though - Thanks Sergei

Sergei Gorelkin wrote:


SteveG wrote:

Anybody know of a way to use TProcess to call the default program in 
WinXP ? - eg call for test.pdf to be opened, and it opens it with 
Acrobat (or currently assigned program).


I know that ShellExecute manages this, but trying to keep everything 
cross platform.


Under Windows, you can use TProcess to execute "start.exe test.pdf". Of 
course, this still isn't crossplatform at all, but the issue is reduced 
to a string constant.


Regards,
Sergei


_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Program Execute

2007-11-24 Thread SteveG
Anybody know of a way to use TProcess to call the default program in 
WinXP ? - eg call for test.pdf to be opened, and it opens it with 
Acrobat (or currently assigned program).


I know that ShellExecute manages this, but trying to keep everything 
cross platform.


If not TProcess, any other method ?

Thanks - SteveG

have a list of functions I need cross platform equivalents for, but will 
work up slowly :)


_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Laz / Fpc function listing

2007-11-20 Thread SteveG

Tiziano - this is exactly what I was looking for

already have found 14 functions I didnt know about, and can replace
within my own code.

Thanks for your time on this


Tiziano De Togni wrote:

SteveG wrote:

Would anybody know if there is a listing (or some way of building one) 
of all functions available for Lazarus and/or Fpc ?



maybe the short answer is simply: no.

But I am pleased that people are asking for something I'm currently
working on :-)

Look at this chart:  http://digilander.libero.it/tizzziano/pdf/procs_01.pdf

It was made looking into the FPC pdf documentation and surfing on the
source code of the RTL libraries.

It's only a draft version. Suggestions are welcome.

tiziano


_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Laz / Fpc function listing

2007-11-17 Thread SteveG



Would anybody know if there is a listing (or some way of building one)
of all functions available for Lazarus and/or Fpc ?


Why not look at the online (fpdoc) documentation...  or use the
Lazarus 'Find in files...' search feature and search the source
folders for a keyword.


Working my way (slowly) thru the source tree now -
has the added advantage of learning a bit more about how Laz is put 
together as well


Just looking for a lazy way out :)

My main issue is how to find (ie where to look) for cross platform 
functions etc - eg GetKeyState in Win - perhaps it has an equivalent 
function within Laz/Fpc for crossplat's


will try the 'find in files' though - Thanks

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Laz / Fpc function listing

2007-11-16 Thread SteveG
Would anybody know if there is a listing (or some way of building one) 
of all functions available for Lazarus and/or Fpc ?


I'm sure a lot of us (programmers) are re-inventing many wheels out 
here, especially if writing for multiple platforms


Thanks - SteveG

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Recompile FPC unit

2007-11-16 Thread SteveG

I (think) I have found an error in the FmtBCD unit
(from C:\lazarus\fpc\2.2.1\units\i386-win32\rtl )

A simple empty dll will not load if this unit (or any 'using' it is used.
So far as I can tell, the problem 'seems' to be with the following lines

{$r+,q+,s+}
{ $r-,q-,s-}

Remove the space at the front of the second line, problem disappears.
I found this by 'using' a copy of the unit under a different name, but
have no idea how to rebuild this unit for testing in the fpc directory.

How would I go about rebuilding just this unit (or the complete fpc dir) 
 when using a binary from Laz?
It seems that the version/structure used by Laz is different to the 
standard from FPC if SVN used from FPC?


Thanks muchly - SteveG

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Dll Sync

2007-10-25 Thread SteveG

I will create a small example and post when done - Thanks

Sergei Gorelkin wrote:


SteveG wrote:


error occurs with fpc 2.2.1, works ok with 2.0.4

I was thinking possible threading in relation to LCL access?
I have since found that the same code in the dll works ok if I call it 
from a syncronised function in the main app.


Your code example is thread-safe by itself if it is contained within a 
single function. This is because variables are located on the stack and 
no global data is accessed (except the memory manager). Maybe you have 
to tell the memory manager of DLL that your application is multithreaded 
(by setting IsMultiThreaded := True during DLL initialization).


If your application contains threading and LCL access, please try to 
provide a more complete example. Otherwise it is hard to guess what is 
going wrong.


Sergei



Sergei Gorelkin wrote:


SteveG wrote:


Could anyone tell me why the following code fails within a dll?

Worked ok with Laz 9.14, but no longer with Laz 9.23 (WindowsXP)
The same code works fine out of the dll - seems to want to sync with 
LCL thread I guess?




 > Access Violation at the 'doc.Appendchild(N);' line
 >
 > var doc :TXMLDocument;
 > N   :TDOMNode;
 >
 >  doc := TXMLDocument.create;
 >  N   := TDOMNode.create(doc);
 >  N   := doc.CreateElement('root');
 >  doc.Appendchild(N);
 >  writeXMLFile(doc, 'C:\Test.xml');
 >  FreeAndNil(doc);
 >

It's hardly a threading issue, because XML package does not use 
threading in any way.


What version of compiler do you use, 2.0.4 or 2.2.0?

Sergei

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives




_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Dll Sync

2007-10-25 Thread SteveG

error occurs with fpc 2.2.1, works ok with 2.0.4

I was thinking possible threading in relation to LCL access?
I have since found that the same code in the dll works ok if I call it 
from a syncronised function in the main app.



Sergei Gorelkin wrote:

SteveG wrote:


Could anyone tell me why the following code fails within a dll?

Worked ok with Laz 9.14, but no longer with Laz 9.23 (WindowsXP)
The same code works fine out of the dll - seems to want to sync with 
LCL thread I guess?



 > Access Violation at the 'doc.Appendchild(N);' line
 >
 > var doc :TXMLDocument;
 > N   :TDOMNode;
 >
 >  doc := TXMLDocument.create;
 >  N   := TDOMNode.create(doc);
 >  N   := doc.CreateElement('root');
 >  doc.Appendchild(N);
 >  writeXMLFile(doc, 'C:\Test.xml');
 >  FreeAndNil(doc);
 >

It's hardly a threading issue, because XML package does not use 
threading in any way.


What version of compiler do you use, 2.0.4 or 2.2.0?

Sergei

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Dll Sync

2007-10-25 Thread SteveG

Could anyone tell me why the following code fails within a dll?

Worked ok with Laz 9.14, but no longer with Laz 9.23 (WindowsXP)
The same code works fine out of the dll - seems to want to sync with LCL 
thread I guess?

Access Violation at the 'doc.Appendchild(N);' line

var doc :TXMLDocument;
N   :TDOMNode;

 doc := TXMLDocument.create;
 N   := TDOMNode.create(doc);
 N   := doc.CreateElement('root');
 doc.Appendchild(N);
 writeXMLFile(doc, 'C:\Test.xml');
 FreeAndNil(doc);



Which brings me to another question :)
When using a dll, there are many functions / operations which require 
access via LCL - therefore syncing necessary

Is there any way to 'sync' without using another thread ?
As a (possibly bad) example, the only part of the above code that seems 
to need sync is the 'appendchild' line.

How to 'sync' just this function, not the complete code block
(have other examples if necessary)

Thanks

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] What about a Lazarus church to raise money?

2007-07-29 Thread SteveG

fully support this idea

Giuliano Colla wrote:

My company badly needs Lazarus. Therefore it could pay some money in 
order to support it, and contribute to keep the Lazarus project alive. 
From the postings in this mail list I believe that many others are in 
a similar condition.




_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Images on Clipboard

2006-09-20 Thread SteveG

Drat - forgot - using Windows
SteveG wrote:

Can anybody tell me if Lazarus is yet capable of cut (from other 
applications) and pasting  graphic images into a TImage

Thanks

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Images on Clipboard

2006-09-20 Thread SteveG
Can anybody tell me if Lazarus is yet capable of cut (from other 
applications) and pasting  graphic images into a TImage

Thanks

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Database create question

2006-05-30 Thread SteveG

Thanks Ido
 would the query not first need to be attached to a transaction, which 
is in turn attached to a database ?
I would like to create the actual database file on the disk, so there 
must be a function (I guess) to begin with


ik wrote:


Hi,

Do you mean the SQL syntax or the functions in the component needed to 
do so ?


For SQL syntax it is :
create database ;

Usually (I never worked with SqlDb) the syntax is
Query.Lines.Add(SQLStatment);
Query.Execute;

There are other ways as well to execute a query (speacialy when you do
not expect it to return a value at the end like the above query), so
please also take a look at
http://wiki.lazarus.freepascal.org/index.php/Lazarus_Database_Tutorial
for additional examples ...

Ido

On 5/29/06, SteveG <[EMAIL PROTECTED]> wrote:


Would somebody be able to point me in the correct direction for creating
a database (the actual file, not a table within it)
for Interbase using the SqlDb components ?

Thanks



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Database create question

2006-05-28 Thread SteveG
Would somebody be able to point me in the correct direction for creating 
a database (the actual file, not a table within it)

for Interbase using the SqlDb components ?

Thanks

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Ping server form Lazarus

2006-03-08 Thread SteveG
Try the Synapse librarys (no components, just standard functions) - 
works well - www.ararat.cz/*synapse*/


Pēteris Bērzs-Bērziņš wrote:



Does anyone can sugest example how to ping from lazarus (runing on WinXP)

PBB

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

 



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Executing another application from within a lazarus app

2006-03-08 Thread SteveG
Reading the source, it would seem that the line 
'Process.Input.Write(InputStrings[1], length(InputStrings));' sends 
whatever is contained in 'inputstrings' to the process as though

typed on the keyboard - is this correct?
if yes, then I am having problems both with my test program, and the 
supplied attachment - neither cause any response from the program I am 
trying to control
if no, could somebody pls explain / point me to an example to show how 
to send keystrokes to a running TProcess ?


Using WinXP
Thanks

Mattias Gaertner wrote:


On Tue, 07 Mar 2006 15:14:12 +0100
Vincent Snijders <[EMAIL PROTECTED]> wrote:

 


Mattias Gaertner wrote:
   


On Tue, 7 Mar 2006 15:48:38 +0200
"A.J. Venter" <[EMAIL PROTECTED]> wrote:


 


On Tuesday 07 March 2006 14:49, Sam Washkansky wrote:

   


Thanks a lot I would appreciate that.
Cheers
Sam

 


Here you go, I´m not going to post the whole huge unit now, just the two
   

procedures, you can use them as you see fit, they are pretty much just 
adaptations of the examples in the tutorial anyway (note that they are 
overloaded):
   


Has anyone an example, how to pipe some text to a process. For example
piping some text to a 'grep' command?


 


I made this last summer, I never got time to update the wiki. It is a
sample  application with TProcesses. The examples has two plink (ssh
client) command lines.  You can type the commands in the memo and see the
output.
   



Thanks. I will try and if it works add it to the wiki.

Mattias

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

 



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Pausing in DLL

2006-03-02 Thread SteveG

In this specific instance -
I am within Program One and run another (from within the dll) - Program Two
Program Two creates an instance of  TSimpleIPCServer once running
I need Program One to 'pause' the function that started Program Two 
until the IPCServer is active,

but I still need Program One's Form / Messages to continue

Also a couple of other functions that require actions from processes 
that are started, then wait till active.
Not all of the exe's using the FPC dll are written in FPC/Laz - 
therefore cant rely on access to Application.ProcessMessages ?



Michael Van Canneyt wrote:




On Fri, 3 Mar 2006, SteveG wrote:

Would anybody know how to implement a 'pause' routine within a dll 
(WinXP)
Sleep stops the app from responding, and calling 
Application.ProcessMessages within a loop causes illegal ops



Define 'pause' ?
What should still happen during the pause and what not ?

Michael.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Pausing in DLL

2006-03-02 Thread SteveG

Would anybody know how to implement a 'pause' routine within a dll (WinXP)
Sleep stops the app from responding, and calling 
Application.ProcessMessages within a loop causes illegal ops


Any ideas ?

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Interbase library

2006-02-23 Thread SteveG

Sorry - should have stuck Joost's name on top for relevance

SteveG wrote:


Adding the line didnt seem to make any diff -
this is the ordering of my code if thats any help

 SqlT   := TSqlT.Create(NIL);
 SqlQ   := TSqlQ.Create(NIL);

 DbConn[DatabaseOffset].SqlD.Transaction := SqlT;
 SqlT.StartTransaction;

 SqlQ.Database := DbConn[DatabaseOffset].SqlD;
 SqlQ.ParseSQL := FALSE;
 SqlQ.SQL.Text := QueryStr;

Joost van der Sluis wrote:


Could you try it again with ParseSQL := False?

If that works it's still a bug, but then I know where to look at it.

 



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Interbase library

2006-02-23 Thread SteveG

Adding the line didnt seem to make any diff -
this is the ordering of my code if thats any help

 SqlT   := TSqlT.Create(NIL);
 SqlQ   := TSqlQ.Create(NIL);

 DbConn[DatabaseOffset].SqlD.Transaction := SqlT;
 SqlT.StartTransaction;

 SqlQ.Database := DbConn[DatabaseOffset].SqlD;
 SqlQ.ParseSQL := FALSE;
 SqlQ.SQL.Text := QueryStr;

Joost van der Sluis wrote:


Could you try it again with ParseSQL := False?

If that works it's still a bug, but then I know where to look at it.

 



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Sqlite in ReportManager

2006-02-22 Thread SteveG
Sorry, not using Laz to compile RM, just using the supplied Designer and 
running from data created with Laz
There is some talk on the RM yahoo group about getting it to work with 
Laz/Fpc though


Graeme Geldenhuys wrote:


Does that mean you are using ReportManager with Lazarus?  I used
ReportManager in my previous Delphi/Kylix project and it worked really
well. My reporting was done from Objects and not a Dataset though -
and all generated at runtime.

Can you compile ReportManager under Lazarus?  I haven't tried yet.

Regards,
 - Graeme -


On 2/22/06, SteveG <[EMAIL PROTECTED]> wrote:
 


Has anybody managed to get ReportManager
(http://reportman.sourceforge.net/) to work with Sqlite databases ?

not 'directly' related to Laz/Fpc, but what the hey - most database
programs need reports eventually

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

   



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

 



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Sqlite in ReportManager

2006-02-22 Thread SteveG
Has anybody managed to get ReportManager 
(http://reportman.sourceforge.net/) to work with Sqlite databases ?


not 'directly' related to Laz/Fpc, but what the hey - most database 
programs need reports eventually


_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Compile without link

2006-02-22 Thread SteveG
Exactly - a shortcut (perhaps Shift-Ctrl-F9) to compile only - otherwise 
it is necessary to insert / remove the compiler switch (which sort of 
defeats the fast check attempt)

Graeme Geldenhuys wrote:


The -s option in the Project -> Compiler Options -> Other -> Custom
options will do that, but maybe a option in the Run menu would be
nice, or some keyboard shortcut.

Regards,
 - Graeme -


On 2/22/06, SteveG <[EMAIL PROTECTED]> wrote:
 


sounds close to what I am after - is there any way to just compile (not
link) even if no errors found? - same thing, just testing for basic
errors in ongoing code

Florian Klaempfl wrote:

   


SteveG wrote:


 


I have noticed that many of my 'typos' are caught at the compile stage -
then have to wait for the linker (for no reason at this point, since I
already know I have problems)


   


If the program doesn't compile, it isn't linked?
-s does the trick on the command line.



 


Christian Iversen wrote:



   


On Wednesday 22 February 2006 13:18, SteveG wrote:




 


Can anybody tell me how (if possible) to compile a Laz program, but skip
the linking step ?



   


I'm not sure exactly how to do that.

What are you trying to do?





 



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Compile without link

2006-02-22 Thread SteveG
sounds close to what I am after - is there any way to just compile (not 
link) even if no errors found? - same thing, just testing for basic 
errors in ongoing code
 
Florian Klaempfl wrote:



SteveG wrote:
 


I have noticed that many of my 'typos' are caught at the compile stage -
then have to wait for the linker (for no reason at this point, since I
already know I have problems)
   



If the program doesn't compile, it isn't linked?
-s does the trick on the command line.

 


Christian Iversen wrote:

   


On Wednesday 22 February 2006 13:18, SteveG wrote:


 


Can anybody tell me how (if possible) to compile a Laz program, but skip
the linking step ?
 
   


I'm not sure exactly how to do that.

What are you trying to do?



 


_
   To unsubscribe: mail [EMAIL PROTECTED] with
  "unsubscribe" as the Subject
 archives at http://www.lazarus.freepascal.org/mailarchives

   



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

 



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Interbase library

2006-02-22 Thread SteveG
Can do - possibly not till tomorrow though - have pulled my program 
apart (again) and need to get it stable to test
understand about the Dt & Tm - customer wants them this way for older 
program pulling data from file - cant (or wont) reformat to suit up the line

(what can you do, they pay the bills - indirectly)

Joost van der Sluis wrote:


Could you try it again with ParseSQL := False?

If that works it's still a bug, but then I know where to look at it.

Ow, and could you try to remove the TimeIn (12:55) ? And the DateIn
(22/02/2006) ?

On Wed, 2006-02-22 at 13:29 +1000, SteveG wrote:
 


Drat - spoke (or typed) too soon
can you tell me whats wrong with this line (works ok using the Interbase 
unit)
INSERT INTO NLISTest (RecIdent, DateIn, TimeIn, Agent, Lot, Paint, 
HeadCount,TagCount, ClientPIC, ClientNVD, ClientNAME, BeastPIC) VALUES ( 
'1370984712', '22/02/2006', '12:55', 'A1', '0', 'P1', '0', '0', 
'XXX-03', 'XXX-03', 'XXX-03', '' )


fails with the following err:
PREPARESTATEMENT: [LF] -DYNAMIC SQL ERROR[LF] -SQL ERROR CODE = 
-104[LF] -TOKEN UNKNOWN - LINE 1, CHAR 176[LF] -A1


Thanks

   



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Compile without link

2006-02-22 Thread SteveG
I have noticed that many of my 'typos' are caught at the compile stage - 
then have to wait for the linker (for no reason at this point, since I 
already know I have problems)


Christian Iversen wrote:


On Wednesday 22 February 2006 13:18, SteveG wrote:
 


Can anybody tell me how (if possible) to compile a Laz program, but skip
the linking step ?
   



I'm not sure exactly how to do that.

What are you trying to do?

 



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Compile without link

2006-02-22 Thread SteveG
Can anybody tell me how (if possible) to compile a Laz program, but skip 
the linking step ?


_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Interbase library

2006-02-21 Thread SteveG

Drat - spoke (or typed) too soon
can you tell me whats wrong with this line (works ok using the Interbase 
unit)
INSERT INTO NLISTest (RecIdent, DateIn, TimeIn, Agent, Lot, Paint, 
HeadCount,TagCount, ClientPIC, ClientNVD, ClientNAME, BeastPIC) VALUES ( 
'1370984712', '22/02/2006', '12:55', 'A1', '0', 'P1', '0', '0', 
'XXX-03', 'XXX-03', 'XXX-03', '' )


fails with the following err:
PREPARESTATEMENT: [LF] -DYNAMIC SQL ERROR[LF] -SQL ERROR CODE = 
-104[LF] -TOKEN UNKNOWN - LINE 1, CHAR 176[LF] -A1


Thanks

SteveG wrote:


Thanks Joost - working find now
does SqLite work using SqlDB, or is it seperate ?

Joost van der Sluis wrote:


On Tue, 2006-02-21 at 09:26 +1000, SteveG wrote:
 


Now I know I haven't a clue :)
If I remove the Interbase unit, Laz can no longer find the 
TIBDatabase / query / trans

So I assume from your examples I need IbConnection in the uses as well?
When I compile the alisttables.pp example, I get the error 
'SqldbExampleUnit.pp(80,72) Warning: Constructing a class 
"TIBConnection" with ab
stract methods' - which brings me back to where I began to have 
problems
  




_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Interbase library

2006-02-21 Thread SteveG

Thanks Joost - working find now
does SqLite work using SqlDB, or is it seperate ?

Joost van der Sluis wrote:


On Tue, 2006-02-21 at 09:26 +1000, SteveG wrote:
 


Now I know I haven't a clue :)
If I remove the Interbase unit, Laz can no longer find the TIBDatabase / 
query / trans

So I assume from your examples I need IbConnection in the uses as well?
When I compile the alisttables.pp example, I get the error 
'SqldbExampleUnit.pp(80,72) Warning: Constructing a class 
"TIBConnection" with ab

stract methods' - which brings me back to where I began to have problems
   



I was already affraid that you would see that. But if you take a good
look, you'll see that these are only warnings, and yo can ignore them.
The examples will compile.

These warnings are fixed in the latest svn-development branche, and I
admit it's somewhat confusing. 

 

Could you let me know how to correctly compile your examples please - 
I'm sure I can work it from there
   



Just did as you did above, and ignore the warnings.

Joost.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

 



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Interbase library

2006-02-20 Thread SteveG

Now I know I haven't a clue :)
If I remove the Interbase unit, Laz can no longer find the TIBDatabase / 
query / trans

So I assume from your examples I need IbConnection in the uses as well?
When I compile the alisttables.pp example, I get the error 
'SqldbExampleUnit.pp(80,72) Warning: Constructing a class 
"TIBConnection" with ab

stract methods' - which brings me back to where I began to have problems

Could you let me know how to correctly compile your examples please - 
I'm sure I can work it from there


Thanks again

Joost van der Sluis wrote:

If I follow it correctly, I place the 'Interbase, Ibase60Dyn' units in 
the uses section (this defines the flag for dynamic control)
   



Please remove the interbase unit, it's obsolete and doesn't work with
dyn. loading of the dll.

If you need a dataset that can work with Interbase you should use sqldb.

Joost


_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

 



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Interbase library

2006-02-20 Thread SteveG

Thanks Joost - having problems though

If I follow it correctly, I place the 'Interbase, Ibase60Dyn' units in 
the uses section (this defines the flag for dynamic control)
At the point just before I attempt to access the database, I place  'if 
LibLoaded = FALSE then begin LibLoaded := TRUE; InitialiseIbase60; end;'
(and then release it in the Finalization section of the unit -  if 
LibLoaded then ReleaseIbase60;)


This appears to make sense (if I have done it correctly), but I still 
receive the 'missing gds32.dll' error

Any suggestions ?


Joost van der Sluis wrote:


On Mon, 2006-02-20 at 22:57 +1000, SteveG wrote:
 

I have an (fpc) dll function library that contains code for both Server 
and Client programs being created.
The server code uses the Interbase unit to connect to firebird, but the 
clients do not need this.
Problem is the IB unit seems to automatically require, and attempts to 
access the gds32.dll (not present on the clients)
Is there anyway I can (thru code, not recompiling) only load the 
gds32.dll when required (ie when I say so)?
   



You can use the loadlibrary procedure with the other functions in the
Dynlibs library.

But why don't you simply use the ibase60dyn unit which is provided with
freepascal?

JoJo,
 Joost.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

 



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Interbase library

2006-02-20 Thread SteveG
I have an (fpc) dll function library that contains code for both Server 
and Client programs being created.
The server code uses the Interbase unit to connect to firebird, but the 
clients do not need this.
Problem is the IB unit seems to automatically require, and attempts to 
access the gds32.dll (not present on the clients)
Is there anyway I can (thru code, not recompiling) only load the 
gds32.dll when required (ie when I say so)?


using Windows XP, latest Laz/fpc

Thanks

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Using SqlDb

2006-02-19 Thread SteveG

Thank you Bram and Matthijs - now working fine

SteveG wrote:


Could anyone tell me what I am doing wrong with the following line

SqlD  := TSqlConnection.Create( NIL );   - generates -> Warning: 
Constructing a class "TSQLConnection" with abstract methods
I am using (trying to anyway) the SqlDb unit directly, not as an 
installed component (no Form)

suggestions very much appreciated

Thanks

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Using SqlDb

2006-02-19 Thread SteveG

Could anyone tell me what I am doing wrong with the following line

SqlD  := TSqlConnection.Create( NIL );   - generates -> Warning: 
Constructing a class "TSQLConnection" with abstract methods
I am using (trying to anyway) the SqlDb unit directly, not as an 
installed component (no Form)

suggestions very much appreciated

Thanks

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Interprocess Communication

2005-11-08 Thread SteveG
Thanks Michael - there wouldn't happen to be any examples of use / wiki 
areas that you know of ?


Michael Van Canneyt wrote:




On Mon, 7 Nov 2005, SteveG wrote:

There was talk recently of IPC methods being worked upon for Laz/FPC 
- (Windows)

Does anybody know if this was competed (or could be tried if not) ?



It depends on what you need.
The SimpleIPC (one-way) implementation is ready and works cross-platform.
I use it daily, so it definitely works.

Michael.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Interprocess Communication

2005-11-06 Thread SteveG
There was talk recently of IPC methods being worked upon for Laz/FPC - 
(Windows)

Does anybody know if this was competed (or could be tried if not) ?

Thanks

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] Scroll bars

2005-09-03 Thread SteveG

Thanks Mattias, but I dont seem to be able to get this to work.
I have tried
 if memo1.VertScrollBar.Visible then ShowMessage('v is visible');
 if memo1.VertScrollBar.IsScrollBarVisible then ShowMessage('v is 
visible');

and neither do anything

I'm using Windows XP if that makes a difference

Mattias Gaertner wrote:


On Sat, 03 Sep 2005 10:32:03 +1000
SteveG <[EMAIL PROTECTED]> wrote:

 


Is it possible to determine if the scroll bars are showing in a TMemo ?
Not just enabled, but actually showing if set for ssAuto
   



Memo1.VertScrollBar.Visible


Mattias

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



 



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Scroll bars

2005-09-02 Thread SteveG

Is it possible to determine if the scroll bars are showing in a TMemo ?
Not just enabled, but actually showing if set for ssAuto

Thanks

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] TCompression example

2005-09-01 Thread SteveG
Would anybody know where I could find an example of how to use the 
TCompression/ DeCompression Stream objects with files ?
I have figured how to use the compression to a file from the fpc 
example, but cant work out the decompression (recovering a compressed file)

TIA

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] Messages in Windows

2005-08-28 Thread SteveG
Could anybody tell me if it is yet possible to send messages between 
apps in Lazarus ?

eg -WM_USER in Windows
If not, any suggestions on how to send a signal to another app (no data) 
would be really appreciated


Thanks

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] TrayIcon

2005-08-10 Thread SteveG
Thanks guys - I understand this would only be useful on Windows, but 
still would like it to work :)
The code below works fine in delphi - cant seem to get it to work with 
Lazarus though.
I have commented the changes I have had to make to get it to compile / 
run in Laz.


Any ideas ?


unit Unit1;
{$mode objfpc}{$H+}
interface
uses Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, 
ExtCtrls, Windows, ShellApi;


const WM_ICONTRAY = WM_USER +1;

type
 { TForm1 }
 TForm1 = class(TForm)
   Image1: TImage;
   procedure Form1Create(Sender: TObject);
 private
   { private declarations }
 public
   { public declarations }
   procedure TrayMessage( var Msg: TMessage ); message WM_ICONTRAY;
 end;

var
 Form1: TForm1;
 TrayIconData :TNotifyIconData;

implementation

procedure TForm1.Form1Create(Sender: TObject);
begin

 with TrayIconData do begin
   cbSize := SizeOf(TrayIconData);
   hWnd   := 
Handle;   
// delphi -  Wnd := Handle;

   uID:= 0;
   uFlags := NIF_MESSAGE + NIF_ICON + NIF_TIP;
   uCallbackMessage := WM_ICONTRAY;
   hIcon := 
0; 
// delphi -  hIcon := Application.Icon.Handle;

   StrPCopy(szTip, Application.Title);
 end;
 Shell_NotifyIcon(NIM_Add, 
PNOTIFYICONDATAA(@TrayIconData));   // delphi -  
Shell_NotifyIcon(NIM_Add, @TrayIconData);


end;

procedure TForm1.TrayMessage( var Msg: TMessage );
begin
 case Msg.lParam of
   WM_LBUTTONDOWN: ShowMessage('Left button');
   WM_RBUTTONDOWN: ShowMessage('Right button');
 end;
end;

Initialization
 {$I unit1.lrs}
Finalization
 Shell_NotifyIcon(NIM_DELETE, PNOTIFYICONDATAA(@TrayIconData));

end.


_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] TrayIcon

2005-08-09 Thread SteveG
Hi - has anybody yet found how to implement a trayicon (system tray) for 
Lazarus under Windows XP ?

Any pointers much appreciated

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives