|
Hii,
i just want to know that How to redirect printer port to c# application.
modified on Tuesday, May 19, 2009 3:08 AM
|
|
|
|
|
Hi,
when we give print a web page opened on browser, how can we know the details of printer like its name etc., using c#?
|
|
|
|
|
Do you want to get the list of installed printers? If yes, work with PrinterSettings.InstalledPrinters property.
|
|
|
|
|
Hi I want the same thing almost, If there are 3types of printers installed,
I want to know the name of Printer which has been selected before giving the printer
|
|
|
|
|
Hi All,
In my windows application I am using 'Zedgraph' dll for displaying graph. In my code I am not using multithreading anywhere. On some of the systems (Windows XP) it shows unhandled exception 'System.InvalidOperationException' (object is currently in use elsewhere). And the instead of graph it just shows RED CROSS.
I have googled about this issue but it says that it may be due to Multithreading and I am not using it anywhere. And the application is running fine but creates problem on some of the systems on my Client side.
Any suggestion would be helpful...
Regards,
-SIFAR.
|
|
|
|
|
What version of .NET FF are you using?
|
|
|
|
|
It is .Net Framework 2.0
Regards,
-SIFAR.
|
|
|
|
|
How to convert a float decimal number into a single precision (4 byte) ?
Thanks
|
|
|
|
|
Convert.ToSingle
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Hey all! I was just wondering if I should dispose of the dirty little RichTextBox control contained within the Selected TabPage that I will be removing? Or does that somehow just "magically" happen automatically? I searched on msdn and google (i did see code that disposes rtb's) but i couldn't find anything that says that it's neccessary?
thank you
jay
p.s. <--- what does P.S stand for? and... does anybody know of a better way to remove a selected tab page other than:
if( Tc.TabPages.Count >= 1 )
{
Tc.TabPages.Remove(Tc.SelectedTab);
}
|
|
|
|
|
I'll let Yogi Berra help you with this one ... hehe
"ps: stands for post script ... which is what you say after you are through saying what you said before you said what you said"
|
|
|
|
|
haha thanks mate, i knew why people said p.s i was just unaware of what the letters actually stood for lol
|
|
|
|
|
oh .. hehehe .. guess you didn't need Yogi's help ... lol
My favorite yogiism (though he says he never said it) is: "Nobody goes to that restaurant anymore because it is always so crowded" ... lol
Good luck with your Disposal problem ... neither Yogi nor i can help you with that.
|
|
|
|
|
hehe thanks yogii's fun i like him lol
|
|
|
|
|
In my background application, I want to "borrow" the cursor for a few microseconds and do some clicking and dragging (in an external application's textbox) in preparation for copying to the clipboard (that part works great), but it is uncool to steal the cursor from the user while he (for example) is in the process of moving or resizing a window as the result IS A MESS and generates some nasty language .
So i need to know if the User is currently using the mouse for ANYTHING in ANY other application just before i begin the fun stuff.
I'd like some code that functionally looks like:
... while (MouseDown) Thread.Sleep(100);
regardless of what application is active.
Thanks very much for your time and help!
|
|
|
|
|
hmmm... that does sound fun!
|
|
|
|
|
I don't see why you'd need the mouse to do that; find a better way.
|
|
|
|
|
I'm open to suggestions ... however, the SendInput that worked fine on a 32-bit XP machine no longer worked when recompiled on a 64-bit Vista machine.
Dunnno why, but i suspect SendInput might be fubar on x64 machines. SendMessage and mouseEvents weren't great solutions either ... hence the fun stuff.
btw ... your answer seems arrogant and condescending. I didn't realize that it was important to get your approval of my method before asking for help on how to do it ... shame shame.
|
|
|
|
|
I bet you are using a wrong struct, where a pointer is held in an int or so.
CORRECTION: I know you do, and I told you before.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
yes you did ... thank you.
I'll try the 8b pointers if we can find the original program from whence that code came ... he chucked it. If not i'll write a simple pgrom to verify that the 8b pointers solves the problem.
Thanks again.
|
|
|
|
|
IceWater42 wrote: your answer seems arrogant and condescending
Good, I had hoped that had come across.
What you were describing just sounds kludgey to me. Like using the clipboard to do a screen capture.
|
|
|
|
|
LOL ... kludgy? ... no KIDDING! It does to me too. I would LOVE to have an alternative solution.
What i don't think i need is your admitted arrogance. Please feel free to NOT help me in the future.
Sorry to have wasted your time.
|
|
|
|
|
IceWater42 wrote: btw ... your answer seems arrogant and condescending. I didn't realize that it was important to get your approval of my method before asking for help on how to do it ... shame shame.
Well, since Windows is a shared system, your app has to work and play nice with others. Since your solution is grabbing the mouse away from the user rather violently, and completely unreliably, I'd say it's your solution that's arrogant and condescending, to the user. There is no way for you to know that your've about to grab the mouse away from the user in the middle of a double-click, or some other operation. The user is liable to think there is a problem with the mouse. You don't see other application doing this at all, do you?? Maybe there's a reason for that...
|
|
|
|
|
My solution is arrogant and condescending? ... rofl
I would LOVE to have a conventional solution if i had one. And i would love to explore ideas of the bright people here. But tell me how "I don't see why you'd need the mouse to do that; find a better way." helps in ANY way. How is it worth the electrons wasted to say it?
I know it is a terrible approach but i was hoping the more knowledgable people here would offer a bit more than ridicule.
Why would anyone EVER want to come here for help if THAT is the quality of the help they are going to get?
The jerk owes me (and everyone else he talks that way to) an apology. Unbelievable.
|
|
|
|
|
Your use of the mouse and the clipboard is, obviously, not advised at all, since you're overwriting values on the clipboard that the user may need after your operation.
From your description, you're only option is to get the window handle to the TextBox and send a WM_GETTEXT message to it, retrieve the pointer that may be returned, and copy the string it points to to your own memory location. No mouse, no copying to clipboard, and no pissing off the user.
Google for "C# WM_GETTEXT[^]" for examples.
|
|
|
|