Solved

About Box question

Posted on 2000-03-22
13
137 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 2
13 Comments
 
LVL 32

Accepted Solution

by:
Erick37 earned 75 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

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.
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month9 days, 23 hours left to enroll

623 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