473,325 Members | 2,860 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Need to print an image which is larger than the screen???

Hi,

Can someone please help me with finding some code to print an image which is larger than the screen?

I am trying to print a black background which is exactly A4 in height and width, yet even tho i pasted an image onto the form at that size, it gets cut off by the screen Because the screen isn't big enough.

I do not necessarily need to see it on screen properly, but i require it to print a black image 210mm wide and 297mm height.

Please help, its quite urgent??

Much Appreciated,
Robert
Nov 22 '06 #1
1 1970
albertw
267 100+
Hi,

Can someone please help me with finding some code to print an image which is larger than the screen?

I am trying to print a black background which is exactly A4 in height and width, yet even tho i pasted an image onto the form at that size, it gets cut off by the screen Because the screen isn't big enough.

I do not necessarily need to see it on screen properly, but i require it to print a black image 210mm wide and 297mm height.

Please help, its quite urgent??

Much Appreciated,
Robert
hi

this a nasty habbit of vb ..
try using the following code, note however that resolution is not as good as the printdoc method

you need to put a picturebox on your form (Pic1)
Flat, NoBorder
in this case Form1 is being printed, but you may use any object as long as the property hWnd exist.


Expand|Select|Wrap|Line Numbers
  1.  
  2. Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
  3.  
  4.  

Expand|Select|Wrap|Line Numbers
  1.  
  2.     With Form1
  3.     .pic1.Left = 0
  4.     .pic1.Top = 0
  5.     .pic1.Width = 12000
  6.     .pic1.Height = 16500
  7.     .pic1.AutoRedraw = True
  8.     .pic1.ZOrder
  9.     .Refresh
  10.     rv = SendMessage(.hWnd, &HF, .pic1.hDC, 0)
  11.     rv = SendMessage(.hWnd, &H317, .pic1.hDC, &H34&)
  12.     .pic1.Picture = .pic1.Image
  13.     .pic1.ZOrder
  14.     Printer.Orientation = 1
  15.     Printer.PaintPicture .pic1.Picture, 0, 400, Printer.Width, Printer.Height, 0, 0, .pic1.Width, .pic1.Height
  16.    Printer.EndDoc
  17.  
  18.  
Nov 22 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: Mario | last post by:
I could you print jpg or bmp from the printer commands I tried something like ; Printer.picturepaint ("92.bmp") printer.enddoc Doesn't work.. I want to be able to print a logo or a picture...
3
by: Ryan Sullivan | last post by:
I have been struggling mightily in getting this to work with the scripts I have seen. I have an image map that uses overlib to display information about a school's campus: ...
17
by: Geoff Cox | last post by:
Hello, I am trying to have 1. web pages in large font 2. web pages with smaller font for printing I am using <link rel="stylesheet" media="print" type="text/css"
8
by: Michael Satterwhite | last post by:
I'm opening a page that has a single image on it. I'd like to resize the window containing the image to the size of the image (slightly larger OK, not smaller). The width isn't a problem, but the...
24
by: Rhino | last post by:
I am dabbling with print CSS for the first time and I need some guidance. The web pages on my site look fine - to my untrained eye - when displayed on the monitor in any of the standard browsers....
11
by: abico | last post by:
Write a program that reads in a sequence of words and prints them in reverse order.Using STACK.
2
by: EnjoyNews | last post by:
Hi NG I have a site where an invoice is shown on the screen in a IFrame. I have this script on the site: <script type="text/javascript"> function zPrint(oTgt) { oTgt.focus(); oTgt.print(); }
10
by: cjparis | last post by:
Hello everyone. If anyone can give me a hand I would be gratefull Am doing a site which requires a moving element and have used DHTML to do it. Have a simple Browser detect script to sort IE...
2
by: studentofknowledge | last post by:
For some unknown reason ie is placing images I have in a div in a weird way. One image is overlapping another but this problem is not occuring in mozilla. I have looked at my code over and over again...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.