Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 1st, 2006, 10:22 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 471
Thanks: 0
Thanked 1 Time in 1 Post
Default Copying and Printing a PictureBox

Hi All,

Got a difficult one for you.

I have a form with 2 picture boxes. PictureBox1 is inside PictureBox2. PictureBox2 is used for scrolling. Inside PictureBox1, I have multiple control arrays, which are determined once the user has entered all players for a particular event. These arrays can grow as large as 512 or more. Anyway, once the arrays are loaded, made visible, PictureBox1 is 3, 4 maybe even 10 screens long, and 3,4 maybe 5 screens wide. I can scroll all through it no problem.

What I want to do is copy all the contents of PictureBox1 to a BMP, then print it. I'm currently trying to use the bitblt code I found on another forum and also in the Microsoft Knowledge Base.

Problem Is:

It will on copy what is visible on the screen. It creates a BMP which is the correct size, and if I scroll down, then do the copy, it places it in the correct spot in the BMP, but the rest of the BMP is black.

Any Ideas?

Thanks in advance.

Kevin

dartcoach
__________________
dartcoach
 
Old December 23rd, 2006, 02:21 AM
Friend of Wrox
 
Join Date: Dec 2004
Posts: 221
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello,

try using this

Clipboard.SetData Me.Picture1.Picture, vbCFBitmap
For i = 1 To 100
    DoEvents
Next
Printer.PaintPicture Clipboard.GetData(), Printer.CurrentX, Printer.CurrentY

I am not sure, is this what you need. If any let me know.

With Regards,
Raghavendra Mudugal





Similar Threads
Thread Thread Starter Forum Replies Last Post
about picturebox inherit youtubeline C# 3 December 12th, 2008 03:41 PM
Picturebox question julz127 Visual Basic 2005 Basics 0 February 26th, 2008 02:44 AM
Transparent PictureBox? tal C# 2005 5 April 19th, 2007 01:59 PM
Name of image in PictureBox purefan Beginning VB 6 5 November 27th, 2006 02:20 PM
Transparent Picturebox philip1981 General .NET 0 August 31st, 2005 08:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.