AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

create an "About" window

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
twhyman



Joined: 07 Dec 2005
Posts: 256

PostPosted: Wed Jan 18, 2006 11:15 am    Post subject: create an "About" window Reply with quote

Hi,

i want to create a button on the GUI that by clicking it a new window
will popup with a button to link to my site and display some text and an
OK button, to close it.
all this by keeping the main window in the background and disabled until the about window is closed.

i tried to make this work and i went over the GUI commands and i cant figure it out.... Question

Thanks
Twhyman
Back to top
View user's profile Send private message
toralf



Joined: 31 Jan 2005
Posts: 3841
Location: Bremen, Germany

PostPosted: Wed Jan 18, 2006 11:42 am    Post subject: Reply with quote

Please post your code, then we can take a look.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
twhyman



Joined: 07 Dec 2005
Posts: 256

PostPosted: Wed Jan 18, 2006 11:53 am    Post subject: Reply with quote

i want to implent the about button in couple of little applications that i made

so here is the most basic start code:
Code:

Gui, Add, Button, x36 y227 w390 h40 gTest,About
Gui, Show, x416 y352 h281 w446 ,
Return

Test:
? ; What Goes here?
Return

GuiClose:
ExitApp



iam posting it cause its just a buton that i want to add Confused and i wish to know the starter code for this kind of function.

thanks
Twhyman
Back to top
View user's profile Send private message
toralf



Joined: 31 Jan 2005
Posts: 3841
Location: Bremen, Germany

PostPosted: Wed Jan 18, 2006 12:02 pm    Post subject: Reply with quote

You need to create a new GUI if you want to have a link to your website showing.
Since the GUI ID has to be different to the IDs used in the main script, I suggest to use a high ID, e.g. 99 or 77.
I would name the g-lable of the AboutButton BtnOpenAboutWindow, so it doesn't conflict with any other subroutine.

The subroutine BtnOpenAboutWindow and all the code of the about window should be placed in a separate file that is only included into the main script with #Include, so you can include the about into several other scripts as well.

Since you want to have an interaction between the calling GUI and the About window, e.g. disable the calling GUI, you have to have a variable in the calling script that holds the GUI ID, so you know which ID you have to set inactive.

The link you can represent with a text control that has blue text color and is underlined. With OnMessage() and GetMousePos you can find out if the text control is clicked, and act acoordingly.

Or you can search the forum, I can remeber that several people have posted examples for an about window with a link. Good luck.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
neyon



Joined: 29 May 2005
Posts: 34
Location: The Netherlands

PostPosted: Wed Jan 18, 2006 12:39 pm    Post subject: Reply with quote

Okay, this is a very basic piece of code:

Code:

; Gui 1, Main Gui
Gui, Add, Button, x+20  gInfo,&Info
Gui, Add, Button, x+40  gExit,&Exit

; Gui 2, About Gui
Gui, 2:Add, Text,, `n(c)2005`nVersion : 1.0`nAuthor : Autohotkey`nDate  : 2006-01-01
; When needed: Insert a logo ->  Gui, 2:Add, Picture,x+20,logo.jpg
Gui, 2:Add, Text,cBlue gWebsite, www.autohotkey.com`n
Gui, 2:Add, Button, xm gOk, &Ok

Gui, Show,,Main Screen
return

Info:
Gui, 2:Show,,About
Return

Website:
run www.autohotkey.com
return

Ok:
Gui, 2:Submit
Return

Exit:
GuiClose:
ExitApp

_________________
Greetz,
Neyon


Last edited by neyon on Wed Jan 18, 2006 12:53 pm; edited 1 time in total
Back to top
View user's profile Send private message
AGU
Guest





PostPosted: Wed Jan 18, 2006 12:48 pm    Post subject: Reply with quote

I've made s.th like this in my BBCodeWriter script.

Just in case you're willing to study some code, take a look at http://www.autohotkey.com/forum/viewtopic.php?t=6161

Open '?' in the menu bar and click "About..."
The code passage can be found in BBCodeEditor.ahk and is named "About GUI".

Cheers
AGU
Back to top
twhyman



Joined: 07 Dec 2005
Posts: 256

PostPosted: Wed Jan 18, 2006 1:18 pm    Post subject: Reply with quote

thanks alot guys especially neyon you rock!


Twhyman
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group