MES blank button

I saw that as well and had already tried your suggestion to no avail.

________________________________
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of CarlH
Sent: Wednesday, October 26, 2011 5:50 PM
To: vantage@yahoogroups.com
Subject: [Vantage] Re: MES blank button



There's an often overlooked step ( I just forgot it, for instance)
On the blank button, the EpiBinding is set to MESControl.NotUsed You need to blank this out. Not part of the /NET code Just something to change in properties.

--- In vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>, "Kevin Simon" <simstrak@...> wrote:
>
> It's been a while (8.03 days), but I had problems utilizing the blank
> buttons. However, I would just set the blank button to a size of (0, 0),
> then add my own button in its place with the same size and location. It
> accomplished the same thing as using a blank button.
>
>
>
> HTH,
>
> Kevin Simon
>
>
>
> From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf Of
> dgodfrey_amc
> Sent: Thursday, October 20, 2011 2:38 PM
> To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
> Subject: [Vantage] MES blank button
>
>
>
>
>
> Has anyone successfully utilized any of the blank button on the MES Main
> Menu? If so can you post the code. What I have is this and all it does is
> displays the text "DB" on the button but not enable it. I have also enabled
> the messages to display the AfterAdapter methodNames and they never show up.
>
> '//**************************************************
> '// Custom VB.NET code for MESMenu
> '// Created: 10/5/2011 4:25:03 PM
> '//**************************************************
> Imports System
> Imports System.Data
> Imports System.Diagnostics
> Imports System.Windows.Forms
> Imports System.ComponentModel
> Imports Microsoft.VisualBasic
> Imports Epicor.Mfg.UI
> Imports Epicor.Mfg.UI.FrameWork
> Imports Epicor.Mfg.UI.ExtendedProps
> Imports Epicor.Mfg.UI.FormFunctions
> Imports Epicor.Mfg.UI.Customization
> Imports Epicor.Mfg.UI.Adapters
> Imports Epicor.Mfg.UI.Searches
> Imports Epicor.Mfg.BO
>
> Module Script
>
> '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module
> Level Variables' Comments! **
> '// Begin Wizard Added Module Level Variables **
>
> Private WithEvents oTrans_empAdapter As EpiBaseAdapter
> Private WithEvents oTrans_adapter As EpiBaseAdapter
> Private WithEvents oTrans_userAdapter As EpiBaseAdapter
> Private WithEvents oTrans_menuAdapter As EpiBaseAdapter
> '// End Wizard Added Module Level Variables **
>
> '// Add Custom Module Level Variables Here **
> Private bManagerLoggedIn AS Boolean = False
> Private WithEvents btnLaunchTracker As EpiButton
> Sub InitializeCustomCode()
> '// ** Wizard Insert Location - Do not delete 'Begin/End Custom Method
> Calls' lines **
> '// Begin Wizard Added Variable Initialization
> '// End Wizard Added Variable Initialization
> '// Begin Custom Method Calls
> '// End Custom Method Calls
> End Sub
> Private Sub MESMenu_Load(ByVal sender As object, ByVal args As EventArgs)
> Handles MESMenu.Load
> '//
> '// Add Event Handler Code
> '//
> 'MyMessageBox(ShowFormInformation(), True, MsgBoxStyle.OKOnly, "Debugging
> Message")
> btnLaunchTracker =
> CType(csm.GetNativeControlReference("185621db-3bc2-439a-b146-886972af8e00"),
> EpiButton)
> btnLaunchTracker.Enabled = True
> btnLaunchTracker.Text = "DB"
> btnLaunchTracker.ReadOnly = False
> End Sub
> Private Sub btnLaunchTracker_Click(ByVal Sender As Object, ByVal args As
> EventArgs ) Handles btnLaunchTracker.Click
> ProcessCaller.LaunchForm(MESMenu, "UDPRIDSP")
> End Sub
>
> Private Function MyMessageBox( ByVal Msg AS String, ByVal FYI AS
> Boolean,Optional ByVal Button As MsgBoxStyle = MsgBoxStyle.OKOnly, Optional
> ByVal Title As String = Nothing) As MsgBoxResult
> Dim results As MsgBoxResult
> If(FYI = True) Then
> If Not String.IsNullOrEmpty(Title) Then
> results = MsgBox(Msg, Button, Title)
> Else
> results = MsgBox(Msg, Button, "Advanced Motion controls Message")
> End If
> End If
> return results
> End Function
>
> Private Function ShowFormInformation() As String
> Dim msg AS String = ""
> msg = "WhoAmI = " & MESMenu.WhoAmI & Chr(13) & Chr(10) _
> & "EmployeeID = " & MESMenu.Session.EmployeeID & Chr(13) & Chr(10) _
> & "UserID = " & MESMenu.Session.UserID & Chr(13) & Chr(10) _
> & "bManagerLoggedIn = " & bManagerLoggedIn & Chr(13) & Chr(10) _
> & "WorkstationID = " & MESMenu.Session.WorkstationID & Chr(13) & Chr(10) _
> & "WorkstationDescription = " & MESMenu.Session.WorkstationDescription &
> Chr(13) & Chr(10)
> Return msg '
> End Function
>
> Private Sub oTrans_empAdapter_AfterAdapterMethod(ByVal sender As object,
> ByVal args As AfterAdapterMethodArgs) Handles
> oTrans_empAdapter.AfterAdapterMethod
> '// ** Argument Properties and Uses **
> '// args.MethodName
> '
> 'Add Event Handler Code
> '
> MyMessageBox("oTrans_empAdapter_AfterAdapterMethod::" & args.MethodName,
> true, MsgBoxStyle.OKOnly, "Debugging Message") ' use this to find method
> IF(args.MethodName = "GetRows") Then
> Dim myEmployeeID AS String = MESMenu.Session.EmployeeID
> Select myEmployeeID
> Case "0099"
> bManagerLoggedIn = True
> Case Else
> bManagerLoggedIn = False
> End Select
> End If
> Select Case args.MethodName
>
> Case "GetRows"
> 'IF(bManagerLoggedIn = True) Then
> ' btnLaunchTracker.Enabled = True
> ' btnLaunchTracker.Text = "DB"
> 'Else
> ' btnLaunchTracker.Enabled = False
> ' btnLaunchTracker.Text = ""
> 'End If
>
> Case Else
>
> End Select
>
> End Sub
>
>
> Private Sub oTrans_adapter_AfterAdapterMethod(ByVal sender As object, ByVal
> args As AfterAdapterMethodArgs) Handles oTrans_adapter.AfterAdapterMethod
> '// ** Argument Properties and Uses **
> '// args.MethodName
> '
> 'Add Event Handler Code
> '
> MyMessageBox("oTrans_adapter_AfterAdapterMethod::" & args.MethodName, true,
> MsgBoxStyle.OKOnly, "Debugging Message") ' use this to find method
>
> Select Case args.MethodName
>
> Case "Update"
>
> Case Else
>
> End Select
>
> End Sub
>
>
> Private Sub oTrans_userAdapter_AfterAdapterMethod(ByVal sender As object,
> ByVal args As AfterAdapterMethodArgs) Handles
> oTrans_userAdapter.AfterAdapterMethod
> '// ** Argument Properties and Uses **
> '// args.MethodName
> '
> 'Add Event Handler Code
> '
> MyMessageBox("oTrans_userAdapter_AfterAdapterMethod::" & args.MethodName,
> true, MsgBoxStyle.OKOnly, "Debugging Message") ' use this to find method
>
> Select Case args.MethodName
>
> Case "Update"
>
> Case Else
>
> End Select
>
> End Sub
>
>
> Private Sub oTrans_menuAdapter_AfterAdapterMethod(ByVal sender As object,
> ByVal args As AfterAdapterMethodArgs) Handles
> oTrans_menuAdapter.AfterAdapterMethod
> '// ** Argument Properties and Uses **
> '// args.MethodName
> '
> 'Add Event Handler Code
> '
> MyMessageBox("oTrans_menuAdapter_AfterAdapterMethod::" & args.MethodName,
> true, MsgBoxStyle.OKOnly, "Debugging Message") ' use this to find method
>
> Select Case args.MethodName
>
> Case "Update"
>
> Case Else
>
> End Select
>
> End Sub
>
>
> End Module
>
>
>
>
>
> [Non-text portions of this message have been removed]
>





