|
Hi
I want to do encryption with the .NET classes and then decrypt with a native c class to not be dependant on .NET on the decrypting side. For instance using dsCrypt available at:
http://freezip.cjb.net/freeware[^]
However I just cant manage to decode the message correctly, is just becomes junk. Has anyone expericance from doing a similar thing?
|
|
|
|
|
I am creating an application for a mobile device with pocket PC in C# manufacturer is Symbol . Can any body help me how can I get scanned barcode into my C# (windows) application .
Thanks
Learner always
|
|
|
|
|
hi
I want to save my database table contents in to CSV format using C# .
how can i do this.
This is very urgent plz reply ASAP.
Thanks in advance
Alok
|
|
|
|
|
A csv format replaces tabs with commas so if you can read your table then you can convert from datatable to csv as shown in following pseudo-code:
DataTable myTable = GetTableContents(tableName);<br />
StringBuilder sb = new StringBuilder();<br />
foreach (DataRow row in myTable.Rows){<br />
for (int colIndex = 0; colIndex < myTable.Columns.Count){<br />
if (colIndex != 0) sb.Append(",")<br />
sb.Append(row[colIndex].ToString());<br />
}<br />
sb.Append("\n");
}
|
|
|
|
|
Hi,
I'm new to .Net and very much need to know how I go about creating a server on a client PC that I can hook other applications into ?? I don't want to use remoting as its on the same client machine but I need to keep a stategull component that is instantiated by the first app to hook to it and avaialble to other apps to hook into ??
Thanks
Chubby..
|
|
|
|
|
One possibility is to use Sockets, and listen only on the 127.0.0.1 interface. But, that's a lot of manual work, developing a basic protocol for the communication and then the code to transfer and respond to whatever you send or receive.
John
"You said a whole sentence with no words in it, and I understood you!" -- my wife as she cries about slowly becoming a geek.
|
|
|
|
|
Thanks John. I've decided to look at Remoting, got the simple one working (MSDN)....Will post another thread more approriate to my problems now. Thanks again.
Chubby..
|
|
|
|
|
I had a function in Invoke.dll
int __stdcall Invoke( const char *arglist[], int count );
to use it , I call it in c#
first declare:
[DllImport("Invoke.dll")]
static extern int Invoke( string[] arglist, int count );
then call it:
string[] arglist = "1, abc, xyz".Split(',');
for( int i = 0; i < arglist.Length; i++ )
{
arglist[i] = arglist[i].Trim();
}
try
{
Invoke( arglist, arglist.Length );
}
catch( Exception ex )
{
Console.WriteLine( "Invoke exception: {0}", ex.Message );
}
It works well, but if I use "1, ,xyz", then the string[] will have a "" string, this result a exception: The parameter is incorrect.
I want to know why, because it is sure sometime "" is a valid parameter.
++O++
/ \
hhmmdd
|
|
|
|
|
sorry, I found the problem not only "1, ,xyz", but also when I do follow:
string[] arglist = "1, ,xyz".Split(',');
for( int i = 0; i < arglist.Length; i++ )
{
arglist[i] = arglist[i].Trim();
}
++O++
/ \
|
|
|
|
|
I didn't really read your question, but from your subject line it looks like you want to know what .net type you want to use for a unmanaged char[]. I suggest a StringBuilder with the out modifier.
/\ |_ E X E GG
|
|
|
|
|
no, not unmanaged char[], it is unmanaged const char *[]
|
|
|
|
|
oh, I don't know then. Sorry.
/\ |_ E X E GG
|
|
|
|
|
Is anyone aware of a control for entering TimeSpans ? I found this one[^], but unfortunately this is for ASP.NET not for Windows Forms.
It doesn't matter whether for .NET 1.1 or 2.0.
I already thought about using DateTimePicker in time-only-mode, but I also want to be able to enter days and this is not possible with the DateTimePicker .
Maybe some masked TextBox control with a certain mask?
Any ideas?
--
Affordable Windows-based CMS for only 99 €: try www.zeta-producer.com for free!
|
|
|
|
|
Could you perhaps use two DateTimePickers to specify start and end time? That way you could specify an arbitrary duration...
Just a thought,
mav
|
|
|
|
|
Hello,
I've added some code to use the macromedia flash player (flash.ocx) to my windows forms application.
If the flash player is not installed on my clients pc it will crash the application.
How can I programmatically determine if the flash player is already installed and execute the flash code based on the condition if the flash player is installed or not.
thx!
|
|
|
|
|
At what point does your application crash? If it is after you've executed some of your own code, you ought to be able to use try/catch or other error handling mechanisms built into .NET to catch whatever error is causing your crash. At that point, you should be able to detect that the player isn't present.
John
"You said a whole sentence with no words in it, and I understood you!" -- my wife as she cries about slowly becoming a geek.
|
|
|
|
|
Yes, I know the try catch is a possible solution.
That's also how I implemented it at this time to avoid the possible crash of the application.
(application crashes when I call the code to play the flash swf file)
I don't like relying on the try catch statement.
I think it should be possible to determine if the flash player is installed and only execute the code to play the flash file if the flash player is installed. (otherwise display image)
|
|
|
|
|
Hi, I have created a .Net Applet that connects to an FTP server via sockets. The problem is that the connection to the socket takes a long time (at around 100+ seconds). I tried creating an implementation of the FTP class in a Windows Form and I got connected faster (roughly 1-3 seconds).
Are there issues when connecting/opening sockets in .Net Applet?
sample code
public Boolean Login()
{
// Create socket
m_objClientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
// Create IPEndpoint
IPEndPoint ep = new IPEndPoint(Dns.Resolve(m_sRemoteHost).AddressList[0], m_iRemotePort);
try
{
// Connect Socket takes a long time in applet
m_objClientSocket.Connect(ep);
}
catch(Exception ex)
{
MessageString = m_sReply;
throw new IOException("Cannot connect to the remote server. Error: " + ex.Message);
}
.......
|
|
|
|
|
You might get better answers if you post in the windowsforms.net forums. .NET 'applets' are so sparingly used, it seems to me that most people will have no idea why it works slower over the web like this.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: The Secular Left, the Religious Right, and Prejudice
Judah Himango
|
|
|
|
|
A GUI have many controls, such as radiobutton, checkbox etc.
After configurate GUI, click "OK" button, how to save current configuration?
ths!!!
|
|
|
|
|
dogdogdog wrote:
how to save current configuration?
However you want to save it. The .NET framework does not dictate how your application should work that is a design issue for you to resolve. If you tell us where you would like the configuration information to be saved then maybe we can help you.
My: Blog | Photos
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
hi,
You have to use XML to do this.
suppose that you click radio button and current configuration of it is "ok".
Then you have to save Radiobutton name and "true" in the XML File.
pl use System.Xml namespace for it.
after that you load application once again,You have to read current status of Radio Button and set it to radiobutton..
regards,
pubudu.
|
|
|
|
|
You have to use XML to do this
Why do you HAVE to use Xml? You COULD use Xml, you COULD use a serialised object, you COULD use a database but you certainly don't HAVE to use Xml.
Personally I have used an object serialized to the filesystem for this. It is very simple - create a class to represent all the properties of the gui you wish to store, remember to mark it as [Serializable].
When the app is unloaded fill a new instance of your "settings" object with the values from the gui and use a serializer (Xml or Binary or any type you wish) to serialize to the filesystem.
When the app is loaded do it in reverse, deserialize the file back to an object and set the properties on the GUI.
|
|
|
|
|
hi,
I have used XMLDocument to save current status of Application Controls.I haven't use Serialization or No need to use database for that.
To do serialize You also need to use XML.
regards,
pubudu.
|
|
|
|
|
IMHO J4amieC says that you presented XML as it was the *only* option. While I agree that XML is cool and XML rocks, it is not the *only* option.
pubududilena wrote:
To do serialize You also need to use XML.
Not at all. You can have binary serialization.
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|