Find Hard Margins Of A Printer?

Jun 3, 2011

I searched many pages but unfortunately found nothing. In fact the problem is Printable Area. Microsoft says: The printable area of a page varies from printer to printer and is not guaranteed to be symmetrical.

Does anybody have any code VB which will print a 1cm x 1cm box on a page which is located 1cm from the top and left edages of the paper for any printer?

I think the answer to the question depends on finding hard margins of the printer.

View 1 Replies


ADVERTISEMENT

Printing With Minimum Margins Specified By The Printer?

Nov 1, 2009

I want to utilize the maximum paper area (A4 size sheet). Therefore I must get the minimum margins that specific printer can handle. I have more printers attached to th pc, so I can not hardcode these values. I have tried to set margins to zero, but that results in printing outside the page at right side and bottom:

PrintDocument1.DefaultPageSettings.Margins.Left = 0
PrintDocument1.DefaultPageSettings.Margins.Top = 0
PrintDocument1.DefaultPageSettings.Margins.Right = 0
PrintDocument1.DefaultPageSettings.Margins.Bottom = 0

So my question is: is it possible to read the selected printers minimum margins without have to open a PageSetupDialog, and therefore make it possible to utilize maximum printing area with code only?

View 1 Replies

VS 2010 Printer Co-ordinates In Relation To Margins

May 22, 2012

If I use the following code to draw a rectange, do the values inserted into 'fromleft' & 'fromtop' set a co-ordinate from the top/left corner of the paper or from the top/left corner of the margins.

Dim R As Rectangle
Dim across As Integer = 5
Dim down As Integer = 13

[Code]....

The reason I am asking this question is because I am trying to print labels so the position of the labels on the sheet are fixed. When the printer is set to papersize = letter the first label is in the correct position but when I change it to A4 the first label has moved 4mm to the right. With the margins set to 0 I still cant get it justified correctly. The printer is obviosly capable of printing 4mm from the left because it does so when set to 'letter'. Can't use letter because I need the extra length of A4 for the bottom row of labels.

View 2 Replies

Can Not Find XML File Unless Hard Coded

Feb 24, 2010

The simple website I am trying to build is a list of banks with their corresponding website. I also wanted the ability to add banks/website with the use of some text boxes and a button click event.[code]...

View 6 Replies

Find The Name Of Motherboard And Make Of Hard Drive?

Jun 22, 2012

Im trying to create a program to gather information about users pcs. So far I have been able to gather thigns like the os, processor, hard drive size and graphics information and I was just wondering how I would be able to collect the name of the motherboard they are using (or model) and the make of the hard drives in their machines.

View 1 Replies

FileOpen Automatic Searching Of Hard Drive To Find File

Mar 28, 2010

I have a program that works I would just like it to be able to find the file with out me specifying the actual path. Because if it is on someone's computer other than mine the path might not be correct and it will not function properly. Here is the code I have done. The file it is looking for is of course names.txt. I have not been able to find much info on this.

[Code]...

View 1 Replies

Find Services - How To Get A List Of Processes - Like - Printer Spoiler

Jun 17, 2010

How to get a list of processes, work with them, etc. Is that also possible for services like e.g. printer spoiler etc. To get a list of them, close some, start some? If so.. How can I do this.. Just ttell me how to get one services the rest will be obvious as I cant find Even 1 service but I have even made a little task manager with processes. I know that there is a page on MSDN but the API's and other things that are written are not being recognised by vb. Maybe you need a extension to vb? or maybe a API declaration?

View 1 Replies

How To Find Remaining Number Of Prints Left On Printer

Dec 23, 2010

I want to find the remaining number of prints left on the printer. I use a Sony UP-CX1 dye sub printer. If I go to Printer Properties>Preferences it tells me the remaining prints and also the total prints on the current thermal head. How can I tap into this information with vb.net?

View 1 Replies

Find All The "About" Files Of All Programs Stored On Hard Drive?

Jun 22, 2010

I would like to find all the "About" files of all programs stored on my hard drive. If you open a program, click on help and select "About". It provides the name, version and date written etc. I would like to extract and store in DB. The store in DB part, I have no issues.

View 1 Replies

Print An Array WebBrowser Each Time To A Different Printer Without Changing The Default Printer

Feb 24, 2009

I want to print an array WebBrowser each time to a different printer without changing the default Printer (not to use the SetDefaultPrinter function) I tried to work with the PrintDocument object(he have the Print function and also i can choose a printer name) but I cant attach the

[Code]...

View 1 Replies

