Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How Do I store image data in PictureVal
Message
De
18/10/2005 21:52:36
 
 
À
18/10/2005 07:43:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01057389
Message ID:
01060128
Vues:
35
Hi Fabio

Thanks for the tips about Pictureval. I did as you suggested but I am getting strange results. Please see this code:
PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN
**********************************
DEFINE CLASS form1 AS form


	Top = 0
	Left = 0
	Height = 217
	Width = 321
	DoCreate = .T.
	Caption = "Form1"
	Name = "Form1"


	ADD OBJECT image1 AS image WITH ;
		Picture = "buttnormal.bmp", ;
		Height = 31, ;
		Left = 47, ;
		Top = 12, ;
		Width = 2, ;
		Name = "Image1"


	ADD OBJECT image2 AS image WITH ;
		Picture = "buttnormal.bmp", ;
		Stretch = 1, ;
		Height = 31, ;
		Left = 47, ;
		Top = 59, ;
		Width = 73, ;
		Name = "Image2"


	ADD OBJECT image3 AS image WITH ;
		Picture = "buttnormal.bmp", ;
		Stretch = 2, ;
		Height = 31, ;
		Left = 47, ;
		Top = 103, ;
		Width = 145, ;
		Name = "Image3"


	ADD OBJECT label1 AS label WITH ;
		WordWrap = .T., ;
		Caption = "Double click form to run the code. Why is the image with Stretch = 2 (image3)  giving this fading result?", ;
		Height = 48, ;
		Left = 36, ;
		Top = 156, ;
		Width = 265, ;
		Name = "Label1"


	PROCEDURE DblClick
		bb=0h424D2E010000000000003600000028000000020000001F0000000100180000000000F8000000130B0000130B00000000000000000000DFA67FDF;
		+				0hA67F0000E1A881E1A8810000E3AA83E3AA830000E3AC87E3AC870000E3AE89E3AE890000E5B08BE5B08B0000E6B28EE6B28E0000E6B490E6B49000;
		+				0h00E7B591E7B5910000E8B896E8B8960000E9B997E9B9970000E9BA9AE9BA9A0000EBBC9CEBBC9C0000EDC09FEDC09F0000EDC1A2EDC1A20000EDC4;
		+				0hA4EDC4A40000EEC5A5EEC5A50000F0C6A9F0C6A90000EFC7AAEFC7AA0000F2CAAEF2CAAE0000F3CCB0F3CCB00000F3CEB2F3CEB20000F3D0B6F3D0;
		+				0hB60000F5D2B8F5D2B80000F6D3B9F6D3B90000F8D4BCF8D4BC0000F3D8BEF3D8BE0000FDD8C4FDD8C40000F7DCC2F7DCC20000FCDDC6FCDDC60000;
		+				0hF9DEC9F9DEC90000

		This.image1.PictureVal = bb
		This.image2.PictureVal = bb
		This.image3.PictureVal = bb
	ENDPROC


ENDDEFINE
*
*-- EndDefine: form1
**************************************************
You can use any small bmp for butnormal.BMP The file I used was a blue gradient bmp Width = 2 pixels Ht = 31 pixels.

Image1 and Image2 display as normal on Dbl Click but Image3 with Stretch = 2 displays with a faded look as you will see if you run this code.

Why is this displaying like this with stretch = 2?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform