|
Sorry didn't help. The richtextbox is at the bottom of the form so it can't be docked to the top. Couldn't get the code to work. Where exactly do i put the code? And how do i call it?
Thought it would be easy enough to do, oh well..
Where is says:
this.richTextBox2.Size = new System.Drawing.Size(760, 200);
can this line not be changed to call a function that autoresizes the richtextbox??
|
|
|
|
|
How to copy file from a directory to another
Thanks in advance
|
|
|
|
|
see this[^]
<italic>Work hard, Work effectively and a bit of luck is the key to success.
|
|
|
|
|
I have a Sys Tray Application with a NotifyIcon,
But I have a big problem that I have been trying to solve for days now.
If I want the Application to show a window, but if I want to do it from another thread . How do I do that then ?
I know that if I have a normal Window Application I can solve this by using invoke, etc.
But ApplicationContext have no such methods, like invoke.
What do I do ? How can I make my own Synchronizer, that can help me call a method on the Application main gui Thread ?
Can i make somekind of workaround, with a mainform that is not shown at all?
Best regards, Anders Both - Denmark.
|
|
|
|
|
Hi every one , this is my first entering to this forum.
I hope we will help ourselves to be professional in C#
C# interested
|
|
|
|
|
I don't understand what the point of interfaces are? Can you explain it to me?
/\ |_ E X E GG
|
|
|
|
|
|
what is that eggie5 on??????
Cheers
|
|
|
|
|
I need to show a loading message or retrieving data message while im accessing to any webservice for data
|
|
|
|
|
Create it in another thread it will do that jop
|
|
|
|
|
Hi experts,
I am trying to display data in a datagrid from a xml file. I have no problem reading the xml file, however when i try to display the data in a datagrid all i get is "null" values. I have bound my dataset to the datasource property but still dont know where im going wrong
can anyone point me in the right direction???
Cheers
|
|
|
|
|
A simple example:
DataSet ds = new DataSet();<br />
ds.ReadXml("99999.xml");<br />
<br />
this.dataGrid1.DataSource = ds.Tables[0].DefaultView;<br />
<br />
CurrencyManager cm = (CurrencyManager)this.BindingContext[this.dataGrid1.DataSource, this.dataGrid1.DataMember]; <br />
((DataView)cm.List).AllowNew = false;<br />
<br />
this.dataGrid1.CaptionText = "Total Tasks: " + dataGrid1.BindingContext[dataGrid1.DataSource, dataGrid1.DataMember].Count.ToString();
Hope this helps
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
I want to get the value(the X and Y value)of a curve from a .jpg file?
get the value of the curve from a .jpg file.
could anyone give me a sample about it?
my E-mail: dxhdxh2k@hotmail.coom
Thanks
|
|
|
|
|
How many times are you going to ask this question ? I've answered it several times, you obviously just want someone to write code for you. I suggest going to rentacoder if you want some cheap code to do this. It might even work.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
My aim is to use the above specified classes for encryption and decryption on strings send across the network.
I am unable to find how to use these two classes put together.
Can anyone help me in this regard. Early response is encouraged.
|
|
|
|
|
Hi,
1) Create the key and IV
2) Create a crypto service provider
3) Create a crypto stream
4) Create new stream writer on the crypto stream
byte [] key ={171, 196, 154, 92, 35, 195, 212, 50};
byte [] IV ={65, 86, 22, 91, 214, 4, 177, 199};
try
{
DESCryptoServiceProvider dsp = new DESCryptoServiceProvider();
MemoryStream ms = new MemoryStream();
CryptoStream cs = new CryptoStream(ms,dsp.CreateEncryptor(key,IV),CryptoStreamMode.Write);
StreamWriter sw = new StreamWriter(cs);
sw.Write(textBox1.Text);
sw.Flush();
cs.FlushFinalBlock();
ms.Flush();
textBox2.Text = Convert.ToBase64String(ms.GetBuffer(),0, (int)(ms.Length));
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
}
Hope this will help you.
Thanks and Regards
SGS
|
|
|
|
|
I am intereseted in developing network application where a server and client will just pass the text messages. I am using Tcp sockets. I could not incorporate networkstream classes in the context. I mean to say that I have to work with networkstream, streamwriter or streamreader and cryptostream classes put together.
Hope you understand the situation.
|
|
|
|
|
Hi there..
There is a lot of examples on how to do the server client stuff in the .Net framework documentation. Search for "TCP" and you'll get something usefull! About the cryptographic stuff:
<br />
public string Encrypt(string ToCrypt)<br />
{<br />
string encoded = "";<br />
byte [] EncKey = {0x16, 0x1F, 0x01, 0x03, 0x1A, 0x0B, 0x10, 0x7F, 0x65, 0x5E, 0x45, 0x3F, 0x11,0x1F, 0xFF, 0xEF, 0x32, 0xEE, 0x5F, 0x38, 0xA7, 0xB2, 0xCC, 0x77, 0x51, 0x14, 0x40, 0x8A, 0x95, 0xE5, 0x00, 0x84};<br />
<br />
byte [] EncIV = {0x05, 0x14, 0x06, 0x15, 0x02, 0x13, 0x00, 0x0F, 0xC0, 0xD8, 0xB6, 0x58, 0xE4, 0xA9, 0x21, 0x5E};<br />
<br />
RijndaelManaged rmEnc = new RijndaelManaged();<br />
rmEnc.Key = EncKey;<br />
rmEnc.IV = EncIV;<br />
<br />
StreamWriter sw = new StreamWriter(encoded);<br />
CryptoStream cs = new CryptoStream(sw, rmEnc.CreateEncryptor(rmEnc.Key, rmEnc.IV), <br />
CryptoStreamMode.Write);<br />
cs.Write(Encoding.ASCII.GetBytes(ToCrypt), 0, ToCrypt.Length);<br />
<br />
cs.Close();<br />
sw.Close();<br />
<br />
return encoded;<br />
}<br />
If this wasen't what you were looking for, you must express yourself more clearly. What is the exact problem?
|
|
|
|
|
Hi Aijaz,
You can initialize the crypto stream class using any class that's derieved from Stream class. (Ex File Stream , Memory Stream, NetworkStream).
Using NetworkStream:
TcpClient client = new TcpClient();
NetworkStream ns = client.GetStream();
CryptoStream cs = new CryptoStream(ns,dsp.CreateEncryptor(key,IV),CryptoStreamMode.Write);
StreamWriter sw = new StreamWriter(cs);
Guess this will help you.
Thanks and Regards
SGS
|
|
|
|
|
Hi All,
I need to export the Chartfx graph which is displayed on a webpage to an excel document(as a graph itself) .How can it be done using C# code??
Can anyone help me out ??
Thanks ,
Sunil
|
|
|
|
|
ChartFX renders and image in ASP.NET, and is nothing like the OLE Chart object that you can embed into Excel. It's simply an image. You could automate downloading and adding the ChartFX-rendered image into Excel, but it won't update when you change data in the worksheet like I'm sure you'd want to happen.
What you need is the data that was used to generate the chart for ChartFX. You could expose this through an XML web service, which Excel could pretty easily import into a worksheet (see the Excel help topics for how to import XML data from a web service, which is outside the scope of this forum) and have an OLE Chart object already embedded.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Customer Product-lifecycle Experience
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
WOW, it's Heath Stewart! Haven't seen you around in a while. How are things going at Microsoft?
/\ |_ E X E GG
|
|
|
|
|
I know how to sync the status bar with the coping or some things,
But, any body knows how to do it with a web browser control with loading the web page on custom code ?
I've tried many but ...?
Any ideas ?.
|
|
|
|
|
LongHC wrote:
...with a web browser control with loading the web page on custom code?
What do u mean by custom code?
There are some interesting things u can do with the System.Net namespaces, e.g. u could have a streamreader accosiated to a WebRequest/WebResponse containing the characters of the webpage you are trying to load and have the progress bar progressing after each character is being read from the streamreader.
Have a look
here[^]
Regards,
Polis
Can you practice what you teach?
|
|
|
|
|
I have a word search program.
Each letter in a UserControl.
I want to draw with GDI over the controls to circle words and what not.
Any ideas or links.
Nick
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|