Print Word Document In Dot Matrix Printer With Printer Default Font?

Apr 21, 2010

i m using this this coding to copy and print the word document

System.IO.File.Copy(Application.StartupPath &"PrintT.doc", Application.StartupPath & "PrintT1.doc", True)

Dim line1 As String

Dim line2 As String

line1 = "Line1 Replace"

line2 = "Line2 Replace"

[Code]...

now i need to print the Word Document with Printer Default Font(Draft 17.5 CPI) in Dot Matricx Printer

View 2 Replies

Print Directly To The Printer : Change Printer Font Size?

Jul 2, 2010

For my current application development I need direct printing technique,For the purpose I refer Microsoft Support page Titled"How to send raw data to a printer using VB.Net "The code snippnet specified is perfect for my application.Refers link [URL]But I need something more like Setting the Printer font to Condensed.By default my printer use the font 10cpi ,by using this font size I limited to print only 80char on A4 sheet,but I have more than 80 char on line so I prefer Condensed font size.

View 2 Replies

VS 2008 : Get Network Computer's Printer List And Printer Info?

Dec 7, 2009

get a list of printer's (name,port,model) from a computer over the network. I know how to list my own, but it's from querying the Win32_printer object on my machine, I need to be able to do something similar on a remote machine.

View 4 Replies

Check Printer Status On A Win98 Shared Printer?

Sep 3, 2009

I'm trying to check the printer status of a shared printer on a Win98 platform pc and need some samples to get started.

View 3 Replies

Set The Margins On A Page?

Sep 20, 2011

I am creating a label program and I would like to set the margins of the page for each of the labels. There are 20 labels per 8 1/2" x 11" page at 1 14/16" H x 1 11/16" per label. I would like to know how to set the margins for each label on the sheet. Is there a chart that shows the X and Y coordinates of the page or is there a mathematical equation? Each label would have to be different is there similar code out there that I could get some Ideas?

View 6 Replies

Way To Adjust Margins

Sep 18, 2010

I just moved to VB 2010 Express. PrintForm works, but the image prints with a large left margin and runs off the right edge of the page.[code]...

View 2 Replies

Get Printer DEVMODE Or HDC With Correct Printer Settings

Feb 22, 2011

I have printer vendor provided SDK implementing that i can get printer DEVMODE or HDC with correct printer settings.

My questions is:

I am already using printDocument to print the image (System.Drawing.Bitmap). How can send use this HDC or DEVMOD with printDocument.

I already tried using the "PrintDocument.SetDevMode". it seems not be working.

View 3 Replies

Printer Stuff - Detect If My Printer Is Busy ?

Mar 18, 2011

1. Detect if my printer is busy, because my code tells the printer to print more pages that it can cope with, so I need to delay the command for 'Print the next page' until the printer has finished printing the previous one.

2. Shift the output to my printer so that it gets printed in it's entirety on the paper, instead of seemingly being anchored to some nebulous point on the A4 page. It starts printing at X = 29mm from the left edge, and Y is 28mm from the top, and stops at X = 22mm from the right edge and Y stops at 22mm from the bottom edge, leaving (aprox) 50mm of X and 50mm of Y unprinted.

3. Get useful information on Bounds, which I'm fairly certain is what I need to control where my printing should start and finish.

I've hunted through this forum, MSDN, 'Help' (a misnomer if ever there was one) the VB Library and one or two other forums, which either baffle me with reams of code or suggest code to try which either just don't work or which doesn't declare all the variables and usually don't suggest what type of variable I need, it's all very frustrating

View 9 Replies

Internal Margins On TextBoxes

Jul 26, 2010

I have some forms that were VS2005 forms the I moved to VS2010. The forms have a tab control and on the tabcontrol are some panel containers. If I add a multi-line textbox toa panel I'm seeing the text offset from the left margin. If I make a form from scratch the margin does not appear.Any idea where this left margin is coming from?Is there a way to set the left internal margin in code?

View 9 Replies

Set Margins In Report Viewer?

Sep 9, 2009

is there solution for to set margin programmatically ? Default margin are 9.8mm, instead i want 3mm?

View 2 Replies

Setting Margins In ReportViewer

Nov 7, 2006

I use Report Viewer to create a report with display records from a database. I have a lot of data to display for each line, but the margin settings are limiting me. If I go to the Page Setup tab in Report viewer(Run time), I can set the margins to 1 (left and right) , and it displays my full line nicely. How can I programatically set the margins to 1 during loading of the form?

[Code]...

