Epicor Stop ripping me off ;)

To disable all you would need to customize each form, unless you had the SDK and then you could change the base classes that these inherit from.



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of phoenix
Sent: 30 June 2008 18:56
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Re: Epicor Stop ripping me off ;)



Just to make 100% sure. As far as I understood this is not a global
resolution. If I want to disable this feature I need to do it for each
application separately. Is it right?

Grzegorz Szczepański

Dnia Fri, 27 Jun 2008 11:01:44 -0400
Aaron Hoyt <aaron.hoyt@... <mailto:aaron.hoyt%40vantageplastics.com> > napisał(a):

> Thank you so much! This works for anyone who is wondering.
> Aaron Hoyt
> Vantage Plastics
>
> bw2868bond wrote:
> >
> > A very kind soul heard my plea and has sent me code (that I have
> > been asked to share) that enumerates the controls on a form, checks
> > if the control is a docking pane, and then disables the undocking
> > ability. I learned much figuring out what I did on my own - and I
> > learn more looking at elegant code examples :o)
> >
> > THANK YOU very kind soul!!
> >
> > (watch out for wrapping that the forum introduces into long lines of
> > text)
> >
> > Sub InitializeCustomCode()
> >
> > '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> > Added Variable Intialization' lines **
> > '// Begin Wizard Added Variable Intialization
> >
> > '// End Wizard Added Variable Intialization
> > '// Begin Custom Method Calls
> >
> > DisableTabFloating()
> >
> > '// End Custom Method Calls
> > End Sub
> >
> > ' Disable the undocking behaviour of a forms tab controls
> > ' Requires: Imports System.Reflection
> > Private Sub DisableTabFloating(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 DisableTabFloating(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)
> >
> > ' Loop through all the panels disabling the undocking
> > behaviour
> > For Each p As
> > Infragistics.Win.UltraWinDock.DockableControlPane In
> > udm.ControlPanes p.Settings().AllowDragging() =
> > Infragistics.Win.DefaultableBoolean.False
> > p.Settings().AllowFloating() =
> > Infragistics.Win.DefaultableBoolean.False
> >
> > p.Settings().DoubleClickAction() =
> > Infragistics.Win.UltraWinDock.PaneDoubleClickAction.None
> > Next
> >
> > End If
> > Next
> >
> > End Sub
> >
> > > > --- In vantage@yahoogroups .com, Aaron Hoyt <aaron.hoyt@ ...>
> > wrote:
> > > >
> > > > >
> > > >
> > > > > Good morning Vantage users,
> > > >
> > > > >
> > > >
> > > > > Ok the creative subject was calculated to get maximum response
> > to
> > > a
> > > >
> > > > > problem that I can't be the only one that is having.
> > > >
> > > > >
> > > >
> > > > > How can we PREVENT tabs from being ripped off and set in a new
> > > >
> > > > location?
> > > >
> > > > >
> > > >
> > > > > I have removed personalization, so the users (MES is my
> > > > > biggest
> > > >
> > > > > frustration) so they will get back their original screen when
> > > they
> > > >
> > > > open
> > > >
> > > > > the form next, but I want to prevent the rather frustrating
> > > > > and
> > > >
> > > > time
> > > >
> > > > > expensive task of dealing with users that have a heavy first
> > > finger
> > > >
> > > > and
> > > >
> > > > > tend to drag the tabs off. I have learned that a tab that is
> > not
> > > >
> > > > > relocated but just removed from a sheet can be reattached
> > > > > where
> > > it
> > > >
> > > > > should be by double clicking on the title bar of the floating
> > > tab,
> > > >
> > > > but
> > > >
> > > > > there has to be some way to prevent this altogether doesn't
> > there?
> > > >
> > > > >
> > > >
> > > > > Can anyone offer some assistance? My call into support has not
> > > >
> > > > received
> > > >
> > > > > an answer as of yet.
> > > >
> > > > >
> > > >
> > > > > Thanks,
> > > >
> > > > > Aaron Hoyt
> > > >
> > > > > Vantage Plastics
> > > >
> > > > >
> > > >
> > >
> >
> >
>
>
> [Non-text portions of this message have been removed]





[Non-text portions of this message have been removed]
Good morning Vantage users,

Ok the creative subject was calculated to get maximum response to a
problem that I can't be the only one that is having.

How can we PREVENT tabs from being ripped off and set in a new location?

I have removed personalization, so the users (MES is my biggest
frustration) so they will get back their original screen when they open
the form next, but I want to prevent the rather frustrating and time
expensive task of dealing with users that have a heavy first finger and
tend to drag the tabs off. I have learned that a tab that is not
relocated but just removed from a sheet can be reattached where it
should be by double clicking on the title bar of the floating tab, but
there has to be some way to prevent this altogether doesn't there?

Can anyone offer some assistance? My call into support has not received
an answer as of yet.

Thanks,
Aaron Hoyt
Vantage Plastics
This is an annoying "feature" of Vantage.



I will be interested in any answer you receive but can add that when it
happens you can also select from the actions tab to "reset layouts to
base" - this also works if you have not just moved but also relocated
the tab.



Prevention would however be better than cure



Regards,



David Watt



Mob. +44 (0) 7809 586 797

Tel. +44 (0) 1793 647 140





________________________________

From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of Aaron Hoyt
Sent: 26 June 2008 15:10
To: Vantage Discussion List; Vantage Yahoo Groups
Subject: [Vantage] Epicor Stop ripping me off ;)



Good morning Vantage users,

Ok the creative subject was calculated to get maximum response to a
problem that I can't be the only one that is having.

How can we PREVENT tabs from being ripped off and set in a new location?

I have removed personalization, so the users (MES is my biggest
frustration) so they will get back their original screen when they open
the form next, but I want to prevent the rather frustrating and time
expensive task of dealing with users that have a heavy first finger and
tend to drag the tabs off. I have learned that a tab that is not
relocated but just removed from a sheet can be reattached where it
should be by double clicking on the title bar of the floating tab, but
there has to be some way to prevent this altogether doesn't there?

Can anyone offer some assistance? My call into support has not received
an answer as of yet.

Thanks,
Aaron Hoyt
Vantage Plastics



*******************************************************************************************************************************************************************************************************************************************************************************
This email is intended for the addressee only and may contain information that is privileged and confidential. If you are not the intended recipient, you must not copy, distribute or take any
action in reliance on it. If this email has been sent to you in error, please notify us immediately by telephone.
This has been transmitted by -

Hilo-PSS Group
Murdock Road
Dorcan Industrial Estate
Swindon

SN3 5HY

Company Registration No: 01028915.

The views within this email are those of the author and not
necessarily those of Planned Storage Systems Ltd.

** This email has been scanned for viruses, vandals and malicious content **
************************************************************************************************************************************************************************************************



[Non-text portions of this message have been removed]
I've been told by anyone and everyone asked at Epicor that this 'feature' can't be disabled.

We have much bigger fish to fry right now so I've never dug into myself to verify that (as Epicor tech support rarely provides the entire story).

You might want to explore whether or not this can be controlled via a SetCustomProperties VB routine during form load. Even if the tab properties documentation doesn't indicate support for locking or disabling the tab 'pins', you might want to check technet.com to see if this is a basic MS screen object that has controllable properties.

Rob Brown

--- On Thu, 6/26/08, Aaron Hoyt <aaron.hoyt@...> wrote:
From: Aaron Hoyt <aaron.hoyt@...>
Subject: [Vantage] Epicor Stop ripping me off ;)
To: "Vantage Discussion List" <VANTAGE@...>, "Vantage Yahoo Groups" <vantage@yahoogroups.com>
Date: Thursday, June 26, 2008, 10:10 AM











Good morning Vantage users,



Ok the creative subject was calculated to get maximum response to a

problem that I can't be the only one that is having.



How can we PREVENT tabs from being ripped off and set in a new location?



I have removed personalization, so the users (MES is my biggest

frustration) so they will get back their original screen when they open

the form next, but I want to prevent the rather frustrating and time

expensive task of dealing with users that have a heavy first finger and

tend to drag the tabs off. I have learned that a tab that is not

relocated but just removed from a sheet can be reattached where it

should be by double clicking on the title bar of the floating tab, but

there has to be some way to prevent this altogether doesn't there?



Can anyone offer some assistance? My call into support has not received

an answer as of yet.



Thanks,

Aaron Hoyt

Vantage Plastics
This was done for Customer Entry Form
The concept applied to a single tab can either be repeated for all
tabs or perhaps some kind soul will take this further and make it
applicable to any panel in a form and post for the group.

This Toggles the Detail Panel back to it's docked location if it is
undocked....

'//**************************************************
'// Custom VB.NET code for CustomerEntryForm
'// Created: 6/26/2008 11:36:32 AM
'//**************************************************
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 **

'// End Wizard Added Module Level Variables **


'// Add Custom Module Level Variables Here **
Private WithEvents pnlDetail As
Epicor.Mfg.UI.App.CustomerEntry.DetailPanel
Private WithEvents tabDetail As
Infragistics.Win.UltraWinDock.UltraDockManager

Sub InitializeCustomCode()


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

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

'// End Custom Method Calls
End Sub



Sub DestroyCustomCode()


'// ** Wizard Insert Location - Do not
delete 'Begin/End Wizard Added Object Disposal' lines **
'// Begin Wizard Added Object Disposal

'// End Wizard Added Object Disposal
'// Begin Custom Code Disposal

'// End Custom Code Disposal
End Sub

Sub tabDetail_AfterDockChange(ByVal sender As Object, ByVal e As
Infragistics.Win.UltraWinDock.PaneEventArgs) Handles
tabDetail.AfterDockChange
'Dim unPinned As Boolean = tabDetail.ActivePane().Pinned
'MessageBox.Show("Dock Changed " + unPinned.ToString())
tabDetail.ActivePane().ToggleDockState()
End Sub


Private Sub CustomerEntryForm_Load(ByVal sender As object,
ByVal args As EventArgs) Handles CustomerEntryForm.Load
'//
'// Add Event Handler Code
'//
pnlDetail = CType(csm.GetNativeControlReference("8fd5b1fa-
db9e-423c-baca-4656696c859b"),
Epicor.Mfg.UI.App.CustomerEntry.DetailPanel)
tabDetail = pnlDetail.TabDockManager()
End Sub


End Module


--- In vantage@yahoogroups.com, Aaron Hoyt <aaron.hoyt@...> wrote:
>
> Good morning Vantage users,
>
> Ok the creative subject was calculated to get maximum response to a
> problem that I can't be the only one that is having.
>
> How can we PREVENT tabs from being ripped off and set in a new
location?
>
> I have removed personalization, so the users (MES is my biggest
> frustration) so they will get back their original screen when they
open
> the form next, but I want to prevent the rather frustrating and
time
> expensive task of dealing with users that have a heavy first finger
and
> tend to drag the tabs off. I have learned that a tab that is not
> relocated but just removed from a sheet can be reattached where it
> should be by double clicking on the title bar of the floating tab,
but
> there has to be some way to prevent this altogether doesn't there?
>
> Can anyone offer some assistance? My call into support has not
received
> an answer as of yet.
>
> Thanks,
> Aaron Hoyt
> Vantage Plastics
>
Thanks! That's a keeper!

Rob Brown

--- On Thu, 6/26/08, bw2868bond <bwalker@...> wrote:
From: bw2868bond <bwalker@...>
Subject: [Vantage] Re: Epicor Stop ripping me off ;)
To: vantage@yahoogroups.com
Date: Thursday, June 26, 2008, 2:11 PM











This was done for Customer Entry Form

The concept applied to a single tab can either be repeated for all

tabs or perhaps some kind soul will take this further and make it

applicable to any panel in a form and post for the group.



This Toggles the Detail Panel back to it's docked location if it is

undocked....



'//********* ********* ********* ********* ********* *****

'// Custom VB.NET code for CustomerEntryForm

'// Created: 6/26/:36:32 AM

'//********* ********* ********* ********* ********* *****

Imports System

Imports System.Data

Imports System.Diagnostics

Imports System.Windows. Forms

Imports System.ComponentMod el

Imports Microsoft.VisualBas ic

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 **



'// End Wizard Added Module Level Variables **



'// Add Custom Module Level Variables Here **

Private WithEvents pnlDetail As

Epicor.Mfg.UI. App.CustomerEntr y.DetailPanel

Private WithEvents tabDetail As

Infragistics. Win.UltraWinDock .UltraDockManage r



Sub InitializeCustomCod e()



'// ** Wizard Insert Location - Do not

delete 'Begin/End Wizard Added Variable Intialization' lines **

'// Begin Wizard Added Variable Intialization



'// End Wizard Added Variable Intialization

'// Begin Custom Method Calls



'// End Custom Method Calls

End Sub



Sub DestroyCustomCode( )



'// ** Wizard Insert Location - Do not

delete 'Begin/End Wizard Added Object Disposal' lines **

'// Begin Wizard Added Object Disposal



'// End Wizard Added Object Disposal

'// Begin Custom Code Disposal



'// End Custom Code Disposal

End Sub



Sub tabDetail_AfterDock Change(ByVal sender As Object, ByVal e As

Infragistics. Win.UltraWinDock .PaneEventArgs) Handles

tabDetail.AfterDock Change

'Dim unPinned As Boolean = tabDetail.ActivePan e().Pinned

'MessageBox. Show("Dock Changed " + unPinned.ToString( ))

tabDetail.ActivePan e().ToggleDockSt ate()

End Sub



Private Sub CustomerEntryForm_ Load(ByVal sender As object,

ByVal args As EventArgs) Handles CustomerEntryForm. Load

'//

'// Add Event Handler Code

'//

