blah blah blah is here! blah blah » Close

0
votes
1 answers

Receiving window messages while looping with DoEvents

I am writing a Skype client application, and am directly processing window messages by overriding WndProc in C# code. The application receives Skype messages then sends them into the application for processing. (The reason I am not using Sk ...

0
votes
1 answers

A good "guide" for understanding WMI?

I'm trying to use WMI from within an application to gather detailed information about devices attached to the system. For example, I was able to come up with the following code to enumerate all connected USB storage devices: [code] ...

0
votes
1 answers

stop USB device from C#

Is it possible to "safely remove" a USB storage device from within C#? The app I'm working on will write some specific data to a USB flash device, then I want to have the device safely removed and afterwards inform the user (wi ...

1
votes
3 answers

Using a form as a dialog without ShowDialog

The basic scenario is that I create a form and write a function in that form (public) that will show the form, wait for the user to input something, and then after the user clicks OK (or closes the form) the form is hidden and then the code ...

0
votes
2 answers

Why does memory run out when system RAM isn't exhausted?

I have an app that is working with very large files - 300MB or greater, and wants to load them into RAM and process them in RAM. I am loading them into byte arrays and doing processing there, sometimes converting portions to strings and bac ...

0
votes
3 answers

better way to search a list of classes?

Suppose I have a class. [code]public class MyClass { public int ID; public string UniqueIdentifier; public bool Enable; ... // more public vars public MyClass Parse(string parseFrom) { ... // pars ...

0
votes
1 answers

asychronous stream reader

I suppose this has probably been asked - maybe many times before, but for now this thing still doesn't have a decent search (:P) How can I implement a StreamReader (line-buffered reader) that implements asynchronous methods? The Strea ...

0
votes
2 answers

show the cursor in a readonly WPF textbox

hello, I'm learning development in WPF for my applications as some of the programs I design are used by disabled people who use alternative access technology, and WPF/UIA are supposed to really help this along. I've come across one major s ...

0
votes
1 answers

custom data bindings

Is there a way to do a custom data binding? For example: [code] internal class LocalSettings // this class only stores per-session // settings that are not saved to disk { internal bool theCheckbo ...

0
votes
1 answers

Prefix all debug messages with timestamp?

I have a large application that has many Debug.WriteLine's in it. In debug builds a file is opened at program startup and a TraceListener is added to the Debug class. I want to alter this program so that all debug lines written to the d ...

0
votes
1 answers

Search/replace/remove/etc in an array with multiple items?

Is it possible to accomplish something like this? [code] byte[] bytes = new byte[] { 0x00, 0x01, 0x01, 0x05, 0xa0, 0xa1, 0x01, 0x01, 0x00, 0xa0, 0xa1, 0xa0, 0xa4, 0x00 }; // ...

0
votes
0 answers

Writing code to communicate with an mIRC bot

Is there any way, short of using sockets, to communicate with the mIRC application? I know DDE can be used, but support for DDE is close to nonexistent in .NET. I could use sockets but then of course I begin to worry about security issues - ...

0
votes
0 answers

Reading XML in an XSD...or something..

This is probably the wrong place to ask this, but you guys have always been helpful so maybe at least someone can direct me to a better place to ask or some info that will help me... Suppose I have this XML file: [code] <?xml vers ...

0
votes
1 answers

Validate XML against static schema

Hi, I'm writing an application that will be dealing with XML files. As part of this, I want to ensure that the provided XML files are valid. The XML files may come from many sources - flash drives, downloaded content, etc. I'm not trying ...

0
votes
1 answers

Writing an extension method for arrays

I want to write some extension methods for arrays. I'm not quite sure how to approach this. Suppose I have an array: [code]byte[] myArray = new byte[24]; // populate byte array here[/code] I want something like [code]bool areAr ...

Feedback