I currently use a System.IO.FileSystemWatcher as part of a "roll your own" message queue system (passing XML "messages" between servers using SOAP web services, writing the "messages" to a specific folder on disk where a Windows Service running a FileSystemWatcher pounces on the new "messages" as they arrive and do something productive w...
I'm trying to add a PropertyChangedCallback to UIElement.RenderTransformOriginProperty. An exception is thrown when I try to override the PropertyMetadata.
I have searched MSDN and Google, and all I have been able to come up with is this. DependencyPropertyDescriptor.AddValueChanged is suggested at some point in that post, but that wo...
After reading this blog, I want to try writing a similar program myself.
One of the subtasks is to have a source set of polygons, and use these polygons to generate the bitmap that is going to be compared with the target image.
In .NET 2005 the obvious method is to use GDI+. Simply create a bitmap, get a Graphics object that interfaces...
Possible Duplicate:
How can I find the method that called the current method?
How can I get the calling function name from the called function in c#?
...
Can anyone suggest a way (supported or unsupported) of getting a look at native code bytes compiled by the NETCF JIT compiler. I happen to be on WinCE6.0 on an ARM platform.
I'm guessing that this can be done with a native debugger, but I'm trying to figure out (essentially) how I would get my bearings to know what I'm looking at. Per...
Are there any alternative to Enterprise Library Validation Block? I want to be able to add validation attributes to my properties.
Thanks
...
Can anyone please explain what the following code checks for? I can make no sense of it, but don't want to leave it out of my rewrite merely out of ignorance. The complete code calculates a variance between now and detailLastDate, i.e. Days(detailLastDate) - Days(Now). For this case, detailLastDate has the value '090722':
int num3 = ...
is there a way to reference the page control in a webservice? something like this:
[WebService(Namespace = "http://test.org/")]
public class Search : System.Web.Services.WebService
{
public Search()
{
Page.Controls.Add(new Control()); // can I get a reference to Page?
}
}
...
I need to create a pen which draws with a width of 0.5 mm regardless of the scale of the graphics transformation matrix. Here is what I am doing:
Note: The sample code is C++/CLI but answers using C# are welcome.
// assume that g is a Graphics object
int dpi = g->DpiX;
float dotsPerHalfInch = dpi * 0.5;
// to extract scale factor from...
You wrote at: Opened SerialPort crashes C# application
"A look into the .NET Framework source code helped a lot. But I think the thrown ObjectDisposedException should be caught by the SerialPort, not by the user."
I'd like to take a look on source code for serialPort. How can I do it?
...
hi.
i am sending messages in MSMQ by setting its priority. using C#
can i get the message from MSMQ having high priority first?
just like we get in Priority Queue.
and one thing more..
suppose there are three priority level
0 - high
1- medium
2 - low
the sequence in queue is 2001122221111100
now if i send message with high prior...
This is a .NET winform application question.
I come to this design from time to time. A simple form. On top of the form you have a list of options to select. According to different option chosen, the body of the form displays a unique panel of setting detail.
How to design this UI in Visual Studio neatly? I have two ideas. First idea i...
Hi,
I have a .NET application (C#, WinForms) application running on Windows XP. If i minimize my application, and have several other windows minimized to the taskbar, and click on my application (in the taskbar) then often i see the taskbar "icon" blink but my application fails to "restore" its window. Any suggestions to what might caus...
I have to "embed" an .exe within a panel in a .net windows form.
I am doing this using user32.dll SetParent to set the launched app's parent to the forms Panel handle.
Once this is done, I would like to
Hide the title bar of the .exe
lock the exe into the panel (maximized) so it cannot be moved or closed.
Suggestions?
...
I do the following:
Copy an executable to C:\temp\x.exe
Start the executable with System.Diagnostics.Process.Start and then wait for the process to exit, synchronously, by calling WaitForExit on the Process object returned by Start.
Delete the executable C:\temp\x.exe
On some machines, this works great, but on others, the call to Del...
I am using IronPython to create a shell for a plugin API to Autodesk Revit Architecture 2010 to speed up learning their API.
One of the classes the API provides is Autodesk.Revit.Elements.Room, derived from Autodesk.Revit.Element.
I would really love to read Room.Name, but this goes Boom! on me as Room has overridden Elements Name prop...
I encountered a behaviour I can´t quite understand when I was trying to populate a GridView. Consider the following code:
DataTable table = GetStockMovement((int)ViewState[MOVEMENT_ID], false);
MovedProducts = from DataRow row in table.Rows
select new Product()
{
Product...
I wonder how the VS2008 IDE registers a plugin. A db file, xml etc. since I know that once I call devenv.exe with the parameter to my plugin dll, the next time I launch VS IDE, my plug in is still there. Any leads on where it registers my dll?
I can also make use of a best practice for such development pattern. I think of developing a b...
I'd like to get a .NET TabControl with a few extra features, such as:
Close button for tabs;
Context menus for tabs (with close this, close all, close all but this)
Tab re-arranging;
Tab scrolling/resizing when there are too many tabs;
I'd also like for the control to maintain the native OS look and feel. And, naturally, freeware win...
My question (I think) can be simply described by this question:
How can I get a "Manager" class to have a list of all possible concrete implementations of a specific interface that have been registered as components injected into it so it can iterate through them? (And because of annoying architecture reasons I can't use the app.config ...