Sign in to follow this  
Followers 0
DasFox

GUI Icon, Msgbox Image, Icon & Hotlink?

37 posts in this topic

#1 ·  Posted (edited)

On the GUI I have the icon placed like this:

$n = GUICtrlCreatePic(@WindowsDir & "\Help\Tours\htmlTour\Admin.jpg", 320, 10, 70, 100)

But I'd like to know is there a way to embed the icon into the GUI when I build it?

Also I'm using a msgbox for my 'About' window, and wanted to know how can I change the Information-sign icon to place in my own icon, as well as a background image... Also can these images be embedded in too?

Also I placed HTML in the About window to show what I'm trying to accomplish, make the weblink Hot linkable, can this be done?

If it's not to complicated I'd like to make a nice About window, something like Firefox's, but everything just as one window with a nice image and a hotlink to go to my website when people click it.

Here is a screenshot:

Posted ImagePosted Image

THANKS

Edited by DasFox

Share this post


Link to post
Share on other sites



DasFox

I'd like to know is there a way to embed the icon into the GUI when I build it?

Use a GUICtrlCreateIcon() function.

Also I'm using a msgbox for my 'About' window, and wanted to know how can I change the Information-sign icon to place in my own icon, as well as a background image... Also can these images be embedded in too?

Create your own MessageBox using a GuiCreate() function.

Share this post


Link to post
Share on other sites

For the label you can use:

$Label1 = GUICtrlCreateLabel("www.hotlink.com", x, x, x, x)

While 1
$nMsg = GUIGetMsg()
    Select
    Case $nMsg = $Label1
       ShellExecute("www.canidothis.com")
    EndSelect
WEnd

AlmarM


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

For the label you can use:

$Label1 = GUICtrlCreateLabel("www.hotlink.com", x, x, x, x)
You also can use a SysLink control :) Demo included:

#include <WinAPI.au3>
#include <WindowsConstants.au3>
Global Const $WC_LINK = "SysLink"
Global Const $WC_LINKA = $WC_LINK
Global Const $WC_LINKW = $WC_LINK

$Parent = GUICreate("SysLink demo")

$g_hLink = _WinAPI_CreateWindowEx(0,$WC_LINK, _ 
        'For more information, <A HREF="http://www.microsoft.com" ID="LInkIDURL+ID">click here</A>, <a href="http://www.microsoft.com">here</a> or <A ID="idInfo">here</A>. And at last <a>here</a>', _
        BitOR($WS_VISIBLE , $WS_CHILD , $WS_TABSTOP), _
        10,10, 300,60, $Parent)
GUICtrlCreateButton("hi",10,80,80,30)
GUISetState()
GUIRegisterMsg($WM_NOTIFY,"MY_LINK_NOTIFY")


While GUIGetMsg() <> -3
    Sleep(1)
WEnd
        
;~ // g_hLink is the handle of the SysLink control.
Func MY_LINK_NOTIFY($hWnd, $Msg, $wParam, $lParam)
    Local Const $tagNMLINK = $tagNMHDR & ";" & "UINT mask; int iLink; UINT state; UINT stateMask; WCHAR szID[48]; WCHAR szUrl[2083];"
    Local $NMHDR = DllStructCreate($tagNMHDR,$lParam)
    Local $hwndFrom = DllStructGetData($NMHDR,"hwndFrom");
    Switch $hwndFrom
        Case $g_hLink
        switch DllStructGetData($NMHDR,"code")
            case $NM_CLICK
                ContinueCase
            case $NM_RETURN
                $NMHDR = DllStructCreate($tagNMLINK,$lParam)
                Local $iLink = DllStructGetData($NMHDR,"iLink")
                Local $szURL = DllStructGetData($NMHDR,"szURL")
                Local $szID = DllStructGetData($NMHDR,"szID")
                
                if $szURL <> "" Then
                    Local $ShouldOpen = MsgBox(4, 'Open URL?',"Should the URL be opened? "& @CRLF & $szURL & _
                        @CRLF & "If available, the Next Line Contains szID:" &@CRLF & $szID )
                    If $ShouldOpen = 6 Then ShellExecute($szURL, "", "", "open",@SW_SHOW);
                ElseIf $szID <> "" Then
                    MsgBox(0, 'Link Clicked',"The Link has no URL, but the following szID: " & @CRLF & $szID)
                Else
                    MsgBox(0, 'Link Clicked',"The Link has no URL, and no szID: " & @CRLF & $szID)
                EndIf
        EndSwitch
    EndSwitch
EndFunc
Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

On the GUI I have the icon placed like this:

$n = GUICtrlCreatePic(@WindowsDir & "\Help\Tours\htmlTour\Admin.jpg", 320, 10, 70, 100)

But I'd like to know is there a way to embed the icon into the GUI when I build it?

Also I'm using a msgbox for my 'About' window, and wanted to know how can I change the Information-sign icon to place in my own icon, as well as a background image... Also can these images be embedded in too?

THANKS

@DasFox

to address your embedded icon, bitmap resource question:

for your background images uses Zednas resource UDF

Add and use binary data to/from resources

this UDF will embed icon, bitmap, data etc resources

internally in your exe without having to fileinstall to hard disk.

for icons you can use AutoItWrapper compiler directives to add icon resources to your EXE

look at this example script

use 'Reshacker' tool to look at EXE internal resources

http://angusj.com/resourcehacker/

Edit: typing in the word 'embed' in the forum search engine brings up the link to Zednas UDF on the first results page.

something to keep in mind when you have questions.

#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\au3.ico
#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype1.ico
#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype2.ico
#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype3.ico
#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\filetype-blank.ico

Opt('MustDeclareVars', 1)

If Not @Compiled And MsgBox(262144,"Compiled script icon resource test", "Compile this script to an exe first, then run") Then Exit
Local $hGui, $icon, $msg, $icnt = 0
$hGui = GUICreate("Compiled script with internal icons", 400, 200)

;default AutoIt internal icons are -1 to -4 (-2 is blank) or icon group name 161,162,164,169
;custom icons start at -5 or icon group name 201