[Non-text portions of this message have been removed]
Has anyone successfully utilized any of the blank button on the MES Main Menu? If so can you post the code. What I have is this and all it does is displays the text "DB" on the button but not enable it. I have also enabled the messages to display the AfterAdapter methodNames and they never show up.

'//**************************************************
'// Custom VB.NET code for MESMenu
'// Created: 10/5/2011 4:25:03 PM
'//**************************************************
Imports System
Imports System.Data
Imports System.Diagnostics
Imports System.Windows.Forms
Imports System.ComponentModel
Imports Microsoft.VisualBasic
Imports Epicor.Mfg.UI
Imports Epicor.Mfg.UI.FrameWork
Imports Epicor.Mfg.UI.ExtendedProps
Imports Epicor.Mfg.UI.FormFunctions
Imports Epicor.Mfg.UI.Customization
Imports Epicor.Mfg.UI.Adapters
Imports Epicor.Mfg.UI.Searches
Imports Epicor.Mfg.BO


Module Script


'// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module Level Variables' Comments! **
'// Begin Wizard Added Module Level Variables **

Private WithEvents oTrans_empAdapter As EpiBaseAdapter
Private WithEvents oTrans_adapter As EpiBaseAdapter
Private WithEvents oTrans_userAdapter As EpiBaseAdapter
Private WithEvents oTrans_menuAdapter As EpiBaseAdapter
'// End Wizard Added Module Level Variables **


