views:

146

answers:

3

We are NOT in the best situation! We have been given the 'latest' project files, and they don't compile. So we are trying to reconstruct the solution and restore it to a working state. We copied all the modules and forms into one project and yet when we compile it is not picking up all the form events, such as Form_Activate. The events are there, spelled correctly, but are not being picked up. If you do a '.' with intellisense the events are not listed either...

Why is this? Is there a way to get visual basic 6 to reload the form in order to pick up the events, etc?

Thanks, R.

+1  A: 

First of all, there is no Visual Studio 2006. Second what are the errors you get when you try to compiler?

bashmohandes
A: 

You are probably having a scope problem. Does the events have any accessibility modifiers such as Public or Private?

Tomas Lycken
+3  A: 

Check to be sure you have both the event handler ...

private void Form1_Activated( object sender, EventArgs e )
{
  // Your code here
}

... and the wire-up usually found in the FormName.Designer.cs file ...

this.Activated += new System.EventHandler( this.Form1_Activated );

If you have moved the event handlers over, but not the event registrations, your event handlers will not get called.

JP Alioto
I suspect the problem is that the designer files were omitted from the code completely, and since they don't have a good project the file they didn't re-generate correctly. It's possibly even a visual studio version mismatch.
Joel Coehoorn