I have some code I am testing that will go to the Line tab if conditions are met. I am testing the opening of the tab with a button click currently. When I click on the button and have a breakpoint on the click in VS and go through the click with F11 or F5 the form goes to the tab. If I'm debugging with no breakpoint or have debugging off it does not work. Could anyone put this code on their side and see what they get? It goes in the Opportunity/Quote Entry form, and is supposed to open the Line tab. Not sure why it would work while debugging but otherwise won't. Running 9.05.606A.
Thanks,
Ted
Private Sub epiButtonC1_Click(ByVal sender As Object, ByVal args As System.EventArgs)
' ** Place Event Handling Code Here **
'pnlMyPanel.Activate()
pnlMyPanel.Activate()
End Sub
Private pnlMyPanel As New Infragistics.Win.UltraWinDock.DockableControlPane()
'Create a Sub to loop through the panels and assign your variable to the panel you want:
Private Sub FindMyPanel(Optional ByRef ctls As System.Windows.Forms.Control.ControlCollection = Nothing)
' Enumerate the forms controls looking for the Epicor dock manager
If ctls Is Nothing Then ctls = oTrans.EpiBaseForm.Controls
For Each ctl As Control In ctls
If ctl.HasChildren Then FindMyPanel(ctl.Controls)
If TypeOf(ctl) Is Infragistics.Win.UltraWinDock.WindowDockingArea Then
Dim objDockManager As Object = ctl.GetType ().InvokeMember("DockManager", BindingFlags.GetProperty Or BindingFlags.NonPublic Or BindingFlags.Instance Or BindingFlags.IgnoreCase, Nothing, ctl, Nothing)
' Once found get a handle to the Infragistics dock manager using relection
Dim udm As Infragistics.Win.UltraWinDock.UltraDockManager = CType (objDockManager, Infragistics.Win.UltraWinDock.UltraDockManager)
For Each p As Infragistics.Win.UltraWinDock.DockableControlPane In udm.ControlPanes
If (p.Key.ToString = "quoteLineDetail") Then
pnlMyPanel = p
End If
'MessageBox.Show(p.ToString())
Next
End If
Next
End Sub
Private Sub QuoteForm_Load(ByVal sender As Object, ByVal args As EventArgs)
' Add Event Handler Code
FindMyPanel()
End Sub
Thanks,
Ted
Private Sub epiButtonC1_Click(ByVal sender As Object, ByVal args As System.EventArgs)
' ** Place Event Handling Code Here **
'pnlMyPanel.Activate()
pnlMyPanel.Activate()
End Sub
Private pnlMyPanel As New Infragistics.Win.UltraWinDock.DockableControlPane()
'Create a Sub to loop through the panels and assign your variable to the panel you want:
Private Sub FindMyPanel(Optional ByRef ctls As System.Windows.Forms.Control.ControlCollection = Nothing)
' Enumerate the forms controls looking for the Epicor dock manager
If ctls Is Nothing Then ctls = oTrans.EpiBaseForm.Controls
For Each ctl As Control In ctls
If ctl.HasChildren Then FindMyPanel(ctl.Controls)
If TypeOf(ctl) Is Infragistics.Win.UltraWinDock.WindowDockingArea Then
Dim objDockManager As Object = ctl.GetType ().InvokeMember("DockManager", BindingFlags.GetProperty Or BindingFlags.NonPublic Or BindingFlags.Instance Or BindingFlags.IgnoreCase, Nothing, ctl, Nothing)
' Once found get a handle to the Infragistics dock manager using relection
Dim udm As Infragistics.Win.UltraWinDock.UltraDockManager = CType (objDockManager, Infragistics.Win.UltraWinDock.UltraDockManager)
For Each p As Infragistics.Win.UltraWinDock.DockableControlPane In udm.ControlPanes
If (p.Key.ToString = "quoteLineDetail") Then
pnlMyPanel = p
End If
'MessageBox.Show(p.ToString())
Next
End If
Next
End Sub
Private Sub QuoteForm_Load(ByVal sender As Object, ByVal args As EventArgs)
' Add Event Handler Code
FindMyPanel()
End Sub