Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help Forums Windows Startup Programs Database Virus, Spyware, and Malware Removal Guides Computer Tutorials Uninstall Database File Database Computer Glossary Computer Resources
 

Welcome Guest ( Log In | Click here to Register a free account now! )



Register a free account to unlock additional features at BleepingComputer.com
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.
Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

 
Reply to this topicStart new topic
> Saving an image boxes content as .png?, In VB 9
Wolfy87
post Jun 7 2009, 04:28 AM
Post #1


Senior Member
****

Group: Members
Posts: 357
Joined: 25-July 08
Member No.: 225,183



Hi, I am creating a program for my dad that helps him do his job, he fills in all of the boxes and then it creates the appropriate forms for him, I made it so it outputted in HTML which works great, although this is easyly editable, I have come up with the idea of outputting it as a image (png to be more specific), i would have to create my own font and system etc but i am willing to do that, anyway i would load an image into an image box and use set pixel to manipulate an image, after this i would need to save that image as a png, is this possible? If not i did look into converting it to a pdf, this seems only achevable with a sdk, is there any other way?

Thank you, Wolfy87.


--------------------

C++ | C | xhtml | CSS | JavaScript | jQuery | PHP | MySql | Visual Basic | Action Script 3.0 / Flex

I like to keep my options open.

Click here for my first physics engine.
Go to the top of the page
 
+Quote Post
Wolfy87
post Jun 7 2009, 04:43 AM
Post #2


Senior Member
****

Group: Members
Posts: 357
Joined: 25-July 08
Member No.: 225,183



ok, worked it out and refined the code a little, here it is for any people that want to know =)

CODE
Imports System.Drawing.Imaging

Public Class MainClass

    Private Sub MainClass_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim MyImage As New Bitmap(256, 256)
        Dim gr As Graphics = Graphics.FromImage(MyImage)
        gr.Clear(Color.White)
        gr.DrawEllipse(Pens.Red, 0, 0, MyImage.Width - 1, MyImage.Height - 1)
        gr.DrawLine(Pens.Green, 0, 0, MyImage.Width - 1, MyImage.Height - 1)
        gr.DrawLine(Pens.Blue, MyImage.Width - 1, 0, 0, MyImage.Height - 1)
        MyImage.Save("test.PNG", ImageFormat.Png)
        Me.Close()
    End Sub
End Class


--------------------

C++ | C | xhtml | CSS | JavaScript | jQuery | PHP | MySql | Visual Basic | Action Script 3.0 / Flex

I like to keep my options open.

Click here for my first physics engine.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 22nd November 2009 - 12:10 AM


Advertise   |   About Us   |   Terms of Use   |   Privacy Policy   |   Contact Us   |   Site Map   |   Chat   |   Tutorials   |   Uninstall List
Discussion Forums   |   The Computer Glossary   |   Resources   |   RSS Feeds   |   Startups   |   The File Database   |   Virus Removal Guides

© 2003-2009 All Rights Reserved Bleeping Computer LLC.