'// Add Custom Module Level Variables Here **
Private bManagerLoggedIn AS Boolean = False
Private WithEvents btnLaunchTracker As EpiButton
Sub InitializeCustomCode()
'// ** Wizard Insert Location - Do not delete 'Begin/End Custom Method Calls' lines **
'// Begin Wizard Added Variable Initialization
'// End Wizard Added Variable Initialization
'// Begin Custom Method Calls
'// End Custom Method Calls
End Sub
Private Sub MESMenu_Load(ByVal sender As object, ByVal args As EventArgs) Handles MESMenu.Load
'//
'// Add Event Handler Code
'//
'MyMessageBox(ShowFormInformation(), True, MsgBoxStyle.OKOnly, "Debugging Message")
btnLaunchTracker = CType(csm.GetNativeControlReference("185621db-3bc2-439a-b146-886972af8e00"), EpiButton)
btnLaunchTracker.Enabled = True
btnLaunchTracker.Text = "DB"
btnLaunchTracker.ReadOnly = False
End Sub
Private Sub btnLaunchTracker_Click(ByVal Sender As Object, ByVal args As EventArgs ) Handles btnLaunchTracker.Click
ProcessCaller.LaunchForm(MESMenu, "UDPRIDSP")
End Sub

Private Function MyMessageBox( ByVal Msg AS String, ByVal FYI AS Boolean,Optional ByVal Button As MsgBoxStyle = MsgBoxStyle.OKOnly, Optional ByVal Title As String = Nothing) As MsgBoxResult
Dim results As MsgBoxResult
If(FYI = True) Then
If Not String.IsNullOrEmpty(Title) Then
results = MsgBox(Msg, Button, Title)
Else
results = MsgBox(Msg, Button, "Advanced Motion controls Message")
End If
End If
return results
End Function

Private Function ShowFormInformation() As String
Dim msg AS String = ""
msg = "WhoAmI = " & MESMenu.WhoAmI & Chr(13) & Chr(10) _
& "EmployeeID = " & MESMenu.Session.EmployeeID & Chr(13) & Chr(10) _
& "UserID = " & MESMenu.Session.UserID & Chr(13) & Chr(10) _
& "bManagerLoggedIn = " & bManagerLoggedIn & Chr(13) & Chr(10) _
& "WorkstationID = " & MESMenu.Session.WorkstationID & Chr(13) & Chr(10) _
& "WorkstationDescription = " & MESMenu.Session.WorkstationDescription & Chr(13) & Chr(10)
Return msg '
End Function


Private Sub oTrans_empAdapter_AfterAdapterMethod(ByVal sender As object, ByVal args As AfterAdapterMethodArgs) Handles oTrans_empAdapter.AfterAdapterMethod
'// ** Argument Properties and Uses **
'// args.MethodName
'
'Add Event Handler Code
'
MyMessageBox("oTrans_empAdapter_AfterAdapterMethod::" & args.MethodName, true, MsgBoxStyle.OKOnly, "Debugging Message") ' use this to find method
IF(args.MethodName = "GetRows") Then
Dim myEmployeeID AS String = MESMenu.Session.EmployeeID
Select myEmployeeID
Case "0099"
bManagerLoggedIn = True
Case Else
bManagerLoggedIn = False
End Select
End If
Select Case args.MethodName

Case "GetRows"
'IF(bManagerLoggedIn = True) Then
' btnLaunchTracker.Enabled = True
' btnLaunchTracker.Text = "DB"
'Else
' btnLaunchTracker.Enabled = False
' btnLaunchTracker.Text = ""
'End If

Case Else

End Select

End Sub



Private Sub oTrans_adapter_AfterAdapterMethod(ByVal sender As object, ByVal args As AfterAdapterMethodArgs) Handles oTrans_adapter.AfterAdapterMethod
'// ** Argument Properties and Uses **
'// args.MethodName
'
'Add Event Handler Code
'
MyMessageBox("oTrans_adapter_AfterAdapterMethod::" & args.MethodName, true, MsgBoxStyle.OKOnly, "Debugging Message") ' use this to find method

Select Case args.MethodName

Case "Update"

Case Else

End Select

End Sub



Private Sub oTrans_userAdapter_AfterAdapterMethod(ByVal sender As object, ByVal args As AfterAdapterMethodArgs) Handles oTrans_userAdapter.AfterAdapterMethod
'// ** Argument Properties and Uses **
'// args.MethodName
'
'Add Event Handler Code
'
MyMessageBox("oTrans_userAdapter_AfterAdapterMethod::" & args.MethodName, true, MsgBoxStyle.OKOnly, "Debugging Message") ' use this to find method

