|
Thank you very much..
I got the perfect idea.
But we are using Excel 2000 and hence we were not able to use that code.
Thank u....
Regards
Sriharsha R
|
|
|
|
|
Hi all,
After hours of googling without much success i decided to post a note on CP.
Basically, What I’m after is a textbox control which mimics / acts the same as the outlook To: Text box.
How it skips names/Addresses which it knows and wont allow you to edit the text of a known address, etc.
Iv searched around and have still come up empty handed.
If anyone could provide any insight into how to do this, point me in the right direction, help out, or even suggest items. Frankly I’m at a loss of how they have actually coded such a control, let alone in C#.
Once again, ANYTHING on this subject is helpful and will be much appreciated.
Thanks in Advanced,
Daniel
|
|
|
|
|
Hi,
I am running a program as windows servie in Windows Server 2003. My service is running perfect till 1400 - 1500 threads. But after 1500 threads it hangs and OS is also hangs.
Can any buddy tell me maximum number of threads in windows 2003 service.
Or tell me any fix for it. So I can run around 3000 threads in service.
Ankit Singhal
|
|
|
|
|
As far as I know, the number of threads you can run is limited by the power of your hardware...
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
The number of threads is usually limited by your applications stack space. Each thread will suck up a little of your application stack until you run out of room.
The number of threads you can start before this happens depends on how much other stuff you have loaded into your stack. Usually around 2000 for a program that only starts threads.
|
|
|
|
|
How can i play live stream from nework with Media player? In my project i have to transmit a stream in RTP. How i check this stream in Media player?
|
|
|
|
|
We have a big response-time issue getting xml data from a webservice and loading it into the CE SQL database (like 1/2 hour for 8K records)
I'm looking for suggestions on how we can improve this --- the load itself seems to be about 15 minutes.
The process is as follows:
The CE application asks for items the signed in person ownes
The webservice gets them and formats them into a string that is really XML
The string is passed via SOAP to the handheld and loaded into XML
The XML is then used to populate the database.
My first concern is the webservice-generated code which does the following
object[] blah = GetData();
return (string) blah[0];
Would this be more efficient if we just built an XML object and passed it as such? (Seems we'd bypass the convert to string and load to XMLDocument)
Would an alternative improve the connection? (remoting)
We are doing a VPN tunnel from the CE client into the intranet and then into the web service.
Thanks for any input -- Michael
|
|
|
|
|
Good day all.
I am having a problem with casting a system.object type into a ArrayList.
I am deserializing a serialized SOAP object in the following code snippet:
public static object DeserializedSOAPFile(string filePath) <br />
{<br />
IFormatter formatter;<br />
FileStream fileStream = null;<br />
Object SOAPObject = null;<br />
<br />
fileStream = new FileStream( filePath, FileMode.Open,FileAccess.Read ); <br />
formatter = new SoapFormatter();<br />
SOAPObject = formatter.Deserialize( fileStream );<br />
<br />
if(fileStream != null)<br />
fileStream.Close();<br />
<br />
return SOAPObject ;<br />
}
They I need to cast it into an ArrayList to get the data. I am trying the following:
comboBoxSavedList = DeserializedSOAPFile( deserializationDataPath );<br />
<br />
ArrayList savedComboBoxes = (ArrayList) comboBoxSavedList;
When using the watch view I can see my saved ArrayList data but the app throws an invalid cast exception.
Thank you in advance for any input to assist me in correcting this code.
"We succeed in enterprises which demand the positive qualities we possess, but we excel in those which can also make use of our defects."
Have a great coding day.
Regards,
Tony D. Abel
|
|
|
|
|
You would get that error if the original object was not an ArrayList.
There are 10 kinds of people in the world.
Those that read binary...
...and those who don't.
|
|
|
|
|
I'm new to databinding and I'm having some trouble getting my program to work the way I want it. I'm not using a database of any kind, but instead I'm just using a DataSet as the database (writing the xml to disk). The DataSet has three DataTables. I have my form components setup like this. I have my strongly-typed DataSet, and three BindingSource's, one is bound to my strongly-typed DataSet, the other two are bound to the first BindingSource, with their DataMembers set to their specific DataTables in the XSD (all of these were generated automatically, when I setup databinding on my controls). Now, I have a Combobox on the form that's bound to one of the BindingSources that's bound to the BindingSource that's bound to the strongly-typed DataSet. Here's a diagram
MyDataSet <-- firstBindingSource <-- secondBindingSource <-- Combobox
^-- thirdBindingSource
When I load the data into the dataset the combobox still isn't populate with the information, it's just blank. I know the dataset has the values in it though.
Any ideas?
- Aaron
|
|
|
|
|
How do I add the animated gif in the c# form control( probably a picture box). I downloaded some animated gifs from web and added as background image to the picture box. But the animation is not happenning. Just the gif image is loaded.
How do I solve this. Thanks
|
|
|
|
|
Searching CP for 'animated gif' gave me a few hits...
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
this link should be useful to you
http://www.c-sharpcorner.com/Code/2002/Nov/ThreadPoolGifs.asp
Regards,
Pramod
|
|
|
|
|
how can i protect my string:
provate string conn_string = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Application.StartupPath + "/" + "mydatabase.mdb" + ";Jet OLEDB:Database Password=mypassword;";
in this way everyone can get "mypassword"
so how can i protect it?
|
|
|
|
|
Not everyone, unless you put that in a publically available file. Then the solution would obviously be not to.
From whom do you need to protect it?
---
b { font-weight: normal; }
|
|
|
|
|
it is very easy to hacker a c# compiled source.
so it is very easy to get a password to get access at the database.
|
|
|
|
|
This How To shows you how to create a managed class library that exposes DPAPI functionality to applications that want to encrypt data, for example, database connection strings and account credentials.
DevIntelligence.com - My blog for .Net Developers
|
|
|
|
|
You put your connection string in your configuration file and you encrypt it. You of course have to decrypt it to use it. Take a look at Microsoft's Enterprise Library in their "Patterns and Practices" stuff. The Enterprise Library includes "Application Blocks" for Encryption, Configuration, Database Access, Logging, Exceptions, and more I think. It's huge but there's a lot of good stuff in there if you choose to use it.
Also, there's a property (sorry I don't remember the name) on the Connection objects that directs it not to store sensitive info. This is only the password in Oracle's ODP.Net but I think SQL Server's Connection is supposed to drop the Id as well. I don't know about OLEDB.
Good luck.
|
|
|
|
|
What we would do is the following:
1) put the connection string in a config file
2) encapsulate getting the string from the config file
3) once you are successful in getting the read from db working in a test configuration, add an encryption module.
4) write a quick and dirty that encrypts any string and shows the result
5) use your encryption technique and encrypt the string
6) replace your connection string with the encrypted data
7) add the decryption in your encapsulated routine and verify you can still access the database
8) now place the encryption/decryption key in the registry and lock it down with security so that only your application has the rights to read it.
There are 10 kinds of people in the world.
Those that read binary...
...and those who don't.
|
|
|
|
|
8) now place the encryption/decryption key in the registry and lock it down with security so that only your application has the rights to read it.
what do you mean about registry, and "lock it down with security.."?
|
|
|
|
|
i am trying to add an ActiveX web browser control to a form during runtime.
i need to do this so that i can create instances of the control and add them to different tabs.
at present i get a 'InvalidActiveXStateException' trying to use the control.
heres my code
AxWebBrowser browser = new AxWebBrowser();
this.Controls.Add(browser);
browser.Dock = DockStyle.Fill;
browser.Navigate("http://www.google.com"); // this line cause the exception
i am guessing that its because the control need to be initialized before the form is created.
anyone got any ideas how to get around this?
|
|
|
|
|
Investigate how it's done if you were to do it through the designer. I believer there's an OcxState or similar propery that has to be initialized before you can add it to the control through code.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Little House on the Flickr
Judah Himango
|
|
|
|
|
thanx man, i looked around and found the code in the form1.designer.cs
heres my code if anyone else come across this problem.
this code adds an activex webbrowser control to a tabpage of a tabcontrol. You just pass it the tabpage by reference
<code>
private AxWebBrowser webPage = new AxWebBrowser();
private void AddBrowserToTab(ref TabPage tp)
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager();
((System.ComponentModel.ISupportInitialize)(webPage)).BeginInit();
tp.Controls.Add(webPage);
((System.ComponentModel.ISupportInitialize)(webPage)).EndInit();
}
</code>
|
|
|
|
|
I create a shortcut for my application in startup folder. But in some machines, after Windows start, it's also running but it can not load all .dll files it uses. So it's frozen. But after that, I terminate it from task manager and click the shortcut in Startup folder, it runs perfectly. And I also add it to registry in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run key, but nothing is better. Do you have any ideas?
Thanks,
hvtin
|
|
|
|
|
Have you checked the event log for error messages?
---
b { font-weight: normal; }
|
|
|
|