none
Digital clock Pictures RRS feed

  • Question

  • Hello honourable people, 

    I am new when it comes to programming and I will need all of you. Currently I want to create a digital clock that displays different piece of art every 30seconds. All I could do was add a picturebox and and a timer. I am stuck. Any help? I am using VISUAL BASIC 2012. Thanks.

    Wednesday, June 19, 2019 7:37 AM

Answers

  • Example in Small Basic:

    'LDUtilities.Version()
    LDUtilities.FixFlickr()
    GraphicsWindow.Title      = " Newbie Productions || |  |    |     |      |       |        |"
    GraphicsWindow.Width      = 800
    GraphicsWindow.Height     = 600
    GraphicsWindow.FontSize   = 50
    GraphicsWindow.BrushColor = "Red"
    WaitSeconds               = 10
    Timebox = Shapes.AddText("")
    Shapes.Move(TImebox,10,550)
    While ("TRUE")
      if seconds >= WaitSeconds Then  
        seconds = 0
        'Picture = ImageList.LoadImage(Flickr.GetRandomPicture("Work of Art"))
        img = Flickr.GetRandomPicture("Kandinsky")
        file = File.GetTemporaryFilePath()
        LDNetwork.DownloadFile(file,img)
        BG = ImageList.LoadImage(file)
        File.DeleteFile(file)
        GraphicsWindow.DrawResizedImage(BG,0,0,GraphicsWindow.Width,GraphicsWindow.Height)
      endif
      Shapes.SetText(Timebox,Clock.Time)
      Program.Delay(1000)
      seconds = seconds + 1
    endwhile
    

    Requires the betaversion of the LD extension.
    Or you use your own image files
    Wednesday, June 19, 2019 8:37 PM
  • You are now in the forum for the Small Basic programming language.

    search for the Visual Basic forum.


    Jan [ WhTurner ] The Netherlands

    Wednesday, June 19, 2019 9:08 AM
    Answerer
  • Hello NEWBIE-PRODUCTIONS,

    I found some YouTube video about Visual Basic 2012 Digital Clock.


    Nonki Takahashi

    Wednesday, June 19, 2019 2:00 PM
    Moderator

All replies

  • You are now in the forum for the Small Basic programming language.

    search for the Visual Basic forum.


    Jan [ WhTurner ] The Netherlands

    Wednesday, June 19, 2019 9:08 AM
    Answerer
  • Hello NEWBIE-PRODUCTIONS,

    I found some YouTube video about Visual Basic 2012 Digital Clock.


    Nonki Takahashi

    Wednesday, June 19, 2019 2:00 PM
    Moderator
  • Example in Small Basic:

    'LDUtilities.Version()
    LDUtilities.FixFlickr()
    GraphicsWindow.Title      = " Newbie Productions || |  |    |     |      |       |        |"
    GraphicsWindow.Width      = 800
    GraphicsWindow.Height     = 600
    GraphicsWindow.FontSize   = 50
    GraphicsWindow.BrushColor = "Red"
    WaitSeconds               = 10
    Timebox = Shapes.AddText("")
    Shapes.Move(TImebox,10,550)
    While ("TRUE")
      if seconds >= WaitSeconds Then  
        seconds = 0
        'Picture = ImageList.LoadImage(Flickr.GetRandomPicture("Work of Art"))
        img = Flickr.GetRandomPicture("Kandinsky")
        file = File.GetTemporaryFilePath()
        LDNetwork.DownloadFile(file,img)
        BG = ImageList.LoadImage(file)
        File.DeleteFile(file)
        GraphicsWindow.DrawResizedImage(BG,0,0,GraphicsWindow.Width,GraphicsWindow.Height)
      endif
      Shapes.SetText(Timebox,Clock.Time)
      Program.Delay(1000)
      seconds = seconds + 1
    endwhile
    

    Requires the betaversion of the LD extension.
    Or you use your own image files
    Wednesday, June 19, 2019 8:37 PM
  • blockclock: TKQ501

    visually displays 3600 secs in 1 hr (lasts 1h)

    Tuesday, June 25, 2019 8:01 AM