Image

How to set the Background image in main window?

My image was located in Desktop.

Drag it into the project navigator on the left and set the window’s backdrop property in the inspector on the right.
You might want to take a look at the documentation and the wiki.

Thanks Alex… I have Drag the Image into my app & use. But Its not fit the full Window…
Help me out?

Please tell which document i have to go through for background image.

If you want to scale the image to fit into the dimensions of your window, you could f.e. create a Method in the Window which “fires” on the Resize and/or Resized and/or Maximized Events of the Window.
In this Method, you take the Width and Height of the Window. You create a new Picture Object and paint your Backdrop Image into this Picture. then you set the Windows Background to this Picture.

I am currently not at my Desk, but i should like like this:

[code]Dim picBackground As New Picture(self.Width, self.Height, 32) // self = the Window itself and 32 for a 32 Bit Picture
picBackground.Graphics.DrawImage(0, 0, picBackground.Width, picBackground.Height, 0, 0, youBackdropImage.Width, yourBackdropImage.Height)

self.Backdrop= picBackground[/code]

You can read more about DrawImage here: http://documentation.xojo.com/index.php/Graphics.DrawPicture

You can read more about Window.Backdrop here: http://documentation.xojo.com/index.php/Window.Backdrop

BTW: If you work on/for Windows OS, you should activate GDI+ and DoubleBuffering to avoid flicker while drawing into the Window.

Read here: http://documentation.xojo.com/index.php/Canvas.DoubleBuffer and here http://documentation.xojo.com/index.php/Application.UseGDIPlus (GDI+ - Windows - Xojo Programming Forum)