.net

WPF client sided and Java server sided?

Hi, I would like to ask for some ideas regarding a scenario like this: 1) we need to build up a real time application that runs on a client. Some sort of stock trading functionality, updates pushed to few clients in different geo locations every 25 secs. 2) the data is collected and pre-processed on the server side (Glassfish/Java) We...

VB.NET Module - Can I force the use of <Module_Name>.Public_Member_Name when accessing pub. Members?

I have a situation where I have several VB.NET Modules in the same Logical-Module of a large application. I would like the update function of each module to be public, but I would like users to be forced to qualify the function call with the module name. ModuleName.Update() instead of Update() Is this possible? Thanks. ...

How can I add a spellchecker to a Richtext box?

How can I add a spellchecker to a richtextbox in my application? ...

.NET - Is it possible to declare a module member accessible only to a namespace?

I'd like to declare some members of a module accessible to an entire namespace, but have them not be accessible from without. Is this possible? Thanks. ...

is it valid to create a static Regex object to be used by all threads in the asp.net app?

i need to know if its safe to create a static Regex object like this public static Regex s_Regex_ExtractEmails = new Regex(@"\b[A-Z0-9._%+-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,4}\b"); and call it staticaly from asp.net threads like this s_Regex_ExtractEmails.Matches("my email is [email protected]") wont this cause any problems? i am doing this...

Embedded IronPython Memory Leak

I need some help finding a solution to a memory leak I'm having. I have a C# application (.NET v3.5) that allows a user to run IronPython scripts for testing purposes. The scripts may load different modules from the Python standard library (as included with IronPython binaries). However, when the script is completed, the memory allocated...

Linq to entities: how to do a subquery

Hi there, How can i do this query with Linq To Entities SELECT * FROM TableA WHERE MyID IN ( SELECT MyID FROM TableB ) The thing is that TableB does not exist as an entity because it contains only foreign keys to other tables, and there is no direct link between TableA and TableB ...

.NET - Create desktop shortcut on installation?

Is the option to create a desktop shortcut during installation only available if the application targets the .NET Framework 3.5? On one of my projects, the option is grayed out and is targeting the .NET Framework 2.0. In case your wondering, I am using Visual Studio 2008 Express Edition. ...

Request thread to quit without forcing it?

I am writing an app. There are plugins which DL resource from the net. If the user would like to quit i would not like any DLs to start but i would like DLs in progress to continue until done. After they stop i would gracefully quit. How do i find out if a thread is in a middle of a DL or just sleeping? The actual download resource func...

what is regular expression required to validate images

hi, i trying to upload images to folder. here i need to upload only images like .JPEG|.jpeg|GIF|.gif|.PNG|.png|bmp|.BMP what is expression that we should write here so that when ever user tryis to upload thier files rather than this any solution would be great thank you ...

.net Binary Serialization - Opt In

I am doing Binary Serilization of big nested data structure. Whenever [Serilizable] attribute is added to class, all the members are automatically serialized. I want to specifically select the fields that need to be serialized. As of now i am using [NonSerialized] Attribute for fields to opt out from serilization. Is there any way i can...

Windows Forms Timer bug or bad use?

When programming a small OpenGL application using Windows Forms, I discovered something using a profiler that I thought was pretty wonky. I'm using a System::Windows::Forms::Timer to detect a combination of mouse idling and some other user input. The tick functionality is useful, but on occasion I want to 'reset' the timer. You can't r...

List<T> and ArrayList default capacity

I have been looking at .NET's List and ArrayList implementations with Reflector. When looking at the Add(T item) I ran across this.EnsureCapacity(this._size + 1): public void Add(T item) { if (this._size == this._items.Length) { this.EnsureCapacity(this._size + 1); } this._items[this._size++] = item; this._ve...

error when passing a reference to a derived object in a method

In c# I am trying to implement a method which I can use to bind data to any control I pass to it (provided of course the control is derived from a databoundcontrol object) given the method public void CTLBindData(ref DataBoundControl ctl){ ... } I get an error when trying to pass derived control to the function for example the follo...

Trouble with "flickering" when updating a panel's children.

I have a TableLayoutPanel that contains rows of labels. This control lives on form with a gradient background. The labels are updated periodically, usually as a whole set. When they are updated, they update very slowly and it is very visible to the user. I have tried using DoubleBuffered on the form, but as expected, this didn't help...

Storing passwords for authentication against another system

This is not the usual question "Is it safe to store plain-text users' passwords?". No, it's not safe, we all know that. I'm writing a little application that should authenticate against an external system to do some stuff, and the only available authentication method is through a username and a password. It was intended for humans, and ...

Download file on ImageButton Click event

I have a link of a file, and I don't know how to add it to imagebutton. I want to see the 'open-save-cancel' , screen when imagebutton is clicked, but imagebutton doesn't seems to be taking the link of file as a file, but taking it as a page url and tring to open the file url as page. Thanks ...

"Push" linq vs reactive framework

(Once again exposing the depths of my ignorance here by combining two concepts which I haven't grokked) I read here about the Reactive framework being a 'Push' model compared to Linq's 'Pull' model. This reminded me of reading an article about 'Push' Linq. Is there really any similarity between these two 'frameworks'? UPDATE Since I ...

.NET Remoting for Occasionally Connected App - good fit?

Our 70 mobile laptop users are struggling with a new version of an externally developed .NET application that downloads a subset of cases, allows offline data entry, then uploads the results when reconnected. Data transfer seems unreliable on both dialup and wired Ethernet links. Using .NET 2.0 SP1. If you've used .NET Remoting, shou...

Windows Forms app, exception on start-up: Could not load System.Xml

Update: I have tried using fuslogvw.exe to get logs. But what exactly am I looking for? Sadly, the logs are in Danish which is extremely annoying (Apparently someone thought that translating everything literaly into Danish inside error log-messages would be a good idea, but it basically renders Google useless: I have to guess at the ori...