|
Hello DaveyM69
I am using the code in that article but the issue is where to get the oServerName as object?
I even tried the following code with slight changes to my previous code.
This is what I have now and error is FileNotFoundException on line:
PRNADMINLib.PrinterCollection prnColl =
(PRNADMINLib.PrinterCollection)oMaster.get_Printers(ref obj);
The actual error is:
The filename, directory name, or volume label syntax is incorrect. (Exception from HRESULT: 0x8007007B)
PRNADMINLib.PrintMaster oMaster = new PRNADMINLib.PrintMasterClass();
PRNADMINLib.Printer pPrinter = null;
object obj = txtServerName.Text.Trim();
PRNADMINLib.PrinterCollection prnColl =
(PRNADMINLib.PrinterCollection)oMaster.get_Printers(ref obj);
IEnumerator prnEnumerator = prnColl.GetEnumerator();
prnEnumerator.Reset();
while (prnEnumerator.MoveNext())
{
PRNADMINLib.Printer prnCurrent = prnEnumerator.Current as PRNADMINLib.Printer;
if (prnCurrent.PrinterName == strPrinter)
{
pPrinter = prnCurrent;
break;
}
}
|
|
|
|
|
I have corrected the code as follows but it seems the data is retrieved from the local machine as opposed to the ServerName.
Any suggestions?
PRNADMINLib.PrintMaster oMaster = new PRNADMINLib.PrintMasterClass();
PRNADMINLib.Printer pPrinter = null;
clsServer oServerName = new clsServer();
object obj = oServerName;
PRNADMINLib.PrinterCollection prnColl =
(PRNADMINLib.PrinterCollection)oMaster.get_Printers(ref obj);
IEnumerator prnEnumerator = prnColl.GetEnumerator();
prnEnumerator.Reset();
while (prnEnumerator.MoveNext())
{
PRNADMINLib.Printer prnCurrent = prnEnumerator.Current as PRNADMINLib.Printer;
if (prnCurrent.PrinterName == strPrinter)
{
pPrinter = prnCurrent;
break;
}
}
|
|
|
|
|
I really haven't got a clue - I just found some online resources that I thought might help you.
This page[^] has loads of info on printing of all kinds including (about halfway down) prnadmin.dll. It has a section on Enumerating Printers - but you should probably read and understand all of it before jumping to that section. It's in VB - (maybe VBS? I didn't check) but it should get you started - maybe try it at get it working in that language before translating so you'll know wheter it's a network/permission problem or just your code if it doesn't function.
I can't help you anymore than this. I have no experience of your particular problem and it seems noone else here has either as you've been asking for a long time and not got a solution, so if this doesn't help, you may be on your own. Good luck!
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
by using a setup project a set up can be created to an application, but in my application i want the user to enter some information when the application is installing(such as server to install), how can i create such a set up project, any articles that might help full
|
|
|
|
|
Not very much experienced with setup projects but I think custom action is what you need.
|
|
|
|
|
|
Does .Net 3.5 SP1 has a big integer class, with an arbitrary number of digits precision, yet?
It would be better if it is a .Net 2.0 class because all of my code is .Net 2.0 and I hope I do not have to upgrade to .Net 3.x just because of 1 class and the 2nd reason being the big .Net 3.x framework download.
Thank you in advance!
|
|
|
|
|
It does have one, but it is still internal.
The same (not very good) code can be found in the IronPython project.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
It doesn't, but AFAIK you can use the BigInteger class from the J# library - vjslib.dll.
|
|
|
|
|
I wonder if that code is better than the one I mentioned, as the one I mentioned is rather slooow...
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
|
|
I don't know if this[^] is any good as I haven't tried it but it's an Int128.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Hi, I'm developing a device application in C#.
I'm currently using a connection string that requires the data source and I'm using the database server name.
String RDAOleBDConnectionString = "Provider=SQLOLEDB;Data Source=" + NombreServidor + "," + Puerto + ";Integrated Security=SSPI;Initial Catalog =" + NombreBD + ";";
But I want to use the IP of the server as the Data Source, I tried to use it but it didn't work.
Also, when I'm running my application, when i try to synchronize the device and the server, I have to delete first the SQL tables because shows an error (the table already exists) when I try to get the last update in tables from the server.
Also, I haven't tested the application when I try to send the data to the server. Will i have to delete the table on the server? Or there is another way to send and receive data to the server and device without deleting tables?
The reason I don't want to delete tables is because i have a website solution manipulating this data and it can delete some of the data the device sent for different reasons, and i don't want to send data that it's already useless when the device syncs again.
thanks.
~ Bizarre what men fin attractive ~
|
|
|
|
|
Hi,
is there a good tutorial or article on create crystal reports programmatically?
Thanks
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
Anyone know how to get the text on a button appear to light up? Or have an idea on how to create the effect?
Thanks...
ed
~"Watch your thoughts; they become your words. Watch your words they become your actions.
Watch your actions; they become your habits. Watch your habits; they become your character.
Watch your character; it becomes your destiny."
-Frank Outlaw.
|
|
|
|
|
could change the font color, or custom draw the button and add like a outline around the text (ie. draw the text twice but a larger size behind)
|
|
|
|
|
howlettt wrote: add like a outline around the text (ie. draw the text twice but a larger size behind)
Kinda what I was thinking about too...
I'm drawing the buttons. So I 'think' what I'm going to need to do is draw the text using a brush that highlights? Matrix?? Haven't done it before so maybe I'll have something to do an article on!!
Thanks!
ed
~"Watch your thoughts; they become your words. Watch your words they become your actions.
Watch your actions; they become your habits. Watch your habits; they become your character.
Watch your character; it becomes your destiny."
-Frank Outlaw.
|
|
|
|
|
Just use the mouse hover and mouse click events and change the background and foreground color of the button as you wish.
Mark Brock
"We're definitely not going to make a G or a PG version of this. It's not PillowfightCraft." -- Chris Metzen
Click here to view my blog
|
|
|
|
|
listen, is it a flashing color text?
i don´t really recall know how to code that but, try to add a timer object, set interval propriety for 1 second. After add a timer_tick event, there you change the color of the forecolor or backcolor.
You can query for if textbox forecolor is red then textbox forecolor to blue or if textbox forecolor is blue then textbox forecolor to red.
There you go, you have the color changed each 1 second. Check windows genereted code to set colors.
(i didn´t post code, i dont have c# turn on, but is very simply d´ont worry you will manage it easy)
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
nelsonpaixao wrote: try to add a timer object
Why? The original post has nothing to do with toggling back and forth between two colors in a given interval.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
I asked: "is it a flashing color text?"
Is it a mouse_hover event what he is talking about?
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
No, they are actually rubber looking buttons. We'd like the text on them to appear as if it glows. As if there were a light behind the button. It's not a web app with the mouse over stuff.
Thanks!
ed
~"Watch your thoughts; they become your words. Watch your words they become your actions.
Watch your actions; they become your habits. Watch your habits; they become your character.
Watch your character; it becomes your destiny."
-Frank Outlaw.
|
|
|
|
|
You should be able to do so with a custom control inherited from the Button class and have the MouseHover event handle it.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
There are a few photoshop tutorials online that demonstrate the functionality. You would just need to take said images and create a custom control.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
|
|
|
|