: I have no doubt that this is the case but where would one expect to find a
: reasonable description of this exercise in obscurity?
<g> I suspect it's buried somewhere in the msdn, in the section that
details how to call DLL functions from VB. But for me this is just ingrained
knowledge, albeit gained from experience, reading and practice.
: If you've been following along here, what do you think about the listbox
: with the malfeasant match entry feature? This manifests itself if and only
: if the SPI_SETACTIVEWINDOWTRACKING is turned on.
No idea really .. I don't know what a "MatchEntry" property or feature is.
Unless you're simply stating the list's ability to move to the next item
when a key is pressed. Testing this under XP with
SPI_SETACTIVEWINDOWTRACKING on shows that even though the form is activated,
the focus does not return to the list having focus when the form lost focus.
Clicking on the list re-enables the keyboard first-letter list selection
functionality.
Since VB forms do not intrinsically provide a method to determine when focus
was gained from another application external to the project, in which case
you could take steps to ensure focus was reset to the listbox, your only
solution is to either require the clicking of the list to explicitly give it
the focus again, or subclass your application to receive notifications when
your app was activated following another non-project app. The code for this
is located at http://www.mvps.org/vbnet/code/subclass/activation.htm
--
Randy Birch
MVP Visual Basic
http://www.mvps.org/vbnet/
Please respond only to the newsgroups so all can benefit.
"Terry von Gease" <***@gv.net> wrote in message news:***@corp.supernews.com...
:
: If you've been following along here, what do you think about the listbox
: with the malfeasant match entry feature? This manifests itself if and only
: if the SPI_SETACTIVEWINDOWTRACKING is turned on.
:
: --
: Terry
:
: "I said I never had much use for one,
: I never said I didn't know how to use one."
: M. Quigley
:
: "Randy Birch" <***@mvps.org> wrote in message
: news:u$***@TK2MSFTNGP09.phx.gbl...
: > uiParam is defined as an "in" only variable; pvParam is an "in/out". So
in
: > VB, if you expect pvParam to be filled with data from the call, you pass
: it
: > byref (unless it's a string, of course). If pvParam is being used as an
In
: > value, as is the case with SPI_SETACTIVEWINDOWTRACKING, then it's passed
: > byval.
: >
: > --
: >
: > Randy Birch
: > MVP Visual Basic
: > http://www.mvps.org/vbnet/
: > Please respond only to the newsgroups so all can benefit.
: >
: >
: > "Terry von Gease" <***@gv.net> wrote in message
: > news:***@corp.supernews.com...
: > : For sure all of the available documentation indicates ByRef is the one
: > true
: > : way. That it doesn't function with ByRef and does with ByVal is a
matter
: > for
: > : the gods of applied pragmatism.
: > :
: > : It's a mystery. There doesn't seem to be a whole hell of a lot of
: > : consistency in this call regarding the use of the uiParam versus the
: > : pvParam. Lots of the SET_ functions use the uiParam for specifying a
: > : True/False and others use the pvParam.
: > :
: > : There doesn't seem to be any rhyme or reason as to why one or the
other
: > : parameter was used in any given case where only a single simple value
is
: > : required..
: > :
: > : I'm reluctant to use it at all. Something that functions only when you
: do
: > it
: > : wrong is a nervous-making situation. Witness the malfunctioning
modeless
: > : form's listbox match entry feature. What other hideous things might be
: > : living in there?
: > :
: > : Yet another confirming instance that the apparatus at Microsoft's
reach
: > : tends to exceed its grasp.
: > :
: > : --
: > : Terry
: > :
: > : "I said I never had much use for one,
: > : I never said I didn't know how to use one."
: > : M. Quigley
: > :
: > : "Ray Mercer" <***@mvps.org> wrote in message
: > : news:#***@tk2msftngp13.phx.gbl...
: > : >
: > : > "Terry von Gease" <***@gv.net> wrote in message
: > : > news:***@corp.supernews.com...
: > : > > That did the trick. Originally I just copied and pasted the
: > declaration
: > : > out
: > : > > of win32api.txt, I never thought to question it.
: > : >
: > : > Glad you got it working, but according to the docs that parameter
: should
: > : be
: > : > passed ByRef. It says so here:
: > : >
: > :
: >
:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvbadev/ht
: > : ml/usingsystemparametersinfofunction.asp
: > : >
: > : > and here
: > : >
: > :
: >
:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/bas
: > : e/systemparametersinfo.asp?frame=true
: > : >
: > : > I even looked up the method signature in WINUSER.H and it look like
: > this:
: > : > WINUSERAPI
: > : > BOOL
: > : > WINAPI
: > : > SystemParametersInfoA(
: > : > UINT uiAction,
: > : > UINT uiParam,
: > : > PVOID pvParam,
: > : > UINT fWinIni);
: > : >
: > : > I searched the MS KBase and the only article I found showed the same
: > ByRef
: > : > declare:
: > : > http://support.microsoft.com/default.aspx?scid=kb;en-us;185637
: > : >
: > : > As far as I know a void pointer [in,out] value should be passed
ByRef,
: > so
: > : I
: > : > think this may be a bug related to that one flag. You may need to
: make
: > an
: > : > alias declare for that one purpose???
: > : >
: > : > Again, I don't have VB6 available right now, but don't the other
flags
: > : work
: > : > as expected with the ByRef declare?
: > : >
: > : > Ray Mercer
: > : >
: > : >
: > :
: > :
: >
: >
:
: