Click here to Skip to main content
15,914,795 members
Home / Discussions / C#
   

C#

 
Questionsystem color depth with .Net Pin
b43r_3oo35-Feb-07 23:25
b43r_3oo35-Feb-07 23:25 
AnswerRe: system color depth with .Net Pin
Judah Gabriel Himango6-Feb-07 8:07
sponsorJudah Gabriel Himango6-Feb-07 8:07 
Questionhow to delete static variable Pin
kalyan_24165-Feb-07 23:15
kalyan_24165-Feb-07 23:15 
AnswerRe: how to delete static variable Pin
Colin Angus Mackay5-Feb-07 23:34
Colin Angus Mackay5-Feb-07 23:34 
GeneralRe: how to delete static variable Pin
kalyan_24165-Feb-07 23:45
kalyan_24165-Feb-07 23:45 
GeneralRe: how to delete static variable Pin
Christian Graus6-Feb-07 0:04
protectorChristian Graus6-Feb-07 0:04 
AnswerRe: how to delete static variable Pin
quiteSmart5-Feb-07 23:39
quiteSmart5-Feb-07 23:39 
QuestionPrint with custom font, but without formfeed Pin
VampireM5-Feb-07 22:57
VampireM5-Feb-07 22:57 
Let's say I need an application to print sales receipts to a dot-matrix printer for a grocery store.
I want to print each line every time an item is keyed into the system.

In this case, I tried using this code, but it sends formfeed after every Print() function call:

<br />
    public void Print()<br />
    {<br />
      PrintDocument pd = new PrintDocument();<br />
      PrintDialog pDialog = new PrintDialog();<br />
      pDialog.Document = pd;<br />
      pd.PrintPage += new PrintPageEventHandler(PrintSalesItem);<br />
      if (pDialog.ShowDialog() == DialogResult.OK)<br />
      { pd.Print(); }<br />
    }<br />
<br />
    public void PrintSalesItem(object sender, PrintPageEventArgs e)<br />
    {<br />
      Graphics g = e.Graphics;<br />
      Font myFont = new Font("Arial", 10);<br />
      g.DrawString("SalesItem1", myFont, Brushes.Black, 5, i*5);<br />
      g.DrawString("ItemInfo1", myFont, Brushes.Black, 5, i*10);<br />
      myFont.Dispose();<br />
    }<br />


I also tried using winspool.drv functions directly, but I don't think I can control the fonts and size using it.

Can anyone help/suggest a solution for this?
Questioninserting a text box into datagridview Pin
Mohammad Daba'an5-Feb-07 22:53
Mohammad Daba'an5-Feb-07 22:53 
AnswerRe: inserting a text box into datagridview Pin
gauthee5-Feb-07 23:01
gauthee5-Feb-07 23:01 
GeneralRe: inserting a text box into datagridview Pin
Kushi Bobby5-Feb-07 23:15
Kushi Bobby5-Feb-07 23:15 
GeneralRe: inserting a text box into datagridview Pin
gauthee5-Feb-07 23:44
gauthee5-Feb-07 23:44 
AnswerRe: inserting a text box into datagridview Pin
VirtualVoid.NET6-Feb-07 3:19
VirtualVoid.NET6-Feb-07 3:19 
AnswerRe: inserting a text box into datagridview Pin
Drew McGhie6-Feb-07 4:34
Drew McGhie6-Feb-07 4:34 
QuestionC#.NET with Direct X -> a 3d game ? Pin
Software_Specialist5-Feb-07 22:39
Software_Specialist5-Feb-07 22:39 
AnswerRe: C#.NET with Direct X -&gt; a 3d game ? Pin
bobsugar2225-Feb-07 23:27
bobsugar2225-Feb-07 23:27 
GeneralRe: C#.NET with Direct X -&gt; a 3d game ? Pin
aSarafian6-Feb-07 1:17
aSarafian6-Feb-07 1:17 
Questionhow can i get some values from one table to another table? Pin
Nekshan5-Feb-07 22:17
Nekshan5-Feb-07 22:17 
AnswerRe: how can i get some values from one database to another database? Pin
Colin Angus Mackay5-Feb-07 22:32
Colin Angus Mackay5-Feb-07 22:32 
Question[Message Deleted] Pin
Nekshan5-Feb-07 21:56
Nekshan5-Feb-07 21:56 
AnswerRe: insert data in database from textbox Pin
Christian Graus5-Feb-07 21:58
protectorChristian Graus5-Feb-07 21:58 
Generalthanx. Pin
Nekshan5-Feb-07 22:05
Nekshan5-Feb-07 22:05 
AnswerRe: insert data in database from textbox Pin
gauthee5-Feb-07 22:05
gauthee5-Feb-07 22:05 
GeneralRe: insert data in database from textbox Pin
Nekshan5-Feb-07 22:19
Nekshan5-Feb-07 22:19 
GeneralRe: insert data in database from textbox Pin
gauthee5-Feb-07 22:34
gauthee5-Feb-07 22:34 

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.