View previous topic :: View next topic |
Author |
Message |
blackcure KiXforms Dabbler


Joined: 15 Nov 2005 Posts: 10 Location: Spain
|
Posted: Tue Nov 03, 2009 9:19 am Post subject: 2 questions: (close form when click a link and link styles) |
|
|
Hello guys,
I have 2 questions:
1.
I have a form with a one hyperlink (this link open a web page) and I need close this form when the user click this link.
2. In a form, how I can change de hyperlink style (font, size....)
Thank you for all
Raul |
|
Back to top |
|
 |
eriqjaffe KiXforms Follower

Joined: 16 Aug 2004 Posts: 19 Location: Arlington Heights, IL, USA
|
Posted: Tue Nov 10, 2009 7:22 pm Post subject: |
|
|
Here's a quick & dirty thing - it uses a standard Label instead of a Hyperlink control, and will open the link in whatever the user's default web browser is.
Code: | ;Script Options
$ = SetOption("NoMacrosInStrings","ON")
$ = SetOption("NoVarsInStrings","ON")
$ = SetOption("WrapAtEOL","ON")
Break ON
$System = CreateObject("Kixtart.System")
$Form = $System.Form()
$Form.BackColor = 235,230,225
$Form.Height = 293
$Form.Text = "Example!"
$LinkLabel1 = $Form.Controls.Label()
$LinkLabel1.BackColor = 235,230,225
$LinkLabel1.Height = 45
$LinkLabel1.Left = 30
$LinkLabel1.ForeColor = &FDD43E
$LinkLabel1.FontName = "Courier New"
$LinkLabel1.FontSize = 24
$LinkLabel1.FontBold = 1
$LinkLabel1.Text = "Click Here"
$LinkLabel1.Top = 30 ""
$LinkLabel1.Width = 200
$LinkLabel1.OnMouseEnter = "underline()"
$LinkLabel1.OnMouseLeave = "underline()"
$LinkLabel1.OnMouseDown = "navigate()"
$Form.Show
While $Form.Visible
$=Execute($Form.DoEvents())
Loop
Exit 1
Function underline()
if $LinkLabel1.FontUnderline = 0
$LinkLabel1.FontUnderline = 1
else
$LinkLabel1.FontUnderline = 0
endif
EndFunction
Function navigate()
dim $
$=createobject('shell.application')
$.open("http://www.google.com")
quit 0
EndFunction |
|
|
Back to top |
|
 |
blackcure KiXforms Dabbler


Joined: 15 Nov 2005 Posts: 10 Location: Spain
|
Posted: Thu Nov 12, 2009 11:47 am Post subject: |
|
|
Thanks eriqjaffe.
this is a nice solution |
|
Back to top |
|
 |
|