Hi folks,
I copied Dev Ashish's code below to a module in Access 2K. No mater
what I do, Access will not recognize the function. What have I
overlooked?
I know I'm going to feel like an idiot when I hear the answer.
All responses appreciated.
'************** *** Code Start ***************
'This code was originally written by Dev Ashish.
'It is not to be altered or distributed,
'except as part of an application.
'You are free to use it in any application,
'provided the copyright notice is left unchanged.
'
'Code Courtesy of
'Dev Ashish
'
Private Const SW_HIDE = 0
Private Const SW_SHOWNORMAL = 1
Private Const SW_NORMAL = 1
Private Const SW_SHOWMINIMIZE D = 2
Private Const SW_SHOWMAXIMIZE D = 3
Private Const SW_MAXIMIZE = 3
Private Const SW_SHOWNOACTIVA TE = 4
Private Const SW_SHOW = 5
Private Const SW_MINIMIZE = 6
Private Const SW_SHOWMINNOACT IVE = 7
Private Const SW_SHOWNA = 8
Private Const SW_RESTORE = 9
Private Const SW_SHOWDEFAULT = 10
Private Const SW_MAX = 10
Private Declare Function apiFindWindow Lib "user32" Alias _
"FindWindow A" (ByVal strClass As String, _
ByVal lpWindow As String) As Long
Private Declare Function apiSendMessage Lib "user32" Alias _
"SendMessag eA" (ByVal Hwnd As Long, ByVal Msg As Long, ByVal _
wParam As Long, lParam As Long) As Long
Private Declare Function apiSetForegroun dWindow Lib "user32" Alias _
"SetForegroundW indow" (ByVal Hwnd As Long) As Long
Private Declare Function apiShowWindow Lib "user32" Alias _
"ShowWindow " (ByVal Hwnd As Long, ByVal nCmdShow As Long) As Long
Private Declare Function apiIsIconic Lib "user32" Alias _
"IsIconic" (ByVal Hwnd As Long) As Long
Function fIsAppRunning(B yVal strAppName As String, _
Optional fActivate As Boolean) As Boolean
Dim lngH As Long, strClassName As String
Dim lngX As Long, lngTmp As Long
Const WM_USER = 1024
On Local Error GoTo fIsAppRunning_E rr
fIsAppRunning = False
Select Case LCase$(strAppNa me)
Case "excel": strClassName = "XLMain"
Case "word": strClassName = "OpusApp"
Case "access": strClassName = "OMain"
Case "powerpoint 95": strClassName = "PP7FrameCl ass"
Case "powerpoint 97": strClassName = "PP97FrameClass "
Case "notepad": strClassName = "NOTEPAD"
Case "paintbrush ": strClassName = "pbParent"
Case "wordpad": strClassName = "WordPadCla ss"
Case Else: strClassName = vbNullString
End Select
If strClassName = "" Then
lngH = apiFindWindow(v bNullString, strAppName)
Else
lngH = apiFindWindow(s trClassName, vbNullString)
End If
If lngH <> 0 Then
apiSendMessage lngH, WM_USER + 18, 0, 0
lngX = apiIsIconic(lng H)
If lngX <> 0 Then
lngTmp = apiShowWindow(l ngH, SW_SHOWNORMAL)
End If
If fActivate Then
lngTmp = apiSetForegroun dWindow(lngH)
End If
fIsAppRunning = True
End If
fIsAppRunning_E xit:
Exit Function
fIsAppRunning_E rr:
fIsAppRunning = False
Resume fIsAppRunning_E xit
End Function
'************** ****** Code End *************** * 4 1875
"Lauren Wilson" <pr*****@nospam .com> wrote in message
news:8o******** *************** *********@4ax.c om... Hi folks,
I copied Dev Ashish's code below to a module in Access 2K. No mater what I do, Access will not recognize the function. What have I overlooked?
Lauren Wilson,
May I ask what you mean by "Access will not recognize"?
Sincerely,
Chris O.
On Thu, 3 Feb 2005 21:01:25 -0800, "Chris2"
<ra************ ******@GETRIDOF .luminousrain.c om> wrote: "Lauren Wilson" <pr*****@nospam .com> wrote in message news:8o******* *************** **********@4ax. com... Hi folks,
I copied Dev Ashish's code below to a module in Access 2K. No mater what I do, Access will not recognize the function. What have I overlooked?
Lauren Wilson,
May I ask what you mean by "Access will not recognize"?
Sincerely,
Chris O.
Thanks for responding Chris. I guess I was not clear enough on that.
By "not recognize" I mean that Intellisense will not display the
function options and when I compile, Access says it's an unrecognized
function. I hope that's what you want to know.
Do you have a clue what I'm doing wrong?
Thanks a lot Chris.
"Lauren Wilson" <pr*****@nospam .com> wrote in message
news:95******** *************** *********@4ax.c om... On Thu, 3 Feb 2005 21:01:25 -0800, "Chris2" <ra************ ******@GETRIDOF .luminousrain.c om> wrote:
"Lauren Wilson" <pr*****@nospam .com> wrote in message news:8o******* *************** **********@4ax. com... Hi folks,
I copied Dev Ashish's code below to a module in Access 2K. No
mater what I do, Access will not recognize the function. What have I overlooked? Lauren Wilson,
May I ask what you mean by "Access will not recognize"?
Sincerely,
Chris O.
Thanks for responding Chris. I guess I was not clear enough on
that. By "not recognize" I mean that Intellisense will not display the function options and when I compile, Access says it's an
unrecognized function. I hope that's what you want to know.
Do you have a clue what I'm doing wrong?
Thanks a lot Chris.
Lauren Wilson,
I'm not sure I'm going to be of much aid, but here goes.
I'm running Win2K SP-3; Access 2K SP-3; JET 4.0 SP-8.
I launched Windows Media Player, ran an mp3.
In the Access Visual Basic Editor, I opened the Immediate Window and
typed therein:
? fisapprunning(" Windows Media Player")
It reported True.
I closed WMP.
I ran the function again.
It reported False.
The code appears to be working just fine.
Sincerely,
Chris O.
Lauren Wilson wrote: Thanks for responding Chris. I guess I was not clear enough on that. By "not recognize" I mean that Intellisense will not display the function options and when I compile, Access says it's an unrecognized function. I hope that's what you want to know.
Do you have a clue what I'm doing wrong?
Thanks a lot Chris.
Perhaps you have to make the function Public for your form's
intellisense to pick it up. BTW, wasn't there a name similar to Lauren
Wilson in a Video Professor commercial?
James A. Fortune This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Penn Markham |
last post by:
Hello all,
I am writing a script where I need to use the system() function to call
htpasswd. I can do this just fine on the command line...works great
(see attached file, test.php). When my webserver runs that part of the
script (see attached file, snippet.php), though, it doesn't go through.
I don't get an error message or...
|
by: Berlin Brown |
last post by:
I am parsing a C file and want to find the function names, is this
python worthy or is Emacs-Lisp better for this. I have searched for
some libraries but coming up null. I just need the function names, no
args or anything else. I would probably have to run a regular
expression pattern looking for int,void,static, etc and then the
enclosing...
|
by: flipdog |
last post by:
Hello all,
I didn't know there is a thread on hash function started in this newsgroup
so reposted my posting from another group.
Hope I can have some feedbacks. I am new to hash table.
I came across a very well presented tutorial web page wrt hash table. In
its content, it listed a number of hash functions which the web master(?)
quoted...
|
by: aredo3604gif |
last post by:
On Sun, 10 Apr 2005 19:46:32 GMT, aredo3604gif@yahoo.com wrote:
>The user can dynamically enter and change the rule connection between
>objects. The rule is a "<" and so given two objects:
>a < b simply means that b < a can't be set, also it must be a != b.
>And with three objects a < b , b < c means a < c
>
>I studied Quick Union Find...
|
by: laststubborn |
last post by:
Dear All,
We have a big concern in our Database system. We have 2000 transactions
daily in our database. We need to replicate some how the database for
our fail over setup. I tried transactional replication at midnight but
our all systems locked and we had a lot of complaints from the
customers and It was taking a lot of time to snapshot...
| |
by: lovecreatesbeauty |
last post by:
Could you talk something about the general rules on the interface
(function) design in C program that recognized publically? Or introduce
some good advice of yourself.
How do you think about some of those advices like following?
a. keep the interface clean and clear (What does clean or clear mean
and how to achieve that?).
b. avoid using...
|
by: kev670 |
last post by:
I'm creating a calendar calculator. i can't get my final function firstDayOfMonth to work. i have been able to calculate the amount of days between 2 dates but now i need to find where the first day of the month goes. i'm using "%7" to do this. i just dont know how to set up the function properly.
also would you have any advice on how to fomat...
|
by: Kelii |
last post by:
Hi all,
(WinXP Pro SP2, Access 2003)
I'm using Dev Ashish's fRefreshLinks function from AccessWeb
(http://www.mvps.org/access/tables/tbl0009.htm) to relink tables in my
front end to one of several back end files.
When I first dropped in the function I was getting an error on one of
my tables saying "Couldn't relink table, table doesn't...
|
by: DL |
last post by:
Hi,
What I wanted to do is to call a function from a newly created
element. But it stumbled me.
Here's the line that references the newly created element and I used
the alert function for debugging for now. Did I mess up all these
quotes?
// once again this is the key line of code, problem area, disregard
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |