Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

About Box question

Posted on 2000-03-22
13
Medium Priority
?
143 Views
Last Modified: 2010-05-02
I put an About Box in my pgm. but i don't know how to put the  instead (misc) in : This product is licensed to misc

Here is my code:
In a module
Declare Function ShellAbout Lib "shell32.dll" Alias "ShellAboutA" (ByVal hwnd As Long, _
        ByVal szApp As String, ByVal szOtherStuff As String, ByVal hIcon As Long) As Long
0
Comment
Question by:dosyl
  • 6
  • 5
  • 2
13 Comments
 
LVL 32

Accepted Solution

by:
Erick37 earned 300 total points
ID: 2645576
Do you need to use ShellAbout, or can you use the frmAbout template provided with VB?
Project->Add Form->About Dialog
You can customize that as you wish.
0
 
LVL 1

Author Comment

by:dosyl
ID: 2645779
Erick37
Your idea is good, but when i run the pgm. the title is never what i write, it is the name of the project.
0
 
LVL 32

Expert Comment

by:Erick37
ID: 2645822
You can change the title:

If using the frmAbout form, change the line
Me.Caption = "About " & App.Title
to whatever you want.

If using ShellAbout use this:

Call ShellAbout(Me.hWnd, "Win Title#Application Name", "Other Information", Me.Icon.Handle)
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 32

Expert Comment

by:Erick37
ID: 2645848
Or if you are referring to the label's caption, the line
lblTitle.Caption = App.Title
can be modified.

I normally keep a global variable called sAppName which holds the name of the application.  The startup code sets this variable to
sAppName = "My Application's Name"

Then you can use sAppName anywhere in the app to set captions, etc.  This reduces the number of static strings in the code, and makes changing the title much easier.
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2645857
Sorry, but you can't change the "This product is licensed to" information using the ShellAbout API.

With ShellAbout:

   hwnd is the handle to the owner window
   szApp is the string that appears in the titlebar
   szOtherStuff is the string that appears after the copyright information


So for example:

   ShellAbout 0&,"Hello","World",0

Would show a box that looks like this:

_________________________________________________________
About Hello                                        
_________________________________________________________

Microsoft Hello
Windows 95
Copyright © 1981-1995 Microsoft Corp
World

This product is licensed to:
John Smyth


Physical Memory Available to Windows:  48.576 KB
System Resources:                      57% Free


                                          [OK]
_________________________________________________________
               
0
 
LVL 1

Author Comment

by:dosyl
ID: 2645912
mcrider
Where do you write John Smyth?
0
 
LVL 1

Author Comment

by:dosyl
ID: 2645934
I tried to take the vb template. I didn't think to look in the form_load to write my Caption.
Are we able with a label to change line?
Exeample:
Company
Tel: 555-4444
Adress
0
 
LVL 32

Expert Comment

by:Erick37
ID: 2645953
Yes, modify it as much as you like:

Private Sub Form_Load()
    Dim sAppInfo As String
    sAppInfo = "Company Name" & vbCrLf & _
            "Tel: 555-1212" & vbCrLf & _
            "6.0 VB Lane" & vbCrLf & _
            "Microville, MS"
    Me.Caption = "About " & App.Title
    lblVersion.Caption = "Version " & App.Major & "." & App.Minor & "." & App.Revision
    lblTitle.Caption = sAppInfo
End Sub

You will have to adjust the label sizes so everything fits...
0
 
LVL 14

Expert Comment

by:mcrider
ID: 2645957
Like I said, you can't change "John Smyth".... You can only change the text that says "Hello" and the text that says "World".

You can always just build your own form from scratch and put anything on it you want...


Cheers!®©
0
 
LVL 1

Author Comment

by:dosyl
ID: 2645980
Erick37
I'm in the clouds, i knowed that.
0
 
LVL 1

Author Comment

by:dosyl
ID: 2646008
Adjusted points from 50 to 75
0
 
LVL 1

Author Comment

by:dosyl
ID: 2646009
Erick37
I increase your point for your patience.
0
 
LVL 32

Expert Comment

by:Erick37
ID: 2646018
Thanks!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question