pnlDetail = CType(csm.GetNative ControlReference ("8fd5b1fa-

db9e-423c-baca- 4656696c859b" ),

Epicor.Mfg.UI. App.CustomerEntr y.DetailPanel)

tabDetail = pnlDetail.TabDockMa nager()

End Sub



End Module



--- In vantage@yahoogroups .com, Aaron Hoyt <aaron.hoyt@ ...> wrote:

>

> Good morning Vantage users,

>

> Ok the creative subject was calculated to get maximum response to a

> problem that I can't be the only one that is having.

>

> How can we PREVENT tabs from being ripped off and set in a new

location?

>

> I have removed personalization, so the users (MES is my biggest

> frustration) so they will get back their original screen when they

open

> the form next, but I want to prevent the rather frustrating and

time

> expensive task of dealing with users that have a heavy first finger

and

> tend to drag the tabs off. I have learned that a tab that is not

> relocated but just removed from a sheet can be reattached where it

> should be by double clicking on the title bar of the floating tab,

but

> there has to be some way to prevent this altogether doesn't there?

>

> Can anyone offer some assistance? My call into support has not

received

> an answer as of yet.

>

> Thanks,

> Aaron Hoyt

> Vantage Plastics

>
Better Yet,

Use these settings to disable dragging, floating, or toggle by double
click

Sub tabDetail_PaneActivate(ByVal sender As Object, ByVal e As
Infragistics.Win.UltraWinDock.ControlPaneEventArgs) Handles
tabDetail.PaneActivate
tabDetail.ActivePane().Settings().AllowDragging() = 2
tabDetail.ActivePane().Settings().AllowFloating() = 2
tabDetail.ActivePane().Settings().DoubleClickAction() = 1
End Sub

Then you don't need the After Dock Change Event

Still have to do this for every panel/tab you want to 'freeze'


--- In vantage@yahoogroups.com, Robert Brown <robertb_versa@...>
wrote:
>
> Thanks! That's a keeper!
>
> Rob Brown
>
> --- On Thu, 6/26/08, bw2868bond <bwalker@...> wrote:
> From: bw2868bond <bwalker@...>
> Subject: [Vantage] Re: Epicor Stop ripping me off ;)
> To: vantage@yahoogroups.com
> Date: Thursday, June 26, 2008, 2:11 PM
>
>
>
>
>
>
>
>
>
>
>
> This was done for Customer Entry Form
>
> The concept applied to a single tab can either be repeated for all
>
> tabs or perhaps some kind soul will take this further and make it
>
> applicable to any panel in a form and post for the group.
>
>
>
> This Toggles the Detail Panel back to it's docked location if it is
>
> undocked....
>
>
>
> '//********* ********* ********* ********* ********* *****
>
> '// Custom VB.NET code for CustomerEntryForm
>
> '// Created: 6/26/:36:32 AM
>
> '//********* ********* ********* ********* ********* *****
>
> Imports System
>
> Imports System.Data
>
> Imports System.Diagnostics
>
> Imports System.Windows. Forms
>
> Imports System.ComponentMod el
>
> Imports Microsoft.VisualBas ic
>
> 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 **
>
>
>
> '// End Wizard Added Module Level Variables **
>
>
>
> '// Add Custom Module Level Variables Here **
>
> Private WithEvents pnlDetail As
>
> Epicor.Mfg.UI. App.CustomerEntr y.DetailPanel
>
> Private WithEvents tabDetail As
>
> Infragistics. Win.UltraWinDock .UltraDockManage r
>
>
>
> Sub InitializeCustomCod e()
>
>
>
> '// ** Wizard Insert Location - Do not
>
> delete 'Begin/End Wizard Added Variable Intialization' lines **
>
> '// Begin Wizard Added Variable Intialization
>
>
>
> '// End Wizard Added Variable Intialization
>
> '// Begin Custom Method Calls
>
>
>
> '// End Custom Method Calls
>
> End Sub
>
>
>
> Sub DestroyCustomCode( )
>
>
>
> '// ** Wizard Insert Location - Do not
>
> delete 'Begin/End Wizard Added Object Disposal' lines **
>
> '// Begin Wizard Added Object Disposal
>
>
>
> '// End Wizard Added Object Disposal
>
> '// Begin Custom Code Disposal
>
>
>
> '// End Custom Code Disposal
>
> End Sub
>
>
>
> Sub tabDetail_AfterDock Change(ByVal sender As Object, ByVal e As
>
> Infragistics. Win.UltraWinDock .PaneEventArgs) Handles
>
> tabDetail.AfterDock Change
>
> 'Dim unPinned As Boolean = tabDetail.ActivePan e().Pinned
>
> 'MessageBox. Show("Dock Changed " + unPinned.ToString( ))
>
> tabDetail.ActivePan e().ToggleDockSt ate()
>
> End Sub
>
>
>
> Private Sub CustomerEntryForm_ Load(ByVal sender As object,
>
> ByVal args As EventArgs) Handles CustomerEntryForm. Load
>
> '//
>
> '// Add Event Handler Code
>
> '//
>
> pnlDetail = CType(csm.GetNative ControlReference ("8fd5b1fa-
>
> db9e-423c-baca- 4656696c859b" ),
>
> Epicor.Mfg.UI. App.CustomerEntr y.DetailPanel)
>
> tabDetail = pnlDetail.TabDockMa nager()
>
> End Sub
>
>
>
> End Module
>
>
>
> --- In vantage@yahoogroups .com, Aaron Hoyt <aaron.hoyt@ ...> wrote:
>
> >
>
> > Good morning Vantage users,
>
> >
>
> > Ok the creative subject was calculated to get maximum response to
a
>
> > problem that I can't be the only one that is having.
>
> >
>
> > How can we PREVENT tabs from being ripped off and set in a new
>
> location?
>
> >
>
> > I have removed personalization, so the users (MES is my biggest
>
> > frustration) so they will get back their original screen when
they
>
> open
>
> > the form next, but I want to prevent the rather frustrating and
>
> time
>
> > expensive task of dealing with users that have a heavy first
finger
>
> and
>
> > tend to drag the tabs off. I have learned that a tab that is not
>
> > relocated but just removed from a sheet can be reattached where
it
>
> > should be by double clicking on the title bar of the floating
tab,
>
> but
>
> > there has to be some way to prevent this altogether doesn't there?
>
> >
>
> > Can anyone offer some assistance? My call into support has not
>
> received
>
> > an answer as of yet.
>
> >
>
> > Thanks,
>
> > Aaron Hoyt
>
> > Vantage Plastics
>
> >
>
A very kind soul heard my plea and has sent me code (that I have been
asked to share) that enumerates the controls on a form, checks if the
control is a docking pane, and then disables the undocking ability. I
learned much figuring out what I did on my own - and I learn more
looking at elegant code examples :o)

THANK YOU very kind soul!!

(watch out for wrapping that the forum introduces into long lines of
text)

Sub InitializeCustomCode()


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

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

DisableTabFloating()

'// End Custom Method Calls
End Sub

