Click here to Skip to main content
15,907,001 members
Home / Discussions / C#
   

C#

 
GeneralRe: Mixing Cpp and C# -- Calling Cpp-Class-Interface from C# Pin
Dave Kreskowiak3-Apr-08 4:00
mveDave Kreskowiak3-Apr-08 4:00 
GeneralRe: Mixing Cpp and C# -- Calling Cpp-Class-Interface from C# Pin
Tomerland3-Apr-08 4:16
Tomerland3-Apr-08 4:16 
GeneralRe: Mixing Cpp and C# -- Calling Cpp-Class-Interface from C# Pin
Dave Kreskowiak3-Apr-08 5:36
mveDave Kreskowiak3-Apr-08 5:36 
GeneralRe: Mixing Cpp and C# -- Calling Cpp-Class-Interface from C# Pin
carbon_golem3-Apr-08 10:28
carbon_golem3-Apr-08 10:28 
GeneralRe: Mixing Cpp and C# -- Calling Cpp-Class-Interface from C# Pin
Tomerland3-Apr-08 18:02
Tomerland3-Apr-08 18:02 
Questionlandscpae printing Pin
sianatia2-Apr-08 21:10
sianatia2-Apr-08 21:10 
GeneralRe: landscpae printing Pin
Gareth H2-Apr-08 21:14
Gareth H2-Apr-08 21:14 
GeneralRe: landscpae printing Pin
sianatia4-Apr-08 17:31
sianatia4-Apr-08 17:31 
hi there
here is some code for more:
using System;<br />
using System.IO;<br />
using System.Diagnostics;<br />
using System.Data.SqlClient; <br />
using System.Drawing;<br />
<br />
		<br />
namespace test<br />
{<br />
	public class Class1<br />
	{<br />
		public static void Main()<br />
		{	<br />
			<br />
			System.Drawing.Printing.PrintDocument doc=new System.Drawing.Printing.PrintDocument();<br />
			doc.QueryPageSettings +=new System.Drawing.Printing.QueryPageSettingsEventHandler(doc_QueryPageSettings);<br />
			doc.PrintPage +=new System.Drawing.Printing.PrintPageEventHandler(doc_PrintPage);<br />
			doc.Print();<br />
			<br />
		}<br />
<br />
		private static void doc_QueryPageSettings(object sender, System.Drawing.Printing.QueryPageSettingsEventArgs e)<br />
		{<br />
			e.PageSettings=new System.Drawing.Printing.PageSettings(new System.Drawing.Printing.PrinterSettings());<br />
			e.PageSettings.PaperSize =new System.Drawing.Printing.PaperSize("Custom Size",8230,4330);<br />
			e.PageSettings.Landscape=true;<br />
			e.PageSettings.Margins.Left=e.PageSettings.Margins.Left=<br />
				e.PageSettings.Margins.Left=e.PageSettings.Margins.Left=0;<br />
			<br />
<br />
		}<br />
		private static void doc_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)		<br />
		{			<br />
			e.Graphics.PageUnit=System.Drawing.GraphicsUnit.Millimeter;<br />
			Font fnt=new Font("Tahoma",14,FontStyle.Bold);<br />
			StringFormat sf=new StringFormat(StringFormatFlags.DirectionRightToLeft);<br />
			sf.LineAlignment=StringAlignment.Near;<br />
			sf.Alignment=StringAlignment.Near;<br />
			Rectangle rec=new Rectangle(113,12,83,17);<br />
			e.Graphics.DrawString("Some Text Goes here",fnt,Brushes.Black,rec,sf);<br />
		}<br />
	}<br />
}<br />


when I print using this code in portrait the text excatly prints in the locataion 83:17 but in landscape no test presents.
Note that I use my own paper size.
GeneralGet Selected Text Pin
Member 34533312-Apr-08 20:21
Member 34533312-Apr-08 20:21 
GeneralRe: Get Selected Text Pin
Skippums3-Apr-08 2:10
Skippums3-Apr-08 2:10 
QuestionHave you try to use iBATIS? Pin
C#Coudou2-Apr-08 19:04
C#Coudou2-Apr-08 19:04 
AnswerRe: Have you try to use iBATIS? Pin
Eduard Keilholz3-Apr-08 0:37
Eduard Keilholz3-Apr-08 0:37 
QuestionHow to install the merge modules...? Pin
Pankaj - Joshi2-Apr-08 18:18
Pankaj - Joshi2-Apr-08 18:18 
AnswerRe: How to install the merge modules...? Pin
mav.northwind3-Apr-08 2:57
mav.northwind3-Apr-08 2:57 
GeneralRe: How to install the merge modules...? Pin
Pankaj - Joshi3-Apr-08 20:43
Pankaj - Joshi3-Apr-08 20:43 
Questioninsert unicode into wordpad Pin
VyTrx2-Apr-08 16:43
VyTrx2-Apr-08 16:43 
GeneralRe: insert unicode into wordpad Pin
C#Coudou2-Apr-08 19:17
C#Coudou2-Apr-08 19:17 
GeneralGeneric List showing Types in UI rather than Data ... Pin
Jammer2-Apr-08 13:17
Jammer2-Apr-08 13:17 
GeneralRe: Generic List showing Types in UI rather than Data ... Pin
darkelv2-Apr-08 14:13
darkelv2-Apr-08 14:13 
GeneralRe: Generic List showing Types in UI rather than Data ... Pin
Ravenet2-Apr-08 15:37
Ravenet2-Apr-08 15:37 
GeneralRe: Generic List showing Types in UI rather than Data ... Pin
J4amieC2-Apr-08 22:17
J4amieC2-Apr-08 22:17 
GeneralRe: Generic List showing Types in UI rather than Data ... Pin
Ravenet2-Apr-08 22:21
Ravenet2-Apr-08 22:21 
GeneralRe: Generic List showing Types in UI rather than Data ... Pin
J4amieC2-Apr-08 22:20
J4amieC2-Apr-08 22:20 
GeneralRe: Generic List showing Types in UI rather than Data ... Pin
Jammer2-Apr-08 23:15
Jammer2-Apr-08 23:15 
GeneralWebService Log.... Pin
visitraajes2-Apr-08 12:48
visitraajes2-Apr-08 12:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.