Page 1 of 1 1
Topic Options
#209525 - 2014-10-16 01:47 PM MessageBox() font
Lipman Offline
Fresh Scripter

Registered: 2005-05-09
Posts: 42
Loc: Jersey Shore USA
Is there anyway I can control the font in a MessageBox() Pop-Up ?

Font selection and Font size in particular.

Top
#209527 - 2014-10-16 02:47 PM Re: MessageBox() font [Re: Lipman]
Allen Moderator Online   shocked
KiX Supporter
*****

Registered: 2003-04-19
Posts: 4303
Loc: USA
short answer no. using kixforms you can create your own.
Top
#209528 - 2014-10-16 04:03 PM Re: MessageBox() font [Re: Allen]
Lipman Offline
Fresh Scripter

Registered: 2005-05-09
Posts: 42
Loc: Jersey Shore USA
Thanx - I had to ask.


Top
#209529 - 2014-10-16 04:09 PM Re: MessageBox() font [Re: Lipman]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4615
Loc: The Netherlands
An example.

 Code:
Break On
$System = CreateObject("Kixforms.System")
If Not $System
   $nul= MessageBox("KiXforms.Net Not Initiated. This Script Will Now Close.","Error",16)
   Quit()
EndIf
$nul = $System.Application.EnableVisualStyles

$Form1 = $System.Form()
$Form1.Left = 0
$Form1.StartPosition = 0  ;FormStartPosition_Manual
$Form1.Size = $System.Size(1083,329) ;(Width,Height)
$Form1.Text = "Form1"
$Form1.Top = 0

$Label1 = $System.Label()
$Label1.Font = $System.Font("Verdana",8.25,0) ;Regular
$Label1.Left = 40
$Label1.Text = "Small Verdana"
$Label1.Top = 40
$nul = $Form1.Controls.Add($Label1)

$Label2 = $System.Label()
$Label2.Font = $System.Font("Arial Narrow",12,0) ;Regular
$Label2.Left = 40
$Label2.Text = "Medium Arial"
$Label2.Top = 70
$nul = $Form1.Controls.Add($Label2)

$Label3 = $System.Label()
$Label3.Font = $System.Font("Times New Roman",20.25,0) ;Regular
$Label3.Height = 40
$Label3.Left = 40
$Label3.Text = "Large Times new roman"
$Label3.Top = 100
$Label3.Width = 310
$nul = $Form1.Controls.Add($Label3)

$Label4 = $System.Label()
$Label4.Font = $System.Font("Courier New",72,0) ;Regular
$Label4.Height = 120
$Label4.Left = 40
$Label4.Text = "Huge Courier new"
$Label4.Top = 150
$Label4.Width = 1010
$nul = $Form1.Controls.Add($Label4)

$Form1.Show  ;Displays the Form

While $Form1.Visible
   $Nul = Execute($Form1.DoEvents())
Loop
Exit 0
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#209530 - 2014-10-16 04:16 PM Re: MessageBox() font [Re: Mart]
Lipman Offline
Fresh Scripter

Registered: 2005-05-09
Posts: 42
Loc: Jersey Shore USA
Thank you.

I guess one of these days I'll have to learn Kixforms and apply it.

After 20+ years of using KiXtart I guess I am used to it being without it. Maybe that should change.


Edited by Lipman (2014-10-16 04:16 PM)

Top
#209531 - 2014-10-17 08:09 PM Re: MessageBox() font [Re: Lipman]
ShaneEP Moderator Online   content
MM club member
*****

Registered: 2002-11-29
Posts: 2030
Loc: Tulsa, OK
Kixforms is an amazing tool in my opinion. Really opens up a lot of possibilities. Have written several full GUI 'applications' with just kix and kixforms.
Top
#209534 - 2014-10-20 01:22 AM Re: MessageBox() font [Re: ShaneEP]
Lipman Offline
Fresh Scripter

Registered: 2005-05-09
Posts: 42
Loc: Jersey Shore USA
Aye...
Top
#209618 - 2014-11-03 12:03 PM Re: MessageBox() font [Re: Lipman]
BillBarnard Offline
Starting to like KiXtart

Registered: 2007-03-14
Posts: 141
Loc: Leighton Buzzard, Bedfordshire...
Kixforms 2.47.5.0 needs a good help file, or a manual with examples, so that all of its graphics functions are documented and explained.
Kixforms.Net 3.1.46.0 could also do with a manual with examples.
I want to draw points, lines, circles, rectangles and ellipses (some filled) and query the colour/value of a graphics pixel/point.
Are these available in the old 2.47.5.0 version?
The .chm file for the .Net version does not include examples.
Regards,
_________________________
Bill

Top
#209619 - 2014-11-04 01:23 AM Re: MessageBox() font [Re: BillBarnard]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22298
Loc: OK
Bill, not completely true.
we didn't at the time document everything all that deeply but if you look at DNS or TCPListener you should find examples in both. Or filestream.
_________________________
!

download KiXnet

Top
#209641 - 2014-11-10 11:07 AM Re: MessageBox() font [Re: Lonkero]
BillBarnard Offline
Starting to like KiXtart

Registered: 2007-03-14
Posts: 141
Loc: Leighton Buzzard, Bedfordshire...
Thanks Lonkero,
I also found good examples in Shawn Tassie's KixPixasoPainter.kix
Cheers,
_________________________
Bill

