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

Tooltip object?

 
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion
View previous topic :: View next topic  
Author Message
peaps
KiXforms Follower
KiXforms Follower


Joined: 17 Jul 2006
Posts: 26
Location: Storrington, West Sussex, UK

PostPosted: Thu Aug 24, 2006 12:32 pm    Post subject: Tooltip object? Reply with quote

I found a post that mentioned $System.Tooltip as an object. I was just wondering what this is and is there any sample code for it? I can't see any mention of it in the build 55 chm file.

I am just wondering is there any way of achieving a kind of small balloon style or even square style desktop alert by the system tray?

Thanks,

Andy P.
Back to top
View user's profile Send private message Visit poster's website
peaps
KiXforms Follower
KiXforms Follower


Joined: 17 Jul 2006
Posts: 26
Location: Storrington, West Sussex, UK

PostPosted: Thu Aug 24, 2006 12:42 pm    Post subject: Reply with quote

....or if anyone knows of a scriptable COM object that I can declare to show a desktop alert balloon, please let me know. Thanks.
Back to top
View user's profile Send private message Visit poster's website
benny69
KiXforms Advocate
KiXforms Advocate


Joined: 30 Oct 2003
Posts: 567
Location: Lincoln, Ne

PostPosted: Thu Aug 24, 2006 1:35 pm    Post subject: Reply with quote

Sorry,
An Alert Balloon would be nice but neither KiXforms.Classic or KiXforms.Net has an object like this.

_________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)
Back to top
View user's profile Send private message Send e-mail
benny69
KiXforms Advocate
KiXforms Advocate


Joined: 30 Oct 2003
Posts: 567
Location: Lincoln, Ne

PostPosted: Thu Aug 24, 2006 1:37 pm    Post subject: Reply with quote

The only thing that would be remotely close would be a context menu of the notify icon, but it sounds like that is not what you are looking for.
_________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)
Back to top
View user's profile Send private message Send e-mail
benny69
KiXforms Advocate
KiXforms Advocate


Joined: 30 Oct 2003
Posts: 567
Location: Lincoln, Ne

PostPosted: Thu Aug 24, 2006 2:07 pm    Post subject: Reply with quote

You could fake it with something like this:

Code:

Break On

$System = CreateObject("Kixtart.System")

$Form = $System.Form()
$Form.BackColor = "White"
$Form.FormBorderStyle = 0 ;None
$Form.Height = 50
$Form.Width = 150
$Form.Top = $System.Screen.WorkingArea.Height - $Form.Height
$Form.Left = $System.Screen.WorkingArea.Width - $Form.Width
$Form.TopMost = "True"

$ExitForm = $Form.Controls.Add("Label")
;$ExitForm.BorderStyle = "FixedSingle"
$ExitForm.FontBold = "True"
$ExitForm.FontSize = 10
$ExitForm.Width = 15
$ExitForm.Height = 15
$ExitForm.Left = $Form.ClientWidth-16
$ExitForm.Top = 1
$ExitForm.Text = "X"
$ExitForm.TextAlign = "MiddleCenter"
$ExitForm.OnClick = "Form_Exit()"

$InfoLable = $Form.Controls.Add("Label")
$InfoLable.BorderStyle = "FixedSingle"
$InfoLable.Dock = "Fill"
$InfoLable.TextAlign = "MiddleCenter"
$InfoLable.Text = "Is This what you want?"

$Form.Show

While $Form.Visible
   $= Execute($Form.DoEvents)
Loop
Exit 0

Function Form_Exit()
   Quit
EndFunction

_________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)
Back to top
View user's profile Send private message Send e-mail
peaps
KiXforms Follower
KiXforms Follower


Joined: 17 Jul 2006
Posts: 26
Location: Storrington, West Sussex, UK

PostPosted: Thu Aug 24, 2006 4:01 pm    Post subject: Reply with quote

That is quite funny, I am working on almost very similar code to you..

Code:


Break On
$System = CreateObject("Kixtart.System")

;KD START

