Hello guys,
am trying to develop a simple application that changes the desktop wallpaper :bgrin:
the only problem for me , how to use Image component ?
first step finished : using openfiledialog to load ("jpg files") ! (i used " Create File " to get the handle of the file opened as a first step)
second step not finished yet (loading the image to Image component) so the user can view the chosen image
third step : Pressing the button to chage the wallpaper (finished) , i used SystemParametersInfo
now what are the functions used to deal with (Image) component ! am stuck at this stage :(
PS : am working on both RadASM and WinAsm
thank you in advance :t
second step not finished yet (loading the image to Image component) so the user can view the chosen image
The best way to preview the image, is use gdi or gdi++ and blit it to your dialog (bitblt)
Gdi++ or Gdi
http://www.masmforum.com/board/index.php?PHPSESSID=786dd40408172108b65a5a36b09c88c0&topic=18534.0
Check the attachments to see what am trying to do !
i did this using VB.NET but i hate it ( need ASM code)
What is your problem correctly?
Your video draw the image on dialog ok,
and set the wallpaper need you SystemParametersInfo correct.
SystemParametersInfo,SPI_SETDESKWALLPAPER, 0, chr$ ("C:\wallpaper.jpg"), SPIF_UPDATEINIFILE
It's easy.
Take the example attached and try it
@ragdog , thanks for your help
@mabdelouahab thank you so much , this is exactly what i wanted to do ! :greenclp:
بلا مزية
Hi mabdelouahab,
Thanks for your example. It's better than mine changing the wallpaper with COM.