Added event to Mercury Winforms project generates a runtime error

I’m just starting out with Elements, so please bear with me if I’m doing something incorrect.

I’m trying to create a simple Winforms application using Elements and Mercury. I’m working in Visual Studio, but I am experiencing the same issue in Water.

My form has a treeview, and I’ve added an AfterSelect event like so:

  Private Sub treeFiles_AfterSelect(sender As Object, e As TreeViewEventArgs) Handles treeFiles.AfterSelect

  End Sub

Now when I run my project, I get this error:
System.AccessViolationException
HResult=0x80004003
Message=Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Source=System.Windows.Forms
StackTrace:
at System.Windows.Forms.Control.get_Visible()
at System.Windows.Forms.ContainerControl.FocusActiveControlInternal()
at System.Windows.Forms.Form.set_Active(Boolean value)
at System.Windows.Forms.Form.WmActivate(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

This doesn’t happen if I add the same event to a non-Elements VB.NET project.

I’m also finding that the Code Navigation Bar at the top of the Visual Studio Code Editor is populated very differently than is typical for VB.NET - usually I can create a new event by selecting a control from the drop down list at the top and then select an available event from the other drop down list. This doesn’t seem to be possible with my Mercury project - it doesn’t show the control names at all in the first list.

I know Mercury is in beta, so I completely understand if the answer is: not ready yet! I’m just trying to get my feet wet with Mercury and Elements.

Thanks,

–Avonelle

P.S. I’ve attached a simple sample solution that has both my Mercury project and my regular Winforms project.PhotoManager.zip (232.2 KB)

Also, this is on preview version: 10.0.0.2577.

1 Like

Thanks, logged as bugs://85273

Thanks, logged as bugs://85274

Hi Avonelle,

no, I; sure kith of these are bugs in out interaction with the IDE; i’ve logged the Form Designer and the Navigation Bar issue separately, for out team to have a look at ASAP. The first sounds like a legitimate bug, while the second like somentkng we probably just haven’t gotten around to hooking up properly for Mercury yet.

thanx a lot for the feedback, and I hope we can get these fixed for you soon.

—marc

Great - thanks! FYI - certainly not an emergency for me.

1 Like

bugs://85273 got closed with status fixed.

bugs://85274 got closed with status fixed.