|
Thanks!
Mark Brock
"We're definitely not going to make a G or a PG version of this. It's not PillowfightCraft." -- Chris Metzen
|
|
|
|
|
You're changing the collection you're iterating through--
So the object you started off with at the beginning of the loop is not the same one at the end.
I'm surprised it even let you do that...
a
for(int x=FlowPanel.Controls.Count-1; x>=0; x--)
{
FlowPanel.Controls(x).Dispose();
}
should do the trick, I think.
var question = (_2b || !(_2b));
|
|
|
|
|
Sorry about beating you to it - it was just luck - but I still think using Remove from the controls list will be a better solution than Dispose!
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
OriginalGriff wrote: Remove from the controls list will be a better solution than Dispose!
Agreed, no arguments there. Didn't think it through completely ;>
var question = (_2b || !(_2b));
|
|
|
|
|
Thanks!
Mark Brock
"We're definitely not going to make a G or a PG version of this. It's not PillowfightCraft." -- Chris Metzen
|
|
|
|
|
hello friends!!
I have made a library for my c# project by combining 3 libraries (using ilmerge).
I wanted to know, is it possible for someone to decompile my new library or view the code?
if yes, how do i protect it?
or is there any other way of merging the library with my project?
|
|
|
|
|
Use Reflector[^] to see the result.
Normally a dll can be protected by Obfuscation.Dotfuscator is a Visual Studio Tool using for obfuscation.
|
|
|
|
|
dotfuscator is good but it does not encrypt the code.
also the project shows an error after being linked with the obfuscated library. obviously because it cannot import the namespaces. how do i correct this? do i need to merge my dll with exe?
|
|
|
|
|
I think you are using dotfuscator in the Visual studio project Dlls.Instead of that use it for dll's and exe in the BIN folder.ie,in the output directory not in the Visual Studio project.
While using dotfuscator browse all of your dlls and also your exe from your build output directory.Otherwise this dll won't work with that exe because of the change in method names and private variable names.
|
|
|
|
|
Thanks arun,
I was only importing dll and not the exe
Now i get the problem.
Thanks again.
|
|
|
|
|
Its ok buddy.
|
|
|
|
|
Arun Jacob wrote: Use Reflector[^] to see the result.
Wow, awesome tool! Thanks!
I wish there was something like that for my VB6 code that I also have to maintain. Of course, there's no time, money, etc to convert my VB6 code to .NET. :-|
________
Joe
|
|
|
|
|
|
amitupadhyay007353543543 wrote: hey pal, googled for u. Check out this link
http://vbcity.com/forums/topic.asp?tid=115861[^]
Wow, thanks!
My desire is for something that will help me find the dependences and code in my VB6 program. By doing a google on VB6 disassembler, I found a bunch of stuff.
I always thought that VB6 compiled directly to assembler/machine code.
My VB6 program started out as a simple quick interface to some custom hardware. However, over the years, it's become a huge monstrosity. Since the program was never planned to be huge with many diverse support functions, it's become a bunch of added_on/hacked_on functions.
I've started the new version in C#. And, I'm and doing the code and functions properly this time to support a complex GUI. However, for a few reasons, I'll still need to support the VB6 program for a few more years. I dread every time I have to go back to VB6 and Visual Studio6. However, as long as I'm getting paid, then it's all good.
Wow, also, I just realized. I have a proprietary calibration routine in my VB6 code. It's part of the overall code base. Now, I just disable/hide that Windows form in the version of code that goes to our customers. However, it seems a VB6 decompiler can expose that routine. Yikes! That's good to know. From now on, I'll strip out that module when I build a customer code version.
By the way, I knew to strip out that proprietary calibration module in my C# customer code version. Until I find/see a very good way to protect that C# code, I'll keep doing that. It would be nice to have just one single C# code base.
Thanks again!
|
|
|
|
|
Hello. I'm having a problem with the codes i used for sorting strings using radix sort..I always get the IndexOutOfRange exception.
Here is the code:
int N = arrayOfLastNames.Length;
for (int a = 0; a < arrayOfLastNames.Length; a++)
{
int W = arrayOfLastNames[a].Length;
Console.WriteLine("{0}", W);
string[] temp = new string[arrayOfLastNames.Length];
for (int d = W - 1; d >= 0; d--)
{
int[] count = new int[50];
for (int i = 0; i < N; i++)
{
count[arrayOfLastNames[i][d] + 1]++;
}
for (int k = 1; k < 256; k++)
{
count[k] += count[k - 1];
}
for (int i = 0; i < N; i++)
{
temp[count[arrayOfLastNames[i][d]]++] = arrayOfLastNames[i];
}
for (int i = 0; i < N; i++)
{
arrayOfLastNames[i] = temp[i];
Console.WriteLine("{0}", arrayOfLastNames[i]);
}
}
}
How will i prevent that from happening?
Can someone please help me? I really need to finish this before saturday because it's the passing date. I have exams tomorrow until this coming monday. If I solve this problem today I'll be able to finish it until tomorrow because i'll be doing one more procedure tomorrow and that's the binary search. So please help me.
modified on Thursday, September 3, 2009 5:33 AM
|
|
|
|
|
Looking at the part that fails a bit closer..
int W = arrayOfLastNames[a].Length;
Console.WriteLine("{0}", W);
string[] temp = new string[arrayOfLastNames.Length];
for (int d = W - 1; d >= 0; d--)
{
int[] count = new int[50];
for (int i = 0; i < N; i++)
{
count[arrayOfLastNames[i][d] + 1]++;
W gets the length of the first item in arrayOfLastNames . In your for -loop you declare
for (int d = W - 1; d >= 0; d--)
An array in C# is zero based so the characters in the first name (of the last names) will be indexed from 0 to W - 1 which equals d , right? And you declare this in your for -loop but then you add + 1 again in the count[arrayOfLastNames[i][d] + 1] part causing the exception. You can't add 1 when d is the end of the array
modified on Thursday, September 3, 2009 11:12 AM
|
|
|
|
|
Actually I'm not the one who created the code. I just got it from the net so I just copied and pasted the things that would fit in the code...
|
|
|
|
|
Maybe you should take some time to go through code you 'just copy and paste', making sure you understand it...
|
|
|
|
|
Hi,
Please could any one tell me any free recommended library to skin UI in my WinForm application. I am developing application C#, .netFramework 3.5 and Visual studio 2008.
thanks,
Umrahi
If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
Hi Everybody,
I would like to identify the event in a PC.
what ever the file i open, or changing from one window to another i need to get a event
in my C# application.
for example i have opened a IE application and Word Application if i change from IE to Word i should get an event.
How can i do it...
thanks in advance...
|
|
|
|
|
When it comes to the IO part, use the FileSystemWatcher class.
link[^]
|
|
|
|
|
Thanks for the reply.
it is not related with IO part.
My need is this when ever i change my IE Application(tab,minimize) the next focused application may be(word, excel, notepad ...) has to be killed.so i need to get the event first of all
if you have any idea please guide me
thanks
|
|
|
|
|
At runtime I need to modify the content of a ToolStripMenuItem.
I've made the changes (added and/or removed new items) but cannot figure out how to refresh or notify the MenuStrip to display the changes.
The menu changes are designed to persist between invocations of the program - and they show up properly when the program is closed and then re-executed. So, I know I've defined and added all of the items correctly - just can't get the changes to appear immediately after they're added.
Any ideas would be appreciated.
|
|
|
|
|
Did you try to manually update status bar through code? I am not sure about exact solution but in your case I think it should work.
|
|
|
|
|
Not sure what you mean by "update". Is there a method somewhere that performs an update of the MenuStrip or its items?
|
|
|
|