Select Case args.MethodName

Case "Update"

Case Else

End Select

End Sub



Private Sub oTrans_menuAdapter_AfterAdapterMethod(ByVal sender As object, ByVal args As AfterAdapterMethodArgs) Handles oTrans_menuAdapter.AfterAdapterMethod
'// ** Argument Properties and Uses **
'// args.MethodName
'
'Add Event Handler Code
'
MyMessageBox("oTrans_menuAdapter_AfterAdapterMethod::" & args.MethodName, true, MsgBoxStyle.OKOnly, "Debugging Message") ' use this to find method

Select Case args.MethodName

Case "Update"

Case Else

End Select

End Sub



End Module
It's been a while (8.03 days), but I had problems utilizing the blank
buttons. However, I would just set the blank button to a size of (0, 0),
then add my own button in its place with the same size and location. It
accomplished the same thing as using a blank button.



HTH,

Kevin Simon



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
dgodfrey_amc
Sent: Thursday, October 20, 2011 2:38 PM
To: vantage@yahoogroups.com
Subject: [Vantage] MES blank button





Has anyone successfully utilized any of the blank button on the MES Main
Menu? If so can you post the code. What I have is this and all it does is
displays the text "DB" on the button but not enable it. I have also enabled
the messages to display the AfterAdapter methodNames and they never show up.

'//**************************************************
'// Custom VB.NET code for MESMenu
'// Created: 10/5/2011 4:25:03 PM
'//**************************************************
Imports System
Imports System.Data
Imports System.Diagnostics
Imports System.Windows.Forms
Imports System.ComponentModel
Imports Microsoft.VisualBasic
Imports Epicor.Mfg.UI
Imports Epicor.Mfg.UI.FrameWork
Imports Epicor.Mfg.UI.ExtendedProps
Imports Epicor.Mfg.UI.FormFunctions
Imports Epicor.Mfg.UI.Customization
Imports Epicor.Mfg.UI.Adapters
Imports Epicor.Mfg.UI.Searches
Imports Epicor.Mfg.BO

Module Script

'// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module
Level Variables' Comments! **
'// Begin Wizard Added Module Level Variables **

Private WithEvents oTrans_empAdapter As EpiBaseAdapter
Private WithEvents oTrans_adapter As EpiBaseAdapter
Private WithEvents oTrans_userAdapter As EpiBaseAdapter
Private WithEvents oTrans_menuAdapter As EpiBaseAdapter
'// End Wizard Added Module Level Variables **

'// Add Custom Module Level Variables Here **
Private bManagerLoggedIn AS Boolean = False
Private WithEvents btnLaunchTracker As EpiButton
Sub InitializeCustomCode()
'// ** Wizard Insert Location - Do not delete 'Begin/End Custom Method
Calls' lines **
'// Begin Wizard Added Variable Initialization
'// End Wizard Added Variable Initialization
'// Begin Custom Method Calls
'// End Custom Method Calls
End Sub
Private Sub MESMenu_Load(ByVal sender As object, ByVal args As EventArgs)
Handles MESMenu.Load
'//
'// Add Event Handler Code
'//
'MyMessageBox(ShowFormInformation(), True, MsgBoxStyle.OKOnly, "Debugging
Message")
btnLaunchTracker =
CType(csm.GetNativeControlReference("185621db-3bc2-439a-b146-886972af8e00"),
EpiButton)
btnLaunchTracker.Enabled = True
btnLaunchTracker.Text = "DB"
btnLaunchTracker.ReadOnly = False
End Sub
Private Sub btnLaunchTracker_Click(ByVal Sender As Object, ByVal args As
EventArgs ) Handles btnLaunchTracker.Click
ProcessCaller.LaunchForm(MESMenu, "UDPRIDSP")
End Sub

Private Function MyMessageBox( ByVal Msg AS String, ByVal FYI AS
Boolean,Optional ByVal Button As MsgBoxStyle = MsgBoxStyle.OKOnly, Optional
ByVal Title As String = Nothing) As MsgBoxResult
Dim results As MsgBoxResult
If(FYI = True) Then
If Not String.IsNullOrEmpty(Title) Then
results = MsgBox(Msg, Button, Title)
Else
results = MsgBox(Msg, Button, "Advanced Motion controls Message")
End If
End If
return results
End Function

