Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Macro substitution and Picture file
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00637840
Message ID:
00637851
Views:
23
Steve,

&pictures = PhoneBMP

since PhoneBMP is a char type

equal to

&pictures = "c:\mydir\phone.bmp"

________________________

>I get operator/operand mismatch on the following code -
>I declared PhoneBmp and NoPhoneBmp.
>PUBLIC PhoneBMP NoPhoneBMP pictures heights widths
>PhoneBMP = "c:\mydir\phone.bmp"
>NoPhoneBMP = "c:\mydir\nophone.bmp"
>
>
>
>I tired parens around the variables instead of an ampersand as in (pictures),(heights),(widths), but did not help.
>
>I wonder what's wrong? This all worked when I had 14 separate groups of commands, but when I condensed the code down to this it longer works. I will keep working on it.
>
>
> 	IF !EMPTY(hospital.phonecall) OR ;
> 		!EMPTY(hospital.typecall) OR ;
> 		ALLT(hospital.newstatus)<>"OPEN" OR ;
> 		hospital.phonepic = "Y"
>		THIS.lblCallNow.Visible = .T.
> 		*Red phone
>		FOR i = 1 to 14
>			pictures="THIS.ImgPhone"+(i)+".Picture"
>			heights="THIS.ImgPhone"+(i)+".Height=14"
>			widths="THIS.ImgPhone"+(i)+".Width=16"
>			IF recno()=i
>				* Phone
>				&pictures = (PhoneBMP)
>				&heights=14
>				&widths=16
>			ELSE
>				*No phone
>				&pictures = (NoPhoneBMP)
>				&heights=14
>				&widths=16
>			ENDIF
>		ENDFOR
> 	ENDIF
>
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform