|
I could be wrong, but I think a lot of the negativity you initially received was mainly due to the fact you didn't register. I think a lot of these guys get tired of unregistered people coming in here and asking them to do their homework and stuff like that. If people can't take the time to register, is it worth answering their question? Will they take the time to come back and read it, etc.? I'm not saying you're lazy or anything, I'm just saying these guys probably get burned out answering questions for people they perceive as asking something off the cuff. It's probable they did a google search and posted this same question in 20 places. I'm probably not describing this adequately, but it's not a slam or anything to you.
That said, I don't think there's too many topics that are "off limits". Spyware is probably a topic that's deserves discussion no matter your intentions. I'd personally love to be able to program a virus just to know the concepts. Would I ever unleash a virus? No. But having that knowledge would most likely prove quite educational.
In any event, you should take a look at "hooks". Learn about keyboard and mouse hooks. They basically allow you to get access to the input devices at more of an "OS level" as opposed to just capturing the device for your application. They also have "legitimate" uses like the "gesture recognizer" you mention. This is probably a good place to start. I'm not sure C# is the best language to do all of this stuff. C/C++ would probably be better suited for doing hooks.
I, for one, do not think the problem was that the band was down. I think that the problem may have been that there was a Stonehenge monument on the stage that was in danger of being crushed by a dwarf.
-David St. Hubbins
|
|
|
|
|
yay! a straight answer.. thank you, Kentamanos!! (Nick, was THAT what you meant about teaching a man to fish-- were you steering me to hooks?).
[as to the philosophy, i think Kentamanos got it perfectly.. whether i'm the scum of the earth posting to "all" 20 newsgroups, whether i will ever read the reply or not, imho this is a question of general interest-- i would bet there is >= 1 other person on this forum who could use hooks or would at least benefit by knowing they're there! here's a link those people may be interested in: http://msdn.microsoft.com/msdnmag/issues/02/10/CuttingEdge/default.aspx.]
If anyone has any more insights, please let us all know-- otherwise i'm happy to believe that the long and short of it is: HOOKS!
Thanks, and Happy Holidays all!
________________________________________
Gosh, it would be awful pleas'n, to reason out the reason, for things I can't explain.
Then perhaps I'll deserve ya, and be even worthy of ya..
if I only had a brain!
|
|
|
|
|
newbie1 wrote:
Nick, was THAT what you meant about teaching a man to fish-- were you steering me to hooks?
Yes, but it wasn't just that. You will find many articles that discuss hooks in great detail. For example Joseph M. Newcomer[^] has a great article entitled Hooks and DLLs[^] (which uses C++). While you don't appear to have signed up for an account yet (as of these posts); I tend to think questions get answered more often to registered members. I hope you find this information useful, sign up for an account (if you already haven't) and continue to post your questions on these forums. Just don't forget to read the documentation.
- Nick Parker My Blog
Last time I checked, all programmers have selective ignorance. I know nothing about 3D graphics. I know a lot about COM. VB gets under people's skin because one can be ignorant of computer architecture and ASM and still get a lot done. - Don Box
|
|
|
|
|
Fine, after reading the discussions, if you really want to know, look up information about SetWindowsHook (or SetWindowsHookEx ). That can record mouse movements (which is what comprises gestures), keyboard strokes, and much more. For Internet Explorer related tracking, you would write a Browser Helper Object (BHO), which you can find more information by typing "Browser Helper Object" into the MSDN Library and find some information in the IObjectWithSite documentation, which you must implement on a BHO.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Heath, thanks!
just out of curiosity, was it me not being registered, or your reluctance to aid and abet spyware, or something about my writing style, or none of the above that inspired your first post on this thread?
|
|
|
|
|
I won't knowing aide and abet spyware or malware and the fact that you weren't registered just added to the suspision.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Heath, all, thanks. i guess i did leave an easily searchable keyword in.. live and learn.
anyway i'll go register now!
Happy New Year!
|
|
|
|
|
I've been working on a asp.net webserver for a while now and its almost finished. The code is going to be released under the gpl. I was wondering if anyone here wanted to lend a hand helping to optimize and debug it. Its fairly complete so far get, post, head, and put are working. CGI 1.1 is almost complete. The one thing that it really lacks is good documentation (Right now its got none)
Thanks,
James Gill
|
|
|
|
|
The dotGNU people is currently looking still looking doing an ASP.NET implementation. Come chat on IRC irc://irc.freenode.org/dotgnu , I'm sure quite a few people will be interested on hearing some details!
Cheers
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
I have just spent about 3 months writing a program for PocketPC and a PC version in C# just to find out that within seconds it can be decompiled into readable source code. Does that not bother anyone else but me? I know it's my fault for not checking out the language more before starting but I need a way to protect my code. Any ideas. I am a single programmer selling software and I can't afford the expensive obfuscation tools. Any help would be appreciated. If I can't get a work around I will have to rewrite the application in c++. Thanks.
|
|
|
|
|
Hi. You can use an obfuscator tool on your assemblies. Do a web search for ".net obfuscator" and you'll find a bunch.
<oops>
I just read your message more carefully. I don't know of a freeware obfuscation tool... keep searching though - there may be one out there.
</oops>
|
|
|
|
|
Obfuscator tools wont really help you out much in this area. It might dissuade people who aren’t very driven to see how your code works, but for every obfuscator out there, there is a de-obfuscator that will unscramble the code. Besides, from my understanding, an obfuscator just scrambles the local variable names, to make it harder to follow the code. But the basic code; if, else, for, switch statements, as well as Function calls will still be very clear to read. I’ve looked at obfucatored code before using Anikrino and was still able to follow the algorithm used.
john C
|
|
|
|
|
This is the problem with knowing a language/syntax and knowing a technology. All language compilers targeting the CLR compile to IL (so the source language really doesn't matter, sans some specific compiler optimizations), which is in many ways like assembler. The IL is JIT'd to native code and executed. Of course it can be disassembled.
But any good programs should fear very little. Copyright your work and make a good product that users want to buy, not buy because they don't really have any better choices. There are many programs out there written in .NET. Heck, Java is no different.
If you're using cryptography anywhere, it's always been said and written by leading cryptoanalysts that the best cryptographic libraries are open. Your algorithms should be so good that you don't need to depend on data-hiding.
Finally, if pieces of your application are really so important and you can't deal with the fact that some schmoe wants to copy pieces of it, make a native library and P/Invoke the functions (or, if using COM, create an RCW for your native COM object). This way, the majority of your application is still managed (which mainly gets that name from its memory management capabilities) and is faster to write and maintain.
Just something to think about.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Just something to add.
VS.Net 2003 comes with a free obsfucator.
"if you vote me down, I shall become more powerful than you can possibly imagine" - Michael P. Butler.
Support Bone
It's a weird Life
|
|
|
|
|
I'd like to compare a user specified file mask with a given file.
I can write my own function, but many of the .NET methods use this ability and I was wondering if it was hiding someplace ?
So my question is simple, does anyone know of a .Net method that will allow me to compare a file and file spec (file mask) ?
i.e. compare all the files in System32 to *.d??
|
|
|
|
|
See the DirectoryInfo.GetFiles method:
DirectoryInfo di = new DirectoryInfo(
Environment.GetFolderPath(Environment.SpecialFolder.System));
FileInfo[] fis = di.GetFiles("*.d");
if (fis != null)
foreach (FileInfo fi in fis)
Console.WriteLine(fi.FullName);
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
This is the way I'm doing it now.
I'm actually getting the filename off a socket. So I create a dir and write a zero-length file using the file name then use the Directory.GetFiles() method. I just didn't know if there was a method that I could specify the file name and mask and get a boolean result, or something along those lines, so I don't have to write to disk. Thanks for your help as usual Heath.
-Mike
|
|
|
|
|
Well, you could generate a regex out of the mask.
Add "^" to the beginning.
Add "$" to the end.
Replace "*" with ".*".
Replace "?" with ".".
And that should do it.
Although you'll need to escape some characters like "(", "+", "." and "[" and a lot more.
|
|
|
|
|
how to change the tab contol background color?
thnx in advance
|
|
|
|
|
You'll have to handle painting yourself since TabControl.BackColor always returns SystemColors.Control . You'll have to extend TabControl with your own class and override OnPaint to do so. There should be several articles here on CP ( I knew of a good one, but the bastard went commercial and pulled all his articles off CP after he got all our free help and beta testing! )
Why is this so hard? Because almost every control in System.Windows.Forms is just a wrapper for its Windows Common Controls equivalent where such details are often abstracted or don't fit the .NET pattern at all times. It is possible, though. I used a similar approach to override the painting for the actual TagPage s in order to make them use the Theme API (for Visual Styles) correctly (they don't by default).
[EDIT]
Note: this is only for the TabControl itself. To paint the TabPage s, see the next message I posted (memory slipped!).
[/EDIT]
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
You can set the TabControl.DrawMode to TabDrawMode.OwnerDrawFixed and 1) handle the TabControl.DrawItem event if handling the painting from another control, or 2) override the TabControl.OnDrawItem if extending the TabControl with your own class (faster than handling the event inside a derivitive class).
[EDIT]
Note: this is only for the TabPage s. See the previous message about the TabControl itself.
[/EDIT]
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Hi,
I am goin to make a Toolbar (band) for the Internet Explorer. But I can't find any good examples on that subject. I need to have a concrete example of a toolbar, that's all I need to advance..
Thank You!
//- UP THE IRONS, MORTEN S. KRISTENSEN -\\
|
|
|
|
|
Since you're in the C# forum, I assume you're going to do this in C#. Therefore, see this article: Extending Explorer with Band Objects using .NET and Windows Forms[^]. This provides a simple base class and attribute to make DeskBands.
I should warn you, however, that this is somewhat limited. You'd be better off using C++ and write one using COM or ATL (wrapper classes for COM). For documentation, search MSDN[^] for IDeskBand . You'll find LOTS of information.
Even if you use the first link I gave you, you should still read some of the information from the search results I mentioned directly above. It's important to understand how things work.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Yeah I read the example over a couple of times, but I'd like a more concrete example. That is if that is possible of course. And I also have to say that I code in notepad/mono =)- Dont have VS.NET.
And yes there is indeed mostly information in C++, but there has to be some good ones in C# too.
Hmm..
//- UP THE IRONS, MORTEN S. KRISTENSEN -\\
|
|
|
|
|
Morten Kristensen wrote:
And I also have to say that I code in notepad/mono =)- Dont have VS.NET.
Good for you. I do a lot of coding in GViM, but what does that have to do with anything? You don't need VS.NET to code these solutions.
Morten Kristensen wrote:
but there has to be some good ones in C# too.
There has to be? Someone has to be first. If you do a search on CP like I said, you'll find plenty of related articles about how to emulate a console window. The first link was how to actually embed the cmd.exe console window. If you can't find decent material in .NET, P/Invoke the functions required in the good C++ articles. Not everything is available in .NET, not even when Longhorn comes out (though a LOT more APIs will be available for managed applications).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|