There are some shortcuts, too. If a param takes an address of a struct, rather than make several unsafe calls from the System.Runtime.InteropServices namespace, you can instead overload SendMessage. For instance, the TVM_SETITEM message for a TreeView Common Control (which System.Windows.Forms.TreeView encapsulates) requires the address of an <code>LPTVITEM for the lParam. You could overload SendMessage like so:
Thank you very much, but in the article you posted I only found how to get running processes, I need to get the applications, like in the first Window in Windows Task Manager.
I searched a lot in CodeProject, but I didn't find nothing really usefull.
Mazy, thanks. The question i want answered was eloquently stated re the article you sent (see below). Unfortunately there was no answer posted-- does anyone know the answer?
HERE IS stantheman's question (and mine):
I dig Agha Ali Raza’s article (Capturing the Screen Image in C#), but what I want to do is capture the image before it hits the screen.
How would I do this?
In essence, I would like to take a screen-shot (bitmap) of a Form *before* it ever gets to the screen.
If you’re interested, - what I want to do is perform a little “graphics-magic” on the image using GDI+ - I want to “dance” the image of the Form around the screen before I present the actual Form. And I don’t know how to do this. I’ve tried overloading the Form.OnPaint method, but I just don’t seem to be getting it right.
You missed the point. C# is not like C or c++ which could have different compiler. C# and all other supported .NET language like VB.NET have the same compiler. Its nothing to deal with C or C++.You should ask in VC++ forum the best C or C++ compiler.
Mazdak wrote: C# and all other supported .NET language like VB.NET have the same compiler.
You may have mistyped this, but to clarify to the original posters or future readers, each language has its own compiler (not to say someone couldn't develop a compiler that compiles multiple languages). The main point to understand is that each compiler produces Intermediate Language, or IL. While each language compiler may support different things (like VB.NET as of 1.1 can't make use of unsigned integer types or use unsafe pointers while C# can), the output is still essentially the same which means that it doesn't matter in what language a .NET assembly / library is written, each language targeting the CLR (a.k.a. ".NET language") can use the assemblies. This is language interoperability thanks to the .NET Framework's Common Type System, or CTS.
I have an office app that need to send information to a central server through the net (Ie. update the central server's SQL database). My first thought was to do remoting. To secure it I used a secure channel. However I still have a problem: the remote object is exposed on the internet. What is the best way of authenticating the clients.
I've been looking for things and the only thing that I came up with is hosting the object in IIS and using server certificates. However I haven't been able to get client-activated remote objects properly hosted in IIS. If this is a good direction to head please help me out with a pointer to hosting client-activated objects in IIS.
Theming (a.k.a. XP styles) should only be used if the operating system uses it. This is highly recommended by the Windows User Interface Guidelines to provide users with a consistent interface. To make that happen, see my article Windows XP Visual Styles for Windows Forms[^]. For themed controls that don't support theming in .NET, see Infragistic's[^] NetAdvantage suite, which has great Windows Forms and Web Forms controls. I've used a few and they're pretty good.