|
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?
|
|
|
|
|
I'm tryed add, it's work! so, your App should work too, or you override sth.?
|
|
|
|
|
User Error!
Found the problem: was referencing the wrong instance of the form that contained he menustrip. When using the "real" form, everything works as it should.
Thanks for your help.
|
|
|
|
|
Hi,
My situation is this, I have 3 comboboxes (drop down list only, not editable), and If the user changes the value of one of the, the other two should change too.
I have used the SelectedIndexChanged Event successfully to update the other two comboboxes. But I have 2 issues with it, first: The code is not pretty, I have to repeat the same 3 times and secondly everytime a call is made to one combobox's SelectedIndexChanged event the other are called too because I update the indexes of those too in the first call. I know it's kind of hard to understand like this, so here's what I'm doing:
private void SubNetCountCombo_SelectedIndexChanged(System.Object sender, System.EventArgs e)
{
HostCountCombo.SelectedIndex = SubNetCountCombo.SelectedIndex;
newsubnetmaskcombo.SelectedIndex = SubNetCountCombo.SelectedIndex;
}
private void HostCountCombo_SelectedIndexChanged(object sender, System.EventArgs e)
{
SubNetCountCombo.SelectedIndex = HostCountCombo.SelectedIndex;
newsubnetmaskcombo.SelectedIndex = HostCountCombo.SelectedIndex;
}
private void newsubnetmaskcombo_SelectedIndexChanged(System.Object sender, System.EventArgs e)
{
SubNetCountCombo.SelectedIndex = newsubnetmaskcombo.SelectedIndex;
HostCountCombo.SelectedIndex = newsubnetmaskcombo.SelectedIndex;
}
I thought of using a bool variable as a switch, so that everytime I enter each of those events it turns true and when it goes to the other methods I use an if to check for that variable, if it's true I just get out. But it's still not pretty... So.. I'm not sure if there's a better way of accomplishing this..
Thanks!
|
|
|
|
|
If any selection will change the other two,. you'll get into an infinite loop, unless you set some sort of flag which will tell the event handler not to do anything. You can also put all of these into one event handler, and just have it check which control it is working with, and then set the other two.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
mmm.. As I said, any selection changes the other two, But no, I do not get into an infinite loop, It only repeats two times the events and then gets out, but you don't notice it. It's not like it slows down the program or anything.
And about the flag, that's what I said in the end of my comment, I used it, but I just don't like the way it works. I want to know if there's another way to accomplish this, without:
1. Having to use a flag.
2. Having to "repeat the instructions" as I'm doing in the excerpt I pasted here.
Thanks
|
|
|
|
|
Well, you've listed the only options. Either have one event for each, or one event that all three use, that's all there is. As for the flag, I'd have expected code that changes the selected item on the other two, to cause events to fire over and over. If that's not the case, then that's fine, you do not need a flag.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Ok.. Thanks.. That's all I wanted to know...
|
|
|
|
|
Hello,
I have a pdf file that has the whole help stuff in it. Based on the helpId(Which form the user has selected) I should display the correct help page.
Will this below code serve my purpose?
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = "Guide.pdf";
startInfo.Verb = helpId;
System.Diagnostics.Process.Start(startInfo);
|
|
|
|
|
This is programming, it's not black magic. You can't just go around making stuff up and expect it to magically do what you want it to. Instead, you should use reference books and google to research the tools you are using.
No. Of course not. You've taken a random property and tried to make it magically do what you want. The verb is a predefined term like 'run' or 'print' that tells the process what to do. There is no way that I know of to make a PDF open on a specific page. You'd have to read the Acrobat documentation to see if it's possible to pass any parameters to Acrobat, to tell it what page to open. As you appear incapable of research, I'll tell you that Arguments is the property on ProcessStartInfo you use to pass an argument to a program. But, you need to find out for yourself if Acrobat will take an argument to do what you want it to.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
Abhishek Sur wrote: Atleast you need to open the PDF to your own viewer to have better control rather than opening in Acrobat Reader directly.
Those libraries are not cheap. What's the bet this guy is only interested in free solutions ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
I don't think you can do this using PDF files. If you can make your help files to a CHM file, work with Help.ShowHelp()[^] method by providing appropriate HelpNavigator value.
|
|
|
|