Private Function ShowFormInformation() As String
Dim msg AS String = ""
msg = "WhoAmI = " & MESMenu.WhoAmI & Chr(13) & Chr(10) _
& "EmployeeID = " & MESMenu.Session.EmployeeID & Chr(13) & Chr(10) _
& "UserID = " & MESMenu.Session.UserID & Chr(13) & Chr(10) _
& "bManagerLoggedIn = " & bManagerLoggedIn & Chr(13) & Chr(10) _
& "WorkstationID = " & MESMenu.Session.WorkstationID & Chr(13) & Chr(10) _
& "WorkstationDescription = " & MESMenu.Session.WorkstationDescription &
Chr(13) & Chr(10)
Return msg '
End Function

Private Sub oTrans_empAdapter_AfterAdapterMethod(ByVal sender As object,
ByVal args As AfterAdapterMethodArgs) Handles
oTrans_empAdapter.AfterAdapterMethod
'// ** Argument Properties and Uses **
'// args.MethodName
'
'Add Event Handler Code
'
MyMessageBox("oTrans_empAdapter_AfterAdapterMethod::" & args.MethodName,
true, MsgBoxStyle.OKOnly, "Debugging Message") ' use this to find method
IF(args.MethodName = "GetRows") Then
Dim myEmployeeID AS String = MESMenu.Session.EmployeeID
Select myEmployeeID
Case "0099"
bManagerLoggedIn = True
Case Else
bManagerLoggedIn = False
End Select
End If
Select Case args.MethodName

Case "GetRows"
'IF(bManagerLoggedIn = True) Then
' btnLaunchTracker.Enabled = True
' btnLaunchTracker.Text = "DB"
'Else
' btnLaunchTracker.Enabled = False
' btnLaunchTracker.Text = ""
'End If

Case Else

End Select

End Sub


Private Sub oTrans_adapter_AfterAdapterMethod(ByVal sender As object, ByVal
args As AfterAdapterMethodArgs) Handles oTrans_adapter.AfterAdapterMethod
'// ** Argument Properties and Uses **
'// args.MethodName
'
'Add Event Handler Code
'
MyMessageBox("oTrans_adapter_AfterAdapterMethod::" & args.MethodName, true,
MsgBoxStyle.OKOnly, "Debugging Message") ' use this to find method

Select Case args.MethodName

Case "Update"

Case Else

End Select

End Sub


Private Sub oTrans_userAdapter_AfterAdapterMethod(ByVal sender As object,
ByVal args As AfterAdapterMethodArgs) Handles
oTrans_userAdapter.AfterAdapterMethod
'// ** Argument Properties and Uses **
'// args.MethodName
'
'Add Event Handler Code
'
MyMessageBox("oTrans_userAdapter_AfterAdapterMethod::" & args.MethodName,
true, MsgBoxStyle.OKOnly, "Debugging Message") ' use this to find method

Select Case args.MethodName

Case "Update"

Case Else

End Select

End Sub


Private Sub oTrans_menuAdapter_AfterAdapterMethod(ByVal sender As object,
ByVal args As AfterAdapterMethodArgs) Handles
oTrans_menuAdapter.AfterAdapterMethod
'// ** Argument Properties and Uses **
'// args.MethodName
'
'Add Event Handler Code
'
MyMessageBox("oTrans_menuAdapter_AfterAdapterMethod::" & args.MethodName,
true, MsgBoxStyle.OKOnly, "Debugging Message") ' use this to find method

Select Case args.MethodName

Case "Update"

Case Else

End Select

End Sub


End Module





[Non-text portions of this message have been removed]
That is what I had to do. Thanks

________________________________
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Kevin Simon
Sent: Friday, October 21, 2011 4:47 AM
To: vantage@yahoogroups.com
Subject: RE: [Vantage] MES blank button



It's been a while (8.03 days), but I had problems utilizing the blank
buttons. However, I would just set the blank button to a size of (0, 0),
then add my own button in its place with the same size and location. It
accomplished the same thing as using a blank button.

HTH,

Kevin Simon

From: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com> [mailto:vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>] On Behalf Of
dgodfrey_amc
Sent: Thursday, October 20, 2011 2:38 PM
To: vantage@yahoogroups.com<mailto:vantage%40yahoogroups.com>
Subject: [Vantage] MES blank button

Has anyone successfully utilized any of the blank button on the MES Main
Menu? If so can you post the code. What I have is this and all it does is
displays the text "DB" on the button but not enable it. I have also enabled
the messages to display the AfterAdapter methodNames and they never show up.

'//**************************************************
'// Custom VB.NET code for MESMenu
'// Created: 10/5/2011 4:25:03 PM
'//**************************************************
Imports System
Imports System.Data
Imports System.Diagnostics
Imports System.Windows.Forms
Imports System.ComponentModel
Imports Microsoft.VisualBasic
Imports Epicor.Mfg.UI
Imports Epicor.Mfg.UI.FrameWork
Imports Epicor.Mfg.UI.ExtendedProps
Imports Epicor.Mfg.UI.FormFunctions
Imports Epicor.Mfg.UI.Customization
Imports Epicor.Mfg.UI.Adapters
Imports Epicor.Mfg.UI.Searches
Imports Epicor.Mfg.BO

Module Script

'// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module
Level Variables' Comments! **
'// Begin Wizard Added Module Level Variables **

Private WithEvents oTrans_empAdapter As EpiBaseAdapter
Private WithEvents oTrans_adapter As EpiBaseAdapter
Private WithEvents oTrans_userAdapter As EpiBaseAdapter
Private WithEvents oTrans_menuAdapter As EpiBaseAdapter
'// End Wizard Added Module Level Variables **

'// Add Custom Module Level Variables Here **
Private bManagerLoggedIn AS Boolean = False
Private WithEvents btnLaunchTracker As EpiButton
Sub InitializeCustomCode()
'// ** Wizard Insert Location - Do not delete 'Begin/End Custom Method
Calls' lines **
'// Begin Wizard Added Variable Initialization
'// End Wizard Added Variable Initialization
'// Begin Custom Method Calls
'// End Custom Method Calls
End Sub
Private Sub MESMenu_Load(ByVal sender As object, ByVal args As EventArgs)
Handles MESMenu.Load
'//
'// Add Event Handler Code
'//
'MyMessageBox(ShowFormInformation(), True, MsgBoxStyle.OKOnly, "Debugging
Message")
btnLaunchTracker =
CType(csm.GetNativeControlReference("185621db-3bc2-439a-b146-886972af8e00"),
EpiButton)
btnLaunchTracker.Enabled = True
btnLaunchTracker.Text = "DB"
btnLaunchTracker.ReadOnly = False
End Sub
Private Sub btnLaunchTracker_Click(ByVal Sender As Object, ByVal args As
EventArgs ) Handles btnLaunchTracker.Click
ProcessCaller.LaunchForm(MESMenu, "UDPRIDSP")
End Sub

Private Function MyMessageBox( ByVal Msg AS String, ByVal FYI AS
Boolean,Optional ByVal Button As MsgBoxStyle = MsgBoxStyle.OKOnly, Optional
ByVal Title As String = Nothing) As MsgBoxResult
Dim results As MsgBoxResult
If(FYI = True) Then
If Not String.IsNullOrEmpty(Title) Then
results = MsgBox(Msg, Button, Title)
Else
results = MsgBox(Msg, Button, "Advanced Motion controls Message")
End If
End If
return results
End Function

Private Function ShowFormInformation() As String
Dim msg AS String = ""
msg = "WhoAmI = " & MESMenu.WhoAmI & Chr(13) & Chr(10) _
& "EmployeeID = " & MESMenu.Session.EmployeeID & Chr(13) & Chr(10) _
& "UserID = " & MESMenu.Session.UserID & Chr(13) & Chr(10) _
& "bManagerLoggedIn = " & bManagerLoggedIn & Chr(13) & Chr(10) _
& "WorkstationID = " & MESMenu.Session.WorkstationID & Chr(13) & Chr(10) _
& "WorkstationDescription = " & MESMenu.Session.WorkstationDescription &
Chr(13) & Chr(10)
Return msg '
End Function

Private Sub oTrans_empAdapter_AfterAdapterMethod(ByVal sender As object,
ByVal args As AfterAdapterMethodArgs) Handles
oTrans_empAdapter.AfterAdapterMethod
'// ** Argument Properties and Uses **
'// args.MethodName
'
'Add Event Handler Code
'
MyMessageBox("oTrans_empAdapter_AfterAdapterMethod::" & args.MethodName,
true, MsgBoxStyle.OKOnly, "Debugging Message") ' use this to find method
IF(args.MethodName = "GetRows") Then
Dim myEmployeeID AS String = MESMenu.Session.EmployeeID
Select myEmployeeID
Case "0099"
bManagerLoggedIn = True
Case Else
bManagerLoggedIn = False
End Select
End If
Select Case args.MethodName

Case "GetRows"
'IF(bManagerLoggedIn = True) Then
' btnLaunchTracker.Enabled = True
' btnLaunchTracker.Text = "DB"
'Else
' btnLaunchTracker.Enabled = False
' btnLaunchTracker.Text = ""
'End If

Case Else

End Select

End Sub

Private Sub oTrans_adapter_AfterAdapterMethod(ByVal sender As object, ByVal
args As AfterAdapterMethodArgs) Handles oTrans_adapter.AfterAdapterMethod
'// ** Argument Properties and Uses **
'// args.MethodName
'
'Add Event Handler Code
'
MyMessageBox("oTrans_adapter_AfterAdapterMethod::" & args.MethodName, true,
MsgBoxStyle.OKOnly, "Debugging Message") ' use this to find method

Select Case args.MethodName

