943,545 Members | Top Members by Rank

Ad:
  • VB.NET Discussion Thread
  • Unsolved
  • Views: 786
  • VB.NET RSS
Apr 10th, 2009
0

[Question] Faster Method to Change Background

Expand Post »
Right now i am using the method where i put the picture in a picbox, then save it as a .bmp then use SystemParametersInfo function to set the picture.
I do not like this because of one main reason: it takes huge amount of ram for a simple program such as this.

If anyone could help me out with a simpler/less ram consuming way to do this, it will be much appreciated.
Similar Threads
Reputation Points: 10
Solved Threads: 8
Junior Poster
toko is offline Offline
104 posts
since Aug 2007
Apr 10th, 2009
0

Re: [Question] Faster Method to Change Background

Background for what? Desktop or Application form?
Anyway you can dispose the object once you don't need it.
Featured Poster
Reputation Points: 480
Solved Threads: 276
Postaholic
Ramy Mahrous is offline Offline
2,189 posts
since Aug 2006
Apr 10th, 2009
0

Re: [Question] Faster Method to Change Background

Try this:
VB.NET Syntax (Toggle Plain Text)
  1. Imports System.Drawing
  2.  
  3. Public Class Form1
  4.  
  5. Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  6. Me.BackgroundImageLayout = ImageLayout.Stretch
  7. Me.BackgroundImage = Image.FromFile("C:\Graphics\tree1.jpg")
  8. End Sub
  9. End Class
Reputation Points: 84
Solved Threads: 58
Posting Pro in Training
waynespangler is offline Offline
461 posts
since Dec 2002
Apr 11th, 2009
0

Re: [Question] Faster Method to Change Background

Desktop background not the application background
Reputation Points: 10
Solved Threads: 8
Junior Poster
toko is offline Offline
104 posts
since Aug 2007
Apr 11th, 2009
0

Re: [Question] Faster Method to Change Background

Reputation Points: 84
Solved Threads: 58
Posting Pro in Training
waynespangler is offline Offline
461 posts
since Dec 2002

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in VB.NET Forum Timeline: REPORTS [rdlc] file- data's from DATATABLE
Next Thread in VB.NET Forum Timeline: dataview rowfilter





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC