We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Small Basic Only Extension
#28
As usual there is more than 1 thing going on:

1] Desktop.SetWallPaper needs a file (local or networded).  It does not work using an imagelist reference (for me this just sets the wallper to black). GW works as expected.

Code:
LDBasic.FixFlickr()
For image = 1 To 5
 
    pic = Flickr.GetRandomPicture("landscape")
    TextWindow.WriteLine(pic)
    wall = LDBasic.LoadImage(pic)
    TextWindow.WriteLine(wall)
    GraphicsWindow.DrawResizedImage(wall, 0,0,GraphicsWindow.Width,GraphicsWindow.Height)
    Desktop.SetWallPaper(wall)
 
  Program.Delay(1000)
EndFor

2] If the input file name is the same, it doesn't reload it, so the following works due to file name change

Code:
LDBasic.FixFlickr()
For image = 1 To 5
 
    pic = Flickr.GetRandomPicture("landscape")
    TextWindow.WriteLine(pic)
    fileName = "c:\temp\test"+image+".jpg"
    LDBasic.DownloadFile(fileName,pic)
    GraphicsWindow.DrawResizedImage(fileName, 0,0,GraphicsWindow.Width,GraphicsWindow.Height)
    Desktop.SetWallPaper(fileName)
 
  Program.Delay(1000)
EndFor

PS, I just saw you also spotted the file name issue!
Reply


Messages In This Thread
Small Basic Only Extension - by jrmrhrb00 - 11-02-2023, 06:09 PM
RE: Small Basic Only Extension - by litdev - 11-03-2023, 07:39 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-04-2023, 02:00 PM
RE: Small Basic Only Extension - by litdev - 11-05-2023, 02:49 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-05-2023, 03:42 PM
RE: Small Basic Only Extension - by litdev - 11-05-2023, 08:58 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-06-2023, 01:13 AM
RE: Small Basic Only Extension - by litdev - 11-06-2023, 09:13 AM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-06-2023, 02:04 PM
RE: Small Basic Only Extension - by litdev - 11-06-2023, 03:15 PM
RE: Small Basic Only Extension - by Scout - 11-06-2023, 03:17 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-06-2023, 03:39 PM
RE: Small Basic Only Extension - by litdev - 11-06-2023, 06:32 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-06-2023, 08:21 PM
RE: Small Basic Only Extension - by litdev - 11-06-2023, 09:11 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-06-2023, 09:42 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-07-2023, 02:32 PM
RE: Small Basic Only Extension - by litdev - 11-07-2023, 05:49 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-07-2023, 06:35 PM
RE: Small Basic Only Extension - by litdev - 11-07-2023, 10:32 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-07-2023, 11:00 PM
RE: Small Basic Only Extension - by litdev - 11-08-2023, 12:07 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-08-2023, 03:00 PM
RE: Small Basic Only Extension - by litdev - 11-08-2023, 08:10 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-08-2023, 08:44 PM
RE: Small Basic Only Extension - by WhTurner - 11-09-2023, 01:13 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 11-10-2023, 04:37 PM
RE: Small Basic Only Extension - by litdev - 11-10-2023, 07:31 PM
RE: Small Basic Only Extension - by jrmrhrb00 - 12-19-2023, 02:46 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)