icomeinpieces

i know this is prolly a big newbie question but...

i can't seem to remove or stretch a background image on one of my forms in my visual basic 6 project.

i added it via picture property in the form's properties and now it says (bitmap) and i can't make it say (none) to clear the picture.

thanks in advance



Re: Windows Forms General can't remove or stretch background image in visual basic 6 (sp6)

NumberKruncher

Hi,

If I remember correctly, scroll to the Picture property, click in the text part (right of Picture: and left of the browse button). Select two or three characters of the text and then press backspace (if that doesn't work try the delete key instead). I remember having the same problem quite some time ago.

Hope this helps,

Lea Hayes





Re: Windows Forms General can't remove or stretch background image in visual basic 6 (sp6)

icomeinpieces

thanx a bunch the delete idea worked like a charm.

now how do i get it to stretch to cover the whole of a form





Re: Windows Forms General can't remove or stretch background image in visual basic 6 (sp6)

NumberKruncher

Hi,

The simplest way to achieve what you require is the following:

Create an 'image' control from the toolbox. The image control allows you to select a picture and then specify "Stretch" to true or false using the properties panel. Lets assume that the 'image' control were named Image1 (by default). It is important to note that the 'image' control is different from the 'picture' control.

Double-click your form and select the 'Resize' event and add the following code.

Private Sub Form_Resize()
Image1.Left = 0
Image1.Top = 0
Image1.Width = ScaleWidth
Image1.Height = ScaleHeight
End Sub

In Visual Basic, ScaleWidth and ScaleHeight represent the dimensions of inside the form itself (i.e. excluding the sizes of the blue caption bar and window frame. This should achieve your requirements.

Glad I could be of help!

Lea Hayes