;set both gui and tray icon to internal custom icon au3.ico index -5 or icon group 201
GUISetIcon(@AutoItExe, 201, $hGui) ; using icon group name number
TraySetIcon(@AutoItExe, -5)        ; using negative 1 based index number

;display internal icons -1 to -9 using 1 based negative index numbers (Resource 'Icon' section)
For $i = 1 To 9
    GUICtrlCreateIcon(@AutoItExe, -$i, 20+$icnt, 20, 32, 32)
    GUICtrlCreateLabel(-$i, 20+$icnt+10, 60, 32, 20)
    $icnt +=40
Next

;display internal icons using string equivalent icon name (Resource 'Icon Group' section)
$icnt = 0
For $i = 1 To 5
    GUICtrlCreateIcon(@AutoItExe, 200 + $i, 20+$icnt, 100, 48, 48)
    GUICtrlCreateLabel(200 + $i, 20+$icnt+15, 160, 48, 20)
    $icnt +=55
Next

GUISetState()
While 1
    $msg = GUIGetMsg()
    If $msg = -3 Then ExitLoop
WEnd
Edited by rover

I see fascists...

Share this post


Link to post
Share on other sites

Hi DasFox,

1st Welcome to the AutoIt Forums! :idiot:

Some of the following tips may not apply to you, but it may make your life a bit easier here on the forum in the future.

CODE
  • Did you know that we have an awesome search feature?

    You can find many answers to your current questions, just by typing in the right search patterns.

  • A suggestion is to use the Advanced Search mode:

  • Type your specific search term in quotes.
  • Click the forum you want to search in (the one most likely to have your information would generally be the Example Script forum and or the General Help and Support Forum).
  • Click on "Search titles only" radio button.
  • Click perform search.
The above will help you narrow down your searches and prevent you from unneccesarily posting a new thread.

[*]Also, you should try to read the Sticky posts that are at the top of each of the AutoIt Forums you enter such as:

[*]Keep in mind, the help file will be your best friend, however you may find some of the tutorials written by some of our elite forum members helpful.

[*]Forum Etiquette:

  • Making a new thread:

    • Use the Search feature first to see if your question has already been answered.
    • Look in the help file as well before even thinking of posting (When what you want could be obtained by simply reading the help file, you don't generally get a good response from your AutoIt community).
    • Titles are very important here. 1 word titles or titles like "help me", "write something for me", "I'm a noob" etc... aren't tolerated.
    • Make sure you are posting in the correct forum:

      • General Help and Support:

        • This forum is for AutoIt related support questions only. If you have a question related to another language, or nothing at all to do with AutoIt then you need to post in the chat forum, or in that languages perspective forum.
      • Example Script:

        • This forum is for AutoIt scripts/executables only.
        • Source code is preferred but not necessary, you do have the right to just post the binary of your project if you wish.
        • Please don't post questions in this forum unless it's directly related to a thread already existing.
    • Use common sense when creating a new thread.

      Ask yourself if the title is descriptive enough to even interest someone (preferably those that know what they are talking about) to even look at your thread, let alone reply in it.

    • Think about how it would show in the search feature if someone were to look for something just like you are looking for (think of the keywords you used yourself and obviously didn't find anything (because we know you used the search feature :) ) and use those types of keywords in your title as well).
  • Thread content:

    • Be descriptive with your query. (Make sure we actually know what you want to do).
    • Show you've made an effort in coding what you want (provide the reproducer code (generally no more than 50 lines as people lose interest in debugging someones script for free)).
    • Don't talk in ebonics. A lot of the forum members are adults, and a lot of them know how to help you, but talk like a child, you'll be treated as such.
    • Don't ask for help making keyloggers, spam (even if it's to do as a prank), or anything that can be thought of as malicious. You'll more than likely have the thread locked by a moderator, and take a bashing from your fellow AutoIt community.
    • When posting code, use code boxes. This can be accomplished by using [code ]<content here>[/code ] (No spaces between the brackets []).

      Using code boxes will keep the indentation and make it easier to read for others to help you.

  • Bumping your threads:

    • Use common courtesy here.

      Keep in mind every time you bump your thread to the top of the forum, you knock the other threads down a notch.

      Everyone posting for help has just as much right for their threads to get read as you do.

      Because of that, do not bump your post more than once in a 24 hour period.

      A Bump is simply posting in your thread with nothing that pertains to your query with the sole purpose of moving it up.

      Deleting previous bumps, and posting new ones is not tolerated, and the moderators can find those deletions, so do yourself a favor and don't cross that line >_< .

  • Rude or obnoxious content:

    This falls pretty much under the common sense thing. If you use it (common sense) before posting, you won't have issues.

    • Don't use foul language, remember, a lot of the community is at work when they read these threads.
    • Don't provoke or instigate an argument with someone.
  • Double Posting:

    • It's understood that sometimes there's a lag in the system, and sometimes people don't see their post go up right aways so they post again.

      If this happens to you, simply notify a moderator with the report feature in the post, and politely ask them to delete it.

    • If you're just creating another topic because your original topic is not being answered the way you want or at all, this is not tolerated. You could lose your posting privileges all together over it.
  • Non-English languages

    • If English is not your primary language, please make an attempt to interpret (yourself or online) and post that interpretation.

      We have wonderful users from around the world, so after you've done your post in English, back it up with your question also in your native tongue (You may find your answer much quicker using both).

That's it for now, I hope you have a wonderful learning experience, and hope to see you contribute to the community as your knowledge grows.

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

THANKS guys....

I'm a PC geek, I know how to search on a forum, yesterday the site was not loading for me for about an hour and then when it did and I logged onto the forum and tried to run a search it wasn't loading either. So after all the waiting I just gave up and made a post...

I'm still a noob with AutoIT, so I really don't know how to work with this code, so I won't bother any further with this, I wouldn't expect people to hand feed me, hehe... BUT thanks heaps...

For now I'll just chew small and try to figure out how to deal with making a hotlink in the msgbox.

For now this is what I have for that and I really don't get how to make the code AlmarM posted work to add to this.

Func _AboutProgram()
    
                MsgBox(64, "About Program Launcher", "Program Launcher v1.0" & @LF & @LF & _
                           "Author: " & @LF & _
                           "Email: " & @LF & _ 
                           "Website: www.hotlink.com")
EndFunc ;==>_AboutProgram

How would I place that in here to make www.hotlink.com a hotlink?

THANKS again guys your great! :)