Case "Update"

Case Else

End Select

End Sub

Private Sub oTrans_userAdapter_AfterAdapterMethod(ByVal sender As object,
ByVal args As AfterAdapterMethodArgs) Handles
oTrans_userAdapter.AfterAdapterMethod
'// ** Argument Properties and Uses **
'// args.MethodName
'
'Add Event Handler Code
'
MyMessageBox("oTrans_userAdapter_AfterAdapterMethod::" & args.MethodName,
true, MsgBoxStyle.OKOnly, "Debugging Message") ' use this to find method

Select Case args.MethodName

Case "Update"

Case Else

End Select

End Sub

Private Sub oTrans_menuAdapter_AfterAdapterMethod(ByVal sender As object,
ByVal args As AfterAdapterMethodArgs) Handles
oTrans_menuAdapter.AfterAdapterMethod
'// ** Argument Properties and Uses **
'// args.MethodName
'
'Add Event Handler Code
'
MyMessageBox("oTrans_menuAdapter_AfterAdapterMethod::" & args.MethodName,
true, MsgBoxStyle.OKOnly, "Debugging Message") ' use this to find method

Select Case args.MethodName

Case "Update"

Case Else

End Select

End Sub

End Module

[Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]
There's an often overlooked step ( I just forgot it, for instance)
On the blank button, the EpiBinding is set to MESControl.NotUsed You need to blank this out. Not part of the /NET code Just something to change in properties.

