Click here to Skip to main content
15,917,926 members
Home / Discussions / C#
   

C#

 
Questionhow to Send/Recive Fax from VC# 2005 ? Pin
hdv21223-Dec-06 7:04
hdv21223-Dec-06 7:04 
AnswerRe: how to Send/Recive Fax from VC# 2005 ? Pin
Judah Gabriel Himango24-Dec-06 9:13
sponsorJudah Gabriel Himango24-Dec-06 9:13 
Questionallocate percentage to each selected user Pin
fmardani23-Dec-06 6:17
fmardani23-Dec-06 6:17 
AnswerRe: allocate percentage to each selected user Pin
saqib8223-Dec-06 9:21
saqib8223-Dec-06 9:21 
QuestionChanging Datagrid elements programmically in C# Pin
Vernware23-Dec-06 5:29
Vernware23-Dec-06 5:29 
AnswerRe: Changing Datagrid elements programmically in C# Pin
gnadeem23-Dec-06 12:33
gnadeem23-Dec-06 12:33 
GeneralRe: Changing Datagrid elements programmically in C# Pin
Vernware24-Dec-06 5:16
Vernware24-Dec-06 5:16 
QuestionHow print over COM and LPT Pin
Savanora23-Dec-06 2:03
Savanora23-Dec-06 2:03 
I'am developing a sticker printing software. In my company we have printer with both COM and LPT port. So my software must support both.

For printing,
I create FileHandle to send data to printer. This method works both COM and LPT but I can't learn if printer finished its job.
with this methot printer gives overflow error when I try to print more than 50 sticker.

My code like this...


public const Int32 GENERIC_READ = -2147483648;
public const Int32 GENERIC_WRITE = 1073741824;
public const Int32 OPEN_EXISTING = 3;
public const Int32 FILE_ATTRIBUTE_NORMAL = 128;
public const Int32 NOPARITY = 0;
public const Int32 ONESTOPBIT = 0;

[DllImport("kernel32", SetLastError = true)]
public static extern IntPtr CreateFile(string lpFileName, Int32 dwDesiredAccess, Int32 dwShareMode,IntPtr lpSecurityAttributes, Int32 dwCreationDisposition,Int32 dwFlagsAndAttributes, IntPtr hTemplateFile);

string port = ""// LPT or COM
IntPtr hParallelPort = CreateFile(port, GENERIC_READ | ENERIC_WRITE, 0, IntPtr.Zero, OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL, IntPtr.Zero);

FileStream stream = new FileStream(hParallelPort, FileAccess.ReadWrite);


with this I'am send data to printer over LPT or COM
stream.Write(file);
Questionunable to access the from server Pin
jayraj todkar23-Dec-06 1:44
jayraj todkar23-Dec-06 1:44 
AnswerRe: unable to access the from server Pin
WillemM23-Dec-06 6:07
WillemM23-Dec-06 6:07 
Questionhow to create dynamic crystal report in c#.net Pin
jaganil23-Dec-06 1:17
jaganil23-Dec-06 1:17 
AnswerRe: how to create dynamic crystal report in c#.net Pin
WillemM23-Dec-06 6:08
WillemM23-Dec-06 6:08 
QuestionHow to bind arraylist to a datatable in C#.Net Pin
NK723-Dec-06 0:01
NK723-Dec-06 0:01 
AnswerRe: How to bind arraylist to a datatable in C#.Net Pin
jaganil23-Dec-06 2:32
jaganil23-Dec-06 2:32 
QuestionHosting a Windows Forms Control in a MFC ActiveX control Pin
sps-itsec4622-Dec-06 23:27
sps-itsec4622-Dec-06 23:27 
AnswerRe: Hosting a Windows Forms Control in a MFC ActiveX control Pin
sps-itsec463-Jan-07 1:17
sps-itsec463-Jan-07 1:17 
QuestionUnicode MSI Pin
MHASSANF22-Dec-06 22:15
MHASSANF22-Dec-06 22:15 
Questionhow to program the barcode reader? Pin
yousafzai22-Dec-06 21:09
yousafzai22-Dec-06 21:09 
AnswerRe: how to program the barcode reader? Pin
Colin Angus Mackay23-Dec-06 1:40
Colin Angus Mackay23-Dec-06 1:40 
GeneralRe: how to program the barcode reader? Pin
gnadeem23-Dec-06 11:33
gnadeem23-Dec-06 11:33 
GeneralRe: how to program the barcode reader? Pin
Colin Angus Mackay23-Dec-06 11:38
Colin Angus Mackay23-Dec-06 11:38 
QuestionComposite design pattern = polymorphism? Pin
[DK]KiloDunse22-Dec-06 21:03
[DK]KiloDunse22-Dec-06 21:03 
AnswerFALSE Pin
CPallini23-Dec-06 3:39
mveCPallini23-Dec-06 3:39 
AnswerRe: Composite design pattern = polymorphism? Pin
Daniel Grunwald23-Dec-06 4:30
Daniel Grunwald23-Dec-06 4:30 
Questionhow to create window like solution explorer?? Pin
shaz jazz22-Dec-06 19:11
shaz jazz22-Dec-06 19:11 

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.