Dmitriy Kostovetskiy
Posts
-
Multi-platform C#? -
date format converter?Here is an example:
MessageBox.Show(DateTime.Now.ToString("dd-MM-yy"));
-
Intercept incoming htmlOne way to do it is to write a Browser Helper Object[^]. Browser Helper Object can then send message and pass URL to your main application.
-
e-mail filesP/Invoke
ShellExecute(0,"open","mailto:?file=\"c:\autoexec.bat\"", NULL, NULL, SW_SHOWNORMAL);
-
Class InheritanceIn C# threads are handled differently. You create an instance of System.Threading.Thread and pass ThreadStart delegate to the constructor. ThreadStart delegate represents a method that thread will run.
public static void RunMe()
{
{
//Run code here
}
}public static Main()
{
Thread myTread = new Thread(new ThreadStart(RunMe));
} -
Text Editor QuestionI use TextPad too and very happy with it. It's fast and has lots of nice features.
-
checking dynamically which control is clickedIf I understand you correctly, you need to know control which triggered context menu when you handle
MenuItem.Click
event. When you handle this eventsender
is a context menu so it wont't help you much. However, if you handleContextMenu.Popup
sender is the control triggering the event. What you can do is this: create a field in the class where you handle eventsobject controlWhichTriggeredEvent;
Then create a handler forContextMenu.Popup
:private void YourContextMenu_Popup(object sender, System.EventArgs e) { controlWhichTriggeredEvent = sender; }
Now when you handle
MenuItem.Click
,controlWhichTriggeredEvent
will contain the latest control clicked by user (you will have to cast it to label of any other control). -
Java Applet/Servlet vs. .NETHere is an article that shows how to write an applet in C#: http://www.csharphelp.com/archives/archive109.html[^]
-
Kazaa Lite