473,699 Members | 2,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What Caption for a MessageBox

Here's a question for the group.

I am presently writing a class, which is a simple Dialog/Form. It handles a
fairly common function, so I writing it to be generic enough to be dropped
into any application. Now, here's the problem: At one point, it pops up a
MessageBox --- What should I put into the Caption of that MessageBox. The
"official" (if somewhat abandoned) standard is to put the title of the
application there. But, since this is going to be a library form, I don't
know the application title. I could use Application.Pro ductName (and
currently that's what I am doing), but that depends on the use actually
filling in that attribute in the AssemblyInfo.cs file. Alternately, I
could use the AssemblyTitle which has a slightly better chance of being
filled in, but is a real B!+©# to get at in .Net v1.1 (It's much easier in
v2.0, but we haven't migrated yet).

Any suggestions?

--
Truth,
James Curran [erstwhile-MVP]
Home: www.noveltheory.com Work: www.njtheater.com
Blog: www.honestillusion.com Day Job: www.partsearch.com
Nov 20 '05 #1
2 1727
I would make it standard to pass in the name of the program or something
when creating the library, then store this as a library global variable.

James Curran wrote:
Here's a question for the group.

I am presently writing a class, which is a simple Dialog/Form. It handles a
fairly common function, so I writing it to be generic enough to be dropped
into any application. Now, here's the problem: At one point, it pops up a
MessageBox --- What should I put into the Caption of that MessageBox. The
"official" (if somewhat abandoned) standard is to put the title of the
application there. But, since this is going to be a library form, I don't
know the application title. I could use Application.Pro ductName (and
currently that's what I am doing), but that depends on the use actually
filling in that attribute in the AssemblyInfo.cs file. Alternately, I
could use the AssemblyTitle which has a slightly better chance of being
filled in, but is a real B!+©# to get at in .Net v1.1 (It's much easier in
v2.0, but we haven't migrated yet).

Any suggestions?

Nov 20 '05 #2
I would setup a variable so that the caller can set the messageBox caption,
but default it to the application name. You could get the application name
with the following call:

Assembly.GetExe cutingAssembly( ).GetName().Nam e;

-- Mikeq
"Benny Raymond" wrote:
I would make it standard to pass in the name of the program or something
when creating the library, then store this as a library global variable.

James Curran wrote:
Here's a question for the group.

I am presently writing a class, which is a simple Dialog/Form. It handles a
fairly common function, so I writing it to be generic enough to be dropped
into any application. Now, here's the problem: At one point, it pops up a
MessageBox --- What should I put into the Caption of that MessageBox. The
"official" (if somewhat abandoned) standard is to put the title of the
application there. But, since this is going to be a library form, I don't
know the application title. I could use Application.Pro ductName (and
currently that's what I am doing), but that depends on the use actually
filling in that attribute in the AssemblyInfo.cs file. Alternately, I
could use the AssemblyTitle which has a slightly better chance of being
filled in, but is a real B!+©# to get at in .Net v1.1 (It's much easier in
v2.0, but we haven't migrated yet).

Any suggestions?

Nov 21 '05 #3

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

Similar topics

5
3480
by: Al Davis | last post by:
Note: I tried cross-posting this message to several newsgoups, including comp.lang.perl.misc, c.l.p.moderated, comp.infosystems.www.authoring.cgi, comp.lang.javascript and comp.lang.php. Nothing appeared on my news server, so I'm trying again - this time posting a separate copy of the message to each group. I'm thinking this should be fairly easy to accomplish - a quick and dirty ... what? ... script? program?
8
3943
by: Wally | last post by:
I would like to have an image with a caption displayed below it. The size of the image will vary. The caption should not extend beyond the width of the image. How can I cause the text of the caption to wrap so that it will stay within the (varying) width of the image? Any ideas?
8
1837
by: Brian Basquille | last post by:
Hello all, Bit of a change of pace now. As opposed to the typical questions regarding my Air Hockey game, am also working on a Photo Album which uses an Access Database to store information about photos. This information is held inside the database (photoDB.mdb) in a table called 'photos' - information being recorded in there are photo information (photoID, location, phDate, category, caption). I have inputted my own photos (not via...
0
3046
by: Chenghui Li | last post by:
We have a problem with the Windows XP theme: We have a IDE which allows other developers to develop visual programs for their customers. Our IDE allow them to set font for window captions easyly (through a dialog). It works fine fo W98, 2000, NT, and XP is the theme is Classic. But on XP if the theme is "Windows XP", the we have a problem: if the developer set the caption font to be say, "Script" (and all non-default font), then the...
2
1121
by: Wayne Wengert | last post by:
I have an aspx page (built in WebMatrix) with the code shown below but when I run it if gives an error "Expression Expected" pointing to the first DB call. It is as if the calls to the DB values - "<%#Container..." are not understood? This really did run last year (we on on a new ISP now but I don't see that as causing a problem?) Any suggestions are most welcome. ============= Code ==================
7
1590
by: Wally | last post by:
Hi all. Is there a way to retrieve captions of system buttons (i.e: Ok, Yes, No, Cancel, Abort, Retry, Ignore that, for italian o.s. are Ok, Si, No, Annulla, Esci, Riprova, Ignora)? Thanks in advance. W
8
1935
by: Ron Dahl | last post by:
My visual studio has been working fine for vb.net for months. Now when I add a button with the following code: Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click MessageBox.Show("text", "caption", MessageBoxButtons.OKCancel) End Sub The word "caption" appears at the top of the messagebox, but the word "text" is not visible and the words "OK" and "Cancel" are also not visible. ...
8
152
by: Siv | last post by:
Hi, What is the best way to get the field names of a table in SQL server where you only have Windows Authentication access to a database. Previously I have used the SQLDMO object to get this, but now I do not have access to the server using an SQL Server user account and am using the Windows Authentication. Any help appreciated. Siv
1
2806
by: kshtjj | last post by:
Dim db As Database Dim rs As Recordset Dim WS As Workspace Dim Max As Long Private Sub Form_Load() Set WS = DBEngine.Workspaces(0) DbFile = (App.Path & "\Database\AddressBook.mdb") PwdString = "swordfish"
0
9174
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9034
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...
1
8914
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
7750
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
6534
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
5874
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3057
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
2347
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.