[Question] Faster Method to Change Background

Please support our VB.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2007
Posts: 89
Reputation: toko is an unknown quantity at this point 
Solved Threads: 8
toko's Avatar
toko toko is offline Offline
Junior Poster in Training

[Question] Faster Method to Change Background

 
0
  #1
Apr 10th, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 2,065
Reputation: Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice 
Solved Threads: 256
Featured Poster
Ramy Mahrous's Avatar
Ramy Mahrous Ramy Mahrous is offline Offline
Postaholic

Re: [Question] Faster Method to Change Background

 
0
  #2
Apr 10th, 2009
Background for what? Desktop or Application form?
Anyway you can dispose the object once you don't need it.
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
Reply With Quote Quick reply to this message  
Join Date: Dec 2002
Posts: 461
Reputation: waynespangler is on a distinguished road 
Solved Threads: 56
waynespangler waynespangler is offline Offline
Posting Pro in Training

Re: [Question] Faster Method to Change Background

 
0
  #3
Apr 10th, 2009
Try this:
  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
Wayne

It is hard to understand how a cemetery can raise its burial rates and blame it on the cost of living.
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 89
Reputation: toko is an unknown quantity at this point 
Solved Threads: 8
toko's Avatar
toko toko is offline Offline
Junior Poster in Training

Re: [Question] Faster Method to Change Background

 
0
  #4
Apr 11th, 2009
Desktop background not the application background
Reply With Quote Quick reply to this message  
Join Date: Dec 2002
Posts: 461
Reputation: waynespangler is on a distinguished road 
Solved Threads: 56
waynespangler waynespangler is offline Offline
Posting Pro in Training

Re: [Question] Faster Method to Change Background

 
0
  #5
Apr 11th, 2009
Wayne

It is hard to understand how a cemetery can raise its burial rates and blame it on the cost of living.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC