.net

Com Visibility in referenced assemblies

If I have the follwing assemblies: MyComVisibleApi: a .Net assembly that is used by a VB app MyReferencedAssembly: a .Net assembly referenced by MyComVisibleApi Does MyReferencedAssembly need to be ComVisible if its functionality is never directly referenced by the VB App? Thanks! ...

[VB.net] How to get text from form1

Hello, I have 2 forms. In form1 i have a textbox called TextBox1 In Form2 i have another textbox called TextBox2. I want the text from textbox1 to textbox2, i tried this. TextBox2.Text = Form1.TextBox1.Text Do i need to make changes to the first textbox? ...

Storing subcollections (filtered versions of the main collection) inside the collection as cache?

Is it good practice to store sub-collections of item X inside a parent collection of item X for caching 'filter-queries' which are performed on the parent collection? (They won't be used together (as in color AND type).) Or is it also ok to just Loop over the collection and return the correct entities in a temporary collection? Class It...

Calling multiple stored procedures in .net, how to do it?

I need to call a stored procedure multiple times, I'm using informix. I would like to know if calling a procedure multiple times with the same connection is the same generating the string with the multiple calls to the stored procedure and executing that as a query. this is an example of the code: IfxCommand cmd = new IfxCommand("store...

The thread 0x1428 has exited with code 0

Hi guys, quick question, I get this message sometime in the output window in debug mode when running a .net mvc c# application. The application still works after these messages, it does not crash and there is no reason to crash, any ideas on what this mean? ...

MessageSecurityException, UsernamePasswordValidator, and HttpWebRequest Problem

Hello everyone, is there a better way to return back the standard "Invalid username/password" message to clients that connect to a WCF service requiring credentials? I have the following code, which causes an exception when I connect to my WCF service with invalid usernames/passwords. Ideally I'd like back just a simple string, but to ...

restart windows app using dot net

Is there a way to restart a windows application written in dot net using dot net code I mean the application should exit and restart itself, on click of a button ...

get keydown on application/form load in vb.net

I want to able to hold a key down while the application is loading and depending on which is being held down a certain form is shown. For example holding down shift and the opening itunes opens a little dialog allowing you set the library(or something) I can check whether the shift/Ctrl/Alt are being held down but i'd prefer to use the...

Dynamic languages supported by .NET 4.0 DLR

Do you know of the list of dynamic languages that .NET 4.0 DLR supports? I know IronRuby, IronPython are supported. Not sure if IronScheme is. F#? What else? Thanks! ...

Optimising PNG output from System.Drawing in .Net

Hi, I have a routine which reads in an image, resizes it and positions it on a new background (brand new bitmap, just the size is set). This all works absolutely perfectly, but now I would like to reduce the size of the PNGs it outputs - if I output jpegs, I get the ~4K or so file size I expect, but my PNGs are more than 30K in size. ...

Anyone use OSGeo.FDO.Common.Xml.XmlReader .NET API?

Trying a simple operation like this throws an exception. var reader = new OSGeo.FDO..Common.Xml.XmlReader("c:\\temp\test.xml"); throws an SEHException. I cannot figure out why from available online resource located here: http://fdo.osgeo.org/files/fdo/docs/FDO_API_managed/index.htm ...

form.defaultbutton does not work in Firefox

i am asking this question because my code has the following which works perfectly on IE but not on any other browsers. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If Not IsPostBack Then --- my code here -- Form.DefaultButton = Button_new.UniqueID End Sub ...

ManagementBaseObject not found

Hi I'm having a problem implementing this method. I have added using System.Management but the class still doesn't work. The error is: Error 7 The type or namespace name 'ManagementBaseObject' could not be found (are you missing a using directive or an assembly reference?) Help would be appreciated. ...

Is there a way to enable both session and streaming in netTcpBinding?

Hi I writing a WCF Service that need transfer large files, so i using streaming, but from the other hand i need to do username specific initializations. The problem is that getting the username and perform initialization every time is very expensive. If i could turn on session, i could just save initialized data in local variables in t...

Implicit version of IsAssignableFrom?

In my code using reflections i wrote if (f.FieldType.IsAssignableFrom("".GetType())) I have a class that has an implicit conversion to strings. However the if statement above doesnt catch it. How can i make reflection/the above if statement catch strings and classes with implicit string conversion? instead of specifically strings and ...

Has RX Extensions "solved" the problem of complex event driven programming?

I've been using Rx on a new financial analysis project that receives all data asynchronously. I've been pretty amazed at my personal productivity and how much more understandable my event based code is (as opposed to the previous model of event handlers with complex nested ifs and random state variables everywhere.). Has anyone else got...

Directing a VC++ app to use older VC80.CRT version

Hello, I have a VC++ managed app that was built and tested against VC80.CRT version 8.0.50727.762. I verified that the embedded manifest points to 762, and the build machine has 762 as the latest VC80.CRT version. The app has now been also run on a machine that has both 762 as well as a later version of the runtimes (4053). Both mac...

Windows 7 theme for WPF?

Is there any way to make a WPF app look like it's running on Windows 7 even if it's running on XP? I'm looking for some kind of theme I can just paste in. I'm aware of the themes project on Codeplex (http://www.codeplex.com/wpfthemes), but it lacks support for DataGrid, which is something I critically need. I was thinking maybe the Windo...

XPath for XML with namespace

Hi, I have an xml with various namespaces that i would like to query using .SelectNodes(string xPath) The problem that i notice is that the xPath query return nothing as long as i have all those namespaces around. is there anyway to tell XmlDocument.SelectNodes to ignore those namespaces and just get me the correct elements (the ele...

What possible errors could I expect to recieve in System.Net.Mail.SendCompletedEventHandler?

I am using the SendAsync method to send some emails out. What different errors could possibly be returned in the AsyncCompletedEventArgs in the SendCompletedEventHandler? Is there recommended practices for handling these? ...