KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

2 questions: (close form when click a link and link styles)

 
Post new topic   Reply to topic    KiXforms Forum Index -> Advanced Scripting
View previous topic :: View next topic  
Author Message
blackcure
KiXforms Dabbler
KiXforms Dabbler


Joined: 15 Nov 2005
Posts: 10
Location: Spain

PostPosted: Tue Nov 03, 2009 9:19 am    Post subject: 2 questions: (close form when click a link and link styles) Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
eriqjaffe
KiXforms Follower
KiXforms Follower


Joined: 16 Aug 2004
Posts: 19
Location: Arlington Heights, IL, USA

PostPosted: Tue Nov 10, 2009 7:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
blackcure
KiXforms Dabbler
KiXforms Dabbler


Joined: 15 Nov 2005
Posts: 10
Location: Spain

PostPosted: Thu Nov 12, 2009 11:47 am    Post subject: Reply with quote

Thanks eriqjaffe.

this is a nice solution
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Advanced Scripting All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group