Author Topic: making my own class ImageDisplayByValue  (Read 854 times)

oqapsking

  • Full Member
  • ***
  • Posts: 178
    • View Profile
making my own class ImageDisplayByValue
« on: April 29, 2017, 06:24:06 AM »
hello
what i do some times is to read true / false address then the picture changes according to it

something like (ImageDisplayByValue) one image is jpg and one is animated gif

the way i do it is i put picturebox , basiclable and timer then add the pictures i need in the project  resources

after i put the basiclabel values and properties

i go to the timer code

and write this

Code: [Select]

 if basiclabel.value = true then
picturebox.image =  Global.MfgControl.AdvancedHMI.My.Resources.Resources.imageOff
else
picturebox.image =  Global.MfgControl.AdvancedHMI.My.Resources.Resources.imageOn

end if
 


now to my question

can i make my own class to do all the above ???


the reason i do this is that  ImageDisplayByValue does not support animated ( gif) images and treats them all as jpg

with thanks




Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5261
    • View Profile
    • AdvancedHMI
Re: making my own class ImageDisplayByValue
« Reply #1 on: April 29, 2017, 07:30:58 AM »
can i make my own class to do all the above ???


the reason i do this is that  ImageDisplayByValue does not support animated ( gif) images and treats them all as jpg
Yes, but why not use the GraphicalIndicator?

oqapsking

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Re: making my own class ImageDisplayByValue
« Reply #2 on: April 29, 2017, 10:26:00 AM »
it does not support animation

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5261
    • View Profile
    • AdvancedHMI
Re: making my own class ImageDisplayByValue
« Reply #3 on: April 29, 2017, 12:02:30 PM »
it does not support animation
That's true it doesn't. I started a new control that will support it:

http://advancedhmi.com/forum/index.php?topic=1748.0

oqapsking

  • Full Member
  • ***
  • Posts: 178
    • View Profile
Re: making my own class ImageDisplayByValue
« Reply #4 on: April 29, 2017, 06:08:40 PM »
thanks man
it worked great