Timed Message Box Q's
- From: "Pop`" <nodoby@xxxxxxxxxxxxxxxxxxx>
- Date: Sun, 16 Sep 2007 20:11:29 GMT
Hi Again,
I thought I could upload an attachment with a post here, but apparently not.
Neither the post nor of course, its attachment have shown up, so I'll do it
this way instead:
The relevant, referenced, form and module are located in a text file at
the following link, without wrapping/mangling, in the event you wish to
peruse the actual, runnable code:
http://download.yousendit.com/E9CB0C653394B67B
And here's the original I tried to post but which failed to show up:
===========
Hi all,
Decided to play in the sandbox today for a change of scenery and since I was
wishing for a timed screen message, decided to try that out.
I chose API's. And mostly what I learned was umpty-leven ways to lock up
VB6 by creating an invisible "something": you tell me and I'll know,
too<G>. That's a rhetorical comment, of course.
So unable to do it myself, I ran out looking for some samples and came
across one I liked and which, for the moment, I'm "stuck with" because I
like it, it's reasonably short and WGLLT. That doesn't mean I'm not open to
alternatives; just that I'd like to target completion of this concept unless
it's all wrong for what I need somehow.
All I really need is a msgbox to trigger & display for abt 3 seconds when
a certain entry error is detected, and then go away on its own
(auto-closing).
Problem is, I had to;
1. dig it out of someone else's code example of multiple msgbox
manipulations and;
2. that done, I'm left with a few questions. Like i said it Works Great,
but I don't understand it all.
The file I robbed from is at:
http://www.mvps.org/vbvision/Sample_Projects.htm#MessageBox_Demo
That URL includes a bookmark, so it should take you right to the selection.
Watch out for wrapping of the URL.
Specifically:
-- I know: '&' data type is long.
-- I have some but not great module experience and NASA intentional API
experience; hence part of my reason for taking this demo code route.
--
"
' the max length of a path for the system (usually 260 or there abouts) '
this is used to size the buffer string for retrieving the class name of the
active window below
Public Const MAX_PATH As Long = 260&
"
I don't -think- I need that line. The program operates fine with it
commented out, but I'm also aware that a path on my system isn't necessarily
a path on another system. I don't seem to have a way to tell if it's needed
or not.
Can you tell if it is anything relevant my my timed msgbox?
--
I've seen before, but cannot now relocate what the encompassing "&" sandwich
is accomplishing:
" Public Const SOMETHING As Long = &H5000&"
Could anyone kindly explain the & (and of course the "H") usage there?
--
And likewise for these declarations:
Public Const WM_CLOSE As Long = &H10& <---
Public Const WM_SETREDRAW As Long = &HB& <---
--
In general I can't seem to locate a listing or inclusive list of API calls.
Guess all I really would like here is a pointer to a source if that's
reasonable; I can lookup the API's used individually if I have to.
--
And, an English language description of:
"
Public Declare Function PostMessage Lib "user32" Alias "PostMessageA"
(ByVal hWnd&, ByVal wMsg&, _
ByVal wParam&, lParam As Any) As Long
"
w/r to "PostMessage" and " "user32" Alias " would help, because I can't
seem to get my head around Help's Help for it.
Finally: I just realized a Type statement isn't used and removed it, but
it's still in the files I attached, so you can ignore that; there's only one
of them. It's used in sizing/positioning the window.
I've probably asked silly questions but even if your response is
to the effect of, "hey, go read ...", that's fine. It's not a lot of
code, but it's pretty muddy water for me right now.
Thanks as always and in advance,
Pop`
.
- Follow-Ups:
- Re: Timed Message Box Q's
- From: Jan Hyde (VB MVP)
- Re: Timed Message Box Q's
- From: Randy Birch
- Re: Timed Message Box Q's
- Prev by Date: Re: A DLL gone bad ?
- Next by Date: Re: A DLL gone bad ?
- Previous by thread: Re: cheapest runescape gold on http://www.runescapemaner.cn
- Next by thread: Re: Timed Message Box Q's
- Index(es):
Relevant Pages
|