I have a COM Callable Wrapper that I'm using from a VB6 program, but the program won't receive COM events unless the CCW is registered. Otherwise, the CCW works fine, just no events until I remove the program's manifest file and register the CCW using "regasm /tlb /codebase theccw.dll". This is in WinXP SP3.
What could be the problem?
...
Hi,
Is their any IoC controllers available that will work on .NET Compact Framework?
...
I'm drawing a border with System.Windows.ControlPaint.DrawBorder3D, and want to draw into the rectangle inside the border. How do I get the width of the border, so that I can find the rectangle inside it?
UPDATE: With the default theme, the borders are 2px top and left, but only 1px bottom and right, so SystemInformation.Border3DSize i...
I have several ActiveX components that needed to be accessed from a C# project.
I can import them via Visual Studio's add reference dialog, which will also automatically generate wrappers class. (i.e. ABCLib and AxABCLib)
I know that I can generate the primary interop assembly manually by running TLBIMP /primary on each individual OCX ...
The question is: How to make default button be focused on form focus and response on "Enter" hit, but not focused when the caret is in textbox with multiline property set to true for example?..I know that i can do some exceptions in code, but maybe there is some "best practices" i dont know for now :(
thank you
...
Say if my code is always going to be run on a particular processor and if I have this information during installation - is there any chance I can avoid JIT?
...
I have a WPF sub window with some input controls that the user has to correctly fill before pressing Ok button.
I have already implemented the interface IDataErrorInfo to validate all properties bound to UI Controls.
Now I would like that the IsEnabled property of Ok button is True only if ALL controls are valid, otherwise it has to be...
Hi,
We need to scan files as they are being uploaded using the Symantec AV Scan Engine from our .Net Application, which supports ICAP
Any pointers on how to go about this would be very helpful.
Kind regards,
...
When trying to replace the content of an XML file in C#.NET with a snippet like this:
string file = Path.GetTempFileName(); // pretend this is a real file
string tmpFile = Path.GetTempFileName();
using (var writer = XmlWriter.Create(File.Create(tmpFile)))
{
writer.WriteStartElement("root");
for (int i = 0; i < 100; i++)
{
...
Hey everyone,
What I am trying to do is pass the raw content of an outgoing email to spamassassin in order to calculate a spam score. I am stuck in how I might get the raw content of the email.
My C# code currently just constructs the MailMessage and passes it the SmtpClient's Send() method. Before sending, is there a way to get a raw ...
I have some string resources, e.g. a user welcome string. By default it should be "Hello", but for customer X it should be "Greetings".
I'd like to use .NET's resources implementation, and have the strings sit in constants or in files or wherever I like, plus the hierarchy model fits my needs: customer X's resources override the user we...
Some texts on ASP.NET MVC state that "there are no runat server tags", even this MSDN article says this, when, right above that statement there is a code example with a runat server tag in the HEAD element:
http://msdn.microsoft.com/en-us/magazine/cc337884.aspx
And on StackOverflow conversations I read
"The fact that you want to...
To get the file size for every file in a list of files, I'm using the following code:
foreach (String f in files)
{
UriBuilder ftpUri = new UriBuilder("ftp", ftpServer, -1, ftpPfadZuLogDateien + "/" + f);
FtpWebRequest ftpclientRequest1 = (FtpWebRequest)WebRequest.Create(ftpUri.Uri);
ftpclientRequest1.Method = WebRequestMethods.Ft...
Does it makes sense to use the Repository pattern without the use of LINQ or some other ORM? I am writing an application in MONO and using MySQL, was thinking of using the repositoy pattern but not going to be able to deal with IQueryable. I was thinking of just exposing more methods on the repository to make it obvious that filtering ...
Hi,
I am trying to use the Enterprise Library 3.1 Validation Block for validating my objects in a new project. This application is to be multi-lingual and as such need to be able to put my error messages into resx files. How would you go about doing this? Would you use the config section or Attributes on the objects themselves and how d...
This MSDN article stated that:
processors are free to reorder this code
internal static volatile int s_x = 0;
internal static volatile int s_y = 0;
internal static volatile int s_ya = 0;
void ThreadA() {
s_x = 1;
s_ya = s_y;
}
I am worried if any code could be reordered, and I know how to identify reorderable code. Speci...
In C#/ASP.NET 3.5, I have a DataTable which pulls rows from the database.
I want to dynamically apply a sort filter to the datatable (could be a dataview), and then do a loop through the "rows" of the sorted data to use each row for some metrics.
I would greatly prefer not to hit the database each time to do custom sorting, but I'm not ...
In my spare time, I do a bit of home development primarily using free tools (Eclipse, Java, PHP, Ruby, Rails, etc.) as they are with what I'm most familiar; however, for my 9-to-5, I work as a developer in the .NET environment using all Microsoft tools. Our product is built using a framework that sits on top of .NET and that was develope...
Hi,
We need to send uploaded files from our CMS website to any antivirus product as a POC. Are there any AV products out there that provide a .Net/COM API.
Kind regards,
...
Or, to be more clear, how can I format a block of text (in my case, to be included within a tooltip) such that some portions of the text come from bound values.
In plain C# I would use:
_toolTip.Text = string.Format("{1:#0}% up, {2:#0}% down",
Environment.NewLine, percentageOne, percentage2);
However the WPF XAML markup for a Tex...