Solved

Forms, images

Posted on 2013-05-21
4
142 Views
Last Modified: 2013-05-27
How can I set an image to be the background of the form? (I.E. sent to back, so that all controls are still viewable)
0
Comment
Question by:acaraciolo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 15

Expert Comment

by:eemit
ID: 39187184
Try:
Private Sub Form_Load()
  Dim sPath As String
  
  sPath = App.Path
  If Right(sPath, 1) <> "\" Then
      sPath = sPath & "\"
  End If
  
  Me.Picture = LoadPicture(sPath & "SamplePicture.jpg")
  
End Sub

Open in new window

0
 

Accepted Solution

by:
acaraciolo earned 0 total points
ID: 39188825
I realized I didn't need the picture box.  I just loaded the picture on the form.  My apologies should have known that from the get go....
0
 
LVL 15

Expert Comment

by:eemit
ID: 39190543
acaraciolo,
>I realized I didn't need the picture box.
but I have posted the solution. I think you should accept my answer.
But if you feel uncomfortable, I don't mind if you want to delete the question.
0
 

Author Closing Comment

by:acaraciolo
ID: 39198783
I wouldn't presume to rate my own ineptness with an A or B.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question