.net

Strange behaviour when appying a ColorMatrix to an image in .Net, WinForms.

The method below, takes a colour matrix and applies it to the supplied image. There are a couple of things to note: (1) It is not a function (2) The same image is used to create the graphics object, and as the source of the DrawImage method. Public Sub ApplyMatrixToImage(ByVal matrix As ColorMatrix, ByVal image As Image) Using atts...

Persisting object changes from child form to parent form based on button press.

I have created a form that is used for both adding and editing a custom object. Which mode the form takes is provided by an enum value passed from the calling code. I also pass in an object of the custom type. All of my controls at data bound to the specific properties of the custom object. When the form is in Add mode, this works great ...

Understanding AddHandler and pass delegates and events.

I am using AddHandler to wire a function to a control's event that I dynamically create: Public Delegate Sub MyEventHandlerDelegate(ByVal sender As Object, ByVal e As System.EventArgs) Public Sub BuildControl(EventHandler as System.Delegate) dim objMyButton as new button AddHandler objMyButton.Click, EventHandler ...

Delphi 2010 and .net

Hi, how is Delphi 2010 relationship with .net? I remember that not long ago you could only generate .net 1.1 code. And now, how is that? How does legacy Delphi code (mostly 7) behave when compiled for the .net platform instead of Win32? Is it compatible? ...

Check for state change in objects using serialization?

I have a form that is bind to an object, and when the user trying to leave the form, I want to warn them if anything on the form has been changed, and prompt them to save. My question is, is there any way to achieve this without implementing IComparar for all my classes in the binded object? I was thinking if there is a way I can seria...

Are lambda expressions/delegates in C# "pure", or can they be?

I recently asked about functional programs having no side effects, and learned what this means for making parallelized tasks trivial. Specifically, that "pure" functions make this trivial as they have no side effects. I've also recently been looking into LINQ and lambda expressions as I've run across examples many times here on StackOve...

Defaulting scope in entity framework

Is there a way to default the scope to internal with updating an .edmx from a database? I get tired of having to go through large tables setting every getter, setter, etc. to internal instead of public ...

HttpWebRequest to different IP than the domain resolves to

Hey, Long story short an API I'm calling's different environments (dev/staging/uat/live) is set up by putting a host-record on the server so the live domain resolves to their other server in for the HTTP request. The problem is that they've done this with so many different environments that we don't have enough servers to use the serve...

asp.net application install folder

Disclaimer: this is not a question about how to install asp.net or an application using it! Hi! I am pretty sure many of you have once installed some kind of forum, blog or CMS (mostly PHP powered applications). All of these contain a folder mostly named "install" where (after you copied the files to the webserver) point your browser t...

How do I lock the workstation from a windows service?

I need to lock the workstation from a windows service written in VB.Net. I am writing the app on Windows 7 but it needs to work under Vista and XP as well. User32 API LockWorkStation does not work as it requires an interactive desktop and I get return value of 0. I tried calling %windir%\System32\rundll32.exe user32.dll,LockWorkStation...

Outlook 2003 View Control with C#

I want to embed a custom c# windows form (or WPF) user control into an outlook view. I am using Outlook 2003 and Visual Studio 2008. I did download an example for Outlook 2007 here: http://blogs.msdn.com/e2eblog/archive/2008/01/09/outlook-folder-homepage-hosting-wpf-activex-and-windows-forms-controls.aspx and also here: http://msdn.m...

Accessing class member variables inside a BackgroundWorker's DoWork event handler, and other BackgroundWorker restrictions

Question 1 In the DoWork event handler of a BackgroundWorker, is it safe to access (for both reading and writing) member variables of the class that contains the BackgroundWorker? Is it safe to access other variables that are not declared inside the DoWork event handler itself? Obviously DoWork should not be accessing any UI objects of...

surveillance camera viewer programming in .net

I'm trying to build a viewer application for analog surveillance cameras in .NET. Something along the line of Zoneminder. Just wondering if there's any api available or where should I start looking in the .NET framework? I'm no expert in the imaging area. Thank you. ...

which event should i handle to adjust the size of controls on winform?

when my form is shown, i want to adjust the height of certain control, i do this in the Shown Event handler, it doesn't work, so which event should i handle? ...

Which verision of Microsoft .Net should i use for windows 7

I am new to .Net framework. I want to develop a PC application, probably in .net framework 2.0. I will create an installer and want to run it in another machine which has windows 7 OS. Which is the .net version i need to install on windows 7, so that I can run my application. ...

Highlight text in a pdf file embedded in a site using C#

I need to render pdf file in a webbrowser then highlight some words on it. How can i do it? any sure 3rd party dll that i can use for this? Thank, Jepe ...

How do I keep .NET applications pinned to the Task Bar during AutoUpdate?

When an application deployed by ClickOnce AutoUpdate is automatically updated on Windows 7, the application becomes unpinnned from the taskbar. Is there a way to stop it from becoming unpinned? ...

TeeChart VCL vs .NET

Is TeeChart .NET built from the same source as TeeChart VCL? I'm just wandering as we have a VCL application heavily dependent on TeeChart and I would like to redevelop the GUI component in .NET so I can switch from the Codegear IDE to Visual Studio. ...

Could not load ConfigurationSection class - type

at web.config <section name="FlowWebDataProviders" type="FlowWebProvidersSection" requirePermission="false"/> <FlowWebDataProviders peopleProviderName="sqlProvider" IzmListProviderName="sqlProvider"> <PeopleProviders> <add name="sqlProvider" type="SqlPeopleProvider" connectionStringName="FlowServerConnectionString"/> ...

Pattern for managing reference count and object life

We have a serial port which is connected to hundreds of physical devices on the same wire. We have protocols like Modbus and Hart to handle the request and response between the application and devices. The question is related to managing the reference count of the channel. When no device is using the channel, the channel should be closed...