PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV 2024 → Re: Setting ActiveX Pictures on Run-Time....
Re: Setting ActiveX Pictures on Run-Time....
Débuté par Alexander Predl, 25 juin 2003 18:56 - Aucune réponse
Posté le 25 juin 2003 - 18:56
HI!
Thanks for fast reply!
http://www.station-media.com/download.html is a trial for download.
Your way for the solution is not bad. But Unfortunally there is no image property, only a picture property. This property cannot take a file only, i think, a picture object (ole).
In Visual-Basic the code follows:
set Button1.picture=image1.picture
Assume the image1 is a image-Object and is available on the Form.
or
Set Button1.Picture = LoadPicture("C:\Programme\Microsoft Visual Studio\Common\Graphics\Icons\Computer\W95MBX03.ICO")
both ways works fine (did test it).
greetings
HI Alexander !
May you send activex (if tryable) for tests.
Else, I don't think you do it right...
I Mean you shoud use an activeX field in you windows and use it's name and méthods.
Button1 is an activeX filed linkd to your smButton dll or ocx file via filed description.
To know all available activeX properties and methos use wd tool : ActiveX viewer that describe all its components.
Sure you have an image property or a method to change it.
An other way is to do as follow
// Load ActiveX
obutton is dynamic object
BUTTON1="smButton.Control"
oBurron = BUTTON1
// Instanciation OK ?
if :obutton=null alors
info("failed")
end
// set properties image with filename (if expected value for this property)
obutton>>image="c:\diretory\imageFile.ext"
Regards

Hi!
I try to set a image-picture or database-picture to a activeX Control. Every try seem to fail. Has any1 a clue for me?
My ActiveX is SmButton 2.0 (very good and fast) works together with WinDev.
Button1>>picture=image1 (nope)
Button1>>picture=gimage(image1) (nope)
hwnd=handle(image1)
Button1>>picture=hwnd (nope)
Button1>>picture=&hwnd (nope)
Please help
Alex