|
Home > Archive > Programming with dBASE > December 2005 > MousePointer - non standard icon
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
MousePointer - non standard icon
|
|
| Ronnie MacGregor 2005-11-30, 8:23 pm |
| Hi folks
Before I waste hours on doing this the API way .......
Has anyone used a non standard MousePointer Icon, that could provide a
code sample ?
Does anyone know how to use :
MousePointer = 4 // Icon
In a quick sample form (following) the cursor icon is "thin air" <g>,
how do I use an Icon here ?
What I am trying to do is have a "magnifying glass" icon display.
Thanks for any ideas.
=================
** END HEADER -- do not remove this line
//
// Generated on 30/11/2005
//
parameter bModal
local f
f = new TestMousePointerForm
()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif
class TestMousePointerForm
of FORM
with (this)
height = 16.0
left = 40.4286
top = 8.3636
width = 40.0
text = ""
endwith
this.ENTRYFIELD1 = new ENTRYFIELD(this)
with (this.ENTRYFIELD1)
height = 1.0
left = 12.8571
top = 5.2727
width = 8.0
value = "Entryfield1"
mousePointer = 4 // Icon
endwith
endclass
====================
==
--
Ronnie MacGregor
Scotland
www.dBASEdeveloper.co.uk
| |
| David Stone 2005-11-30, 8:23 pm |
| Ronnie MacGregor wrote:
> Does anyone know how to use :
>
> MousePointer = 4 // Icon
I think it isn't implemented yet.
Possible solution from Gary White at the top of this listing (a long
thread---several relevant posts):
http://groups.google.com/groups?hl=...off&qt_s=Search
David
| |
| Ivar B. Jessen 2005-11-30, 8:23 pm |
| On Wed, 30 Nov 2005 20:23:19 -0000, Ronnie MacGregor <no@spam.thanks>
wrote:
>Before I waste hours on doing this the API way .......
>Has anyone used a non standard MousePointer Icon, that could provide a
>code sample ?
Try the code below. It was put together by Ronald de Vries based on code by
Gary White.
Ivar B. Jessen
//----
#define CURSDIR "C:\WINNT\cursors\"
** END HEADER -- do not remove this line
//
// Generated on 08/20/2001
//
parameter bModal
local f
f = new cursor2Form()
if (bModal)
f.mdi = false // ensure not MDI
f.readModal()
else
f.open()
endif
class cursor2Form of FORM
with (this)
open = class::OPEN
height = 11
left = 0.5714
top = 0.2273
width = 63.1429
text = ""
endwith
this.PUSHBUTTON1 = new PUSHBUTTON(this)
with (this.PUSHBUTTON1)
onClick = class::addButton
height = 1.0909
left = 45.7143
top = 0.9545
width = 15.2857
text = "New Button"
endwith
function addButton
if form.aButtons.size < form.icons.size
form.lastX = form.lastX + 5
if form.lastX > 40
form.lastY ++
form.lastX = 3
endif
if form.lastY > form.height - 2
form.height ++
endif
form.aButtons.add(new cursorbutton(form))
with(form.aButtons[form.aButtons.size])
left = form.lastX
top = form.lastY
width = 5
height = 1
cursorFile = CURSDIR + form.icons[form.aButtons.size]
endwith
form.aButtons[form.aButtons.size].onOpen()
else
msgbox('No more icon files')
endif
return
function open
local a, x, y
x = 1
y = 1
form.icons = new array()
this.aButtons = new array()
form.icons.dir(CURSDIR + '*.cur')
form.icons.resize(form.icons.size / 5, 1, 1)
for i = 0 to min(form.icons.size, 66)
x = mod(i, 8) * 5 + 3
y = int(i/8) + 1
this.aButtons.add(new cursorbutton(this))
with(this.aButtons[this.aButtons.size])
left = x
top = y
width = 5
height = 1
cursorFile = CURSDIR + form.icons[i+1]
text = ''
endwith
next
form.lastX = x
form.lastY = y
return super::open()
endclass
class CursorButton(o) of Pushbutton(o)
this.text := ''
this.cursorFile = ''
this.cursorEnabled = false
function onMouseMove(flags, col, row)
if this.cursorEnabled
if col > this.width or row > this.height
cfReleaseCapture()
cfSetCursor(this.hOldCursor)
else
cfSetCapture(this.hWnd)
this.hOldCursor = cfSetCursor(this.hCursor)
endif
endif
return
function onOpen
try
if type('cfLoadCursorFr
omFile') # 'FP'
extern chandle cfLoadCursorFromFile
(cstring) user32 ;
from 'LoadCursorFromFileA
'
endif
if type("cfGetCursor") # "FP"
extern chandle cfGetCursor(cvoid) User32 ;
from 'GetCursor'
endif
if type("cfSetCursor") # "FP"
extern chandle cfSetCursor(chandle)
User32 ;
from 'SetCursor'
endif
if type("cfSetCapture") # "FP"
extern chandle cfSetCapture(chandle
) User32 ;
from 'SetCapture'
endif
if type("cfReleaseCapture") # "FP"
extern clogical cfReleaseCapture(cvo
id) user32 ;
from 'ReleaseCapture'
endif
this.hCursor = cfLoadCursorFromFile
(this.cursorFile)
this.cursorEnabled := this.hCursor # 0
if not this.cursorEnabled
msgbox('Cursor file is not enabled' + chr(13) + ;
'Check the path\file name', 'Error', 48)
endif
catch(exception e)
msgbox(e.message, 'Error', 16)
endtry
return
endclass
//-----
| |
| Ronnie MacGregor 2005-11-30, 8:23 pm |
| In article < nq5so19sq20led598019
mjgnp6htdla07a@4ax.com>,
bergishagen@it.notthis.dk says...
> Try the code below. It was put together by Ronald de Vries based on code by
> Gary White.
Thanks Ivar
..... and Ronald and Gary.
--
Ronnie MacGregor
Scotland
www.dBASEdeveloper.co.uk
| |
| Ronnie MacGregor 2005-11-30, 8:23 pm |
| In article <438E0FE7.7E35BEB0@wholegrain.com>, dlstone@wholegrain.com
says...
> Possible solution from Gary White at the top of this listing (a long
> thread---several relevant posts):
Cheers David .... that should save me some time.
--
Ronnie MacGregor
Scotland
www.dBASEdeveloper.co.uk
| |
| Ken Mayer [dBVIPS] 2005-11-30, 8:23 pm |
| Ronnie MacGregor wrote:
> In article < nq5so19sq20led598019
mjgnp6htdla07a@4ax.com>,
> bergishagen@it.notthis.dk says...
>
>
>
>
> Thanks Ivar
>
> .... and Ronald and Gary.
If you get something useful out of all that, perhaps another addition to
the dUFLP is in order?
Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/
*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/dbase/dBASEBook.htm
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
| |
| Dave Petonic 2005-12-01, 8:23 pm |
| Hey Big Ken -
On another subject: BDE installer
You're a big answer man for dBase, and I was wondering if you knew of a very simple installer for the BDE. I've never had to do that, because I write addons, and the parent program always had the BDE installed already. Now they've gone to Firebird, so t
he BDE may not be installed. I'm gonna hafta handle it.
It seems as if there is no good way to do this. Inno does not work, I have dbase 2.6, the docs are very skimpy...
I don't need to install my whole program, that is handled separately. Just to install the BDE. Does anyone have anything like this? This seems to be handled so poorly by dBase....
Thanks, Dave
| |
| Ken Mayer [dBVIPS] 2005-12-01, 8:23 pm |
| Dave Petonic wrote:
> Hey Big Ken -
>
> On another subject: BDE installer
>
> You're a big answer man for dBase, and I was wondering if you knew of a very simple installer for the BDE. I've never had to do that, because I write addons, and the parent program always had the BDE installed already. Now they've gone to Firebird, so
the BDE may not be installed. I'm gonna hafta handle it.
>
> It seems as if there is no good way to do this. Inno does not work, I have dbase 2.6, the docs are very skimpy...
>
> I don't need to install my whole program, that is handled separately. Just to install the BDE. Does anyone have anything like this? This seems to be handled so poorly by dBase....
Check what Johnny K. is doing with the project manager. You may be able
to do something with that ... he's been incorporating Inno Setup with
the PM, and his own ScriptMaker stuff (I find that kind of confusing, so
haven't done much with it). In addition, check my book -- there's a
chapter on deployment, and it includes a list of the files needed for
the BDE ...
Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/
*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/dbase/dBASEBook.htm
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
| |
| Dave Petonic 2005-12-01, 8:23 pm |
| Thanks Ken for the heads-up on your book, just placed an order. About time you started earning some extra coin from your dBase deftness and dexterity ;-)
Hopefully I'll be able to come up with some kind of BDE installer from what you say in your book...
Take care,
Regards,
Dave Petonic, Redstone SoftBase Company
GoldBox© for GoldMine®
World's Largest CRM add-on
redstone@earthlink.net
http://www.redstonesoftbase.com
(310)559-1833 (USA Pacific Time Zone)
>
> Check what Johnny K. is doing with the project manager. You may be able
> to do something with that ... he's been incorporating Inno Setup with
> the PM, and his own ScriptMaker stuff (I find that kind of confusing, so
> haven't done much with it). In addition, check my book -- there's a
> chapter on deployment, and it includes a list of the files needed for
> the BDE ...
>
> Ken
>
> --
> /(Opinions expressed are purely my own, not those of dataBased
> Intelligence, Inc.)/
>
> *Ken Mayer* [dBVIPS]
> /Golden Stag Productions/
> dBASE at goldenstag dot net
> http://www.goldenstag.net/dbase/dBASEBook.htm
> http://www.goldenstag.net/GSP
> http://www.goldenstag.net/dbase
| |
| Gerald Lightsey 2005-12-02, 3:23 am |
| On Thu, 01 Dec 2005 16:01:39 -0500, in the dbase.programming group, Dave
Petonic said...
>
> On another subject: BDE installer
>
> You're a big answer man for dBase, and I was wondering if you knew of a
> very simple installer for the BDE. I've never had to do that, because
> I write addons, and the parent program always had the BDE installed already.
> Now they've gone to Firebird, so the BDE may not be installed. I'm gonna
> hafta handle it.
>
> It seems as if there is no good way to do this. Inno does not work,
> I have dbase 2.6, the docs are very skimpy...
>
> I don't need to install my whole program, that is handled separately.
> Just to install the BDE. Does anyone have anything like this? This
> seems to be handled so poorly by dBase....
Go to http://www.dbase.com/updatesandfixes.asp and down load the runtime
engine file that corresponds with the version of dBASE you are using for
development.
This file will install the BDE as well as the dBASE runtime files. The
Project Explorer deployment application is a work in process and is
getting better with each version in making it easier to install both the
BDE and Runtime using this file wrapped into your setup.exe. You can
describe the BDE settings and databases you want to be set up with your
deployment with INNO. You can also use the file as a stand alone to
accomplish the task.
I believe Borland has always insisted that there NOT be a file that
installs the BDE and nothing else. You might be able to call off the
installation of the runtime during the process, I have not tried to do
it and don't know if this is possible. However, if necessary, you could
install both and uninstall the runtime afterward. If you uninstall the
runtime you should probably also remove the reference to it that exist
within the Windows Registry. Just delete the key HKEY_LOCAL_MACHINE
\SOFTWARE\dBASE.
Gerald
| |
| Ronnie MacGregor 2005-12-02, 7:23 am |
| In article <QQJaTrg9FHA.1020@news-server>, dbase@_nospam_golden
stag.net
says...
> If you get something useful out of all that, perhaps another addition to
> the dUFLP is in order?
OK. I've gone the custom control route with this, and expanded on Gary's
basic method adding support for dll cursor resources.
http://www.dbasedeveloper.co.uk/rmCursor/rmCursor.htm
You are welcome to add this to the dUFLP if you wish, but could you do
it in unzipped format so that your library.wfm can jump to the files.
I've gradually figured that the zipped files in the dUFLP are less
readily accessible and as a result perhaps are often skipped over.
--
Ronnie MacGregor
Scotland
www.dBASEdeveloper.co.uk
| |
| Ronnie MacGregor 2005-12-02, 7:23 am |
| In article <438E0FE7.7E35BEB0@wholegrain.com>, dlstone@wholegrain.com
says...
> Possible solution from Gary White at the top of this listing (a long
> thread---several relevant posts):
There is a minor bug with major impact in all of the various samples
from Gary and Ronald (all being based on the same code).
The mouseover code does not test for col < 0 or row < 0.
An easy fix.
--
Ronnie MacGregor
Scotland
www.dBASEdeveloper.co.uk
| |
| Ken Mayer [dBVIPS] 2005-12-02, 9:23 am |
| Ronnie MacGregor wrote:
> In article <QQJaTrg9FHA.1020@news-server>, dbase@_nospam_golden
stag.net
> says...
>
>
>
>
> OK. I've gone the custom control route with this, and expanded on Gary's
> basic method adding support for dll cursor resources.
>
> http://www.dbasedeveloper.co.uk/rmCursor/rmCursor.htm
>
> You are welcome to add this to the dUFLP if you wish, but could you do
> it in unzipped format so that your library.wfm can jump to the files.
> I've gradually figured that the zipped files in the dUFLP are less
> readily accessible and as a result perhaps are often skipped over.
Yeah. The only reason for zipping them was to keep items with large
numbers of files associated with them together. I didn't want the dUFLP
to require a bunch of subdirectories. I suppose I could set it up with
an installer, and then put things in subdirectories, but that would get
even more hairy to deal with (setting up different source code aliases
for different things ...).
Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/
*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/dbase/dBASEBook.htm
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
| |
| Ronnie MacGregor 2005-12-02, 9:23 am |
| In article <LnCX0b09FHA.1020@news-server>, dbase@_nospam_golden
stag.net
says...
> Yeah. The only reason for zipping them was to keep items with large
> numbers of files associated with them together.
True.
> I didn't want the dUFLP
> to require a bunch of subdirectories. I suppose I could set it up with
> an installer, and then put things in subdirectories, but that would get
> even more hairy to deal with (setting up different source code aliases
> for different things ...).
I would avoid that I think <g>.
Probably the best way to retain file grouping is by appropriate naming
which is what I've done with all the files for rmCursor. Easy for new
submissions, but probably not worth it for existing ones.
Perhaps Library.wfm could be updated to fire up the zip file in WinZip
or whatever, rather than the current "Can't do it" load to the dBASE
Source Editor.
--
Ronnie MacGregor
Scotland
www.dBASEdeveloper.co.uk
| |
| Ronnie MacGregor 2005-12-02, 11:23 am |
| In article <LnCX0b09FHA.1020@news-server>, dbase@_nospam_golden
stag.net
says...
P.S.
Your book arrived this afternoon. Printed in the UK, shipped to dBASE
France, then shipped to Scotland.
I'm just away out to see if I have the same luck as Emilio <g>.
Seriously .... looks good.
--
Ronnie MacGregor
Scotland
www.dBASEdeveloper.co.uk
| |
| Ken Mayer [dBVIPS] 2005-12-02, 8:23 pm |
| Ronnie MacGregor wrote:
> In article <LnCX0b09FHA.1020@news-server>, dbase@_nospam_golden
stag.net
> says...
>
>
>
>
> True.
>
>
>
>
> I would avoid that I think <g>.
>
> Probably the best way to retain file grouping is by appropriate naming
> which is what I've done with all the files for rmCursor. Easy for new
> submissions, but probably not worth it for existing ones.
True. Some of them I think are named fairly appropriately, but ...
> Perhaps Library.wfm could be updated to fire up the zip file in WinZip
> or whatever, rather than the current "Can't do it" load to the dBASE
> Source Editor.
Yeah, in all that spare time I have. <g>
Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/
*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/dbase/dBASEBook.htm
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
| |
| Ken Mayer [dBVIPS] 2005-12-02, 8:23 pm |
| Ronnie MacGregor wrote:
> In article <LnCX0b09FHA.1020@news-server>, dbase@_nospam_golden
stag.net
> says...
>
> P.S.
>
> Your book arrived this afternoon. Printed in the UK, shipped to dBASE
> France, then shipped to Scotland.
>
> I'm just away out to see if I have the same luck as Emilio <g>.
Hahaha! Good luck there. <g>
> Seriously .... looks good.
Thanks!
Ken
--
/(Opinions expressed are purely my own, not those of dataBased
Intelligence, Inc.)/
*Ken Mayer* [dBVIPS]
/Golden Stag Productions/
dBASE at goldenstag dot net
http://www.goldenstag.net/dbase/dBASEBook.htm
http://www.goldenstag.net/GSP
http://www.goldenstag.net/dbase
|
|
|
|
|