' Disable the undocking behaviour of a forms tab controls
' Requires: Imports System.Reflection
Private Sub DisableTabFloating(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 DisableTabFloating(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)

' Loop through all the panels disabling the undocking
behaviour
For Each p As
Infragistics.Win.UltraWinDock.DockableControlPane In udm.ControlPanes
p.Settings().AllowDragging() =
Infragistics.Win.DefaultableBoolean.False
p.Settings().AllowFloating() =
Infragistics.Win.DefaultableBoolean.False

p.Settings().DoubleClickAction() =
Infragistics.Win.UltraWinDock.PaneDoubleClickAction.None
Next

End If
Next

End Sub



> > --- In vantage@yahoogroups .com, Aaron Hoyt <aaron.hoyt@ ...>
wrote:
> >
> > >
> >
> > > Good morning Vantage users,
> >
> > >
> >
> > > Ok the creative subject was calculated to get maximum response
to
> a
> >
> > > problem that I can't be the only one that is having.
> >
> > >
> >
> > > How can we PREVENT tabs from being ripped off and set in a new
> >
> > location?
> >
> > >
> >
> > > I have removed personalization, so the users (MES is my biggest
> >
> > > frustration) so they will get back their original screen when
> they
> >
> > open
> >
> > > the form next, but I want to prevent the rather frustrating and
> >
> > time
> >
> > > expensive task of dealing with users that have a heavy first
> finger
> >
> > and
> >
> > > tend to drag the tabs off. I have learned that a tab that is
not
> >
> > > relocated but just removed from a sheet can be reattached where
> it
> >
> > > should be by double clicking on the title bar of the floating
> tab,
> >
> > but
> >
> > > there has to be some way to prevent this altogether doesn't
there?
> >
> > >
> >
> > > Can anyone offer some assistance? My call into support has not
> >
> > received
> >
> > > an answer as of yet.
> >
> > >
> >
> > > Thanks,
> >
> > > Aaron Hoyt
> >
> > > Vantage Plastics
> >
> > >
> >
>
This is Great!
Now just one more question, where do I put this?
Is this a form open event? Sorry for the rather simple question, but
4GL I understand, this DotNet stuff is new to me.
Thanks so much,
Aaron Hoyt
Vantage Plastics

bw2868bond wrote:
>
> A very kind soul heard my plea and has sent me code (that I have been
> asked to share) that enumerates the controls on a form, checks if the
> control is a docking pane, and then disables the undocking ability. I
> learned much figuring out what I did on my own - and I learn more
> looking at elegant code examples :o)
>
> THANK YOU very kind soul!!
>
> (watch out for wrapping that the forum introduces into long lines of
> text)
>
> Sub InitializeCustomCode()
>
> '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> Added Variable Intialization' lines **
> '// Begin Wizard Added Variable Intialization
>
> '// End Wizard Added Variable Intialization
> '// Begin Custom Method Calls
>
> DisableTabFloating()
>
> '// End Custom Method Calls
> End Sub
>
> ' Disable the undocking behaviour of a forms tab controls
> ' Requires: Imports System.Reflection
> Private Sub DisableTabFloating(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 DisableTabFloating(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)
>
> ' Loop through all the panels disabling the undocking
> behaviour
> For Each p As
> Infragistics.Win.UltraWinDock.DockableControlPane In udm.ControlPanes
> p.Settings().AllowDragging() =
> Infragistics.Win.DefaultableBoolean.False
> p.Settings().AllowFloating() =
> Infragistics.Win.DefaultableBoolean.False
>
> p.Settings().DoubleClickAction() =
> Infragistics.Win.UltraWinDock.PaneDoubleClickAction.None
> Next
>
> End If
> Next
>
> End Sub
>
> > > --- In vantage@yahoogroups .com, Aaron Hoyt <aaron.hoyt@ ...>
> wrote:
> > >
> > > >
> > >
> > > > Good morning Vantage users,
> > >
> > > >
> > >
> > > > Ok the creative subject was calculated to get maximum response
> to
> > a
> > >
> > > > problem that I can't be the only one that is having.
> > >
> > > >
> > >
> > > > How can we PREVENT tabs from being ripped off and set in a new
> > >
> > > location?
> > >
> > > >
> > >
> > > > I have removed personalization, so the users (MES is my biggest
> > >
> > > > frustration) so they will get back their original screen when
> > they
> > >
> > > open
> > >
> > > > the form next, but I want to prevent the rather frustrating and
> > >
> > > time
> > >
> > > > expensive task of dealing with users that have a heavy first
> > finger
> > >
> > > and
> > >
> > > > tend to drag the tabs off. I have learned that a tab that is
> not
> > >
> > > > relocated but just removed from a sheet can be reattached where
> > it
> > >
> > > > should be by double clicking on the title bar of the floating
> > tab,
> > >
> > > but
> > >
> > > > there has to be some way to prevent this altogether doesn't
> there?
> > >
> > > >
> > >
> > > > Can anyone offer some assistance? My call into support has not
> > >
> > > received
> > >
> > > > an answer as of yet.
> > >
> > > >
> > >
> > > > Thanks,
> > >
> > > > Aaron Hoyt
> > >
> > > > Vantage Plastics
> > >
> > > >
> > >
> >
>
>


[Non-text portions of this message have been removed]
Thank you so much! This works for anyone who is wondering.
Aaron Hoyt
Vantage Plastics

bw2868bond wrote:
>
> A very kind soul heard my plea and has sent me code (that I have been
> asked to share) that enumerates the controls on a form, checks if the
> control is a docking pane, and then disables the undocking ability. I
> learned much figuring out what I did on my own - and I learn more
> looking at elegant code examples :o)
>
> THANK YOU very kind soul!!
>
> (watch out for wrapping that the forum introduces into long lines of
> text)
>
> Sub InitializeCustomCode()
>
> '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> Added Variable Intialization' lines **
> '// Begin Wizard Added Variable Intialization
>
> '// End Wizard Added Variable Intialization
> '// Begin Custom Method Calls
>
> DisableTabFloating()
>
> '// End Custom Method Calls
> End Sub
>
> ' Disable the undocking behaviour of a forms tab controls
> ' Requires: Imports System.Reflection
> Private Sub DisableTabFloating(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 DisableTabFloating(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)
>
> ' Loop through all the panels disabling the undocking
> behaviour
> For Each p As
> Infragistics.Win.UltraWinDock.DockableControlPane In udm.ControlPanes
> p.Settings().AllowDragging() =
> Infragistics.Win.DefaultableBoolean.False
> p.Settings().AllowFloating() =
> Infragistics.Win.DefaultableBoolean.False
>
> p.Settings().DoubleClickAction() =
> Infragistics.Win.UltraWinDock.PaneDoubleClickAction.None
> Next
>
> End If
> Next
>
> End Sub
>
> > > --- In vantage@yahoogroups .com, Aaron Hoyt <aaron.hoyt@ ...>
> wrote:
> > >
> > > >
> > >
> > > > Good morning Vantage users,
> > >
> > > >
> > >
> > > > Ok the creative subject was calculated to get maximum response
> to
> > a
> > >
> > > > problem that I can't be the only one that is having.
> > >
> > > >
> > >
> > > > How can we PREVENT tabs from being ripped off and set in a new
> > >
> > > location?
> > >
> > > >
> > >
> > > > I have removed personalization, so the users (MES is my biggest
> > >
> > > > frustration) so they will get back their original screen when
> > they
> > >
> > > open
> > >
> > > > the form next, but I want to prevent the rather frustrating and
> > >
> > > time
> > >
> > > > expensive task of dealing with users that have a heavy first
> > finger
> > >
> > > and
> > >
> > > > tend to drag the tabs off. I have learned that a tab that is
> not
> > >
> > > > relocated but just removed from a sheet can be reattached where
> > it
> > >
> > > > should be by double clicking on the title bar of the floating
> > tab,
> > >
> > > but
> > >
> > > > there has to be some way to prevent this altogether doesn't
> there?
> > >
> > > >
> > >
> > > > Can anyone offer some assistance? My call into support has not
> > >
> > > received
> > >
> > > > an answer as of yet.
> > >
> > > >
> > >
> > > > Thanks,
> > >
> > > > Aaron Hoyt
> > >
> > > > Vantage Plastics
> > >
> > > >
> > >
> >
>
>


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

Where did you end up placing the code in order to get it to work.

As our number of users grows, we could develop a similar problem and
I'd like to save this thread for future reference.

Thanks.

Lynn




--- In vantage@yahoogroups.com, Aaron Hoyt <aaron.hoyt@...> wrote:
>
> This is Great!
> Now just one more question, where do I put this?
> Is this a form open event? Sorry for the rather simple question,
but
> 4GL I understand, this DotNet stuff is new to me.
> Thanks so much,
> Aaron Hoyt
> Vantage Plastics
>
> bw2868bond wrote:
> >
> > A very kind soul heard my plea and has sent me code (that I have
been
> > asked to share) that enumerates the controls on a form, checks if
the
> > control is a docking pane, and then disables the undocking
ability. I
> > learned much figuring out what I did on my own - and I learn more
> > looking at elegant code examples :o)
> >
> > THANK YOU very kind soul!!
> >
> > (watch out for wrapping that the forum introduces into long lines
of
> > text)
> >
> > Sub InitializeCustomCode()
> >
> > '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> > Added Variable Intialization' lines **
> > '// Begin Wizard Added Variable Intialization
> >
> > '// End Wizard Added Variable Intialization
> > '// Begin Custom Method Calls
> >
> > DisableTabFloating()
> >
> > '// End Custom Method Calls
> > End Sub
> >
> > ' Disable the undocking behaviour of a forms tab controls
> > ' Requires: Imports System.Reflection
> > Private Sub DisableTabFloating(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 DisableTabFloating(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)
> >
> > ' Loop through all the panels disabling the undocking
> > behaviour
> > For Each p As
> > Infragistics.Win.UltraWinDock.DockableControlPane In
udm.ControlPanes
> > p.Settings().AllowDragging() =
> > Infragistics.Win.DefaultableBoolean.False
> > p.Settings().AllowFloating() =
> > Infragistics.Win.DefaultableBoolean.False
> >
> > p.Settings().DoubleClickAction() =
> > Infragistics.Win.UltraWinDock.PaneDoubleClickAction.None
> > Next
> >
> > End If
> > Next
> >
> > End Sub
> >
> > > > --- In vantage@yahoogroups .com, Aaron Hoyt <aaron.hoyt@ ...>
> > wrote:
> > > >
> > > > >
> > > >
> > > > > Good morning Vantage users,
> > > >
> > > > >
> > > >
> > > > > Ok the creative subject was calculated to get maximum
response
> > to
> > > a
> > > >
> > > > > problem that I can't be the only one that is having.
> > > >
> > > > >
> > > >
> > > > > How can we PREVENT tabs from being ripped off and set in a
new
> > > >
> > > > location?
> > > >
> > > > >
> > > >
> > > > > I have removed personalization, so the users (MES is my
biggest
> > > >
> > > > > frustration) so they will get back their original screen
when
> > > they
> > > >
> > > > open
> > > >
> > > > > the form next, but I want to prevent the rather frustrating
and
> > > >
> > > > time
> > > >
> > > > > expensive task of dealing with users that have a heavy first
> > > finger
> > > >
> > > > and
> > > >
> > > > > tend to drag the tabs off. I have learned that a tab that is
> > not
> > > >
> > > > > relocated but just removed from a sheet can be reattached
where
> > > it
> > > >
> > > > > should be by double clicking on the title bar of the
floating
> > > tab,
> > > >
> > > > but
> > > >
> > > > > there has to be some way to prevent this altogether doesn't
> > there?
> > > >
> > > > >
> > > >
> > > > > Can anyone offer some assistance? My call into support has
not
> > > >
> > > > received
> > > >
> > > > > an answer as of yet.
> > > >
> > > > >
> > > >
> > > > > Thanks,
> > > >
> > > > > Aaron Hoyt
> > > >
> > > > > Vantage Plastics
> > > >
> > > > >
> > > >
> > >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
One Exception I have found - Does not work on panels added by sheet
wizard, nor have I found a way to get those panels to not undock :-(

bw

--- In vantage@yahoogroups.com, Aaron Hoyt <aaron.hoyt@...> wrote:
>
> Thank you so much! This works for anyone who is wondering.
> Aaron Hoyt
> Vantage Plastics
>
> bw2868bond wrote:
> >
> > A very kind soul heard my plea and has sent me code (that I have
been
> > asked to share) that enumerates the controls on a form, checks if
the
> > control is a docking pane, and then disables the undocking
ability. I
> > learned much figuring out what I did on my own - and I learn more
> > looking at elegant code examples :o)
> >
> > THANK YOU very kind soul!!
> >
> > (watch out for wrapping that the forum introduces into long lines
of
> > text)
> >
> > Sub InitializeCustomCode()
> >
> > '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> > Added Variable Intialization' lines **
> > '// Begin Wizard Added Variable Intialization
> >
> > '// End Wizard Added Variable Intialization
> > '// Begin Custom Method Calls
> >
> > DisableTabFloating()
> >
> > '// End Custom Method Calls
> > End Sub
> >
> > ' Disable the undocking behaviour of a forms tab controls
> > ' Requires: Imports System.Reflection
> > Private Sub DisableTabFloating(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 DisableTabFloating(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)
> >
> > ' Loop through all the panels disabling the undocking
> > behaviour
> > For Each p As
> > Infragistics.Win.UltraWinDock.DockableControlPane In
udm.ControlPanes
> > p.Settings().AllowDragging() =
> > Infragistics.Win.DefaultableBoolean.False
> > p.Settings().AllowFloating() =
> > Infragistics.Win.DefaultableBoolean.False
> >
> > p.Settings().DoubleClickAction() =
> > Infragistics.Win.UltraWinDock.PaneDoubleClickAction.None
> > Next
> >
> > End If
> > Next
> >
> > End Sub
> >
> > > > --- In vantage@yahoogroups .com, Aaron Hoyt <aaron.hoyt@ ...>
> > wrote:
> > > >
> > > > >
> > > >
> > > > > Good morning Vantage users,
> > > >
> > > > >
> > > >
> > > > > Ok the creative subject was calculated to get maximum
response
> > to
> > > a
> > > >
> > > > > problem that I can't be the only one that is having.
> > > >
> > > > >
> > > >
> > > > > How can we PREVENT tabs from being ripped off and set in a
new
> > > >
> > > > location?
> > > >
> > > > >
> > > >
> > > > > I have removed personalization, so the users (MES is my
biggest
> > > >
> > > > > frustration) so they will get back their original screen
when
> > > they
> > > >
> > > > open
> > > >
> > > > > the form next, but I want to prevent the rather frustrating
and
> > > >
> > > > time
> > > >
> > > > > expensive task of dealing with users that have a heavy first
> > > finger
> > > >
> > > > and
> > > >
> > > > > tend to drag the tabs off. I have learned that a tab that is
> > not
> > > >
> > > > > relocated but just removed from a sheet can be reattached
where
> > > it
> > > >
> > > > > should be by double clicking on the title bar of the
floating
> > > tab,
> > > >
> > > > but
> > > >
> > > > > there has to be some way to prevent this altogether doesn't
> > there?
> > > >
> > > > >
> > > >
> > > > > Can anyone offer some assistance? My call into support has
not
> > > >
> > > > received
> > > >
> > > > > an answer as of yet.
> > > >
> > > > >
> > > >
> > > > > Thanks,
> > > >
> > > > > Aaron Hoyt
> > > >
> > > > > Vantage Plastics
> > > >
> > > > >
> > > >
> > >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>
Use the Form Load event instead



From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf
Of bw2868bond
Sent: 27 June 2008 17:37
To: vantage@yahoogroups.com
Subject: [Vantage] Re: Epicor Stop ripping me off ;)



One Exception I have found - Does not work on panels added by sheet
wizard, nor have I found a way to get those panels to not undock :-(

bw

--- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
Aaron Hoyt <aaron.hoyt@...> wrote:
>
> Thank you so much! This works for anyone who is wondering.
> Aaron Hoyt
> Vantage Plastics
>
> bw2868bond wrote:
> >
> > A very kind soul heard my plea and has sent me code (that I have
been
> > asked to share) that enumerates the controls on a form, checks if
the
> > control is a docking pane, and then disables the undocking
ability. I
> > learned much figuring out what I did on my own - and I learn more
> > looking at elegant code examples :o)
> >
> > THANK YOU very kind soul!!
> >
> > (watch out for wrapping that the forum introduces into long lines
of
> > text)
> >
> > Sub InitializeCustomCode()
> >
> > '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> > Added Variable Intialization' lines **
> > '// Begin Wizard Added Variable Intialization
> >
> > '// End Wizard Added Variable Intialization
> > '// Begin Custom Method Calls
> >
> > DisableTabFloating()
> >
> > '// End Custom Method Calls
> > End Sub
> >
> > ' Disable the undocking behaviour of a forms tab controls
> > ' Requires: Imports System.Reflection
> > Private Sub DisableTabFloating(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 DisableTabFloating(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)
> >
> > ' Loop through all the panels disabling the undocking
> > behaviour
> > For Each p As
> > Infragistics.Win.UltraWinDock.DockableControlPane In
udm.ControlPanes
> > p.Settings().AllowDragging() =
> > Infragistics.Win.DefaultableBoolean.False
> > p.Settings().AllowFloating() =
> > Infragistics.Win.DefaultableBoolean.False
> >
> > p.Settings().DoubleClickAction() =
> > Infragistics.Win.UltraWinDock.PaneDoubleClickAction.None
> > Next
> >
> > End If
> > Next
> >
> > End Sub
> >
> > > > --- In vantage@yahoogroups .com, Aaron Hoyt <aaron.hoyt@ ...>
> > wrote:
> > > >
> > > > >
> > > >
> > > > > Good morning Vantage users,
> > > >
> > > > >
> > > >
> > > > > Ok the creative subject was calculated to get maximum
response
> > to
> > > a
> > > >
> > > > > problem that I can't be the only one that is having.
> > > >
> > > > >
> > > >
> > > > > How can we PREVENT tabs from being ripped off and set in a
new
> > > >
> > > > location?
> > > >
> > > > >
> > > >
> > > > > I have removed personalization, so the users (MES is my
biggest
> > > >
> > > > > frustration) so they will get back their original screen
when
> > > they
> > > >
> > > > open
> > > >
> > > > > the form next, but I want to prevent the rather frustrating
and
> > > >
> > > > time
> > > >
> > > > > expensive task of dealing with users that have a heavy first
> > > finger
> > > >
> > > > and
> > > >
> > > > > tend to drag the tabs off. I have learned that a tab that is
> > not
> > > >
> > > > > relocated but just removed from a sheet can be reattached
where
> > > it
> > > >
> > > > > should be by double clicking on the title bar of the
floating
> > > tab,
> > > >
> > > > but
> > > >
> > > > > there has to be some way to prevent this altogether doesn't
> > there?
> > > >
> > > > >
> > > >
> > > > > Can anyone offer some assistance? My call into support has
not
> > > >
> > > > received
> > > >
> > > > > an answer as of yet.
> > > >
> > > > >
> > > >
> > > > > Thanks,
> > > >
> > > > > Aaron Hoyt
> > > >
> > > > > Vantage Plastics
> > > >
> > > > >
> > > >
> > >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>





[Non-text portions of this message have been removed]
Works like a charm - like you knew it would :o)

Thanks!!

--- In vantage@yahoogroups.com, "Stephen Edginton" <stephene@...>
wrote:
>
> Use the Form Load event instead
>
>
>
> From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On
Behalf
> Of bw2868bond
> Sent: 27 June 2008 17:37
> To: vantage@yahoogroups.com
> Subject: [Vantage] Re: Epicor Stop ripping me off ;)
>
>
>
> One Exception I have found - Does not work on panels added by sheet
> wizard, nor have I found a way to get those panels to not undock :-(
>
> bw
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com> ,
> Aaron Hoyt <aaron.hoyt@> wrote:
> >
> > Thank you so much! This works for anyone who is wondering.
> > Aaron Hoyt
> > Vantage Plastics
> >
> > bw2868bond wrote:
> > >
> > > A very kind soul heard my plea and has sent me code (that I
have
> been
> > > asked to share) that enumerates the controls on a form, checks
if
> the
> > > control is a docking pane, and then disables the undocking
> ability. I
> > > learned much figuring out what I did on my own - and I learn
more
> > > looking at elegant code examples :o)
> > >
> > > THANK YOU very kind soul!!
> > >
> > > (watch out for wrapping that the forum introduces into long
lines
> of
> > > text)
> > >
> > > Sub InitializeCustomCode()
> > >
> > > '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> > > Added Variable Intialization' lines **
> > > '// Begin Wizard Added Variable Intialization
> > >
> > > '// End Wizard Added Variable Intialization
> > > '// Begin Custom Method Calls
> > >
> > > DisableTabFloating()
> > >
> > > '// End Custom Method Calls
> > > End Sub
> > >
> > > ' Disable the undocking behaviour of a forms tab controls
> > > ' Requires: Imports System.Reflection
> > > Private Sub DisableTabFloating(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 DisableTabFloating(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)
> > >
> > > ' Loop through all the panels disabling the undocking
> > > behaviour
> > > For Each p As
> > > Infragistics.Win.UltraWinDock.DockableControlPane In
> udm.ControlPanes
> > > p.Settings().AllowDragging() =
> > > Infragistics.Win.DefaultableBoolean.False
> > > p.Settings().AllowFloating() =
> > > Infragistics.Win.DefaultableBoolean.False
> > >
> > > p.Settings().DoubleClickAction() =
> > > Infragistics.Win.UltraWinDock.PaneDoubleClickAction.None
> > > Next
> > >
> > > End If
> > > Next
> > >
> > > End Sub
> > >
> > > > > --- In vantage@yahoogroups .com, Aaron Hoyt
<aaron.hoyt@ ...>
> > > wrote:
> > > > >
> > > > > >
> > > > >
> > > > > > Good morning Vantage users,
> > > > >
> > > > > >
> > > > >
> > > > > > Ok the creative subject was calculated to get maximum
> response
> > > to
> > > > a
> > > > >
> > > > > > problem that I can't be the only one that is having.
> > > > >
> > > > > >
> > > > >
> > > > > > How can we PREVENT tabs from being ripped off and set in
a
> new
> > > > >
> > > > > location?
> > > > >
> > > > > >
> > > > >
> > > > > > I have removed personalization, so the users (MES is my
> biggest
> > > > >
> > > > > > frustration) so they will get back their original screen
> when
> > > > they
> > > > >
> > > > > open
> > > > >
> > > > > > the form next, but I want to prevent the rather
frustrating
> and
> > > > >
> > > > > time
> > > > >
> > > > > > expensive task of dealing with users that have a heavy
first
> > > > finger
> > > > >
> > > > > and
> > > > >
> > > > > > tend to drag the tabs off. I have learned that a tab that
is
> > > not
> > > > >
> > > > > > relocated but just removed from a sheet can be reattached
> where
> > > > it
> > > > >
> > > > > > should be by double clicking on the title bar of the
> floating
> > > > tab,
> > > > >
> > > > > but
> > > > >
> > > > > > there has to be some way to prevent this altogether
doesn't
> > > there?
> > > > >
> > > > > >
> > > > >
> > > > > > Can anyone offer some assistance? My call into support
has
> not
> > > > >
> > > > > received
> > > > >
> > > > > > an answer as of yet.
> > > > >
> > > > > >
> > > > >
> > > > > > Thanks,
> > > > >
> > > > > > Aaron Hoyt
> > > > >
> > > > > > Vantage Plastics
> > > > >
> > > > > >
> > > > >
> > > >
> > >
> > >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
I was given the answer off line, but basically, you customize the form.
Then in the script editor you add...
Imports System.Reflection
in with the rest of the imports at the top.
Then you place the...
DisableTabFloating()
where it shows in the existing code.
The rest goes at the bottom, above the existing...
End Module

Lynn wrote:
>
> Dear Aaron:
>
> Where did you end up placing the code in order to get it to work.
>
> As our number of users grows, we could develop a similar problem and
> I'd like to save this thread for future reference.
>
> Thanks.
>
> Lynn
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>,
> Aaron Hoyt <aaron.hoyt@...> wrote:
> >
> > This is Great!
> > Now just one more question, where do I put this?
> > Is this a form open event? Sorry for the rather simple question,
> but
> > 4GL I understand, this DotNet stuff is new to me.
> > Thanks so much,
> > Aaron Hoyt
> > Vantage Plastics
> >
> > bw2868bond wrote:
> > >
> > > A very kind soul heard my plea and has sent me code (that I have
> been
> > > asked to share) that enumerates the controls on a form, checks if
> the
> > > control is a docking pane, and then disables the undocking
> ability. I
> > > learned much figuring out what I did on my own - and I learn more
> > > looking at elegant code examples :o)
> > >
> > > THANK YOU very kind soul!!
> > >
> > > (watch out for wrapping that the forum introduces into long lines
> of
> > > text)
> > >
> > > Sub InitializeCustomCode()
> > >
> > > '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> > > Added Variable Intialization' lines **
> > > '// Begin Wizard Added Variable Intialization
> > >
> > > '// End Wizard Added Variable Intialization
> > > '// Begin Custom Method Calls
> > >
> > > DisableTabFloating()
> > >
> > > '// End Custom Method Calls
> > > End Sub
> > >
> > > ' Disable the undocking behaviour of a forms tab controls
> > > ' Requires: Imports System.Reflection
> > > Private Sub DisableTabFloating(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 DisableTabFloating(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)
> > >
> > > ' Loop through all the panels disabling the undocking
> > > behaviour
> > > For Each p As
> > > Infragistics.Win.UltraWinDock.DockableControlPane In
> udm.ControlPanes
> > > p.Settings().AllowDragging() =
> > > Infragistics.Win.DefaultableBoolean.False
> > > p.Settings().AllowFloating() =
> > > Infragistics.Win.DefaultableBoolean.False
> > >
> > > p.Settings().DoubleClickAction() =
> > > Infragistics.Win.UltraWinDock.PaneDoubleClickAction.None
> > > Next
> > >
> > > End If
> > > Next
> > >
> > > End Sub
> > >
> > > > > --- In vantage@yahoogroups .com, Aaron Hoyt <aaron.hoyt@ ...>
> > > wrote:
> > > > >
> > > > > >
> > > > >
> > > > > > Good morning Vantage users,
> > > > >
> > > > > >
> > > > >
> > > > > > Ok the creative subject was calculated to get maximum
> response
> > > to
> > > > a
> > > > >
> > > > > > problem that I can't be the only one that is having.
> > > > >
> > > > > >
> > > > >
> > > > > > How can we PREVENT tabs from being ripped off and set in a
> new
> > > > >
> > > > > location?
> > > > >
> > > > > >
> > > > >
> > > > > > I have removed personalization, so the users (MES is my
> biggest
> > > > >
> > > > > > frustration) so they will get back their original screen
> when
> > > > they
> > > > >
> > > > > open
> > > > >
> > > > > > the form next, but I want to prevent the rather frustrating
> and
> > > > >
> > > > > time
> > > > >
> > > > > > expensive task of dealing with users that have a heavy first
> > > > finger
> > > > >
> > > > > and
> > > > >
> > > > > > tend to drag the tabs off. I have learned that a tab that is
> > > not
> > > > >
> > > > > > relocated but just removed from a sheet can be reattached
> where
> > > > it
> > > > >
> > > > > > should be by double clicking on the title bar of the
> floating
> > > > tab,
> > > > >
> > > > > but
> > > > >
> > > > > > there has to be some way to prevent this altogether doesn't
> > > there?
> > > > >
> > > > > >
> > > > >
> > > > > > Can anyone offer some assistance? My call into support has
> not
> > > > >
> > > > > received
> > > > >
> > > > > > an answer as of yet.
> > > > >
> > > > > >
> > > > >
> > > > > > Thanks,
> > > > >
> > > > > > Aaron Hoyt
> > > > >
> > > > > > Vantage Plastics
> > > > >
> > > > > >
> > > > >
> > > >
> > >
> > >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>


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


-----Original Message-----
From: Aaron Hoyt [mailto:aaron.hoyt@...]
Sent: Friday, June 27, 2008 1:22 PM
To: vantage@yahoogroups.com
Subject: Re: [Vantage] Re: Epicor Stop ripping me off ;)

