Click here to Skip to main content
15,916,189 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
Questioncrystal report taking long time for preview Pin
srinisiv24-May-09 1:05
srinisiv24-May-09 1:05 
AnswerRe: crystal report taking long time for preview Pin
ISoftwareDev24-May-09 2:09
ISoftwareDev24-May-09 2:09 
GeneralRe: crystal report taking long time for preview Pin
srinisiv24-May-09 20:25
srinisiv24-May-09 20:25 
GeneralRe: crystal report taking long time for preview Pin
Pete O'Hanlon24-May-09 22:28
mvePete O'Hanlon24-May-09 22:28 
GeneralRe: crystal report taking long time for preview Pin
David Mujica22-Jun-09 16:20
David Mujica22-Jun-09 16:20 
QuestionHow to detect the person who will click the print option in windows application??? Pin
manjari kar23-May-09 0:52
manjari kar23-May-09 0:52 
AnswerRe: How to detect the person who will click the print option in windows application??? Pin
Colin Angus Mackay23-May-09 21:27
Colin Angus Mackay23-May-09 21:27 
GeneralRe: How to detect the person who will click the print option in windows application??? Pin
manjari kar24-May-09 18:28
manjari kar24-May-09 18:28 
thanx for responding.plz giv eme ur answer depictly with code .becoz i tried a lot .but i didnt get result.plz help me.and nw again i briefly tell u the task.suppose in ms word or in notepad or in pdf file ,when a person is going to click the print option in file menu thattime our window should display instead of print dialog popup.if valid then it goes to print dialog popup for print that document.
i hv done my task like this.after clicking the print option printdialog popup is comming,then clicking ok my window is displaying and asking for username and password.but i want before that print dialog popup it should display.plz helpme and give me a right path.
my code is like this :
private void timer1_Tick(object sender, EventArgs e)
{

PrintServer myPrintServer = new PrintServer(@"HP LaserJet P2010 Series PCL 5e");
PrintQueueCollection myPrintQueues = myPrintServer.GetPrintQueues();
foreach (PrintQueue pq in myPrintQueues)
{
pq.Refresh();
PrintJobInfoCollection jobs = pq.GetPrintJobInfoCollection();
foreach (PrintSystemJobInfo job in jobs)
{
if (job.Submitter == "gyana.manjarikar")
{
job.Pause();
}

if (true)
{
//MessageBox.Show(job.Name.ToString());

this.Show();
}

else
this.Hide();
}
}
}

private void btnlogin_Click(object sender, EventArgs e)
{

int copies=10;
this.Opacity = 50;
PrintServer myPrintServer = new PrintServer(@"HP LaserJet P2010 Series PCL 5e");
PrintQueueCollection myPrintQueues = myPrintServer.GetPrintQueues();
foreach (PrintQueue pq in myPrintQueues)
{
pq.Refresh();
PrintJobInfoCollection jobs = pq.GetPrintJobInfoCollection();
foreach (PrintSystemJobInfo job in jobs)
{


//if (txtUserName.Text == "aaa" && txtPassword.Text == "bbb" && copies <= 10)
//{
// job.Restart();

//}
if (job.Submitter == "gyana.manjarikar")
{
if (txtUserName.Text == "aa" && txtPassword.Text == "bb" && copies <= 10)
{
timer1.Dispose();
job.Resume();
this.Hide();
}
else
{
lblErrormsg.Text = "Invalid UserName Or Password";
}

}
else
{
this.Show();
timer1.Start();
lblErrormsg.Visible = true;
lblErrormsg.Text = "Invalid User";
}
//if (job.Submitter == "")
//{
// job.Pause();
//}
//else
//{
// lblErrormsg.Visible = true;
// lblErrormsg.Text = "Invalid User";
//}
//if ( txtUserName.Text == "aa" && txtPassword.Text == "bb" )
//{
// job.Pause();
//}

//else
//{
// lblErrormsg.Visible = true;
// lblErrormsg.Text = "Invalid User";
//}
}
}
}




private void btncancel_Click(object sender, EventArgs e)
{
this.Opacity = 50;
this.Hide();
PrintServer myPrintServer = new PrintServer(@"HP LaserJet P2010 Series PCL 5e");
PrintQueueCollection myPrintQueues = myPrintServer.GetPrintQueues();
foreach (PrintQueue pq in myPrintQueues)
{
pq.Refresh();

PrintJobInfoCollection jobs = pq.GetPrintJobInfoCollection();
foreach (PrintSystemJobInfo job in jobs)
{

if (job.Submitter == "gyana.manjarikar")
{
job.Cancel();

}

}// end for each print job
}
}


private void Form1_Load(object sender, EventArgs e)
{

this.Opacity =100;

}
}

}
plz help me where and what i will change here.

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

Generalread my sig! Pin
Luc Pattyn25-May-09 0:07
sitebuilderLuc Pattyn25-May-09 0:07 
QuestionInstallation in Windows Services Pin
bobbymale7722-May-09 13:33
bobbymale7722-May-09 13:33 
AnswerRe: Installation in Windows Services Pin
Moreno Airoldi24-May-09 0:19
Moreno Airoldi24-May-09 0:19 
QuestionSQL Server Project Pin
kermit8822-May-09 5:06
kermit8822-May-09 5:06 
AnswerRe: SQL Server Project Pin
Ramesh Swaminathan23-May-09 0:10
Ramesh Swaminathan23-May-09 0:10 
QuestionCrystal Reports XI Pin
SudhaMall22-May-09 2:55
SudhaMall22-May-09 2:55 
AnswerRe: Crystal Reports XI Pin
bobbymale7722-May-09 13:37
bobbymale7722-May-09 13:37 
GeneralRe: Crystal Reports XI Pin
SudhaMall26-May-09 4:28
SudhaMall26-May-09 4:28 
GeneralRe: Crystal Reports XI Pin
SudhaMall26-May-09 4:29
SudhaMall26-May-09 4:29 
GeneralRe: Crystal Reports XI Pin
bobbymale7727-May-09 4:31
bobbymale7727-May-09 4:31 
GeneralRe: Crystal Reports XI Pin
SudhaMall27-May-09 4:36
SudhaMall27-May-09 4:36 
GeneralRe: Crystal Reports XI Pin
bobbymale7727-May-09 4:50
bobbymale7727-May-09 4:50 
GeneralRe: Crystal Reports XI Pin
SudhaMall27-May-09 4:51
SudhaMall27-May-09 4:51 
GeneralRe: Crystal Reports XI Pin
bobbymale7727-May-09 4:53
bobbymale7727-May-09 4:53 
GeneralRe: Crystal Reports XI Pin
SudhaMall27-May-09 4:58
SudhaMall27-May-09 4:58 
GeneralRe: Crystal Reports XI Pin
bobbymale7727-May-09 4:58
bobbymale7727-May-09 4:58 
GeneralRe: Crystal Reports XI Pin
bobbymale7727-May-09 5:01
bobbymale7727-May-09 5:01 

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.