473,378 Members | 1,138 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Application Title

What is the code for changing the title in the title bar at the top of the
screen?

Thanks!

Suzanne
Nov 12 '05 #1
8 2806
Suzanne wrote:
What is the code for changing the title in the title bar at the top of the
screen?

Thanks!

Suzanne

You can change this using Tools->Startup.

--
But why is the Rum gone?
Nov 12 '05 #2
Thanks, Trevor, but I need to change it with code.

Suzanne
"Trevor Best" <nospam@localhost> wrote in message
news:40***********************@auth.uk.news.easyne t.net...
Suzanne wrote:
What is the code for changing the title in the title bar at the top of the
screen?

Thanks!

Suzanne

You can change this using Tools->Startup.

--
But why is the Rum gone?

Nov 12 '05 #3
"Suzanne" <sm*****@earthlink.net> wrote in
news:kU*******************@newsread3.news.atl.eart hlink.net:
Thanks, Trevor, but I need to change it with code.

Suzanne
"Trevor Best" <nospam@localhost> wrote in message
news:40***********************@auth.uk.news.easyne t.net...
Suzanne wrote:
> What is the code for changing the title in the title bar at the top
> of the screen?
>
> Thanks!
>
> Suzanne
>
>

You can change this using Tools->Startup.

--
But why is the Rum gone?


I suspect that there is a much easier way than this:

Private Declare Function SetWindowText Lib "user32" _
Alias "SetWindowTextA" _
(ByVal hwnd As Long, ByVal lpString As String) As Long

Public Sub DisplayAppTitle(ByVal Title As String)
SetWindowText hWndAccessApp, Title
End Sub
--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #4

"Suzanne" <sm*****@earthlink.net> wrote in message
news:kU*******************@newsread3.news.atl.eart hlink.net...
Thanks, Trevor, but I need to change it with code.


Changing the Application's title in the bar at runtime is pretty
non-standard practice in Windows, and Windows' consistency is its strong
point.

What's displayed there is the Application's Name property but it is
read-only at runtime.

I'm sure, with a little research, you will find an API that you can use to
accomplish this, if you really have a need.

Perhaps you might consider some other way to accomplish the same purpose.

Larry Linson
Microsoft Access MVP
Nov 12 '05 #5
The VB code is here:
http://support.microsoft.com/default...b;en-us;210169

If memory serves, some automation functions (like opening Word and
passing data from an Access application) don't work unless the
application title is 'Microsoft Access'.

So if you change the application title, you have to switch it to
'Microsoft Access' before calling Word then set it back to your custom
title when done.

This was true of Access 97, don't know about later versions.

- Brian

On Sat, 17 Apr 2004 02:15:05 GMT, "Larry Linson"
<bo*****@localhost.not> wrote:

"Suzanne" <sm*****@earthlink.net> wrote in message
news:kU*******************@newsread3.news.atl.ear thlink.net...
Thanks, Trevor, but I need to change it with code.


Changing the Application's title in the bar at runtime is pretty
non-standard practice in Windows, and Windows' consistency is its strong
point.

What's displayed there is the Application's Name property but it is
read-only at runtime.

I'm sure, with a little research, you will find an API that you can use to
accomplish this, if you really have a need.

Perhaps you might consider some other way to accomplish the same purpose.

Larry Linson
Microsoft Access MVP


Nov 12 '05 #6
Suzanne wrote:
Thanks, Trevor, but I need to change it with code.


Option Compare Database
Option Explicit
Declare Function WinAPI_SetWindowText Lib "user32" Alias
"SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
Declare Function WinAPI_GetParent Lib "user32" Alias "GetParent" (ByVal
hwnd As Long) As Long

Sub SetWindowText(pstrText As String)
Dim hwndAccess As Long

If Forms.Count = 0 Then
MsgBox "I need a form open to do this as I need " & _
"it's window handle"
Else
hwndAccess = Forms(0).hwnd
Do Until WinAPI_GetParent(hwndAccess) = 0
hwndAccess = WinAPI_GetParent(hwndAccess)
Loop
WinAPI_SetWindowText hwndAccess, pstrText
End If

End Sub

--
But why is the Rum gone?
Nov 12 '05 #7
A long time ago I think this worked

Function ChangeTitle(s$)
Dim MyDb As Database, prp As Property
Const conPropNotFoundError = 3270

On Error GoTo ErrorHandler
' Return Database object variable pointing to
' the current database.
Set MyDb = CurrentDb
' Change title bar.
MyDb.Properties!AppTitle = s
' Update title bar on screen.
Application.RefreshTitleBar

Set MyDb = Nothing
Exit Function

ErrorHandler:
If Err.Number = conPropNotFoundError Then
Set prp = MyDb.CreateProperty("AppTitle", dbText, MyDb.Name)

MyDb.Properties.Append prp
Else
MsgBox "Error: " & Err.Number & vbCrLf & Err.Description
End If
Resume Next
End Function

HTH

Phil
"Suzanne" <sm*****@earthlink.net> wrote in message
news:Xf*****************@newsread2.news.atl.earthl ink.net...
What is the code for changing the title in the title bar at the top of the
screen?

Thanks!

Suzanne

Nov 12 '05 #8
With Application
.Properties("AppTitle") = "somethingelse"
.RefreshTitleBar
end with
--
Malcolm E. Cook
Stowers Institute for Medical Research

"Suzanne" <sm*****@earthlink.net> wrote in message
news:Xf*****************@newsread2.news.atl.earthl ink.net...
What is the code for changing the title in the title bar at the top of the
screen?

Thanks!

Suzanne

Nov 12 '05 #9

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

Similar topics

5
by: Mark Fisher | last post by:
I have a Java desktop GUI application that the user can run multiple times. In order to keep one instance of the application distinct from another, I'd like to put the instance number of the...
3
by: wolftor | last post by:
If I change the application title, it appears to change OK during the current session; but if I exit Access 97 and then run the application again, the change did not get saved. Any idea how to fix...
8
by: Suzanne | last post by:
What is the code for changing the title in the title bar at the top of the screen? Thanks! Suzanne
3
by: James | last post by:
Hi I'm James Newbie I'm going to use some xml from a previous posters because it's similiar to mine <Store> <Name> My Book Store</Name> <Phone> 555-555-5555 </Phone> <Book id="1" >...
2
by: Oberon | last post by:
Why does this not work as it should? I expect index.aspx to show:. Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\inetpub\wwwroot\ChatSimple\db\chatusers.mdb Instead, I get: ...
3
by: John | last post by:
Hi How can I change the application title through code? Thanks Regards
0
by: Colin Graham | last post by:
hi folks, I am trying to access an application variable called "Title" (line 3 below) which stores an array i created earlier in the system. From this two dimensional array i wish to populate a...
0
chanderravi
by: chanderravi | last post by:
Hello Is there a way to find an application window reference which is running, with its partial name? I can get the application address using a API "FindWindow". It requires two parameters. One is...
0
by: Stephen Thomas | last post by:
Hi there I wonder if any one has encountered this problem or can suggest what is wrong. I am trying the a procedure from the msn site but get the following message: Error 1 The type or...
1
by: Alex Shulman | last post by:
I develop a C# application with Visual Studio .NET 2008. I customize the icon and title for my application form in runtime and it works fine: I can see correct icon and title in the status bar as...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.