|
I'd like the form to ignore the validation requirements and close the form. For now the e.cancel feature doesn't allow me to close a form via a close button.
I can only close by hitting the X in the top right corner. Probalby because there I can access the event that supports this cancel feature and I can set it to false.
|
|
|
|
|
Set the Button 's CausesValidation property to false .
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
Cool!
Thanks!
works great
love the little simple solutions
|
|
|
|
|
Hi
I have un over problem. Wheni close the form with Top Right X it fire the validating event of the textbox.
Did you change any property of the form, that it don't fire this event
Help me please
|
|
|
|
|
There´s no way to know the database column max size (VARCHAR(20)<-- size) by the ADO.NET DataColumn or DataTable or Dataset information?
How can I prevent to write more chars than sql column let in a ADO .NET DataColumn of DataTable in for example DataGrid Control.
I Get the MaxLenth property in DataColumn but it has -1 value and the database column is Varchar(20) I want to get 20 not -1
I want to know if is possible get de real max size of text in DataColum that comes from database column with datatype varchar in .net not with sql querry.
Thank for your suggestion.
La realidad no es más que impulsos eléctricos del cerebro - Morpheus
|
|
|
|
|
|
The "Decompilers!!!" post reminded me of something, and OK, I admit I'm lazy and haven't tried it--
What happens to an application that uses reflection when it's obfuscated? All those type names that are strings now refer to obfuscated classes and properties, don't they? So reflection breaks, I would think.
Anyone ever tried it?
Marc
MyXaml
Advanced Unit Testing
YAPO
|
|
|
|
|
We're currently looking at several obfuscators here, and the ones I've researched usually mention something about this. I actually encountered one that claimed it wouldn't break reflection, however, nearly all do. I know for a fact that DotFuscator (the one who's community edition is bundled with VS) won't work with reflection; any reflection calls, after they've been obfuscated, will thow an exception at runtime (ouch!).
Fortunately, most of the obfuscators I've tried allow shielding from obfuscation on a per-method basis, allowing you to workaround the problem. It's better just to avoid string reflection, IMO. If absolutely necessary, you could find the method using a custom attribute so it'd work even if obfuscated.
IMO, the obfuscators out there are way over-priced, don't work well, unprofessional (minus maybe XenoCode & WiseOwl), and just seem like a total hack to somewhat protect your code. I mean, you can still see the calls into the .NET assemblies (i.e. most of your code) which remain unobfuscated...
Then there are those apps like DotNetProtector, Thinstall, and others, that compress and encrypt your .NET assemblies into a single native executable. This seems like better protection, but the ones I've tried add a significant boot slow down; I remember DotNetProtector added about 3 seconds to the boot time of our large smart client app.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: The Secular Left, the Religious Right, and Prejudice
Judah Himango
|
|
|
|
|
Thanks for the response. I guess this doesn't bode well for things like declarative programming, where you use reflection to instantiate object graphs of, well, just about anything. Probably a good argument for compiling the declarative markup into code.
Marc
MyXaml
Advanced Unit Testing
YAPO
|
|
|
|
|
I see it like this.
if you use reflection on private members , those members are a part of your API, even if they are private they are still inteded to be used by something on the outside.
and you should not obfuscate the API , only the private implementation.
and dotfuscatior has settings for most of that kind of stuff in the full version.
//Roger
|
|
|
|
|
I'm working on a voice key to be written in C#.
What I need to do is be able to take input from a microphone and measure the onset of vocal input. However, I don't know how I can read input directly from the mic jack in real time. What is the best approach to this?
|
|
|
|
|
There are articles on audio recorders here on CP.
Try searching the multimedia zone.
Regards,
mav
|
|
|
|
|
Hi,
Yesterday I found an application on the Internet that claimed that it managed to browse the source of any .NET application. In curiousity I downloaded it, installed it and tried to view the source of one my projects. Surprisingly it worked.
... which isn't too good!
Professionally it has to be impossible to work with a language that everyone can decompile after it's compiled! How do you do to protect your applications? Is there any methods that prevents this horrible feature? And why did Microsoft implent such redicilous feature?
// Zanathel
|
|
|
|
|
What you need is an Obfuscator for you code. Search for it on Google you will find more then enough information about them out there.
|
|
|
|
|
It's not a ridiculous feature, but an unfortunate side-effect of using an intermediate, hardware-independant language that all managed code is compiled into. The .NET Framework, at execution time, then takes that code, called MSIL, and translates it into instructions that the processor can actually execute.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Zanathel wrote:
Surprisingly it worked.
Not really. There is a little app that comes with the .NET framework that will do this also. It won't show you the original C# like some applications, but it will show the MSIL which, for the most part, can be easily read and understood.
Zanathel wrote:
Professionally it has to be impossible to work with a language that everyone can decompile after it's compiled!
Even C and C++ can be decompiles after it is compiled. That is why software licenses have had for many years a thou shalt not reverse engineer clause in them. While it is more difficult with a C or C++ application (because it doesn't have any metadata) it is still possible.
Zanathel wrote:
And why did Microsoft implent such redicilous feature?
The feature is not being able to reverse compile the application per se, but so that features such as reflection can work. This can be a very powerful feature which can make development a lot easier.
My: Blog | Photos | Next SQL Presentation
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
Zanathel: could you give the link to this decompiler? I'm really curious how it works!
|
|
|
|
|
|
|
I've got a string
@"\fs17 someTextHere\"
where 17 could be any number
I'd like to extrract the "someTextHere" part from the string using a regular expression.
The regular expression
@"\\fs(\d{1})+ (\w|\W)+\\"
will match the entire string; but I only want to find out the "someTextHere" part of the string. Could any of the regular expression experts here help me out?
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: The Secular Left, the Religious Right, and Prejudice
Judah Himango
|
|
|
|
|
@"\\fs\d+ (\w|\W)+\\"
Now you have only one grouping, which is the word. You can get this group out of your regex match, it has a property or something to access it. Any bracket will generate a group. From memory, the array is 1 indexed, with the 0 index containing the whole match.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks Christian; I was totally oblivious to the groups property, much appreciated. For the record, I ended up modifying the pattern a bit:
<br />
@"\\fs\d+ (\w+|\W+)\\"
As the previous one grouped only a single character (the plus sign was outside the parentheses).
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: The Secular Left, the Religious Right, and Prejudice
Judah Himango
|
|
|
|
|
Judah Himango wrote:
As the previous one grouped only a single character (the plus sign was outside the parentheses).
Sorry, I just copied that bit from yours, I didn't really check it
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|