none
small basic programming help

    Question

  • GraphicsWindow.Show()
    GraphicsWindow.Height = 480     
    GraphicsWindow.Width = 640
    GraphicsWindow.DrawLine(10, 410, 640, 410)
    image1 = Shapes.AddImage("soccerball.png")


    Shapes.Move(image1, 100, 50)
    Shapes.ShowShape(image1)
    Program.Delay(10000)

    i dont understand why it wont display the soccerball on the line pls help PLS HELP......

    Tuesday, March 14, 2017 1:12 AM

All replies

  • image1 = Shapes.AddImage("soccerball.png")

    i dont understand why it wont display the soccerball on the line pls help PLS HELP......

    where is "soccerball.png"?

    If it is in Program.Directory, you can do below 2 ways.

      image1 = Shapes.AddImage(Program.Directory+"\soccerball.png").

       or

    img= ImageList.LoadImage(Program.Directory+"\soccerball.png")

    image1 = Shapes.AddImage(img).

    Tuesday, March 14, 2017 9:18 AM
    Answerer
  • If your image in not in the programdirectory, then you have too give the full path to the image with disk included:

    e.g.  Shapes.AddImage("C:\users\DGG\images\soccerball.png")


    Jan [ WhTurner ] The Netherlands

    Tuesday, March 14, 2017 11:18 AM
    Answerer
  • thank you i will try it out.
    Wednesday, March 15, 2017 8:48 PM
  • thank you i will try that out 
    Wednesday, March 15, 2017 8:48 PM