--- In vantage@yahoogroups.com, "Kevin Simon" <simstrak@...> wrote:
>
> It's been a while (8.03 days), but I had problems utilizing the blank
> buttons. However, I would just set the blank button to a size of (0, 0),
> then add my own button in its place with the same size and location. It
> accomplished the same thing as using a blank button.
>
>
>
> HTH,
>
> Kevin Simon
>
>
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of
> dgodfrey_amc
> Sent: Thursday, October 20, 2011 2:38 PM
> To: vantage@yahoogroups.com
> Subject: [Vantage] MES blank button
>
>
>
>
>
> Has anyone successfully utilized any of the blank button on the MES Main
> Menu? If so can you post the code. What I have is this and all it does is
> displays the text "DB" on the button but not enable it. I have also enabled
> the messages to display the AfterAdapter methodNames and they never show up.
>
> '//**************************************************
> '// Custom VB.NET code for MESMenu
> '// Created: 10/5/2011 4:25:03 PM
> '//**************************************************
> Imports System
> Imports System.Data
> Imports System.Diagnostics
> Imports System.Windows.Forms
> Imports System.ComponentModel
> Imports Microsoft.VisualBasic
> Imports Epicor.Mfg.UI
> Imports Epicor.Mfg.UI.FrameWork
> Imports Epicor.Mfg.UI.ExtendedProps
> Imports Epicor.Mfg.UI.FormFunctions
> Imports Epicor.Mfg.UI.Customization
> Imports Epicor.Mfg.UI.Adapters
> Imports Epicor.Mfg.UI.Searches
> Imports Epicor.Mfg.BO
>
> Module Script
>
> '// ** Wizard Insert Location - Do Not Remove 'Begin/End Wizard Added Module
> Level Variables' Comments! **
> '// Begin Wizard Added Module Level Variables **
>
> Private WithEvents oTrans_empAdapter As EpiBaseAdapter
> Private WithEvents oTrans_adapter As EpiBaseAdapter
> Private WithEvents oTrans_userAdapter As EpiBaseAdapter
> Private WithEvents oTrans_menuAdapter As EpiBaseAdapter
> '// End Wizard Added Module Level Variables **
>
> '// Add Custom Module Level Variables Here **
> Private bManagerLoggedIn AS Boolean = False
> Private WithEvents btnLaunchTracker As EpiButton
> Sub InitializeCustomCode()
> '// ** Wizard Insert Location - Do not delete 'Begin/End Custom Method
> Calls' lines **
> '// Begin Wizard Added Variable Initialization
> '// End Wizard Added Variable Initialization
> '// Begin Custom Method Calls
> '// End Custom Method Calls
> End Sub
> Private Sub MESMenu_Load(ByVal sender As object, ByVal args As EventArgs)
> Handles MESMenu.Load
> '//
> '// Add Event Handler Code
> '//
> 'MyMessageBox(ShowFormInformation(), True, MsgBoxStyle.OKOnly, "Debugging
> Message")
> btnLaunchTracker =
> CType(csm.GetNativeControlReference("185621db-3bc2-439a-b146-886972af8e00"),
> EpiButton)
> btnLaunchTracker.Enabled = True
> btnLaunchTracker.Text = "DB"
> btnLaunchTracker.ReadOnly = False
> End Sub
> Private Sub btnLaunchTracker_Click(ByVal Sender As Object, ByVal args As
> EventArgs ) Handles btnLaunchTracker.Click
> ProcessCaller.LaunchForm(MESMenu, "UDPRIDSP")
> End Sub
>
> Private Function MyMessageBox( ByVal Msg AS String, ByVal FYI AS
> Boolean,Optional ByVal Button As MsgBoxStyle = MsgBoxStyle.OKOnly, Optional
> ByVal Title As String = Nothing) As MsgBoxResult
> Dim results As MsgBoxResult
> If(FYI = True) Then
> If Not String.IsNullOrEmpty(Title) Then
> results = MsgBox(Msg, Button, Title)
> Else
> results = MsgBox(Msg, Button, "Advanced Motion controls Message")
> End If
> End If
> return results
> End Function
>
> Private Function ShowFormInformation() As String
> Dim msg AS String = ""
> msg = "WhoAmI = " & MESMenu.WhoAmI & Chr(13) & Chr(10) _
> & "EmployeeID = " & MESMenu.Session.EmployeeID & Chr(13) & Chr(10) _
> & "UserID = " & MESMenu.Session.UserID & Chr(13) & Chr(10) _
> & "bManagerLoggedIn = " & bManagerLoggedIn & Chr(13) & Chr(10) _
> & "WorkstationID = " & MESMenu.Session.WorkstationID & Chr(13) & Chr(10) _
> & "WorkstationDescription = " & MESMenu.Session.WorkstationDescription &
> Chr(13) & Chr(10)
> Return msg '
> End Function
>
> Private Sub oTrans_empAdapter_AfterAdapterMethod(ByVal sender As object,
> ByVal args As AfterAdapterMethodArgs) Handles
> oTrans_empAdapter.AfterAdapterMethod
> '// ** Argument Properties and Uses **
> '// args.MethodName
> '
> 'Add Event Handler Code
> '
> MyMessageBox("oTrans_empAdapter_AfterAdapterMethod::" & args.MethodName,
> true, MsgBoxStyle.OKOnly, "Debugging Message") ' use this to find method
> IF(args.MethodName = "GetRows") Then
> Dim myEmployeeID AS String = MESMenu.Session.EmployeeID
> Select myEmployeeID
> Case "0099"
> bManagerLoggedIn = True
> Case Else
> bManagerLoggedIn = False
> End Select
> End If
> Select Case args.MethodName
>
> Case "GetRows"
> 'IF(bManagerLoggedIn = True) Then
> ' btnLaunchTracker.Enabled = True
> ' btnLaunchTracker.Text = "DB"
> 'Else
> ' btnLaunchTracker.Enabled = False
> ' btnLaunchTracker.Text = ""
> 'End If
>
> Case Else
>
> End Select
>
> End Sub
>
>
> Private Sub oTrans_adapter_AfterAdapterMethod(ByVal sender As object, ByVal
> args As AfterAdapterMethodArgs) Handles oTrans_adapter.AfterAdapterMethod
> '// ** Argument Properties and Uses **
> '// args.MethodName
> '
> 'Add Event Handler Code
> '
> MyMessageBox("oTrans_adapter_AfterAdapterMethod::" & args.MethodName, true,
> MsgBoxStyle.OKOnly, "Debugging Message") ' use this to find method
>
> Select Case args.MethodName
>
> Case "Update"
>
> Case Else
>
> End Select
>
> End Sub
>
>
> Private Sub oTrans_userAdapter_AfterAdapterMethod(ByVal sender As object,
> ByVal args As AfterAdapterMethodArgs) Handles
> oTrans_userAdapter.AfterAdapterMethod
> '// ** Argument Properties and Uses **
> '// args.MethodName
> '
> 'Add Event Handler Code
> '
> MyMessageBox("oTrans_userAdapter_AfterAdapterMethod::" & args.MethodName,
> true, MsgBoxStyle.OKOnly, "Debugging Message") ' use this to find method
>
> Select Case args.MethodName
>
> Case "Update"
>
> Case Else
>
> End Select
>
> End Sub
>
>
> Private Sub oTrans_menuAdapter_AfterAdapterMethod(ByVal sender As object,
> ByVal args As AfterAdapterMethodArgs) Handles
> oTrans_menuAdapter.AfterAdapterMethod
> '// ** Argument Properties and Uses **
> '// args.MethodName
> '
> 'Add Event Handler Code
> '
> MyMessageBox("oTrans_menuAdapter_AfterAdapterMethod::" & args.MethodName,
> true, MsgBoxStyle.OKOnly, "Debugging Message") ' use this to find method
>
> Select Case args.MethodName
>
> Case "Update"
>
> Case Else
>
> End Select
>
> End Sub
>
>
> End Module
>
>
>
>
>
> [Non-text portions of this message have been removed]
>