I was given the answer off line, but basically, you customize the form.
Then in the script editor you add...
Imports System.Reflection
in with the rest of the imports at the top.
Then you place the...
DisableTabFloating()
where it shows in the existing code.
The rest goes at the bottom, above the existing...
End Module

Lynn wrote:
>
> Dear Aaron:
>
> Where did you end up placing the code in order to get it to work.
>
> As our number of users grows, we could develop a similar problem and
> I'd like to save this thread for future reference.
>
> Thanks.
>
> Lynn
>
> --- In vantage@yahoogroups.com <mailto:vantage%40yahoogroups.com>
<mailto:vantage%40yahoogroups.com>,
> Aaron Hoyt <aaron.hoyt@...> wrote:
> >
> > This is Great!
> > Now just one more question, where do I put this?
> > Is this a form open event? Sorry for the rather simple question,
> but
> > 4GL I understand, this DotNet stuff is new to me.
> > Thanks so much,
> > Aaron Hoyt
> > Vantage Plastics
> >
> > bw2868bond wrote:
> > >
> > > A very kind soul heard my plea and has sent me code (that I have
> been
> > > asked to share) that enumerates the controls on a form, checks if
> the
> > > control is a docking pane, and then disables the undocking
> ability. I
> > > learned much figuring out what I did on my own - and I learn more
> > > looking at elegant code examples :o)
> > >
> > > THANK YOU very kind soul!!
> > >
> > > (watch out for wrapping that the forum introduces into long lines
> of
> > > text)
> > >
> > > Sub InitializeCustomCode()
> > >
> > > '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> > > Added Variable Intialization' lines **
> > > '// Begin Wizard Added Variable Intialization
> > >
> > > '// End Wizard Added Variable Intialization
> > > '// Begin Custom Method Calls
> > >
> > > DisableTabFloating()
> > >
> > > '// End Custom Method Calls
> > > End Sub
> > >
> > > ' Disable the undocking behaviour of a forms tab controls
> > > ' Requires: Imports System.Reflection
> > > Private Sub DisableTabFloating(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 DisableTabFloating(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)
> > >
> > > ' Loop through all the panels disabling the undocking
> > > behaviour
> > > For Each p As
> > > Infragistics.Win.UltraWinDock.DockableControlPane In
> udm.ControlPanes
> > > p.Settings().AllowDragging() =
> > > Infragistics.Win.DefaultableBoolean.False
> > > p.Settings().AllowFloating() =
> > > Infragistics.Win.DefaultableBoolean.False
> > >
> > > p.Settings().DoubleClickAction() =
> > > Infragistics.Win.UltraWinDock.PaneDoubleClickAction.None
> > > Next
> > >
> > > End If
> > > Next
> > >
> > > End Sub
> > >
> > > > > --- In vantage@yahoogroups .com, Aaron Hoyt <aaron.hoyt@ ...>
> > > wrote:
> > > > >
> > > > > >
> > > > >
> > > > > > Good morning Vantage users,
> > > > >
> > > > > >
> > > > >
> > > > > > Ok the creative subject was calculated to get maximum
> response
> > > to
> > > > a
> > > > >
> > > > > > problem that I can't be the only one that is having.
> > > > >
> > > > > >
> > > > >
> > > > > > How can we PREVENT tabs from being ripped off and set in a
> new
> > > > >
> > > > > location?
> > > > >
> > > > > >
> > > > >
> > > > > > I have removed personalization, so the users (MES is my
> biggest
> > > > >
> > > > > > frustration) so they will get back their original screen
> when
> > > > they
> > > > >
> > > > > open
> > > > >
> > > > > > the form next, but I want to prevent the rather frustrating
> and
> > > > >
> > > > > time
> > > > >
> > > > > > expensive task of dealing with users that have a heavy first
> > > > finger
> > > > >
> > > > > and
> > > > >
> > > > > > tend to drag the tabs off. I have learned that a tab that is
> > > not
> > > > >
> > > > > > relocated but just removed from a sheet can be reattached
> where
> > > > it
> > > > >
> > > > > > should be by double clicking on the title bar of the
> floating
> > > > tab,
> > > > >
> > > > > but
> > > > >
> > > > > > there has to be some way to prevent this altogether doesn't
> > > there?
> > > > >
> > > > > >
> > > > >
> > > > > > Can anyone offer some assistance? My call into support has
> not
> > > > >
> > > > > received
> > > > >
> > > > > > an answer as of yet.
> > > > >
> > > > > >
> > > > >
> > > > > > Thanks,
> > > > >
> > > > > > Aaron Hoyt
> > > > >
> > > > > > Vantage Plastics
> > > > >
> > > > > >
> > > > >
> > > >
> > >
> > >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
>

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



[Non-text portions of this message have been removed]
Just to make 100% sure. As far as I understood this is not a global
resolution. If I want to disable this feature I need to do it for each
application separately. Is it right?

Grzegorz Szczepański

Dnia Fri, 27 Jun 2008 11:01:44 -0400
Aaron Hoyt <aaron.hoyt@...> napisał(a):

> Thank you so much! This works for anyone who is wondering.
> Aaron Hoyt
> Vantage Plastics
>
> bw2868bond wrote:
> >
> > A very kind soul heard my plea and has sent me code (that I have
> > been asked to share) that enumerates the controls on a form, checks
> > if the control is a docking pane, and then disables the undocking
> > ability. I learned much figuring out what I did on my own - and I
> > learn more looking at elegant code examples :o)
> >
> > THANK YOU very kind soul!!
> >
> > (watch out for wrapping that the forum introduces into long lines of
> > text)
> >
> > Sub InitializeCustomCode()
> >
> > '// ** Wizard Insert Location - Do not delete 'Begin/End Wizard
> > Added Variable Intialization' lines **
> > '// Begin Wizard Added Variable Intialization
> >
> > '// End Wizard Added Variable Intialization
> > '// Begin Custom Method Calls
> >
> > DisableTabFloating()
> >
> > '// End Custom Method Calls
> > End Sub
> >
> > ' Disable the undocking behaviour of a forms tab controls
> > ' Requires: Imports System.Reflection
> > Private Sub DisableTabFloating(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 DisableTabFloating(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)
> >
> > ' Loop through all the panels disabling the undocking
> > behaviour
> > For Each p As
> > Infragistics.Win.UltraWinDock.DockableControlPane In
> > udm.ControlPanes p.Settings().AllowDragging() =
> > Infragistics.Win.DefaultableBoolean.False
> > p.Settings().AllowFloating() =
> > Infragistics.Win.DefaultableBoolean.False
> >
> > p.Settings().DoubleClickAction() =
> > Infragistics.Win.UltraWinDock.PaneDoubleClickAction.None
> > Next
> >
> > End If
> > Next
> >
> > End Sub
> >
> > > > --- In vantage@yahoogroups .com, Aaron Hoyt <aaron.hoyt@ ...>
> > wrote:
> > > >
> > > > >
> > > >
> > > > > Good morning Vantage users,
> > > >
> > > > >
> > > >
> > > > > Ok the creative subject was calculated to get maximum response
> > to
> > > a
> > > >
> > > > > problem that I can't be the only one that is having.
> > > >
> > > > >
> > > >
> > > > > How can we PREVENT tabs from being ripped off and set in a new
> > > >
> > > > location?
> > > >
> > > > >
> > > >
> > > > > I have removed personalization, so the users (MES is my
> > > > > biggest
> > > >
> > > > > frustration) so they will get back their original screen when
> > > they
> > > >
> > > > open
> > > >
> > > > > the form next, but I want to prevent the rather frustrating
> > > > > and
> > > >
> > > > time
> > > >
> > > > > expensive task of dealing with users that have a heavy first
> > > finger
> > > >
> > > > and
> > > >
> > > > > tend to drag the tabs off. I have learned that a tab that is
> > not
> > > >
> > > > > relocated but just removed from a sheet can be reattached
> > > > > where
> > > it
> > > >
> > > > > should be by double clicking on the title bar of the floating
> > > tab,
> > > >
> > > > but
> > > >
> > > > > there has to be some way to prevent this altogether doesn't
> > there?
> > > >
> > > > >
> > > >
> > > > > Can anyone offer some assistance? My call into support has not
> > > >
> > > > received
> > > >
> > > > > an answer as of yet.
> > > >
> > > > >
> > > >
> > > > > Thanks,
> > > >
> > > > > Aaron Hoyt
> > > >
> > > > > Vantage Plastics
> > > >
> > > > >
> > > >
> > >
> >
> >
>
>
> [Non-text portions of this message have been removed]
>