.net

Change the size of the panel dynamically

Hi! I am implementing an application that needs to drag and drop image boxes in a panel.Image boxes are added dynamically from the program and so I have set the autoscroll property to true in panel.But when I have drag out the boxes at bottom in the panel the panel size got reduced.I have put autosize property false in panel.The panel is...

Recommended way to communicate between processes running on different computers on the same network

I'm working on what should (hopefully) be a small feature for a .NET software solution that will allow one application to report on the status of multiple instances of another application running on more than one computer on the same network. I took a look at this MSDN article on named pipes, and set up a simple client/server project th...

can't access the excel file in c#

Hi, I had a problem with my program for opening an excel file through the use of PIA. here below is my sample code; any suggestions? path = @"C:\\Test Template.xls"; wb = objExcel.Workbooks.Open(path, Missing.Value, Missing.Value , Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value,...

How can I find the content area of a MDI parent form?

I want to know the bounds of the grey scrollable area in an MDI parent -- the area in which MDI children are placed/arranged. I don't want it to include any menu, scroll bars, or status areas -- just the grey area. this.mdiForm.ClientRectangle gives the whole interior of the Form, including scroll bars et al, which is not what I want. ...

Deserializing inherited types without explicit XmlArrayItem attribute

I have an XML document that looks like this: <MyEntity> <Vehicles> <Car /> <Truck /> </Vehicles> </MyEntity> I want to deserialise it into the following structure: public class MyEntity { public Vehicle[] Vehicles { get; set; } } public class Vehicle {} public class Car : Vehicle {} public class Truck : V...

c# getting the web server name

I am placing a JS file to remote server(s). I d like to know where the request is coming from. ie : i have a js on google.com and upon user click on the link that s produced by js, it triggers some c# code on my server, but i also have the same js on yahoo.com and i d like to be able to know where the request is coming from. How to fi...

Dynamically change properties returned by ICustomTypeDescriptor.GetProperties to readonly

I have a class which implements ICustomTypeDescriptor, and is viewed and edited by the user in a PropertyGrid. My class also has a IsReadOnly property which determines if the user will be able to save their changes later. I don't want to allow the user to make changes if they will not be able to save. So if IsReadOnly is true I want to o...

Share Session between 2 J2EE applications Deployed in JBOSS Server

Hi, I have 2 J2EE applications which needs to share some common user related data of logged in user. Is there anyway by which i can store these data in session from one application and retreive that data in second application.. ie. something similar to sticky session in .NET Any help appreciated.. ...

what is the default Versions of .net frame work using by windows

i have different versions of .net framework installed on my windowsxp. i want to install a hotfix for version 2.0 but when i run this patch it gives the error that specified application (.net 2.0) not isntalled or have differnt version. it seemes that installer did not found 2.0 and picking up someother version may be 3.5 how can i fix t...

Access to an array items ?

I have a variable that contains : Sometimes array of strings and sometimes array of array of strings e.g: var words = a LINQ to XML query; //words == { "01", "02", "03", ... } //or //words == { {"01", "02", "03"}, {"04", "05", "06"}, ... } Now , I wanna access to each item in the words array with a for statement Could you please guid...

Convert .doc and .txt format file into pdf file for for .aspnet?

I really try to find on google how can we convert .doc and .txt file into pdf file but not getting required answer or code. I want any command line software of converter code which will provide code that convert above to format file into pdf file. if any user upload upload .txt and .doc file then it will be convert into .pdf file in m...

Winforms control that works like ajax tag-completion

Heya, I want to create a winforms app where you can assign tags to an entity. ofc I want the customer to re-use existing tags a lot. That's why I want to show them the list of tags while they are typing (similar to intellisense in VS and the tags-dropdown even here in stackoverflow ;)) do you have any control(s) in mind that offers th...

Is there a way to set the maximum number of error messages a log4net memory appender can contain?

I would like to add a memory appender to the root logger so that I can connect to the application and get the last 10 events. I only ever want to keep the last 10. I am worried about this appender consuming all too much memory. The application is designed to run 24/7. Or is there another way? ...

Lag/buffering using the Windows Meida Player ActiveX control

Hello, For a fairly short-duration project I'm producing a video application using the Windows Media ActiveX control in a Windows Form under VB.Net. I could have dug into the API if I'd had more time, but this is the quick and easy solution. Unfortunately, the application's performance is time-critical on the order of microseconds. The ...

.net technology that must be learned

Our company is offering some trainings and asks us what would we want to learn. We are using .net technologies so it will be .net platforms. my thoughts are wcf, asp.net mvc 2.0, silverlight, .net 4.0 platform. Which of these? you can add on the list. thanks ...

Common resources in Silverlight and .NET

Hello. Is any way to use common resource file in Silverlight and .Net project? I try to make link to Silverlight resources but different namespaces not allows ResourceManager to get resources from assembly. Do you have any ideas? ...

Does importing a "non-relevant" dll has a performance penalty?

I'm using c#. In many cases I'm writing code that can benefit from a very simple class/method located in a "non-relevant" dll. For example, I'm writing some algorithm with no UI but it can benefit from a Point class in System.Drawing, or I need some xml manipulation method from System.Web even though I'm writing a console app (these are ...

Application Status Bar Updates

I have a WPF line of business application. When a click a menu item I want to update the status bar with the status before the code is executed and after. For example, on clicking the button to navigate from View A to View B the status would update to "Navigating to View A...", the view would change and then the status would be updated t...

Correct method of 'hooking' code into a WCF instance?

I have a WCF service up and running. I have it hosted in a win forms app and I want to have various statistics about it's usage being displayed in real time on the form. Obviously I don't want any code in the WCF service to collect the statistics or handle any GUI. Currently I am working towards having a number of events inside the WC...

How to create WPF listBox template

Hello, I've got an application, which uses many listBoxes with data attached to them using listBox.ItemsSource. The problem is it creates entries like [namespace].[class_name]. How can I create a template, which will replace entries with, eg. class "Name" field? I look forward to hear from you soon, MattheW ...