;************* frmBalloon **************
$frmBalloon = $System.Form()
$frmBalloon.FormBorderStyle = 5
$frmBalloon.Height = 150
$frmBalloon.Left = $System.Screen.WorkingArea.Width - 150
$frmBalloon.MaximizeBox = "False"
$frmBalloon.MinimizeBox = "False"
$frmBalloon.ShowInTaskBar = "False"
$frmBalloon.StartPosition = 0
$frmBalloon.Text = "Warning"
$frmBalloon.Top = $System.Screen.WorkingArea.Height
$frmBalloon.Width = 150
;**************************************

$Label1 = $frmBalloon.Controls.Label()
$Label1.Height = 59
$Label1.Left = 6
$Label1.Text = "Lunch at 12:16 GMT+0000"
$Label1.Top = 34
$Label1.Width = 130
$Label1.BackgroundImage = ".\back.bmp"

;Declarations
global $stack

;Assignments
$Timer = $System.Timer()
$Timer.Interval = 1
$Timer.OnTick = Timer_Ontick()


$frmBalloon.BackgroundImage = ".\back.bmp"

;KD END


$stack = 0
$frmBalloon.Show
FadeIn()
sleep 2

;While cint($stack) < 200
;   $=Execute($frmBalloon.DoEvents())
; ? "executing"
;Loop
FadeOut()
Exit 1



function FadeIn()
   ;This will gradually increase the top of the frmBalloon until it is normal height
   do
      $frmBalloon.Top = $frmBalloon.Top - 1
      sleep 0.001
   until $frmBalloon.Top = $System.Screen.WorkingArea.Height - 150
endfunction


function FadeOut()
   ;This will gradually increase the top of the frmBalloon until it is normal height
   do
      $frmBalloon.Top = $frmBalloon.Top + 1
      sleep 0.001
   until $frmBalloon.Top = $System.Screen.WorkingArea.Height + 150
endfunction


function Timer_Ontick()
   $stack = $stack + 1
   ;? $stack
endfunction


However, I can't get the backgroundimage property of the Label to display an image.. The form one works fine..
Back to top
View user's profile Send private message Visit poster's website
benny69
KiXforms Advocate
KiXforms Advocate


Joined: 30 Oct 2003
Posts: 567
Location: Lincoln, Ne

PostPosted: Thu Aug 24, 2006 4:22 pm    Post subject: Reply with quote

Nice!
_________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)
Back to top
View user's profile Send private message Send e-mail
peaps
KiXforms Follower
KiXforms Follower


Joined: 17 Jul 2006
Posts: 26
Location: Storrington, West Sussex, UK

PostPosted: Thu Aug 24, 2006 4:25 pm    Post subject: Reply with quote

I can feel further development taking place now.

I would be nice to finish off this script and have it so that another script could "Run" WKIX32 with some command line parameters to control what was displayed in the balloon tip. Then you could just incorporate it into other projects.


I see the use of more than one WKIX32 as a definate viable solution to emulate multi-threaded applications.. Just be multi-process instead!
Back to top
View user's profile Send private message Visit poster's website
benny69
KiXforms Advocate
KiXforms Advocate


Joined: 30 Oct 2003
Posts: 567
Location: Lincoln, Ne

PostPosted: Thu Aug 24, 2006 4:28 pm    Post subject: Reply with quote

you could set this one up as a service and then feed the changes in the text to it via another script.
_________________
Wait don't order yet,... get KiXforms Designer .NET 2.0 (Beta)
KiXforms Designer .NET 2.0 (Beta)
Back to top
View user's profile Send private message Send e-mail
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Thu Aug 24, 2006 11:53 pm    Post subject: Reply with quote

peaps, to answer your first question - your right - there is indeed a tooltip object but its not used very frequently ... its based on the .Net way of doing tooltips and I added it for some level of compatibility ... here's some sample code:

Code:

Break On

$System = CreateObject("Kixtart.System")

$Form = $System.Form()

$Button = $Form.Controls.Add("Button")
$Button.Text = $Button.Name
$Button.Center
$Button.OnClick = "Button_Click()"

$Tooltip = $System.Tooltip()

$Tooltip.SetToolTip($Button,"Click me")

$Form.Center
$Form.Show
While $Form.Visible
 $= Execute($Form.DoEvents)
Loop

Exit 0

Function Button_Click()

 $= $System.MessageBox.Show("Thanks")

EndFunction
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Discussion 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