Page 1 of 1 1
Topic Options
#109130 - 2003-11-27 06:53 PM Picture in the Form
dasiguer Offline
Fresh Scripter

Registered: 2003-09-10
Posts: 22
Loc: Rio de Janeiro - Brazil
Dears,

In the form:


Code:

$frmMain = CreateObject("Kixtart.Form")
$frmMain.Size = 370,280
$frmMain.Center
$frmMain.Text = "Welcome"



How I can place a picture before of "Welcome"?

Thanks!

Top
#109131 - 2003-11-27 07:19 PM Re: Picture in the Form
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Are you refering to changing the icon to the left of the text in the title bar ?
Top
#109132 - 2003-11-27 07:19 PM Re: Picture in the Form
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
That'd be

$form.Icon = 'youricon.ico'
_________________________



Top
#109133 - 2003-11-27 07:20 PM Re: Picture in the Form
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
hmm...
as you are not positioning your text by any means, I don't see any way to do it.
_________________________
!

download KiXnet

Top
#109134 - 2003-11-27 09:34 PM Re: Picture in the Form
Jose Offline
Seasoned Scripter
*****

Registered: 2001-04-04
Posts: 693
Loc: Buenos Aires - Argentina
Como vai dasiguer ... legao?

Dont know if you are looking for this but might help.

Code:

Break On

$Form = CreateObject('Kixtart.Form')
$Form.BackColor = 212,208,200
$Form.ForeColor = 0,0,0
$Form.Left = 79
$Form.Top = 25
$Form.Height = 333
$Form.Width = 456
$Form.FontSize = 8.25
$Form.Text = "Welcome.."
$Form.FormBorderStyle = 4
;-----------------------------------------------------
$PictureBox1 = $Form.PictureBox
$PictureBox1.BackColor = 128,64,64
$PictureBox1.Left = 33
$PictureBox1.Top = 26
$PictureBox1.Height = 183
$PictureBox1.Width = 380
$PictureBox1.Picture = "c:\temp\myimage.bmp" ;here you put the image reference
;-----------------------------------------------------
$Label1 = $Form.Label
$Label1.ForeColor = 0,0,0
$Label1.Left = 148
$Label1.Top = 241
$Label1.Height = 50
$Label1.Width = 200
$Label1.FontBold = "True"
$Label1.FontItalic = "True"
$Label1.FontName = "Arial"
$Label1.FontSize = 20
$Label1.Text = "Welcome!!"
;-----------------------------------------------------
$Form.Show
While $Form.Visible
$=Execute($Form.DoEvents())
Loop
Exit 1


Remembre to use a BMP image.
MERCOSUR !!


Edited by jose3 (2003-11-27 09:43 PM)
_________________________
Life is fine.

Top
#109135 - 2003-11-28 04:08 PM Re: Picture in the Form
dasiguer Offline
Fresh Scripter

Registered: 2003-09-10
Posts: 22
Loc: Rio de Janeiro - Brazil
This exactly, Shawn!

Jochen, this code does not function, exactly that the file is as .ICO or .BMP

Lonkero, what I want is accurately what Shawn said.

jose3, Tudo! I thank your aid, but I need that script will not be very great.
If you it will have another tip, it will be welcome!

Top
#109136 - 2003-11-28 04:21 PM Re: Picture in the Form
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
oh well,

it must be of course :

Code:
$frmMain.Icon = "[PATH\]youricon.ico"



Quote from the manual :

Quote:

Description
Sets the icon that is displayed by the object.

Syntax
$Object.Icon = String

$Object.Icon = Number

Values
String - A string value specifying the fully qualified path of an ICO file.

Number - A numeric value specifying the index number of a builtin icon. Use the icon viewer script (icons.kix) for an up-to-date list of icons.



_________________________



Top
#109137 - 2003-11-28 05:43 PM Re: Picture in the Form
dasiguer Offline
Fresh Scripter

Registered: 2003-09-10
Posts: 22
Loc: Rio de Janeiro - Brazil
I also thought about this, but exactly thus it didn't function.

Code:

$frmMain = CreateObject("Kixtart.Form")
$frmMain.Size = 370,280
$frmMain.Center
$frmMain.Icon = "\\DELL_SERVER\KIXTART\Logo\kixscript.ico"
$frmMain.Text = "Welcome"
$frmMain.SysMenu = 0


Top
#109138 - 2003-11-28 08:59 PM Re: Picture in the Form
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
hmmm, should be working ... what kinda icon is this ? whats the size ? how many colors ? Since this is the taskbar icon, should be 16x16 (32x32 max) and for best results, max 16 colors (4bpp) ...


Top
#109139 - 2003-12-05 11:49 AM Re: Picture in the Form
dasiguer Offline
Fresh Scripter

Registered: 2003-09-10
Posts: 22
Loc: Rio de Janeiro - Brazil
It is the icon of software 'KiXscripts Editor', that standard is in 32x32.
Top
#109140 - 2003-12-18 11:16 AM Re: Picture in the Form
dasiguer Offline
Fresh Scripter

Registered: 2003-09-10
Posts: 22
Loc: Rio de Janeiro - Brazil
Is it possible to place this icon in the Window Title?
Top
Page 1 of 1 1


Moderator:  Shawn, ShaneEP, Ruud van Velsen, Arend_, Jochen, Radimus, Glenn Barnas, Allen, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 363 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.06 seconds in which 0.025 seconds were spent on a total of 12 queries. Zlib compression enabled.

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