.net

Firefox engine library

Hi, I'm now using AxWebBrowser component to get DOM from web page and find used styles on each element. Unfortunatelly this is not working perfectly and some elements doesn't return correct data. I'm thinking about if it's possible to use engine from firefox? Is there some dll library I can use, navigate to the page and go throw DOM of ...

AOP can be use to share data among different running threads in application process?

UPDATE: I am not clear in what context AOP should be used? As we can use AOP for logging purpose, security(Authentication), please suggest some other scenarios where we can take benefit of AOP. Can AOP be used to share data among different running threads in application process? ...

Load Outlook 2003 VSTO plugin

Hi, I have an annoying problem. I have a VSTO 2 plugin for Outlook 2003 (written with VS2005). I simply create 2 buttons that save email objects and work on emails. The problem is that the plugin, when just installed, is loaded by outlook and it works, but when I reboot the plugin is no more automatically loaded. I must re-enable it fro...

How to identify file created completely

How to identify the file has been created completely in c#.. Which command do we need to use to see that the file has been created completely.. some large file takes time to create completely how to identify them.. Thanks ...

BSTR and SysAllockStringByteLen() in C++

I'm new to C++, so this may be a noobish question; I have the following function: #define SAFECOPYLEN(dest, src, maxlen) \ { \ strncpy_s(dest, maxlen, src, _TRUNCATE); \ dest[maxlen-1] = '\0'; ...

HtmlHelper<ChildType> not assignable to HtmlHelper<MotherType>

I have a view ViewUserControl<SearchViewData> where SearchViewData: CommonViewData In this view I thus have a reference to Html. This is of the type HtmlHelper<SearchViewData> I create a custom HtmlHelper class called CommonHtmlHelper where I want to this (note the HtmlHelper parameter's type): public static SelectList Translat...

LinqToSql - Prevent sub queries when limiting number of rows returned

Dim query = (From p in Parent _ select _ p.ID, _ Tags = String.Join("|", p.Child.Select(Function(c) c.Tag.TagName).ToArray)).Take(100) In the above query, when using Take to limit the rows returned, a separate SQL query is executed for each row to return the 'Tags' field. If I remove Take(100), a single query to sen...

What is app.config for?

Settings.settings generates Settings.Designer.cs which presumably generates app.config which then is copied to output directory as Foo.exe.config. When I distribute the application without the config file, nothing bad seems to happen. So, what is that file for? ...

What's the advantage of mapping a binary column to System.Data.Linq.Binary instead of byte[]?

LINQ to SQL by default maps a binary column (varbinary, image, ...) to a property of the type 'System.Data.Linq.Binary'. Working with binary data this way is not that hard, but you can manually change that mapping to 'byte[]', making it easier to work with binary data (since you don't have to convert it in code anymore. What's the disad...

Check registry permission without throwing exception

I have a piece of code like this try { RegistryKey regKey = Registry.LocalMachine.CreateSubKey("SOFTWARE\\xxxx\\yyyyy"); // more code } catch { } I don't like the use of the empty catch block. But, it's useful because if the user don't have permissions to access the Registry, nothing should be done. This piece of code ge...

Creating custom Inbox item in Outlook - C#

Hello, Im creating an addin for Outlook 2007. I have no problems creating custom folders and custom MailItems or PostItems and moving them to my folders. But Outlook assumes, that all those items I create (using Application.CreateItem) are to be sent - It allows me only to change the "To" property, but there's no "From" property. In o...

Order of exception handling stack frames on the call stack

What is the order in which exception handling stack frames are pushed onto the call stack in say C#. If i have a method: private void MyMethod() { try { DoSomething(); } catch (Exception ex) { //Handle } } Is a separate stack frame created for each exception handler as follows? DoSomething stackframe<br/> Exceptio...

Are there any .NET libraries that draw a table in console (textmode)?

While writing a small C# application for myself I realized that it would be neat if I could easily draw tables in textmode. You know, like this: +-----------------+-----------------+ | Header 1 | Header 2 | +--------+--------+--------+--------+ | Data 1 | Data 2 | Data 3 | Data 4 | | Data 1 | Data 2 | Data 3 | Data 4 | | D...

Keyboard messages Windows flow problem and doubt

I'm developing a program where I've had to add a keyboard shortcuts system. The problem is it uses a third party OCX for a part of its display, and it is catching some essential WM_KEYDOWN messages when in focus, like Ctrl+C, Ctrl+V, etc. I've tried catching the WM_KEYDOWN message through WndProc, but the message is not propagating, so ...

How to lock file

Hi, please tell me how to lock file in c# Thanks ...

How can I set initial values when using Silverlight DataForm and .Net RIA Services DomainDataSource?

I'm experimenting with .Net RIA and Silverlight, I have a few of related entities; Client, Project and Job, a Client has many Projects, and a Project has many Jobs. In the Silverlight app, I'm uisng a DomainDataSource, and DataForm controls to perform the CRUD operations. When a Client is selected a list of projects appears, at which p...

TypedDataSetGenerator ignoring HierarchicalUpdate option?

I'm using System.Data.Design.TypedDataSetGenerator to convert a .xsd file (generated by VS2008) into a strongly-typed DataSet class compatible with .NET 2.0. From what I understand from MSDN, the HierarchicalUpdate option must be specified to get the same result that the VS2008 IDE generates: HierarchicalUpdate - Generates typed dataset...

ASP.NET Users/Membership/MembershipUser/Security/Principal/Profile... HELP

I know this might sound like something which is explained everywhere.. but I've been watching lots of asp.net/learn videos reading articles - and still there's something missing that explains how all this "Membership" ties together. On the one hand, there's this built-in .net user management which allows you to create roles, users etc....

Programmatically adding a Membership Provider

I have a .Net application that uses an arbitrary number of Membership providers. I will not go into the reasons, but I do not want these to be pre-configured, but I want to create and add them programmatically. Is there anyway to do this? I have no problem creating the providers, but Membership.Providers is readonly, so I can't add them....

DataGridViewColumnCollection property in custom control

I am creating a custom control, constisting of DataGridView, a few additional buttons and useful functions. For user of the control to be able editing grid's columns I added Columns property of type DataGridViewColumnCollection. Now it's possible to edit columns through Property Editor (clicking by a small button near Columns prope...