epiShape C# to VB

Trying to add a epiShape box to a screen that is already using VB. Epicor gave me this c# code to link the checkbox with the shape.


Is there an equivalent in VB?

I am not sure where you got the C# code from Epicor, but I always go to Customization > Tools > Object Explorer. From here choose Controls > EpiShape > Properties. Scroll down to Enabled. On the right you can see code examples in both C# and VB. Looks like the syntax should be the same for this case.

I hope this helps!

Epicor support sent me this link.
To KB0030291

Did you follow the instructions they sent? That should work. Are you getting an error?

Yes they work in C# but not VB. the tech told me I need the VB code equivalent to this.


try replacing that first capital e:


Did that. The capital E is actually a typo on their document. Had to change it to small e to get it to work in C#. There are older customization that are in VB so I can’t change to C# without rewriting everything.

I think there are lots of free online converters, but from my memory the VB equivalent of != is <>

But I haven’t done anything with VB since I was like 11 or 12 so… :joy:

When I try to add the code I get this error.

This is the full Script:
'// Custom VB.NET code for QuoteForm
'// Created: 8/11/2005 3:07:20 PM
Imports System
Imports System.Data
Imports System.Diagnostics
Imports System.Windows.Forms
Imports System.ComponentModel
Imports Erp.UI
Imports Ice.Lib.Framework
Imports Ice.Lib.ExtendedProps
Imports Ice.UI.FormFunctions
Imports Ice.Lib.Customization

Module Script

'// ** Wizard Insert Location ** 
'// Begin Wizard Added Module Level Variables ** 

'// End Wizard Added Module Level Variables ** 

'// Add Custom Module Level Variables Here ** 

Sub InitializeCustomCode() 

	'// ** Wizard Insert Location - Do not delete 'Begin/End Custom Method Calls' lines ** 
	'// Begin Wizard Added Variable Intialization 

	'// End Wizard Added Variable Intialization 
	'// Begin Custom Method Calls 

	AddHandler Script.epiCheckBoxC3.CheckStateChanged, AddressOf Script.epiCheckBoxC3_CheckStateChanged
			'// End Custom Method Calls 
End Sub 

Private Sub btnEpiCustom1_9de96f4b_86e4_4549_af13_52708b00b2bb_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEpiCustom1_9de96f4b_86e4_4549_af13_52708b00b2bb.Click
	'// place event handling code here


End Sub

Private Sub btnEpiCustom3_b124ca24_407b_403e_84e4_ece072240d87_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEpiCustom3_b124ca24_407b_403e_84e4_ece072240d87.Click
	'// place event handling code here


End Sub

Private Sub btnEpiCustom2_c6862f4f_e1e7_49da_8c49_ac1cdfc75a28_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEpiCustom2_c6862f4f_e1e7_49da_8c49_ac1cdfc75a28.Click
	'// place event handling code here


End Sub

Private Sub epiCheckBoxC3_CheckStateChanged(ByVal sender As Object, ByVal args As System.EventArgs)
	' ** Place Event Handling Code Here **
epiShapeC1.Enabled = Not epiShapeC1.Enabled
End Sub

End Module

epiShapeC1.Enabled = Not epiShapeC1.Enabled

This code should work, but I would offer that if you are using E10, you should move the code to C# anyway…


Thank you all for the suggestions.

Did any of them work for you?

No, We have not been able to get this to work.