.net

Fileinfo Milisecond of last access isn't update

In the method monitorCallback() I write a the time to text file. after writing the file I check the FileInfo of file and print it. I have got the following result: time = 16/08/2009 14:01:46, mili = 307 time = 16/08/2009 14:01:51, mili = 291 time = 16/08/2009 14:01:56, mili = 291 time = 16/08/2009 14:02:01, mili = 291 time = 16/08/20...

ScrollViewer not scrolling....

The scrollviewer below does not work. I tried everything I could find on this site and beyond: embedding the scrollviewer in an Grid, embedding the ScrollViewer's children in a grid, embedding the Scrollviewer in a StackPanel with fixed height, setting/binding the height of the scrollviewer, all to no avail... Who shows me the way back t...

How Do I Stop An Application From Opening

Hi Guys, I want to write a small app that sits in my tray and that allows me to select an executable and prevent it from opening. The UI of the app is easy to do using WinForms. What I want to know is how to detect if a certain exe has been lauched and then how to stop it from running. I'm pretty sure I'll have to dig down into some W...

WCF named pipes: Across network? Really?

Many people seem to think this it is possible, yet clearly in this document the boundary is stated as inter-process which to my mind means "no network". Another document is completely unambiguous: The named pipe transport has very little reach; it can only connect to services running on the same machine So why are so many posters...

What would be the best way to simulate Radar in C#?

I have a Picture box inside a Groupbox in my form with the Picture of a radar set as the background picture. My intention is to dynamically load tiny Jpeg images within the radar area (overlaid) at runtime but I am unsure as to the best way to achieve this. All crazy ideas welcomed (but I would prefer sane easy to do ones). Thank you all...

DataContractSerializer not Serializing member of class that inherits ISerializable

I have this class: using System; using System.Collections.Generic; using System.Runtime.Serialization; namespace Grouping { [Serializable] public class Group<T> : HashSet<T> { public Group(string name) { this.name = name; } protected Group(){} protected Group(Serializati...

.Net Communicate with running service

I've written my first windows service in .Net. Can I communicate with this service from other .Net application? Can I execute methods on a service object from remote .net applications? ...

Determining the origin of audio during playback

Hi. I don't know the first thing about programming in regards to audio, so bear with me. Is there any way to determine which file (or files) is being played by my sound driver? Or a way to examine the current stack of audio files played by my sound driver? I think that I basically want to sniff the data sent to the audio bus to determi...

WCF - "CommunicationException was unhandled by user code"

What's the deal with CommunicationExceptions in a system using WCF? I have a client communicating with a server through WCF using SOAP - all async communication. Occasionally I get a CommunicationException thrown in my face - without seeing any reproducible pattern on why and when this happens. However; I am able to continue running th...

Multiple sounds in SoundPlayer in C#.net

hi whatsup? im making a SAMPLER program where each key from 1 to 9 will make a different sound. everything is working great, But.. when i press two (or more) sounds at the same time, the second one "kills" the first one im playing the sounds from .WAV files, using SoundPlayer. how can i solve this? thanks! ...

When should Structs be used in C#?

Possible Duplicates: When to use struct in C#? When should I use a struct instead of a class? What would be some instances when one would want to use Structs in C#? Is it when you want a lightweight, immutable class? How will the stack vs heap allocation effect me and what should I be aware of? Are there any other instances ...

Does Mono support 64bit Windows?

Hi, On this page, http://www.mono-project.com/Supported%5FPlatforms, 64bit windows isn't listed as a supported platform. However, I keep getting the feeling that it's supported (the x64 codegenerator works...). Can anyone conclusively confirm this theory? Thanks ...

ContextMenu not displaying, and I don't know why

I'm writing a C# (.NET 3.5) app with a usercontrol that inherits from DataGridView. When the user right-clicks a column header, I want to display a context menu. I've actually got this working find on 2 forms in my app. I'm stumped because the ContextMenu won't show on the same control on a third form. I do see that the Popup event gets...

Is there any .Net JIT Support from chip vendors?

I know that ARM actually has some support for Java and SUN obviously, but I haven't really references seen any chip vendor supporting a .Net JIT compiler. I know IBM and Intel both support C compilers, as well as TI and many of the embedded chip vendors. When you think of it, all a JIT compiler is, is the last stages of compilation and...

Can we construct an instance of `OpCode`?

The .NET Framework 4.0 introduces several items to the Reflection API that range from extremely useful to vital for my work. Among these are protected constructors for Assembly, Module, MethodBody, and LocalVariableInfo and the new CustomAttributeData class. There are a couple items I still need that are quite troublesome to work around....

Multi-Threading: At what point have you created too many threads?

I am working on a multi-threaded application. This application started out as a single thread and was expanded to multiple threads in order to realize a gain in performance. I have a main thread which divides up the work into smaller chunks and offloads it to worker threads which process the chunks. This portion is controlled using a ...

How do I limit the number of results back in LinqToSql?

Hi folks, I'm used to loading some children results (for a parent result) using the LoadWith syntax. Works great. Is there a way I can limit these LoadWith results to the most recent 5 or something? I've got some pseduo code with some inline comments to help explain what I'm trying to do... Eg. IList<Parent> results; using (DataBas...

Is it possible to change a console window's icon from .net?

Is it possible to change a console window's icon from .net? Without using win32 calls. ...

Rendering of a form in winforms and asp.net dynamically

Hi, I have values stored in the database describing panels, combos, textboxes, labels etc...to be dynamically generated based on what the user set it up to be on a setup form, mainly used for input, including validation rules and datatypes to be specified during the setup of the form. Problem is, I need to render the "Form" in both w...

how to pass parameters to a function in a .net dll via COM/VB6?

hi guys, i have a .net dll written in c# which reads data off a data source and acts as a wrapper to allow other apps to call its function to retrieve those data. the thing is i didn't anticipate the .net dll to be used for other than .net apps, so now i was told this all is going to be used in a vba/powerpoint macro which i figure is r...