lulu_703 Posted July 7, 2003 Posted July 7, 2003 I need help related to bitmaps... I have decalred a bitmap in which i drew some shapes, I want to save it as a Gif image The thing is I want to have other things in the file such as labels or other bitmaps, but I can't figure out how to do that... Can anyone give me an example on how to do that? This is the code I use for the bitmap: dim objBitmap as new Bitmap(400,300) dim objGraphics as graphics objGraphics = graphics.fromImage(objbitmap) objGraphics.Clear(blue) objGraphics.Save(response.OutputStream,imageFormat.gif) Quote
*Experts* Nerseus Posted July 7, 2003 *Experts* Posted July 7, 2003 If by labels you mean you want to draw text and not draw a Label control, you can use the methods of the Graphics object you created. Look at it's methods such as DrawText and DrawImage. -Nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
lulu_703 Posted July 8, 2003 Author Posted July 8, 2003 I'm afraid i haven't made myself clear, I already use the methods to write strings in the bitmap... but i want is to add other form elements other than the bitmap e.g button,textbox,... I can't seem to be able to do that, the bitmap simply overwites that.... someone said use a picturebox , but I'm not sure I know how to do that....Can you show me? thanx in advance Quote
*Gurus* divil Posted July 8, 2003 *Gurus* Posted July 8, 2003 If you want things like that in there you'll have to draw them yourself. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
JCreationsInc Posted July 10, 2003 Posted July 10, 2003 You want to save the appearance of the label control on your form within the gif image? You can problably find some way to "Capture" a image of the screen and then pull the image of the label and then draw it onto your form. Quote When in doubt.... use the sledge Hammer!!
lulu_703 Posted July 10, 2003 Author Posted July 10, 2003 what i want is to use a container for the image so that i can add other form elements ... i can't do that since I write the image tio the output stream.... Is a picture Box a solution? if it is can you tell me how to declare and use one? Quote
JCreationsInc Posted July 10, 2003 Posted July 10, 2003 You cant save the position of the controls within the container to a image file. You can save the image file and then add the positions of the controls within the picture box to the end of the image file, but you will not be able to open the image file in other image viewers. Go on PSCODE.COM and search for "binary file" or "setup" to learn how to add files to the end of other files. Quote When in doubt.... use the sledge Hammer!!
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.