PEACE

Edited by DasFox

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

THANKS guys....

I'm a PC geek, I know how to search on a forum, yesterday the site was not loading for me for about an hour and then when it did and I logged onto the forum and tried to run a search it wasn't loading either. So after all the waiting I just gave up and made a post...

I'm still a noob with AutoIT, so I really don't know how to work with this code, so I won't bother any further with this, I wouldn't expect people to hand feed me, hehe... BUT thanks heaps...

For now I'll just chew small and try to figure out how to deal with making a hotlink in the msgbox.

For now this is what I have for that and I really don't get how to make the code AlmarM posted work to add to this.

Func _AboutProgram()
    
                MsgBox(64, "About Program Launcher", "Program Launcher v1.0" & @LF & @LF & _
                           "Author: " & @LF & _
                           "Email: " & @LF & _ 
                           "Website: www.hotlink.com")
EndFunc;==>_AboutProgram

How would I place that in here to make www.hotlink.com a hotlink?

THANKS again guys your great! :)

PEACE

@DasFox, thanks for responding.

many users on this forum don't respond at all after working solutions are posted to their questions.

but that's what the ignore list is for.

you might be able to add a hotlink to a message box but you probably need to subclass and or register messages for it as its a pre-made blocking function.

I don't have examples at hand but that's what I've done.

there are examples on the forum of adding or modifying buttons on a message box.

your better off using one of the 'about' box examples on the forum and modifying it to your needs

Create an about window

heres AlmarMs code as an example of the hotlink

Edit: Welcome to the forums >_<

$hGui = GUICreate("hotlink test", 200, 200)

$Label1 = GUICtrlCreateLabel("www.google.com", 20, 20, 100, 20)
GUICtrlSetColor(-1,0xFF0000)
GUICtrlSetTip(-1,"Click hotlink www.google.com")
GUISetState()

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $Label1
            ShellExecute("www.google.com")
        Case -3
            Exit
    EndSwitch
WEnd
Edited by rover

I see fascists...

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

Rover thanks for the reply, well I get what you mean about those hit and runners, don't worry I reply, I'm an old school geek 20+ years, I'm just a total noob at AutoIT is all, LOL....

Ok here's the deal, I'm still sucking on baby food, and what I'm seeing here is a lot of meat, and I'm not ready to chew it yet, and still looks like a lot of Greek too, hehe...

Basically I'm just hoping someone can say, use this code, and place it here to make it work, so then I can see a working example and start learning, otherwise I'm just lost still with this....

So with this code to work, would I place it inside the code I just posted for my msgbox?:

Func

Place new code here....

EndFunc

THANKS

Edited by DasFox

Share this post


Link to post
Share on other sites

Rover thanks for the reply, well I get what you mean about those hit and runners, don't worry I reply, I'm an old school geek 20+ years, I'm just a total noob at AutoIT is all, LOL....

Ok here's the deal, I'm still sucking on baby food, and what I'm seeing here is a lot of meat, and I'm not ready to chew it yet, and still looks like a lot of Greek too, hehe...

Basically I'm just hoping someone can say, use this code, and place it here to make it work, so then I can see a working example and start learning, otherwise I'm just lost still with this....

So with this code to work, would I place it inside the code I just posted for my msgbox?:

Func

Place new code here....

EndFunc

THANKS

no problem

give me a few minutes...


I see fascists...

Share this post


Link to post
Share on other sites

You also can use a SysLink control

Very interesting! Thanks. :)

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

@DasFox

more or less what is in the link I posted above

#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\au3.ico
#include <GUIConstantsEX.au3>
#include <Constants.au3>
#include <WindowsConstants.au3>

$hGui = GUICreate("Main Form GUI", 207, 200)

$AboutBtn = GUICtrlCreateButton("About", 60, 60, 80, 25)
GUISetState()

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $AboutBtn
            _AboutProgram()
    EndSwitch
WEnd


Func _AboutProgram()
    Local $hGui, $Label1, $OKBtn, $nMsg
    $hGui = GUICreate("About Program Launcher", 207, 170, -1, -1, $WS_SYSMENU, $WS_EX_TOPMOST )
    ;$hGui = GUICreate("hotlink test", 207, 170, -1, -1, -1, bitor($WS_EX_TOOLWINDOW,$WS_EX_TOPMOST )) ; alternate window style
    If @Compiled Then
        GUISetIcon(@AutoItExe, -5, $hGui)
    Else
        GUISetIcon("C:\Program Files\AutoIt3\Icons\au3.ico", -1, $hGui)
    EndIf

    If @Compiled Then 
        GUICtrlCreateIcon(@AutoItExe, -5, 12, 12, 32, 32) ; for compiled
    Else
        GUICtrlCreateIcon("C:\Program Files\AutoIt3\Icons\au3.ico", -1, 12, 12, 32, 32)
    EndIf

    GUICtrlCreateLabel("Program Launcher v1.0", 66, 12, 125, 20)
    GUICtrlCreateLabel("Author:", 66, 40, 100, 20)
    GUICtrlCreateLabel("Email: ", 66, 55, 100, 20)
    $Label1 = GUICtrlCreateLabel("Website: www.hotlink.com", 66, 70, 135, 20)
    GUICtrlSetColor(-1,0xFF0000) ; set color red
    GUICtrlSetFont(-1, -1, -1, 4) ;underlined font
    GUICtrlSetTip(-1,"Click to visit www.hotlink.com") ;set tooltip
    GUICtrlSetCursor(-1, 0)
    $OKBtn = GUICtrlCreateButton("OK", 66, 100, 75, 25)
    GUISetState()

    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $Label1
                ShellExecute("http://www.hotlink.com")
            Case $OKBtn, $GUI_EVENT_CLOSE
                GUIDelete($hGui)
                Return
        EndSwitch
    WEnd
EndFunc;==>_AboutProgram
Edited by rover

I see fascists...

Share this post


Link to post
Share on other sites

#13 ·  Posted (edited)