Top
#209642 - 2014-11-10 11:18 AM Re: MessageBox() font [Re: BillBarnard]
BillBarnard Offline
Starting to like KiXtart

Registered: 2007-03-14
Posts: 141
Loc: Leighton Buzzard, Bedfordshire...
Where can I find DNS and TCPListener and filestream please?
Can't find them in the UDF list.
If it's on Glenn's website, then http://www.innotechcg.com is giving errors today.
Cheers,
_________________________
Bill

Top
#209643 - 2014-11-10 07:11 PM Re: MessageBox() font [Re: BillBarnard]
Glenn Barnas Moderator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4224
Loc: New Jersey
I only have 3 KF-specific UDFs on my site.. kfNFSLookup, kfPing, and kfVer. I haven't used any public UDFs for my Sockets-based code.

Site's up - you probably hit it when the SQL server was getting patched.

Glenn
_________________________

Actually I am a Rocket Scientist! \:D

Top
#209644 - 2014-11-10 10:22 PM Re: MessageBox() font [Re: Glenn Barnas]
BillBarnard Offline
Starting to like KiXtart

Registered: 2007-03-14
Posts: 141
Loc: Leighton Buzzard, Bedfordshire...
Thanks Glenn, yes the your site is OK now.
Cheers,
_________________________
Bill

Top
#209653 - 2014-11-17 01:06 PM Re: MessageBox() font [Re: BillBarnard]
BillBarnard Offline
Starting to like KiXtart

Registered: 2007-03-14
Posts: 141
Loc: Leighton Buzzard, Bedfordshire...
Is this a bug in Kixforms graphics?
I'm trying to plot single points, but there isn't a function to do this, .point($x,$y) only reads the colour of a pixel. So I tried using .line($x, $y, $x, $y) but nothing actually gets plotted.
 Code:
$system = CreateObject("kixtart.system")

If Not $System
  $nul= MessageBox("KiXtart.Net Not Initiated. This Script Will Now Close.","Error",16)
  Quit()
EndIf

$form = $system.form()
$form.top = 0
$form.left = 0
$form.width = 1024
$form.height = 768
$form.text = "TestLine.kix  WFB  " + @time + "  " +@date
$form.show

$form.drawwidth = 1

For $i = 0 to 100
   $form.line($i, $i, $i, $i)
next

While $form.visible
   $ = Execute($form.doevents())
Loop

Return
 

The above produces no visible line, unless you increase .drawwidth to 2 and then you get a line plotted of width 1. Weird!
Does the .line() object miss plotting the start or end pixel of a line?
Regards,
_________________________
Bill

Top
#209654 - 2014-11-17 01:43 PM Re: MessageBox() font [Re: BillBarnard]
BillBarnard Offline
Starting to like KiXtart

Registered: 2007-03-14
Posts: 141
Loc: Leighton Buzzard, Bedfordshire...
Also:-
$form.rectangle($I, $I, 1, 1)
Doesn't plot anything.
Whereas:-
$form.circle($I, $I, 1)
Plots more than a pixel.
How can I plot single points/pixels please?
I also want to be able to plot arcs, which the old QBasic Circle command used to do.

Ok SORTED !

With trial and error I have discovered there is a PSET($x,$y) function.
Can't find any documentation on this, I searched through kixforms.dll with a hex editor to look for text string containing "plot" and "set".
Regards,
_________________________
Bill

Top
#209655 - 2014-11-17 02:12 PM Re: MessageBox() font [Re: BillBarnard]
BillBarnard Offline
Starting to like KiXtart

Registered: 2007-03-14
Posts: 141
Loc: Leighton Buzzard, Bedfordshire...
Hi All,
Just to finish, I'll show you the code that works for me to plot circles and ellipses.
It can be easily modified to produce arcs of circles and ellipses.
 Code:
 
$system = CreateObject("kixtart.system")

If Not $System
  $nul= MessageBox("KiXtart.Net Not Initiated. This Script Will Now Close.","Error",16)
  Quit()
EndIf

$form = $system.form()
$form.top = 0
$form.left = 0
$form.width = 1024
$form.height = 768
$form.text = "TestLine.kix  WFB  " + @time + "  " +@date
$form.show

$form.drawwidth = 1

For $i = 0 to 100
   $form.pset($i, $i)
Next

$math = $system.math()
$pi = $math.pi
$2pi = 2.0 * $pi

Circle(200,200,50)
Ellipse(300,300,50,35)

While $form.visible
   $ = Execute($form.doevents())
Loop

Return

Function Circle($x, $y, $r)
$t = 0.0
While $t < $2pi
   $xx = $math.cos($t) * $r + $x
   $yy = $math.sin($t) * $r + $y
   $form.pset($xx,$yy)
   $t = $t + 0.01
Loop
EndFunction

Function Ellipse($x, $y, $h, $v)
$t = 0.0
While $t < $2pi
   $xx = $math.cos($t) * $h + $x
   $yy = $math.sin($t) * $v + $y
   $form.pset($xx,$yy)
   $t = $t + 0.01
Loop
EndFunction



I hope this is useful to someone.
Cheers,
_________________________
Bill

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Chris S., Glenn Barnas, ShaneEP, Arend_, Mart 
Hop to:
Shout Box

Who's Online
2 registered (Allen, ShaneEP) and 158 anonymous users online.
Newest Members
Sjaak, Biybucket, Markus1961, Ian231, kixnewbie12
17480 Registered Users

Generated in 0.048 seconds in which 0.019 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org