473,830 Members | 2,241 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FindWIndow and trademark symbol

I have an Access application with the name: MyAppName®
It has the "®" symbol (ChrW$(&H00AE)) at the end of it.
If I remane the application without the "®" symbol, I can use
FindWindow to close the application, but with the "®" symbol it
doesn't. Unfortunaetley this app is already distributed as MyAppName®
and I cannot change it.
I have tried:
hwnd = FindWindow(vbNu llString, "myAppName" & ChrW$(&H00AE))
But it won't work.
Yikes.
This has become an emergency.
Can anyone help?
lq

Nov 13 '05
17 3076
"lauren quantrell" <la************ *@hotmail.com> wrote in
news:11******** **************@ g14g2000cwa.goo glegroups.com:
Lyle,
I use:
Dim hwnd as long
hwnd = FindWindow(vbnu llstring,"AppNa me" & ChrW$(&HAE))
SetForegroundWi ndow hwnd
PostMessage hwnd, WM_CLOSE, 0&, 0&

lq


Your code works for me.

--
Lyle
--
Nov 13 '05 #11
Lauren just to eliminate the obvious why don't you post your
declarations for the FindWindow and PostMessage API's.

Do you have Spy++ on your system so you can verify that the hWnd
returned via FindWindow is the correct window and that the Window name
ending character is correct?
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"lauren quantrell" <la************ *@hotmail.com> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.com.. .
Lyle,
I use:
Dim hwnd as long
hwnd = FindWindow(vbnu llstring,"AppNa me" & ChrW$(&HAE))
SetForegroundWi ndow hwnd
PostMessage hwnd, WM_CLOSE, 0&, 0&

lq

Lyle Fairfield wrote:
"lauren quantrell" <la************ *@hotmail.com> wrote in
news:11******** **************@ z14g2000cwz.goo glegroups.com:
Lyle,
(&H00AE) converts to (&HAE) when compiled.
I can find the window, and it gives me a hwnd number, but for some
reason it doesn't close it, but it will only close it if the
application has no "®". Very puzzling.
lq
How do you try to close it?

I use:

Dim h As Long
h = FindWindow(vbNu llString, "MyApplicationT itle" & ChrW$(&HAE))
PostMessage h, WM_CLOSE, 0, 0

with the requisite API declarations. Of course, one can use the

IsWindow and WaitForSingleOb ject functions to be sure or branch somewhere else if unsuccessful.

--
Lyle
--


Nov 13 '05 #12
Stephan,
Here's the full code.
Thanks,
lq

Const WM_CLOSE = &H10
Const SW_HIDE = 0

Private Declare Function FindWindow _
Lib "user32" _
Alias "FindWindow A" _
( _
ByVal lpClassName As String, _
ByVal lpWindowName As String _
) _
As Long

Private Declare Function SetForegroundWi ndow _
Lib "user32" _
( _
ByVal hwnd As Long _
) _
As Long

Private Declare Function PostMessage _
Lib "user32" _
Alias "PostMessag eA" _
( _
ByVal hwnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
ByVal lParam As Long _
) _
As Long

Function CloseMyFrigginA pp()
Dim hwnd As Long, AppCaption As String

AppCaption = "AppName" '& ChrW$(&HAE)
hwnd = FindWindow(vbNu llString, AppCaption)
If hwnd <> 0 Then
SetForegroundWi ndow hwnd
PostMessage hwnd, WM_CLOSE, 0&, 0&
End If
End Function

Nov 13 '05 #13
"lauren quantrell" <la************ *@hotmail.com> wrote in
news:11******** *************@f 14g2000cwb.goog legroups.com:
AppCaption = "AppName" '& ChrW$(&HAE)


The single quote (comment indicator) is a typo ... or the problem?

--
Lyle
--
From ADO28.chm
Nov 13 '05 #14
Lauren your code works here.
I created an MDB with an Appname containing a trailing Trademark
symbol.
I created another MDB containing your code.

You do not need the call to the SetForegroundWi ndow API but it works
either way.

What versions of Access and windows are you running under?
Are you doing as I tested, closing one Access App from another?
Do you perchance have a an opened Form with the same name as the Access
Application?
--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"lauren quantrell" <la************ *@hotmail.com> wrote in message
news:11******** *************@f 14g2000cwb.goog legroups.com...
Stephan,
Here's the full code.
Thanks,
lq

Const WM_CLOSE = &H10
Const SW_HIDE = 0

Private Declare Function FindWindow _
Lib "user32" _
Alias "FindWindow A" _
( _
ByVal lpClassName As String, _
ByVal lpWindowName As String _
) _
As Long

Private Declare Function SetForegroundWi ndow _
Lib "user32" _
( _
ByVal hwnd As Long _
) _
As Long

Private Declare Function PostMessage _
Lib "user32" _
Alias "PostMessag eA" _
( _
ByVal hwnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
ByVal lParam As Long _
) _
As Long