View 5 Replies

Entire Workspace Less 10% Margins On Each Side?

Aug 24, 2009

Dim workspace(1 To 4) As Long ' (1)=left (2)=top (3)=right (4)=bottom SystemParametersInfo &H30, 0, workspace(1), 0 ' &h30 = get workspace size Dim X As Long, Y As Long, w As Long, h As Long

X = workspace(1) * Screen.TwipsPerPixelX
Y = workspace(2) * Screen.TwipsPerPixelY
w = workspace(3) * Screen.TwipsPerPixelX - X
h = workspace(4) * Screen.TwipsPerPixelY - Y

Move X + 0.1 * w, Y + 0.1 * h, 0.8 * w, 0.8 * h ' 10% margins

View 2 Replies

Make Printing And Page Margins?

Jan 13, 2011

I am printing a receipt with the following code:

Dim printFont As New System.Drawing.Font("Courier New", 10, System.Drawing.FontStyle.Regular)
e.Graphics.DrawString(sPrintText, printFont, System.Drawing.Brushes.Black, 10, 6)

[code]....

View 1 Replies

Set Different Margins In Richtext Box In Vb Express 2008?

Jan 9, 2010

I want to set different margins in richtext box in vb express 2008

what I want to do is like this need to set left margin of 2.7" and right margin of 2.4" and one blank lines precede after that. and left margin 1.0" from the left edge of the page and the right margin is at 7.4" from the left edge of the page.

View 6 Replies

Control Internal Margins Inside Of A Label?

Jan 14, 2010

I would like the size of a label to be identical to the space used by the text inside. The height and width of a label does indeed change depending on its content (text property and its font), but there is a wide margin that I would like to remove.

View 1 Replies

Printing Full Page - Margins Off At Top Left

Feb 7, 2009

I am trying to print a full page of lines, labels, and variables to match a physical form that I have. When I go to print the form, everything is moved down and to the right. I have tried to set the margins to 0 and have also tried OrginsAtMargins but neither have corrected the problem. So basically, I am trying to get the margins to be set at 0 so I can use the whole 8.5x11 (minus a little on the sides; about .25 of a inch) to print. What is weird is the print preview is fine but when it prints it's down and the right. So getting it so it prints how it does in print preview would be great. [URL].

View 1 Replies

Programatically Set Margins In Report Viewer Control?

Jan 18, 2010

In onw of our application, we have some reports that need very specific margins that are dependant of the printer the user have. It is used to print into preformated paper with blanks to fill and depending of the printer, the printing is off by some margins. To make things worse, we don't actually control what printer is used because it is not an internal application.

The only solution I could think of is to let the user configure the margins somehow. I though I could just dinamycally change the report margins like I did with datasources and actual report ( I have one control that is used to display every reports from my application and it works alright), but I can't seem to find that damn property to do so. There is a margin property on the report viewer but it's for the form display so it doesn't cut it.What I was thinking to do is to define the margins before the user loads the report, i.e. when he clicks on the report button, I load the report, set the margins (or vice-versa is necessary) and then display it.

Before someone mention it, I know the user can, once the report is loaded, change the page setup to fit his needs, but this has two drawbakcs. First one is that it is not saved each time and I need it to be 'saveable' and by users. The second one is that Report viewer seems to have some bugs when the regional setting aren't set to what it's expecting and we can't force the users to changes their setting to accomodate one application.

View 3 Replies

Set Margins - Pagesetup Dilog Does Not Effect The Print

Mar 11, 2010

I am using this code but pagesetup dilog does not effect the print.

[Code]...

View 3 Replies

VS 2005 - How To Set Margins To Print Out Image Of Form

Apr 20, 2009

As part of this project I'm doing for VB class I'm required to print out an image of the form. Anyways, the form is exactly 1024 x 780 so I have it set to landscape to fit better, but it still hangs off by an inch or so on the top and left margins. Here where I got the code from [URL]. I tried going under .DefaultPrintSettings and using Offset and Margins but changing them did nothing. I should also add that I know my printer can't print on every part of a page and that some of the image will be cut off, but I have been able to print within 1/2 inch of the edge of the paper before and when I print the form image it cuts it of at like 1 1/2 inches.

View 6 Replies

VS 2008 Setting Print Margins In MsReports?

Aug 5, 2010

I set my print margins for my report to all be 0.3in.Top, Left and right would print 0.3, but the bottom part of my report would cut off and print on the second page. It cuts at a muck bigger margin, about 1inch(which is the default margin on a report).

View 7 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved