473,327 Members | 2,016 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Emptying out an Image Variable

How do you empty the contents of a variable the contains an image?

Thank you,
John
Nov 20 '05 #1
3 1108
Hi,

Is this what you mean?

Dim bm As New Bitmap(100, 100)
Dim g As Graphics = Graphics.FromImage(bm)

g.Clear(Color.White)
g.Dispose()

Ken
------------------

"jcrouse" <me> wrote in message
news:#o**************@TK2MSFTNGP12.phx.gbl:
How do you empty the contents of a variable the contains an image?

Thank you,
John


--
Outgoing mail is certified Virus Free.
Checked by AVG Anti-Virus (http://www.grisoft.com).
Version: 7.0.230 / Virus Database: 263.3.9 - Release Date: 7/2/2004
Nov 20 '05 #2
* "jcrouse" <me> scripsit:
How do you empty the contents of a variable the contains an image?


Are you talking about a variable of type 'Image'? For exmptying the
variable, set it to 'Nothing'. If you want to destory the object
referenced in the variable, call its 'Dispose' method and assign another
reference or a reference to 'Nothing' to the variable if it's reused
later in the method.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #3
More......Here is what I have.

On form1:
Public imgCockTailStyle as Image

On form2:
imgCockTailStyle = pbCTS.Image

Now, when I attempt to enter this code on form2:

form1.imgCockTailStyle is Nothing

It underlines "form2.imgCockTailStyle" and it also underlines "is". The
three errors are

Expression expected.
Expression is not a method.
Method arguments must be enclosed in parentheses.

"jcrouse" <me> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
How do you empty the contents of a variable the contains an image?

Thank you,
John

Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Mattias Campe | last post by:
Hi, Depending on if I get an image or a text of a certain URL, I want to do something different. I don't know in advance whether I'll get an image or a text. This is a URL that returns an...
6
by: lawrence | last post by:
I've the form you see below, which is supposed to upload an image. I expect the image name as a var to be $uploadedFile. In the receiving function, I've this code: global $uploadedFile,...
3
by: jon | last post by:
Hello, I've had long standing code that runs in IE, that I'm testing with firefox unsuccessfully now. The problem seems to be that images that I dynamically create don't fire their onload event...
1
by: godrifle | last post by:
I hope this is the best way to explain what I'm trying to do, using PHP5. Given the following HTML sample... <html><head><title>The Page</title></head> <body> <h2>A Title</h2> <img...
6
by: Eric Lilja | last post by:
Hello, I have a the following priority_queue: priority_queue<pair<int, string pq; AFAICT, priority_queues doesn't support iterators. My question: is there a way to print its contents without...
6
by: googletired | last post by:
Hello, I haven't made a XSL in quite sometime so i am very rusty. Basicly i want the XSL to display a defined image if one is not present in the XML. here is my current XSL and XML will be...
0
by: Gilles Ganault | last post by:
Hello I use a POST variable named "status" to show different screens while keeping everything in the same script. The problem is that in the Print screen, I need to empty this variable so the...
7
by: howardk | last post by:
I'm writing some code that loads a number of images, using the standard mechanism of assigning a src url to a newly constructed Image object, thus invoking the image-load operation. On a successful...
26
by: Bill Cunningham | last post by:
I have written this short program to empty out files. It works great except that it truncates. My guess was that it was in the fopen mode somewhere but I have played with that and the same results....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.