473,595 Members | 2,474 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

7 New Member
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 1982
albertw
267 Contributor
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
12120
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 in a page with my other printer.print statements.. is that possible ?
3
2867
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: http://dcavello.phenominet.com/about/tour.php I would like onClick to generate a series of thumbnails located directly above or below the image map. Those thumbnails would then be linked to larger images which would pop-up in a new browser window. Does anyone...
17
2379
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
2398
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 height is. The window, of course has things like menu bars, toolbar, navigation, etc. I need to account for these when I resize the image, but I'm not seeing how to do that. I'm sure this must be done frequently, but I'm not seeing the solution. ...
24
2725
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. However, I am new to print CSS and am having trouble getting the text on my printed pages to flow correctly. I know that I need a separate CSS for printing than the one I use for displaying on the monitor; I know that is accomplished by having...
11
1875
by: abico | last post by:
Write a program that reads in a sequence of words and prints them in reverse order.Using STACK.
2
7505
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
6749
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 from Netscape. IE is ok but the Netscape browser including Firefox and Safari are not working now. Not sure why. The idea is that when you mouseover the arrows the gallery div moves to left and right. I have changed the script and now the image...
2
4087
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 but cant seem to find out what the problem is. I think this could be fixed with a i.e hack??? please advise the problem of the overlapping image is occuring in imagerow2 div on line 56. please see my code below here is my html <!DOCTYPE...
0
7955
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
8019
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8251
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5418
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3873
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3911
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2391
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1490
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1223
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.