|
Umm does the client machine have the .net framework installed (the proper version of it as well)?
|
|
|
|
|
Yes.
If this helps, it's just a plain dialog based application.
Being curious, I created an application using the wizard, and tried it on the machine. Same result.
|
|
|
|
|
Hi, This is manjari and im facing some problem to getting no of copies.i cant get the particular method to restrict the no of copies in printdialog.tell me the proper method which will restrict the no of copies .menas if a user will give 10 copies to print if that user hv limit for 9 copies then it should blocked.hw i will restrict plz help me.
thanks,
regards,
manjari.
How i will design a a form in windows service to print a document.
|
|
|
|
|
The short answer is, you can't.
|
|
|
|
|
Wow. Two "you can't" in a row. You're on a anti-roll. Yeah, that's pretty weak but what the heck.
|
|
|
|
|
I aim to please!
I really thought the long answer was WAY beyond his skill level.
|
|
|
|
|
Hi Dave,
really i appriciate ur view.nw i m in notice period.i m leaving this company.but in this period also he told try to restrict no of copies of print dialog.hw yaar.i tried to set flags of copies and copycount method also set.but it returns only 1 copy not multiple copies.in this 8 days i will give whatever i searched.
and one more thing personally i want 2 share with u .when i gave resignation thattime my p.m called me personally and told i want u people for permanent position.why u want to leave this company.i just gave little smile and told what should i will do.i got another offer and i signed the agreement.
and one more thing plz give ur mailid,if u want.i want to keep touch with u.hw z ur life going on.if u thing that i m ur true frnd then mail me.take care.bye.hv a nice day.
How i will design a a form in windows service to print a document.
|
|
|
|
|
Hi Dave,
finally i got the solution.i restricted no of copies of printdialog.my project is finished.takecare.bye.
How i will design a a form in windows service to print a document.
|
|
|
|
|
Then share the solution with everyone else here.
|
|
|
|
|
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.
bye.
How i will design a a form in windows service to print a document.
|
|
|
|
|
This only restricts the number of copies in your app. Your original post came acrossed like you wanted to limit the number of copies in EVERY application running on the system.
|
|
|
|
|
Hi dave,
see first u run ur application then go to any like notepad or pdf or wordpad.give the print option then u wil get the print dialog box after clicking ok the pop up will come to ask username and password while thattime ur job is in pause mode.if valid it will ask for no of copies.if that particular user have limit like 6 copies it cant permit to 7 copies,and it will blocked.thats what he wants.he wants to do this one one exe or a service and implement it.i hope u understud my point.
c u.
takecare.
bye.
manjari.
How i will design a a form in windows service to print a document.
|
|
|
|
|
Ha Manjari ,
Pls email me at subashis.halder@wachovia.com
Regards
Subashis
|
|
|
|
|
There is a number of pc connected in LAN.
I want to run my Application on remote PC and also need the acknowledgement for the clicked button.
For e.g.
In my application there is form with "YES" and "NO" button.
I want the acknowledgement for which button user has been clicked?
|
|
|
|
|
You cannot do that. A process launched remote cannot be launched as an interactive process. The users will never see the form, even though the app will be running.
The process has to be launched by the user on their own machine in order to be visible. I think you need to rethink your design... perhaps using a web forms-based solution and an internal web server.
|
|
|
|
|
Have any of you come across, or, more interestingly, found a work-around for the bug in ListView, where doing multi-select in a multi-column control, with check boxes and full-row select enabled, causes the check state of already selected items to change? It's really annoying, as I'd like to keep full row selection, and multi-select. (edit : more detailed description below)
I found a message from MS admitting there was a problem, dated 2002( ) so it looks like they're not in any hurry to fix it.
The alternative is to track all the select and checked states myself, and do my own updates in the selection changed handler, which is just extra work and extra code.
I'm hoping somebody has a quick and easy solution, but none of the searches I've done has turned up anything useful...
edit : a more detailed description of the problem :-
Create a multi-column ListView, set to "Details" view mode, with checkboxes enabled (they appear in the first column), as well as multi-select and full row select.
Try selecting, and checking the checkboxes. When multi-selecting (ctrl+click) and clicking in any except the first column, the check boxes for rows already selected will nearly always toggle state.
There are three kinds of people in the world - those who can count and those who can't...
modified on Friday, June 5, 2009 2:10 PM
|
|
|
|
|
I recently answered this in another thread:
http://www.codeproject.com/Messages/3417741/Re-how-to-disable-multi-select-of-checkbox-in-list.aspx
HTH - hground
|
|
|
|
|
Hi,
While working with crystal report in winform, I found that the printer settings can be set using the report designer itself. And depending upon the paper size (that I set) the report canvas (designer view) size also adjusted itself.
Do we have some similar setting in Microsoft Report (rdlc) in VS 2005? I see no matter how many columns I add in the report its width goes on increasing and during printing or exporting (in PDF) the results are horrible with the table getting split in an ugly manner. Can't the page size be set in the report designer?
If not in the designer, have we some way to do it through code?
Any replies will be appreciated.
Best Regards,
Sid
|
|
|
|
|
How windows Operating System remember the windows sizes.
For example if we open word document and resize that document and close the document. Now reopen MS word we see the window with last changed size. This is applicable for Internet explorer, explorer, MS Office and any window in Microsoft Operating System.
Thanks & Regards
Ramesh Babu Peddapalli
|
|
|
|
|
That information is saved by the individual applications, not Windows. Each app gets it's own window sizes and saves that information to the registry, or some other store. When the app launches again, it just reads the stored information and recreates the windows with the proper size.
|
|
|
|
|
If an application (eg: a form in VB 6.0) is developed by the programmer that form size will be stored in registry (under [HKEY_CURRENT_USER\Software\VB and VBA Program Settings])with the form name.
But what about Internet explorer, Explorer, MS Word, MS Powerpoint ... i don't see any registry entry for these applications.
Please give me the path for one of the above mentioned apllications.
Thanks & Regards
Ramesh Babu P
|
|
|
|
|
You just have to know how to look for them and what tools to use to find them.
For Word 2003, it's in:
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Word\Data\Settings
For Excel 2003, it's in:
HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Excel\Options\Pos
There is also a couple of other values that changes for both apps, called MTTA and MTTF.
|
|
|
|
|
Sorry to go a little off-topic here, but why is everybody so fixated on using the Registry to store such information?
It's so much easier to use Settings like, create 2 Settings entries and then use:
Form Load:
this.Size.Width = Properties.Settings.Default.SizeWidth;
this.Size.Height = Properties.Settings.Default.SizeHeight;
then, Form_Closing:
Properties.Settings.Default.SizeWidth = this.Size.Width;
Properties.Settings.Default.SizeHeight = this.Size.Height;
It works flawlessly for me, and there's no need to go digging into the registry and spending 75 years trying to find the right place to get/set information. Can someone please explain why virtually everyone prefers or needs to use the registry?
|
|
|
|
|
Yeah, but his point was that he thinks Windows stores this information and not the app itself.
|
|
|
|
|
IMO you are right, most of the things present in the registry would be better of somewhere else.
The registry is fine for storing paths, so system objects can be located easily.
It is not the ideal place to keep app settings.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|