This is what I have in my code now, of course I haven't got a clue as to where I'm placing stuff, LOL...

#include <GUIConstantsEx.au3>
#include <Constants.au3>
#include <WindowsConstants.au3>

Opt('MustDeclareVars', 1)
; *** we comment out this function, not needed normally
;Program()

;Func Program()
  ;Local/Global *** we declare local/global the GUI objects, to use in functions
    Global $Button_1, $Button_2, $Button_3, $Button_4, $Button_5, $Button_6, $Button_7, $Button_8, $Button_9
    Global $AboutBtn, $exititem, $filemenu, $hGui, $Label1, $mnuAbout, $mnuInfo, $msg, $n 
    Global $nMsg, $OKBtn
    
    GUICreate("Program Launcher v1.0",700, 400); will create a dialog box that when displayed is centered
    
    GUISetBkColor(0xFFFFFF)
    $n = GUICtrlCreatePic(@WindowsDir & "\Help\Tours\htmlTour\Admin.jpg", 600, 10, 70, 100)
    
    $filemenu = GUICtrlCreateMenu("&File")
    $exititem = GUICtrlCreateMenuItem("&Exit", $filemenu)

    $mnuInfo = GUICtrlCreateMenu("&Info")
    $mnuAbout = GUICtrlCreateMenuItem("&About",$mnuInfo)

    Opt("GUICoordMode", 3)
    $Button_1 = GUICtrlCreateButton("Calculator", 30, 130, 120)
    $Button_2 = GUICtrlCreateButton("CCleaner", 160, 130, 120)
    $Button_3 = GUICtrlCreateButton("Control Panel", 290, 130, 120)
    $Button_4 = GUICtrlCreateButton("Disk Defragmenter", 420, 130, 120)
    $Button_5 = GUICtrlCreateButton("Disk Management", 30, 160, 120)
    $Button_6 = GUICtrlCreateButton("Display Properties",160, 160, 120)
    $Button_7 = GUICtrlCreateButton("Search Results", 30, 250, 120)
    $Button_8 = GUICtrlCreateButton("System Config Utility", 30, 280, 120)
    $Button_9 = GUICtrlCreateButton("System Properties", 30, 310, 120)

    GUICtrlCreateLabel("Welcome To Program Launcher v1.0", 30, 10)
    GUICtrlCreateLabel("The Program Launcher makes it easy", 30, 40) 
    GUICtrlCreateLabel("to run all of your favorite programs.", 30, 55)
    GUICtrlCreateLabel("Click a button below to open a program.", 30, 90)
    
    GUISetState()   ; dialog box with button

  ; Run the GUI until the dialog is closed
    
    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $AboutBtn
            _AboutProgram()
    EndSwitch
WEnd
    
    
    While 1
        $msg = GUIGetMsg()
            
        Select
            Case $msg = $GUI_EVENT_CLOSE
                ExitLoop
            Case $msg = $Button_1
                Run('calc.exe'); Will Run/Open Calculator   
            Case $msg = $Button_2
                Run('C:\Program Files\CCleaner\CCleaner.exe'); Will Run/Open CCleaner
            Case $msg = $Button_3
                Run('control.exe'); Will Run/Open Control Panel
            Case $msg = $Button_4   
                Run('mmc.exe c:\windows\system32\dfrg.msc'); Will Run/Open Disk Defragmenter
            Case $msg = $Button_5   
                Run('mmc.exe c:\windows\system32\diskmgmt.msc'); Will Run/Open Disk Management
            Case $msg = $Button_6
                Run("control.exe desk.cpl"); Will Run/Open Display Properties
            Case $msg = $Button_7   
                Run(@ComSpec & ' /c type nul > %temp%\1.fnd & start %temp%\1.fnd & del /q /f "%temp%\1.fnd"','',@SW_HIDE); Will Run/Open Search Results
            Case $msg = $Button_8
                ShellExecute("msconfig.exe"); Will Run/Open System Configuration Utility
            Case $msg = $Button_9   
                Run("control.exe sysdm.cpl"); Will Run/Open System Properties
            Case $msg = $mnuAbout
            EndSelect
WEnd
;EndFunc ;==>Program

Func _AboutProgram()
    Local $hGui, $Label1, $OKBtn, $nMsg
    $hGui = GUICreate("About Program Launcher", 207, 170, -1, -1, $WS_SYSMENU, $WS_EX_TOPMOST )
  ;$hGui = GUICreate("hotlink test", 207, 170, -1, -1, -1, bitor($WS_EX_TOOLWINDOW,$WS_EX_TOPMOST )); alternate window style
    If @Compiled Then
        GUISetIcon(@AutoItExe, -5, $hGui)
    Else
        GUISetIcon("C:\Program Files\AutoIt3\Icons\au3.ico", -5, $hGui)
    EndIf

    If @Compiled Then
        GUICtrlCreateIcon(@AutoItExe, -5, 12, 12, 32, 32); for compiled
    Else
        GUICtrlCreateIcon("C:\Program Files\AutoIt3\Icons\au3.ico", -1, 12, 12, 32, 32)
    EndIf

    GUICtrlCreateLabel("Program Launcher v1.0", 65, 12, 125, 20)
    GUICtrlCreateLabel("Author:", 65, 40, 100, 20)
    GUICtrlCreateLabel("Email: ", 65, 55, 100, 20)
    $Label1 = GUICtrlCreateLabel("Website: www.hotlink.com", 65, 70, 135, 20)
    GUICtrlSetColor(-1,0xFF0000); set color red
    GUICtrlSetFont(-1, -1, -1, 4);underlined font
    GUICtrlSetTip(-1,"Click to visit www.hotlink.com");set tooltip
    $OKBtn = GUICtrlCreateButton("OK", 66, 100, 75, 25)
    GUISetState()

    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $Label1
                ShellExecute("http://www.hotlink.com")
            Case $OKBtn, $GUI_EVENT_CLOSE
                GUIDelete($hGui)
                Return
        EndSwitch
    WEnd
EndFunc;==>_AboutProgram

THANKS ALOT ROVER!

Edited by DasFox

Share this post


Link to post
Share on other sites

