Printing graphics created at runtime

04-22-2006, 07:06 AM
I would like to allow the user to create graphics (music notes) on a form or picturebox that already has a staff as an image that has been loaded from a file, and then print the original image and the modifications that were done during runtime to the entire side of a sheet of paper.

I know there is going to be a lot involved with this project, but right now I am only concerned with modifying an image and then printing it. I am an old half ******* VB6 programmer, and I really am trying, but am having little and no success with .Net ... I just don't seem to get it.

If someone could please show me specifically how to make some simple graphic - a line or a circle - on a form or picturebox at runtime with a button click, or a mouse down, and then print the form or picture box to fit an entire sheet of paper.

Thank you

04-22-2006, 08:07 AM
If this is a .Net question, then you need to post your question on the .Net side of the forum. Are you asking how to do this in .Net?

04-22-2006, 10:15 AM
yes. I would like to do it in Visual Basic.NET. I thought that's where I was.
Where should I post it?

04-22-2006, 12:00 PM
I did this example the other day, it shows a correct way to draw and the incorrect way (where the drawing disappears), and shows how to draw to a print document. Its a start...

04-22-2006, 02:51 PM
You know I think my edition : 2003 standard is against me... this won't open because it was created with a newer version.

I tried other things from here that others seem to be having success with and nothing seems to work for me... it always has some complaint.

... I don't know... I don't think I'm ever gonna get this.

Cerian Knight
04-22-2006, 06:08 PM
I don't know how well 2003 Standard can co-exist with it, but I am just getting started with Microsoft Visual Basic 2005 Express Edition. Since it is a free download, I couldn't resist. I launched the sln (solution) file of the posted example and it came up. The example ran, as expected.

I noticed a typical graphical anomaly...text overruns the buttons. Apparently Microsoft has not yet recognized the need for full compatibility with systems set to 'Large Fonts 125% Normal'. The development environment should have testing for this problem built-in. Microsoft is apparently oblivious to the issue, as many of their own web pages do not display properly. Rant off.

04-23-2006, 06:36 AM
Hey Thanks... I'll look into it.

Microsoft doesn't seem to recognize the need for a lot of stuff.

All I want to do is print a picturebox or a form after modifying it at runtime. I see no reason why it should be any more difficult than printing something from "Word" or "AutoCad" or anything else. I have 5 books, have looked through the help (They don't seem to be able to keep on a coherent train of thought ), and about 2/3 of the posts in this thread starting from 2002... for hours, and still can't do it.

Call me a whiner if you want ( and I'm sure someone will ), but I have been using Basic a long time, and I think it is just ridiculous that I am having so much trouble with this .NET stuff. Normal people would have quit trying a long time ago.

So I am unable to do the project I wanted because the language and help is so cumbersome and disjointed and/or after 20 years of using Basic, I am too stupid to use it. My project ( oh excuse me ... solution ( it certainly was necessary to change the name of everything)) may or may not have amounted to anything, but it appears that it ain't gonna happen. I have already wasted an entire weekend ( and more ) on something I think you should be able to look up and figure out in a short time. How many other projects that may have been useful ain't happenin' because the language and it's accompanying "help" is such a mess?

04-23-2006, 08:06 AM
attached is 2003.

04-23-2006, 08:27 AM
Hey Jo0ls... thank you very much That's very kind of you.

04-23-2006, 09:01 AM
It only took a second to translate, you just paste the code in from the vb2005 form and tidy up.
Here's another example, showing how to use the e.MarginBounds with e.DrawImage, so that the bitmap is stretched to fit the page.

04-24-2006, 05:16 PM
It only took a second to translate, you just paste the code in from the vb2005 form and tidy up.
Here's another example, showing how to use the e.MarginBounds with e.DrawImage, so that the bitmap is stretched to fit the page.

Hey that's excellent... that's exactly what I have in mind...It must be nice to know what you're doing...

how do you save/print it ... blobs and all, after you put the blobs on it ...that's my problem (well one of them anyway)

04-25-2006, 04:36 AM
I'm sorry jo0ls, I got so excited when I saw this thing, I didn't even notice the print button . Good grief!

I showed it to my wife and daughter ( both excelent pianists )

"Look what I got from a guy in London... I been trying for days and he must've done it in about 10 min.. "

This morning when I was trying to decipher the code I saw a PrintPage, so I ran it again.

Again- thank you. this is excellent. It'll take me a while to try to absorb this.

. :D

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum