Yes, I saw those in there. I won't use special character often, if I did I would come up with my own character map and shortcut keys. Maybe just make a program to do it. But, as it is, I don't need to.
Is there a list or something of how to insert special characters into your program? In MS Word, the Copyright symbol can be typed in using Ctrl + Alt + C but it does not work in the vs source code editor.
Yep, that works. I realize that I could just take everything out of the event block and put it in a regular method (C# function) but I really wanted to know how to do that anyway.
Thanks.
I have a couple of places in my code where it would be convenient to simulate an event. I looked on the internet but could find nothing about it.
For example, I have a date and time picker with an event - dateTimePicker_ValueChanged
How do I simulate the value changed so that everything in that block executes?
Divil, I found a small mistake in your page:
but in this case we want to hide then. (them)
That is under the Adding the designer section.
Here is another one:
Adding Buttons
The first thing we want the user to be able to do is to buttons.
I have been trying all day long to draw the toolbar background red but to no avail. The OnPaint event is not ever called when I inherit from ToolBar.
But when I inherit from UserControl or Button the OnPaint event is fired, but that is pretty useless to me because it is not anything like a toolbar.
And, the ToolBar in VS does not have a DrawMode option for it. So I cannot Owner Draw. I don't think so anyway. It seems like I would have to create my own toolbar control from scratch. What do you think?
What I meant was, I have no idea why I would want to serialize and then deserialize an object just to put it into a byte array. Because the only reason I want something in a byte[] is to save it to disk with a FileStream.
Serialization does seem pretty fast. I found that using method Save() to save an image to disk saves it correctly whereas serialization does not.
I did not see that you posted before I did vf. I'm thinking right along your lines.
I have a question about that though. When I serialize an image to disk it never shows a thumbnail like all the other pictures do. But I can open it in any picture editor just fine. What am I doing wrong?
I think I figured out the exception to that. I serialize the object to disk first and then deserialize it. That works. I have no idea why I would want to do that though.
I have seen on the web alot of documentation on the memory stream. It has a method ToArray() to convert an object to a byte[] but no matter what I do I cannot get memory stream to have anything in the stream. Maybe something like this:
public static byte[] GetByteArray(object o)
{
using (MemoryStream ms = new MemoryStream())
{
return ms.ToArray();
}
}
Although it does not work. Please help, or give me assurance that putting an object into a byte[] is impossible.
I have tried many things to do a simple check to return either true or false, for object in clipboard. Nothing has worked so far. Here is my last resort and the code that I think is close but does not work right:
public static bool ClipBOccupied()
{
if(Clipboard.GetDataObject().Equals(null))
return true;
return false;
}
It seems to me that the clipboard always has something in it, because when I copy bland rtb text it returns false. It always returns false. Please help.
I got the context menu to work for rtb's but it still does not show any source control here:
private void contextMenu1_Popup(object sender, System.EventArgs e)
{
MessageBox.Show(""+this.contextMenu1.SourceControl);
}
Does anyone know why?
Please answer this, I am having much trouble figuring out why it works for labels and not for the text boxes.
Also, you might want to know that when I do right click on a label the messagebox shows it is a label with the text property and when I right click on a textbox after that there is something in the messageBox but it is the label info.
However, this method works: this.RTB1.Copy(); What did I do wrong?
I was always trying to find things using the helps search and got nowhere. But I heard about the object browser and I found exactly what I was looking for. Thank you Divil.
I have included the source file for the directory picker to give you an idea of how to make you own.
I like your user name, check out my site: click directorypicker.cs
That works. It completely stops enter from being manifested at all. Thank you very much. One thing I don't understand is why Handled=true stops enter from being recognized. Why isn't it Handled=false?
I have been looking on the internet for code to put in my program to simply send an email to me using a link label to my email address.
But all I can find on the internet is how to use smtp to send mail. Isn't there a way just like using a web link to open up the default mail client and put my address in there just like the mailto does in html?
Probably something like this:
Process.Start("IExplore", "http://exeat.com/art/aewarnick/index.htm");