#14 ·  Posted (edited)

corrected a few things, have a look

Edit: some errors I made corrected and Rasims hyperlink highlite added

#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\au3.ico
#include <GUIConstantsEx.au3>
#include <Constants.au3>
#include <WindowsConstants.au3>

Opt('MustDeclareVars', 1)
; *** we comment out this function, not needed normally
;Program()

;Func Program()
;Local/Global *** we declare local/global the GUI objects, to use in functions
Global $Button_1, $Button_2, $Button_3, $Button_4, $Button_5, $Button_6, $Button_7, $Button_8, $Button_9
Global $AboutBtn, $exititem, $filemenu, $hGui, $Label1, $mnuAbout, $mnuInfo, $msg, $n
Global $nMsg, $OKBtn

GUICreate("Program Launcher v1.0", 700, 400); will create a dialog box that when displayed is centered

GUISetBkColor(0xFFFFFF)
$n = GUICtrlCreatePic(@WindowsDir & "\Help\Tours\htmlTour\Admin.jpg", 600, 10, 70, 100)

$filemenu = GUICtrlCreateMenu("&File")
$exititem = GUICtrlCreateMenuItem("&Exit", $filemenu)

$mnuInfo = GUICtrlCreateMenu("&Info")
$mnuAbout = GUICtrlCreateMenuItem("&About", $mnuInfo)

Opt("GUICoordMode", 3)
$Button_1 = GUICtrlCreateButton("Calculator", 30, 130, 120)
$Button_2 = GUICtrlCreateButton("CCleaner", 160, 130, 120)
$Button_3 = GUICtrlCreateButton("Control Panel", 290, 130, 120)
$Button_4 = GUICtrlCreateButton("Disk Defragmenter", 420, 130, 120)
$Button_5 = GUICtrlCreateButton("Disk Management", 30, 160, 120)
$Button_6 = GUICtrlCreateButton("Display Properties", 160, 160, 120)
$Button_7 = GUICtrlCreateButton("Search Results", 30, 250, 120)
$Button_8 = GUICtrlCreateButton("System Config Utility", 30, 280, 120)
$Button_9 = GUICtrlCreateButton("System Properties", 30, 310, 120)

GUICtrlCreateLabel("Welcome To Program Launcher v1.0", 30, 10)
GUICtrlCreateLabel("The Program Launcher makes it easy", 30, 40)
GUICtrlCreateLabel("to run all of your favorite programs.", 30, 55)
GUICtrlCreateLabel("Click a button below to open a program.", 30, 90)

GUISetState() ; dialog box with button


While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $exititem, $GUI_EVENT_CLOSE
            Exit
        Case $Button_1
            Run('calc.exe'); Will Run/Open Calculator
        Case $Button_2
            Run('C:\Program Files\CCleaner\CCleaner.exe'); Will Run/Open CCleaner
        Case $Button_3
            Run('control.exe'); Will Run/Open Control Panel
        Case $Button_4
            Run('mmc.exe c:\windows\system32\dfrg.msc'); Will Run/Open Disk Defragmenter
        Case $Button_5
            Run('mmc.exe c:\windows\system32\diskmgmt.msc'); Will Run/Open Disk Management
        Case $Button_6
            Run("control.exe desk.cpl"); Will Run/Open Display Properties
        Case $Button_7
            Run(@ComSpec & ' /c type nul > %temp%\1.fnd & start %temp%\1.fnd & del /q /f "%temp%\1.fnd"', '', @SW_HIDE); Will Run/Open Search Results
        Case $Button_8
            ShellExecute("msconfig.exe"); Will Run/Open System Configuration Utility
        Case $Button_9
            Run("control.exe sysdm.cpl"); Will Run/Open System Properties
        Case $mnuAbout
            _AboutProgram()
    EndSwitch
WEnd
;EndFunc ;==>Program

Func _AboutProgram()
    Local $hGUIAbout, $Label1, $OKBtn, $nMsg, $aPos, $iFlag = False
    $hGUIAbout = GUICreate("About Program Launcher", 207, 170, -1, -1, $WS_SYSMENU, $WS_EX_TOPMOST)
    ;$hGui = GUICreate("hotlink test", 207, 170, -1, -1, -1, bitor($WS_EX_TOOLWINDOW,$WS_EX_TOPMOST )); alternate window style
    If @Compiled Then
        GUISetIcon(@AutoItExe, -5, $hGui)
    Else
        GUISetIcon("C:\Program Files\AutoIt3\Icons\au3.ico", -1, $hGui)
    EndIf

    If @Compiled Then
        GUICtrlCreateIcon(@AutoItExe, -5, 12, 12, 32, 32); for compiled
    Else
        GUICtrlCreateIcon("C:\Program Files\AutoIt3\Icons\au3.ico", -1, 12, 12, 32, 32)
    EndIf

    GUICtrlCreateLabel("Program Launcher v1.0", 66, 12, 125, 20)
    GUICtrlCreateLabel("Author:", 66, 40, 100, 20)
    GUICtrlCreateLabel("Email: ", 66, 55, 100, 20)
    $Label1 = GUICtrlCreateLabel("Website: www.hotlink.com", 66, 70, 135, 20)
    GUICtrlSetColor(-1, 0xFF0000); set color red
    GUICtrlSetFont(-1, -1, -1, 4);underlined font
    GUICtrlSetTip(-1, "Click to visit www.hotlink.com");set tooltip
    GUICtrlSetCursor(-1, 0) ; added this after you saw my post, changes cursor to hand when hovering over hyperlink
    $OKBtn = GUICtrlCreateButton("OK", 66, 100, 75, 25)
    GUISetState()

    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $Label1
                ShellExecute("http://www.hotlink.com")
            Case $OKBtn, $GUI_EVENT_CLOSE
                GUIDelete($hGui)
                Return
        EndSwitch
        
        $aPos = GUIGetCursorInfo($hGUIAbout)
        If IsArray($aPos) Then
            If ($aPos[4] = $Label1) And $iFlag = False Then
                $iFlag = True
                GUICtrlSetColor($Label1, 0x0000FF)
            ElseIf ($aPos[4] <> $Label1) And $iFlag = True Then
                $iFlag = False
                GUICtrlSetColor($Label1, 0xFF0000)
            EndIf
        EndIf
    WEnd
