473,662 Members | 2,575 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1137
Hi,

Is this what you mean?

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

g.Clear(Color.W hite)
g.Dispose()

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

"jcrouse" <me> wrote in message
news:#o******** ******@TK2MSFTN GP12.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 imgCockTailStyl e as Image

On form2:
imgCockTailStyl e = pbCTS.Image

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

form1.imgCockTa ilStyle is Nothing

It underlines "form2.imgCockT ailStyle" 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******** ********@TK2MSF TNGP12.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
3032
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 image: http://indicator.amessage.info/indicator.php?param1=cobnet%40jabber.org&amp;param2=bounce&amp;param3=http%3A%2F%2Fstudent.ugent.be%2Fastrid%2Fpics%2Fjabber%2F&amp;param4=.png
6
2371
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, $uploadedFile_size, $uploadedFile_name; echo "here is the file name: $uploadedFile, $uploadedFile_size, $uploadedFile_name; <hr> "; $uploadedFile_name = $formatTextObject->processFileName($uploadedFile_name); $uploadedFile_name =...
3
26746
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 in firefox. The onload method I assign is never being called. Any ideas why firefox isn't calling this, or what I can do for a workaround? Below is approxiatemate code of what I'm doing...
1
1339
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 alt="zfMs|SCRIPTURE|1COL1ROW" src="./scripture.gif" style="left: 507px; position: absolute; top: 85px;" /> <p><strong>Some descriptive text</strong></p> <img src="this.gif" alt="An image" />
6
11224
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 emptying it? Right now I'm using the following code: while (!pq.empty()) { cout << setw(3) << pq.top().first << ": " << pq.top().second <<
6
2226
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 below that, hope you can help. <?xml version='1.0' encoding='utf-8' ?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="html" encoding="ISO-8859-1" omit-xml-declaration="yes"/>
0
1271
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 user doesn't get FireFox's familiar ""The page you are trying to view contains POSTDATA" if he hits F5/Refresh. Neither unset() nor setting the variable to nothing works:
7
3150
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 load, an image.onload handler I've previously assigned will be called. Or should be at any rate. The problem is that I need to know inside the onload handler which particular image in the array invoked the handler. I'd be quite happy to know...
26
1526
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. Empty file of zero bytes. If I have a 512 byte file of data, I want 512 bytes of '\0'. Pardon the exit(1)'s. It's hort hand on my implementation for exit(EXIT_FAILURE); The macro is defined on my implementation as 1. Bill /* se, secure...
0
8432
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8857
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8546
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7367
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5654
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4180
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1752
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.