Function CloseMyFrigginA pp()
Dim hwnd As Long, AppCaption As String

AppCaption = "AppName" '& ChrW$(&HAE)
hwnd = FindWindow(vbNu llString, AppCaption)
If hwnd <> 0 Then
SetForegroundWi ndow hwnd
PostMessage hwnd, WM_CLOSE, 0&, 0&
End If
End Function


Nov 13 '05 #15
Lyle,
Thanks for the reply. The single quote is just a typo.
lq
Lyle Fairfield wrote:
"lauren quantrell" <la************ *@hotmail.com> wrote in
news:11******** *************@f 14g2000cwb.goog legroups.com:
AppCaption = "AppName" '& ChrW$(&HAE)


The single quote (comment indicator) is a typo ... or the problem?

--
Lyle
--
From ADO28.chm


Nov 13 '05 #16
Stephen,
I am using a second MS Access app to close the first. Both apps running
Access 2K on Win XP Pro. I'll have to look at the form issue. It is
possible a popup form could have the same caption as the database with
the trailing ChrW$(&HAE) symbol...
again, the code works as long as there's no trailing ChrW$(&HAE) symbol
and most of the forms are popup forms.
lq

Nov 13 '05 #17
I've tested your scenario on WinXP Pro with A2K and A2003 and your code
works every time. THere's something else going on with your setup that I
am missing.
Can you send me your APP and the secondary MDB that closes the first
app? Just delete the contents of the tables if they contain data that is
sensitive.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
"lauren quantrell" <la************ *@hotmail.com> wrote in message
news:11******** **************@ g14g2000cwa.goo glegroups.com.. .
Stephen,
I am using a second MS Access app to close the first. Both apps running Access 2K on Win XP Pro. I'll have to look at the form issue. It is
possible a popup form could have the same caption as the database with
the trailing ChrW$(&HAE) symbol...
again, the code works as long as there's no trailing ChrW$(&HAE) symbol and most of the forms are popup forms.
lq


Nov 13 '05 #18

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2454
by: K McNeil | last post by:
I'm trying to run this query: SELECT * FROM features WHERE food_group_ID = 'Company™' I've tried Company%99, Company™ Company&trade; and nothing returns. What do I need to pass from a jsp page to represent the trademark in MySql? Thanks
2
10432
by: mrwoopey | last post by:
Hi, On my site I have "SomeProduct™", a name with the trademark symbol, in a javascript menu. When the page (js) was refered in classic asp it showed the trademark symbol. Now the page is aspx (.net) and the traemark symbol displays as a "?". I used String.fromCharCode(153) to display the "™", but it displays a box.
79
3810
by: VK | last post by:
I wandering about the common proctice of some UA's producers to spoof the UA string to pretend to be another browser (most often IE). Shouldn't it be considered as a trademark violation of the relevant name owner? If I make a whisky and call it "Jack Daniels", I most probably will have some serious legal problems. "Mozilla" partially appeared because NCSA stopped them from using "Mosaic" in the UA string. Is it some different...
3
16774
by: hsmsites | last post by:
Anyone know how I can remove this symbol from a string. I'm using vi and do not know how to refer to this symbol in my script. TIA
2
3470
by: sasingh75 | last post by:
We have a strange problem using trademerk symbol in our emails. We store certain templates in database as long text. A aprt of the text looks as shown below. "Please access the XYZ â„¢ site to review and update" We retreive the template from database and send a email to our customer. When the email is sent out to an hotmail account the content gets changed to as shown below.
3
6368
n8kindt
by: n8kindt | last post by:
simple question: is there a chr() number code for the trademark symbol? i am compiling an email in vba and need to use the trademark symbol when sending it out.
1
3214
by: danka21819 | last post by:
Hi, I am a front end web designer/developer and analyst...struggling with putting an accordian flash xml menu together. I have it done except I need to add a simple trademark symbol circle with r. I am struggling with how to do this since I am not savvy in actioncript. I assume the best way is to add it is with a CDATA child node, but do not know how or whatever is the best way to get this done since am on a tight deadline. I need someone to...
1
2234
by: danka21819 | last post by:
Hi, I am a front end web designer/developer and analyst...struggling with putting an accordian flash xml menu together. I have it done except I need to add a simple trademark symbol circle with r. I am struggling with how to do this since I am not savvy in actioncript. I assume the best way is to add it is with a CDATA child node, but do not know how or whatever is the best way to get this done since am on a tight deadline. I need someone to...
1
4419
by: danka21819 | last post by:
Hi, I am a front end web designer/developer and analyst...struggling with putting an accordian flash xml menu together. I have it done except I need to add a simple trademark symbol circle with r. I am struggling with how to do this since I am not savvy in actioncript. I assume the best way is to add it is with a CDATA child node, but do not know how or whatever is the best way to get this done since am on a tight deadline. I need someone to...
0
9642
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10489
jinu1996
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10202
tracyyun
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9314
agi2029
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7746
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5780
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4411
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
2
3959
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3076
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.