|
good to hear ..ur problem solved..do marks as answer..!
Jimish
|
|
|
|
|
Hallo
I need help with my code ...
I read image from my picturebox to memorystream and next i want save this
image from memorystream to my xls file.
I dont now how,... i have forever same problem,xls file then show only
System.Drawing.Bitmap but image isnt show.
Here is my code..
Excel.Application oXL;
Excel._Workbook oWB;
Excel._Worksheet oSheet;
try
{
oXL = new Excel.Application();
oWB = oXL.Workbooks.Open("C:\\tmp\\plan_udrzby.xlt", 1, false, 5,
"", "", true, Excel.XlPlatform.xlWindows,
"\t", false, false, 0, true, 1, 0);
oSheet = (Excel._Worksheet)oWB.ActiveSheet;
DataRowView vypis = (DataRowView)machine_OverviewBindingSource.Current;
MemoryStream ms = new MemoryStream();
myPictureBox.Image.Save(ms, ImageFormat.Jpeg);
ms.Seek(0, SeekOrigin.Begin);
Image img = Image.FromStream(ms);
System.Windows.Forms.Clipboard.SetDataObject(img);
oSheet.Cells[3, 2] = vypis["Car"];
oSheet.Cells[6, 2] = ;
}
catch (Exception theException)
{
String errorMessage;
errorMessage = "Chyba: ";
errorMessage = String.Concat(errorMessage, theException.Message);
errorMessage = String.Concat(errorMessage, " Řádek: ");
errorMessage = String.Concat(errorMessage, theException.Source);
MessageBox.Show(errorMessage, "Chyba");
}
Can someone help my please
|
|
|
|
|
Hello,
i have a question to P2P, how it is possible to connect two Clients with TCPListener/TCPClient, but not with NAT! I know how to do that if i have a access to that specified porrts. I don't want that the user must at first configuring his NAT-Router, to get access. Is there any other way to do that (except a "Server-Client-Connection").
Well i don't know any other way, but i can't imaginge, that for example in a Instant Messenger (ICQ, AIM or something else) all data-transfers are running over their server (imagine the huge traffic). Has somebody experience in this? Or is there a "standardized" open Port in every NAT-Router which i can use?
Many Thanks
|
|
|
|
|
Generally, in P2P/IM systems, the server is used only to make possible the contact between clients, then the communication is done directly between clients.
To do what you want, at least one of the clients must be able to listen to incoming connections on the specified port.
You can try to auto configure port forwarding by using upnp (a tutorial here[^]), but keep in mind that upnp could not be available in your network infrastucture.
|
|
|
|
|
Exactly that is my Problem, i know i must have a server to manage the "external IPs", but the communication between the clients must (or better should) run over P2P to avoid huge traffic. And so how can i connect to a Cilent which has a NAT-Router without a Port-Forwarding? (I know i must open a port with TCPListener and so on, but that's not the problem )
Has somebody a exact example for my problem? I know the external and internal IP-Address and to find out the MAC-Address wouldn't be a problem. I would store that on a server and CLient 1 is asking for the network informations of Client 2 and then (now thats where i have a problem) Client 1 is establishing a Connection to Client 2.
Many Thanks
modified on Wednesday, April 8, 2009 8:10 AM
|
|
|
|
|
Has nobody any idea? I need "only" a connection between two PCs in a WAN, without manually Port forwarding. So i need UPnP and i don't have any idea if i get a connection, to use it to establish a TCPClient Connection. I'm extremely confused after reading all this posts about UPnP. I mean, how does that for example in Instant Messaging-Application works? Their File-Transfer and Streaming and so on doesn't run over the IM-Server, too. How does they get a connection. And to find out what the external IP Adress the PCs have isn't a problem. So how can i establish a connection between those PCs? A code example would be very great.
Many thanks
|
|
|
|
|
Operations working regarding calculator.It should be same as Calculator in our system
SANDEEP
|
|
|
|
|
Here[^] you are
I are troll
|
|
|
|
|
Hi,
I wanna change the project work timings of microsoft project using .net. Am in need to change holidays of the project from saturday,sunday to wednesday. Please help me out in this.
Thanks
Maheshkumar B
|
|
|
|
|
i have code like this
public void Page_Load(object e, EventArgs s)
{
try
{
XmlDocument doc = new XmlDocument();
byte[] chunk;
string message;
string xmlmessage;
xmlmessage = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
"<chunk xmlns:dt=\"urn:schemas-microsoft-com:datatypes\" dt:dt=\"bin.base64\">SSdtIGp1c3QgYSBsaXR0bGUgYml0IGNhdWdodCBpbiB0aGUgbWlkZGxlDQpMaWZlIGlzIGEg" +
"bWF6ZSBhbmQgbG92ZSBpcyBhIHJpZGRsZQ0KSSBkb24ndCBrbm93IHdoZXJlIHRvIGdvIEkg" +
"Y2FuJ3QgZG8gaXQgYWxvbmUgSSd2ZSB0cmllZA0KQW5kIEkgZG9uJ3Qga25vdyB3aHkNCg0K" +
"U2xvdyBpdCBkb3duDQpNYWtlIGl0IHN0b3ANCk9yIGVsc2UgbXkgaGVhcnQgaXMgZ29pbmcg" +
"dG8gcG9wDQonQ2F1c2UgaXQncyB0b28gbXVjaA0KWWVhaCwgaXQncyBhIGxvdA0KVG8gYmUg" +
"c29tZXRoaW5nIEknbSBub3QNCg0KSSdtIGEgZm9vbA0KT3V0IG9mIGxvdmUNCidDYXVzZSBJ" +
"IGp1c3QgY2FuJ3QgZ2V0IGVub3VnaA0KDQpJJ20ganVzdCBhIGxpdHRsZSBiaXQ=</chunk>";
doc.LoadXml(xmlmessage);
XmlNode node = doc.SelectSingleNode("chunk");
chunk = node.Value ;
Response.Write("sucsess ");
}
catch (Exception x)
{
Response.Write("error "+x);
}
}
can some body help me solve my problem or give me suggestion to solve the problem, thx
regards
novhard
|
|
|
|
|
Use chunk = Convert.FromBase64String(node.InnerText);
|
|
|
|
|
thx mate .., for answering my question
i will try it
|
|
|
|
|
I am building a "Messenger" and looking for an "Open Source" in C# using "Session Initiation Protocol"...Where can i find any?? its almost a week now and i hav failed to find any...
|
|
|
|
|
1. Implementation of discussion board.
2. Creation of discussion board categories.
3. Post Message In discussion board.
4. Display All discussion board messages.
5. Post Comments on discussion board.
|
|
|
|
|
|
Hi programmers,
I have created a simple Windows application with a text box, a Browse button and a Delete button. I have also added an OpenFile Dialog control, such that whenever the user clicks the browse button, the Open File Dialog box is displayed. Now I want that whenever the user selects any file from the Dialog box and clicks on the Delete button, the file path must be copied to the following code of a Console Application, I have created earlier: //Code
{
System.IO.File.Delete("FilePathHere");
}
How can I do that? Please help.
Your help will be appreciated,
Rajdeep.NET
|
|
|
|
|
You can execute your console-application using the Process class. Add the filepath-variable as a parameter, enclosed in quotes. In the console-application, read the parameter and convert it back to a variable.
Hope this helps
I are troll
|
|
|
|
|
i have a bounded combobox. i need to convert that to an autocomplete combobox. i need when i type first character in combobox, complete other character automatically. I HAVE A BOUNDED COMBOBOX
|
|
|
|
|
comboBox.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.Suggest;
comboBox.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems;
|
|
|
|
|
u can use something like this..
combobox1.AutoCompleteMode = AotuCompleteMode.Append;
Jimish
|
|
|
|
|
How can i start with read registry subkeys values created by each running process
in the task manager using c#?
|
|
|
|
|
You can get the Running Process List and File Name by Using System.Diagnostics.Process.Process().
The Windows API provides a function RegNotifyChangeKeyValue that is used to Find the changing in Registry.
Best Regard
Anubhava Dimri
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
can i use this function to determine what each process change in the registry?how?
|
|
|
|
|
HI
I want to change the colour of title bar in c# .net to my form attractive can anybody help me or give me relevent information about my post
|
|
|
|
|
Hello Shomic,
You cannot change the color of the title bar simple like that. It depends on the OS or the present theme of your or your client's PC. However, you can apply interactive design to your form by using WPF (Windows Presentation Foundation) but for that you have to know core XML. You can seacrh for online tutorials on WPF in Google or MSDN. Hope this helps.
Happy programming,
Rajdeep.NET
|
|
|
|