About box in GUI

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
User avatar
jimbobukii
Posts: 52
Joined: Mon Jan 14, 2013 10:34 pm

About box in GUI

Post by jimbobukii » Mon Mar 25, 2013 10:03 am

I am looking to have Menu Items within my PowerShell GUI but I am stuck with an about Dialog, could some one tell me how to call a dialog with all my details like version number etc?

User avatar
jvierra
Posts: 13289
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: About box in GUI

Post by jvierra » Mon Mar 25, 2013 10:33 am

Can you try to clarify your question. It does not make much sense.

Are you asking how to add a menu to a form?

User avatar
davidc
Posts: 5725
Joined: Thu Aug 18, 2011 4:56 am

Re: About box in GUI

Post by davidc » Mon Mar 25, 2013 10:34 am

FYI I moved the post to the PowerShell GUIs forum.

This really depends on the tool you are using. PowerShell Studio supports multi-form projects. It will involve more work if you use PrimalForms CE.
In either case I recommend looking at the Tic Tac Plebius game:

http://www.sapien.com/blog/2011/04/26/t ... hell-game/

It has an about box.

David
David
SAPIEN Technologies, Inc.

User avatar
jvierra
Posts: 13289
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: About box in GUI

Post by jvierra » Mon Mar 25, 2013 10:52 am

David - I am guessing that the question is asking how to add the information to an about box.

Good call. I couldn't get that out of the question at first.

User avatar
jimbobukii
Posts: 52
Joined: Mon Jan 14, 2013 10:34 pm

Re: About box in GUI

Post by jimbobukii » Mon Mar 25, 2013 11:21 am

Thanks all,

I used the following....


PowerShell Code
Double-click the code block to select all.
$formNewApplicationName_Load={
	#TODO: Initialize Form Controls here
$authorVersion = '1.0'
$authorDate = 'March 2013'
$authorName = 'Jason Rose'
$authorEmail = 'jrose@yyyy.net.uk'
$authorWebsite = 'http://yyyyy.co.uk'
$authorDitty = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. 
Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. 
It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. 
It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."
$authorAppName = $formNewApplicationName.Text
}

$aboutToolStripMenuItem_Click={
	#TODO: Place custom script here
	[void][System.Windows.Forms.MessageBox]::Show("Version:`t$authorVersion ($authorDate)`nEmail:`t$authorEmail`nWebSite:`t$authorWebsite`n`n$authorDitty","About $authorAppName")

}

User avatar
davidc
Posts: 5725
Joined: Thu Aug 18, 2011 4:56 am

Re: About box in GUI

Post by davidc » Mon Mar 25, 2013 11:26 am

I was just about to suggest a message box if you only care about displaying text.

David
David
SAPIEN Technologies, Inc.

Locked