|
If you want to create a new printer (real or virtual) then you will need to install a driver for it, and that will need to be written according to the WDK. Go to the link I gave you and study how to do it.
Veni, vidi, abiit domum
|
|
|
|
|
How to display image on crytal report using image path from folder and selection of combobox.
|
|
|
|
|
Bit by bit.
You're asking three questions here; how to display an image in CR, how to fetch an image, and how to work with a combobox. I assume that the combobox is on some WinForm?
Check out Image in Crystal Reports[^]
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hello everyone
How I can add add local printer programmactly with c#
thanks in advance
|
|
|
|
|
You have already been hiven an answer below.
Veni, vidi, abiit domum
|
|
|
|
|
Don't repost the same question again.
|
|
|
|
|
Hello
I used this code to add printer but it did not work
try
{
oManagementScope = new ManagementScope(ManagementPath.DefaultPath);
oManagementScope.Connect();
ManagementClass oPrinterClass = new ManagementClass
(new ManagementPath("Win32_Printer"), null);
ManagementBaseObject oInputParameters =
oPrinterClass.GetMethodParameters("AddPrinterConnection");
oInputParameters.SetPropertyValue("Name", "testprinter");
oPrinterClass.InvokeMethod("AddPrinterConnection", oInputParameters, null);
return true;
}
catch (Exception ex)
{
return false;
}
|
|
|
|
|
What does "it didn't work" mean?
Where did you specify what printer to connect to? What driver to use? What printer settings (port, ip, etc)? I can't imagine you would get a working printer just by telling Windows the name of one...
|
|
|
|
|
Thanks for answer
did not work mean when I execute the code and go to Printers ,I did not see any new printer.
I want to create it on local host(Client Machine)
Port:Local port.
IP:Local IP
thanks
|
|
|
|
|
|
|
No problem.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
|
The same way you would do it on paper. Create a List of all the points in the graph and then draw a line from the first to the last, passing through each intermediate point. You can do this by using the Graphics Class[^], or search Google for some other utility classes that may help you.
Veni, vidi, abiit domum
|
|
|
|
|
I do not plot as in the picture. No numbers only lines
|
|
|
|
|
Sorry, but I do not know what you mean.
Veni, vidi, abiit domum
|
|
|
|
|
No lines. does not seem spots
|
|
|
|
|
Sorry, but that is no more clear. Try explaining in detail what you are having trouble with. And if it is a matter of translation, then perhaps you can get someone else to help with the English.
Veni, vidi, abiit domum
|
|
|
|
|
self.dots=[]
for i in range(0,num_dots)
if (condition)
self.dots.append("fix",dots[i])
else
self.dots.append("free",dots[i])
Hi all.I have a part of my project created in python and i would like to rewrite in c#.In python i used a list (self.dots) to have every item ordered with its string value.in c# i don't know how to obtain the same thing.i need to check if each item is free or fix but following the order i previously established.
|
|
|
|
|
|
Perfect.thank you very much
|
|
|
|
|
Take a look at the SortedList[^] or SortedDictionary[^] classes.
other than that there is also a "Sort" Method on the Default List[^] object. Where you can pass a comparer object with your logic how to sort the items contained in that list.
Besides, I'm not really sure what you're trying to accomplish. So I can't guarantee those are what you're looking for
|
|
|
|
|
Ok.thank you very much.Do you know how the sorteddictionary is ordered? by adding elements?i am looking up on the web in the meanwhile.
|
|
|
|
|
In the SortedDictionary sorting is made on the key. And you can't have the same key multiple times in the same dictionary.
Note that for both the SortedDictionary and the SortedList the object on which the sorting should happen has to implement the IComparable Interface or you need to assign an IComparer Implementation that takes care of the sorting for you.
|
|
|
|
|
ok i think i have undestood.I only need how to get value by index.is the following the only way?and do you think is it too slow?
sortedDictionary[sortedDictionary.ElementAt(index).Key] = value;
thank you very much
|
|
|
|