Click here to Skip to main content
15,902,299 members
Home / Discussions / Windows Forms
   

Windows Forms

 
QuestionHow to restrict no of copies in printdialog of any printer Pin
manjari kar8-Jun-09 20:22
manjari kar8-Jun-09 20:22 
AnswerRe: How to restrict no of copies in printdialog of any printer Pin
Dave Kreskowiak9-Jun-09 3:08
mveDave Kreskowiak9-Jun-09 3:08 
GeneralRe: How to restrict no of copies in printdialog of any printer Pin
led mike9-Jun-09 4:46
led mike9-Jun-09 4:46 
GeneralRe: How to restrict no of copies in printdialog of any printer Pin
Dave Kreskowiak9-Jun-09 12:27
mveDave Kreskowiak9-Jun-09 12:27 
GeneralRe: How to restrict no of copies in printdialog of any printer Pin
manjari kar12-Jun-09 18:33
manjari kar12-Jun-09 18:33 
GeneralRe: How to restrict no of copies in printdialog of any printer Pin
manjari kar14-Jun-09 18:35
manjari kar14-Jun-09 18:35 
GeneralRe: How to restrict no of copies in printdialog of any printer Pin
Dave Kreskowiak15-Jun-09 0:53
mveDave Kreskowiak15-Jun-09 0:53 
GeneralRe: How to restrict no of copies in printdialog of any printer Pin
manjari kar17-Jun-09 1:18
manjari kar17-Jun-09 1:18 
ok. fine i m giving the code for restrict the no of copies of print dialog.
if (ds.Tables[0].Rows.Count > 0)
{
cmd = new MySqlCommand("select credencials.Limit-credencials.`No of Pages` from credencials where UserName='" + txtusername.Text + "' and Password='" + txtpassword.Text + "'", con);
{
adp = new MySqlDataAdapter(cmd);
ds = new DataSet();
adp.Fill(ds);
PrintDialog dia = new PrintDialog();
dia.PrinterSettings = ps;
if (dia.ShowDialog() == DialogResult.OK)
{
timer1.Dispose();
Copies = ps.Copies;
Copies = (short)(Copies * job.NumberOfPages);
if (Copies >= Convert.ToInt32(ds.Tables[0].Rows[0][0].ToString()))
{

MessageBox.Show("Exceed Printing Limit is " + Copies.ToString());
dia.ShowDialog();
timer1.Dispose();
job.Resume();
this.Hide();

}
else
{
timer1.Dispose();
job.Resume();
this.Hide();
}
using this code u can restrict the no of copies of print dialog with ur database copies.
takecare.
Thumbs Up | :thumbsup: bye.

How i will design a a form in windows service to print a document.

GeneralRe: How to restrict no of copies in printdialog of any printer Pin
Dave Kreskowiak17-Jun-09 1:33
mveDave Kreskowiak17-Jun-09 1:33 
GeneralRe: How to restrict no of copies in printdialog of any printer Pin
manjari kar17-Jun-09 2:13
manjari kar17-Jun-09 2:13 
GeneralRe: How to restrict no of copies in printdialog of any printer Pin
subashis halder30-Jun-09 15:48
subashis halder30-Jun-09 15:48 
QuestionHow can i run my installed application on remote PC using dot net? Pin
RA|-|UL PATEL6-Jun-09 0:08
RA|-|UL PATEL6-Jun-09 0:08 
AnswerRe: How can i run my installed application on remote PC using dot net? Pin
Dave Kreskowiak6-Jun-09 4:30
mveDave Kreskowiak6-Jun-09 4:30 
QuestionListView multi-select checkbox bug [modified] Pin
molesworth5-Jun-09 6:17
molesworth5-Jun-09 6:17 
AnswerRe: ListView multi-select checkbox bug Pin
hground26-Mar-10 6:43
hground26-Mar-10 6:43 
QuestionWinform RDLC Report Problem-VS 2005 Pin
Siddhartha S.5-Jun-09 2:06
Siddhartha S.5-Jun-09 2:06 
QuestionHow and where windows remember the window size Pin
rameshbabu_peddapalli4-Jun-09 9:34
rameshbabu_peddapalli4-Jun-09 9:34 
AnswerRe: How and where windows remember the window size Pin
Dave Kreskowiak4-Jun-09 9:46
mveDave Kreskowiak4-Jun-09 9:46 
GeneralRe: How and where windows remember the window size Pin
rameshbabu_peddapalli4-Jun-09 19:41
rameshbabu_peddapalli4-Jun-09 19:41 
GeneralRe: How and where windows remember the window size Pin
Dave Kreskowiak5-Jun-09 3:50
mveDave Kreskowiak5-Jun-09 3:50 
QuestionRe: How and where windows remember the window size Pin
Baeltazor11-Jun-09 18:54
Baeltazor11-Jun-09 18:54 
AnswerRe: How and where windows remember the window size Pin
Dave Kreskowiak12-Jun-09 11:05
mveDave Kreskowiak12-Jun-09 11:05 
AnswerRe: How and where windows remember the window size Pin
Luc Pattyn12-Jun-09 11:22
sitebuilderLuc Pattyn12-Jun-09 11:22 
QuestionDynamically change the Crystal report Pin
bruze4-Jun-09 0:38
bruze4-Jun-09 0:38 
Questionbreakpoint is skiping out Pin
Choubey Prashant3-Jun-09 23:06
Choubey Prashant3-Jun-09 23:06 

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.