Hyperlink imgtag / button possible?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
  08 August 2013
[ SOLVED ] Hyperlink imgtag / button possible?

Hi, is it possible to have an image that works like an hyper link so when you click it the web browser opens and goes to the specified address?

Current code...

	rollout imagebuttonlink "Image Button Link"
(

local bm1 = openbitmap "C:\image.jpg"
		imgtag logobitmapBm1 "imgtag" bitmap:bm1 align:#left
		
		on logobitmapBm1 click do (
			print "click"
                --would like to have  go to address...

		)
		
		on logobitmapBm1 mouseover do (
			print "over"
		)
		
		-----
		--Regular Hyper link
		hyperLink theName "Autodesk" address:"http://www.autodesk.com" color:[255,255,255]
	)
		createdialog imagebuttonlink


Thanks in advance, all help is appreciated (:
__________________
My website: www.patan77.com
My YouTube:Patan77xD

Last edited by Patan77 : 08 August 2013 at 09:13 AM.
 
  08 August 2013
Originally Posted by Patan77: Hi, is it possible to have an ...

after the autodesk integrated .net into MAX everything is possible. EVERYTHING! except for... but it's a different story.

Last edited by denisT : 08 August 2013 at 02:58 AM.
 
  08 August 2013
shellLaunch test:
rollout test "inet"
(
	local
	bmred = bitmap 140 20 color:red,
	bmgreen = bitmap 140 20 color:green
	imgtag imagbtn "imgtag" bitmap:bmgreen align:#left
	on imagbtn mouseover do imagbtn.bitmap = bmred
	on imagbtn mouseout do imagbtn.bitmap = bmgreen
	on imagbtn click do
	(
		ShellLaunch "http:\\\\www.google.com\\" ""
	)
)
CreateDialog test
__________________
may not be following this thread.
.
 
  08 August 2013
Originally Posted by denisT: after the autodesk integrated .net into MAX everything is possible. EVERYTHING! except for... but it's a different story.


Nice will have to check that out some more

Originally Posted by Ruramuq: shellLaunch test:
rollout test "inet"
(
	local
	bmred = bitmap 140 20 color:red,
	bmgreen = bitmap 140 20 color:green
	imgtag imagbtn "imgtag" bitmap:bmgreen align:#left
	on imagbtn mouseover do imagbtn.bitmap = bmred
	on imagbtn mouseout do imagbtn.bitmap = bmgreen
	on imagbtn click do
	(
		ShellLaunch "http:\\\\www.google.com\\" ""
	)
)
CreateDialog test


Thanks that works perfect
__________________
My website: www.patan77.com
My YouTube:Patan77xD
 
  08 August 2013
Originally Posted by denisT: after the autodesk integrated .net into MAX everything is possible. EVERYTHING! except for... but it's a different story.

here is an example:

try(form.close()) catch()
form = dotnetobject "MaxCustomControls.Maxform"
(
	form.text = "Link Label Example by denisT"
	form.Size = dotnetobject "System.Drawing.Size" 310 120
		
	mh = dotnetobject "LinkLabel"
	mh.Text = "Visit Autodesk.  Visit CGTalk."
	mh.AutoSize = on
	mh.links.add 6 8 "http://www.autodesk.com/" 
	mh.links.add 23 6 "http://www.cgsociety.org/" 
	mh.Dock = mh.Dock.Top 

	fn onLinkClicked s e = 
	(
		s.links.item[s.links.IndexOf e.link].Visited = on
		(dotnetclass "System.Diagnostics.Process").Start e.link.LinkData		
	)
	dotnet.addeventhandler mh "LinkClicked" onLinkClicked

	ih = dotnetobject "LinkLabel"
	ih.Size = dotnetobject "System.Drawing.Size" 32 32
	icon = dotnetobject "System.Drawing.Icon" (getdir #ui + @"icons\file_3dsmax_3ds.ico")
	ih.Image = icon.ToBitmap()
	ih.Dock = ih.Dock.Left

	fn onImageClicked s e = 
	(
		s.LinkVisited = on
		(dotnetclass "System.Diagnostics.Process").Start "http://www.autodesk.com/products/autodesk-3ds-max"	
	)
	dotnet.addeventhandler ih "Click" onImageClicked

	form.controls.addrange #(ih, mh)
) 	
form.ShowModeless()
 
  08 August 2013
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 04:49 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.