EndFunc   ;==>_AboutProgram
Edited by rover

I see fascists...

Share this post


Link to post
Share on other sites

Little improving:

#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\au3.ico
#include <GUIConstantsEX.au3>
#include <Constants.au3>
#include <WindowsConstants.au3>

$hGui = GUICreate("Main Form GUI", 207, 200)

$AboutBtn = GUICtrlCreateButton("About", 60, 60, 80, 25)

GUISetState()

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $AboutBtn
            _AboutProgram()
    EndSwitch
WEnd


Func _AboutProgram()
    Local $hGui, $Label1, $OKBtn, $nMsg, $aPos, $iFlag = False
    $hGUIAbout = GUICreate("About Program Launcher", 207, 170, -1, -1, $WS_SYSMENU, $WS_EX_TOPMOST )
    ;$hGUIAbout = GUICreate("hotlink test", 207, 170, -1, -1, -1, bitor($WS_EX_TOOLWINDOW,$WS_EX_TOPMOST )) ; alternate window style
    If @Compiled Then
        GUISetIcon(@AutoItExe, -5, $hGUIAbout)
    Else
        GUISetIcon("C:\Program Files\AutoIt3\Icons\au3.ico", -5, $hGUIAbout)
    EndIf

    If @Compiled Then 
        GUICtrlCreateIcon(@AutoItExe, -5, 12, 12, 32, 32) ; for compiled
    Else
        GUICtrlCreateIcon("C:\Program Files\AutoIt3\Icons\au3.ico", -1, 12, 12, 32, 32)
    EndIf

    GUICtrlCreateLabel("Program Launcher v1.0", 65, 12, 125, 20)
    GUICtrlCreateLabel("Author:", 65, 40, 100, 20)
    GUICtrlCreateLabel("Email: ", 65, 55, 100, 20)
    $Label1 = GUICtrlCreateLabel("Website: www.hotlink.com", 65, 70, 135, 20)
    GUICtrlSetCursor(-1, 0)
    GUICtrlSetColor(-1,0xFF0000) ; set color red
    GUICtrlSetFont(-1, -1, -1, 4) ;underlined font
    GUICtrlSetTip(-1,"Click to visit www.hotlink.com") ;set tooltip
    $OKBtn = GUICtrlCreateButton("OK", 66, 100, 75, 25)
    GUISetState()

    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $Label1
                ShellExecute("http://www.hotlink.com")
            Case $OKBtn, $GUI_EVENT_CLOSE
                GUIDelete($hGUIAbout)
                Return
        EndSwitch
        
        $aPos = GUIGetCursorInfo($hGUIAbout)
        If IsArray($aPos) Then
            If ($aPos[4] = $Label1) And $iFlag = False Then
                $iFlag = True
                GUICtrlSetColor($Label1, 0x0000FF)
            ElseIf ($aPos[4] <> $Label1) And $iFlag = True Then
                $iFlag = False
                GUICtrlSetColor($Label1, 0xFF0000)
            EndIf
        EndIf
    WEnd
EndFunc;==>_AboutProgram

:)

Share this post


Link to post
Share on other sites

Greetings Rasim :)

great addition, I remember seeing that I think in MrCreators about box.


I see fascists...

Share this post


Link to post
Share on other sites

updated previous example with changes

thanks Rasim :)


I see fascists...

Share this post


Link to post
Share on other sites

#18 ·  Posted (edited)

Btw when I add in the bb {code} {/code} how come I'm not getting a scrolling window anymore?

THANKS guys this is really awesome of you!

Ok I took what rasim now gave me, SORRY rover he said 'little improving' so I thought maybe I should add it in.

I added another: GUICtrlCreateLabel("Website:", 65, 70, 135, 20)

So that the word Website wasn't hot linkable too, only the URL...

Also I changed the link color to blue and if you don't mouse over it goes back to blue, only red with the mouse over.

