Jump to content

I didn't know this .


Recommended Posts

You can click on a picture as a link or run program .. :D

;Generated with AutoBuilder 0.3

Opt("GUICoordMode", 1)
Opt("GUINotifyMode", 1)

GuiCreate("MyGUI", 392,266,10,10,0x04CF0000)
$pic_1 = GUISetControl("pic", "link.jpg", 30,20, 330,200)

GuiShow()

While 1
    sleep(100)
    $msg = GuiMsg(0)
    Select
    Case $msg = -3
  Exit
    Case $msg = $pic_1
      Run("Notepad.exe", "", @SW_MAXIMIZE)
    ;;;
    EndSelect
WEnd
Exit

How would you make a tool tip when mouse goes over it ? Like "Opens Notepad"

Link to comment
Share on other sites

  • 4 weeks later...

old post I know but I was looking for example code of images as buttons.. then I added to it..

;Generated with AutoBuilder 0.3

Opt("GUICoordMode", 1)
Opt("GUINotifyMode", 1)

GuiCreate("MyGUI", 392,266,10,10,0x04CF0000)
$pic_1 = GUISetControl("pic", "button_up.gif", 30,20, 330,200)
$A=1
GuiShow()

While 1
sleep(100)
$msg = GuiMsg(0)
Select
Case $msg = -3
 Exit
Case $msg = $pic_1
   $A=$A*"-1"
      if $A="-1" then
     GUIWrite($pic_1,0,"button_down.gif")
  Else
     GUIWrite($pic_1,0,"button_up.gif")
     EndIf
;;;
EndSelect
WEnd
Exit

just incase someone else looks for reffrence. here's how I went about making the image alternate when pushed.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...