Ok here is what I did, and it seems to be running: (If I click the link it doesn't work now) :)

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.2.12.1
 Author:         myName

 Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\au3.ico
#include <GUIConstantsEx.au3>
#include <Constants.au3>
#include <WindowsConstants.au3>

Opt('MustDeclareVars', 1)
; *** we comment out this function, not needed normally
;Program()

;Func Program()
;Local/Global *** we declare local/global the GUI objects, to use in functions
Global $Button_1, $Button_2, $Button_3, $Button_4, $Button_5, $Button_6, $Button_7, $Button_8, $Button_9
Global $AboutBtn, $exititem, $filemenu, $hGui, $hGUIAbout, $Label1, $mnuAbout, $mnuInfo, $msg, $n
Global $nMsg, $OKBtn

GUICreate("Program Launcher v1.0", 700, 400); will create a dialog box that when displayed is centered

GUISetBkColor(0xFFFFFF)
$n = GUICtrlCreatePic(@WindowsDir & "\Help\Tours\htmlTour\Admin.jpg", 600, 10, 70, 100)

$filemenu = GUICtrlCreateMenu("&File")
$exititem = GUICtrlCreateMenuItem("&Exit", $filemenu)

$mnuInfo = GUICtrlCreateMenu("&Info")
$mnuAbout = GUICtrlCreateMenuItem("&About", $mnuInfo)

Opt("GUICoordMode", 3)
$Button_1 = GUICtrlCreateButton("Calculator", 30, 130, 120)
$Button_2 = GUICtrlCreateButton("CCleaner", 160, 130, 120)
$Button_3 = GUICtrlCreateButton("Control Panel", 290, 130, 120)
$Button_4 = GUICtrlCreateButton("Disk Defragmenter", 420, 130, 120)
$Button_5 = GUICtrlCreateButton("Disk Management", 30, 160, 120)
$Button_6 = GUICtrlCreateButton("Display Properties", 160, 160, 120)
$Button_7 = GUICtrlCreateButton("Search Results", 30, 250, 120)
$Button_8 = GUICtrlCreateButton("System Config Utility", 30, 280, 120)
$Button_9 = GUICtrlCreateButton("System Properties", 30, 310, 120)

GUICtrlCreateLabel("Welcome To Program Launcher v1.0", 30, 10)
GUICtrlCreateLabel("The Program Launcher makes it easy", 30, 40)
GUICtrlCreateLabel("to run all of your favorite programs.", 30, 55)
GUICtrlCreateLabel("Click a button below to open a program.", 30, 90)

GUISetState(); dialog box with button


While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $exititem, $GUI_EVENT_CLOSE
            Exit
        Case $Button_1
            Run('calc.exe'); Will Run/Open Calculator
        Case $Button_2
            Run('C:\Program Files\CCleaner\CCleaner.exe'); Will Run/Open CCleaner
        Case $Button_3
            Run('control.exe'); Will Run/Open Control Panel
        Case $Button_4
            Run('mmc.exe c:\windows\system32\dfrg.msc'); Will Run/Open Disk Defragmenter
        Case $Button_5
            Run('mmc.exe c:\windows\system32\diskmgmt.msc'); Will Run/Open Disk Management
        Case $Button_6
            Run("control.exe desk.cpl"); Will Run/Open Display Properties
        Case $Button_7
            Run(@ComSpec & ' /c type nul > %temp%\1.fnd & start %temp%\1.fnd & del /q /f "%temp%\1.fnd"', '', @SW_HIDE); Will Run/Open Search Results
        Case $Button_8
            ShellExecute("msconfig.exe"); Will Run/Open System Configuration Utility
        Case $Button_9
            Run("control.exe sysdm.cpl"); Will Run/Open System Properties
        Case $mnuAbout
            _AboutProgram()
    EndSwitch
WEnd
;EndFunc;==>Program

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $AboutBtn
            _AboutProgram()
    EndSwitch
WEnd


Func _AboutProgram()
    Local $hGui, $Label1, $OKBtn, $nMsg, $aPos, $iFlag = False
    $hGUIAbout = GUICreate("About Program Launcher", 250, 170, -1, -1, $WS_SYSMENU, $WS_EX_TOPMOST )
 ;$hGUIAbout = GUICreate("hotlink test", 207, 170, -1, -1, -1, bitor($WS_EX_TOOLWINDOW,$WS_EX_TOPMOST )); alternate window style
    If @Compiled Then
        GUISetIcon(@AutoItExe, -5, $hGUIAbout)
    Else
        GUISetIcon("C:\Program Files\AutoIt3\Icons\au3.ico", -5, $hGUIAbout)
    EndIf

    If @Compiled Then
        GUICtrlCreateIcon(@AutoItExe, -5, 12, 12, 32, 32); for compiled
    Else
        GUICtrlCreateIcon("C:\Program Files\AutoIt3\Icons\au3.ico", -1, 12, 12, 32, 32)
    EndIf

    GUICtrlCreateLabel("Program Launcher v1.0", 65, 12, 125, 20)
    GUICtrlCreateLabel("Author:", 65, 40, 100, 20)
    GUICtrlCreateLabel("Email:", 65, 55, 100, 20)
    GUICtrlCreateLabel("Website:", 65, 70, 135, 20)
    $Label1 = GUICtrlCreateLabel("www.hotlink.com", 120, 70, 135, 20)
    GUICtrlSetCursor(-1, 0)
    GUICtrlSetColor(-1,0x0000FF); set color blue
    GUICtrlSetFont(-1, -1, -1, 4);underlined font
    GUICtrlSetTip(-1,"Click to visit www.hotlink.com");set tooltip
    $OKBtn = GUICtrlCreateButton("OK", 66, 100, 75, 25)
    GUISetState()

    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $Label1
                ShellExecute("http://www.hotlink.com")
            Case $OKBtn, $GUI_EVENT_CLOSE
                GUIDelete($hGUIAbout)
                Return
        EndSwitch
       
        $aPos = GUIGetCursorInfo($hGUIAbout)
        If IsArray($aPos) Then
            If ($aPos[4] = $Label1) And $iFlag = False Then
                $iFlag = True
                GUICtrlSetColor($Label1, 0xFF0000)
            ElseIf ($aPos[4] <> $Label1) And $iFlag = True Then
                $iFlag = False
                GUICtrlSetColor($Label1, 0x0000FF)
            EndIf
        EndIf
    WEnd
EndFunc;==>_AboutProgram
Edited by DasFox

Share this post


Link to post
Share on other sites

#19 ·  Posted (edited)

I think code box is

{code} must be no scrolling, never tried that, I mostly use AutoIt boxes.

I reversed the hyperlink colours so normal is underlined blue like Google links

you may want to adjust the about box dimensions

and change about box icon in the compiler directive

you can also add main icon and tray icon of your choice

see the icon example I posted earlier for guiseticon and trayseticon

you can add an image or set background colour of the about box

have a look at the WS_EX_TOOLWINDOW style window option

Edit: updated code, added fileinstall

#cs ----------------------------------------------------------------------------

AutoIt Version: 3.2.12.1
Author:         myName

Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

#AutoIt3Wrapper_Res_Icon_Add=C:\Program Files\AutoIt3\Icons\au3.ico
#include <GUIConstantsEx.au3>
#include <Constants.au3>
#include <WindowsConstants.au3>

Opt('MustDeclareVars', 1)
; *** we comment out this function, not needed normally
;Program()

;Func Program()
;Local/Global *** we declare local/global the GUI objects, to use in functions
Global $Button_1, $Button_2, $Button_3, $Button_4, $Button_5, $Button_6, $Button_7, $Button_8, $Button_9
Global $AboutBtn, $exititem, $filemenu, $hGui, $Label1, $mnuAbout, $mnuInfo, $msg, $n, $hGui

FileInstall("C:\WINDOWS\Help\Tours\htmlTour\Admin.jpg", @TempDir & "\Admin.jpg", 1)
; must be literal string, no variables allowed for source path

$hGui = GUICreate("Program Launcher v1.0", 700, 400); will create a dialog box that when displayed is centered
GUISetBkColor(0xFFFFFF)
$n = GUICtrlCreatePic(@TempDir & "\Admin.jpg", 600, 10, 70, 100)


;set both gui and tray icon to internal custom icon au3.ico index -5 or icon group 201
If @Compiled Then
    GUISetIcon(@AutoItExe, -5, $hGui)
    TraySetIcon(@AutoItExe, -5)
Else
    GUISetIcon("C:\Program Files\AutoIt3\Icons\au3.ico", -1, $hGui)
    TraySetIcon("C:\Program Files\AutoIt3\Icons\au3.ico")
EndIf

$filemenu = GUICtrlCreateMenu("&File")
$exititem = GUICtrlCreateMenuItem("&Exit", $filemenu)

$mnuInfo = GUICtrlCreateMenu("&Info")
$mnuAbout = GUICtrlCreateMenuItem("&About", $mnuInfo)

Opt("GUICoordMode", 3)
$Button_1 = GUICtrlCreateButton("Calculator", 30, 130, 120)
$Button_2 = GUICtrlCreateButton("CCleaner", 160, 130, 120)
$Button_3 = GUICtrlCreateButton("Control Panel", 290, 130, 120)
$Button_4 = GUICtrlCreateButton("Disk Defragmenter", 420, 130, 120)
$Button_5 = GUICtrlCreateButton("Disk Management", 30, 160, 120)
$Button_6 = GUICtrlCreateButton("Display Properties", 160, 160, 120)
$Button_7 = GUICtrlCreateButton("Search Results", 30, 250, 120)
$Button_8 = GUICtrlCreateButton("System Config Utility", 30, 280, 120)
$Button_9 = GUICtrlCreateButton("System Properties", 30, 310, 120)

GUICtrlCreateLabel("Welcome To Program Launcher v1.0", 30, 10)
GUICtrlCreateLabel("The Program Launcher makes it easy", 30, 40)
GUICtrlCreateLabel("to run all of your favorite programs.", 30, 55)
GUICtrlCreateLabel("Click a button below to open a program.", 30, 90)

GUISetState() ; dialog box with button

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $exititem, $GUI_EVENT_CLOSE
            If FileExists(@TempDir & "\Admin.jpg") Then FileDelete(@TempDir & "\Admin.jpg")
            Exit
        Case $Button_1
            Run('calc.exe'); Will Run/Open Calculator
        Case $Button_2
            Run('C:\Program Files\CCleaner\CCleaner.exe'); Will Run/Open CCleaner
        Case $Button_3
            Run('control.exe'); Will Run/Open Control Panel
        Case $Button_4
            Run('mmc.exe c:\windows\system32\dfrg.msc'); Will Run/Open Disk Defragmenter
        Case $Button_5
            Run('mmc.exe c:\windows\system32\diskmgmt.msc'); Will Run/Open Disk Management
        Case $Button_6
            Run("control.exe desk.cpl"); Will Run/Open Display Properties
        Case $Button_7
            Run(@ComSpec & ' /c type nul > %temp%\1.fnd & start %temp%\1.fnd & del /q /f "%temp%\1.fnd"', '', @SW_HIDE); Will Run/Open Search Results
        Case $Button_8
            ShellExecute("msconfig.exe"); Will Run/Open System Configuration Utility
        Case $Button_9
            Run("control.exe sysdm.cpl"); Will Run/Open System Properties
        Case $mnuAbout
            _AboutProgram()
    EndSwitch
WEnd
;EndFunc ;==>Program

Func _AboutProgram()
    Local $hGUIAbout, $Label1, $OKBtn, $nMsg, $aPos, $iFlag = False
    $hGUIAbout = GUICreate("About Program Launcher", 207, 170, -1, -1, $WS_SYSMENU, $WS_EX_TOPMOST)
    ;$hGUIAbout = GUICreate("hotlink test", 207, 170, -1, -1, -1, bitor($WS_EX_TOOLWINDOW,$WS_EX_TOPMOST )); alternate window style
    GUISetBkColor(0xFFFFFF)
    If @Compiled Then
        GUISetIcon(@AutoItExe, -5, $hGUIAbout)
    Else
        GUISetIcon("C:\Program Files\AutoIt3\Icons\au3.ico", -1, $hGUIAbout)
    EndIf

    If @Compiled Then
        GUICtrlCreateIcon(@AutoItExe, -5, 12, 12, 32, 32); for compiled
    Else
        GUICtrlCreateIcon("C:\Program Files\AutoIt3\Icons\au3.ico", -1, 12, 12, 32, 32)
    EndIf

    GUICtrlCreateLabel("Program Launcher v1.0", 66, 12, 125, 20)
    GUICtrlCreateLabel("Author:", 66, 40, 100, 20)
    GUICtrlCreateLabel("Email: ", 66, 55, 100, 20)
    GUICtrlCreateLabel("Website:", 66, 70, 45, 20)
    $Label1 = GUICtrlCreateLabel("www.hotlink.com", 110, 70, 135, 20)

    GUICtrlSetColor(-1, 0x0000FF); set color blue
    GUICtrlSetFont($Label1, -1, -1, 4);underlined font
    GUICtrlSetTip(-1, "Click to visit www.hotlink.com");set tooltip
    GUICtrlSetCursor(-1, 0) ; added this after you saw my post, changes cursor to hand when hovering over hyperlink
    $OKBtn = GUICtrlCreateButton("OK", 66, 100, 75, 25)
    GUISetState()

    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $Label1
                ShellExecute("http://www.hotlink.com")
            Case $OKBtn, $GUI_EVENT_CLOSE
                GUIDelete($hGUIAbout)
                Return
        EndSwitch
        
        $aPos = GUIGetCursorInfo($hGUIAbout)
        If IsArray($aPos) Then
            If ($aPos[4] = $Label1) And $iFlag = False Then
                $iFlag = True
                GUICtrlSetColor($Label1, 0xFF0000)
            ElseIf ($aPos[4] <> $Label1) And $iFlag = True Then
                $iFlag = False
                GUICtrlSetColor($Label1, 0x0000FF)
            EndIf
        EndIf
    WEnd
EndFunc   ;==>_AboutProgram
Edited by rover

I see fascists...

Share this post


Link to post
Share on other sites

If the hyperlink isn't working, remove http://

using http:// works for me with Firefox as default browser


I see fascists...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0