Docking pane error on loading
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=6555
Printed Date: 31 January 2025 at 11:41am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: Docking pane error on loading
Posted By: dloring
Subject: Docking pane error on loading
Date Posted: 03 March 2007 at 5:05pm
Hi, I am new to this and I seem to be having a problem getting the docking pane set up. The code is below, but this always goes to the catch as soon as the code hits the paneA.Title with the error Object reference not set to an instance of an object. Does anyone have any idea what I am doing wrong?
Private arrPanes(1) As XtremeDockingPane.Pane
Private Sub FMain_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
Try
Dim paneA As XtremeDockingPane.Pane = DockingPanelManager.CreatePane(1, 200, 120, DockingDirection.DockBottomOf, Nothing)
paneA.Title = "Supplier Totals"
Dim paneB As XtremeDockingPane.Pane = DockingPanelManager.CreatePane(2, 200, 120, DockingDirection.DockRightOf, paneA)
paneB.Title = "Controls"
'DockingPanelManager.LoadState("DA Software", "GCOrders", "DPLayout")
Catch ex As Exception
MsgBox( "An error occured loading the Docking Panels: " & ex.Message, MsgBoxStyle.Information, gCST_AppTitle)
End Try
End Sub
Private Sub DockingPanelManager_AttachPaneEvent(ByVal sender As Object, ByVal e As AxXtremeDockingPane._DDockingPaneEvents_AttachPaneEvent) Handles DockingPanelManager.AttachPaneEvent
Dim nIndex As Integer = e.item.Id - 1
If arrPanes(nIndex) Is Nothing Then
Select Case nIndex
Case 0
arrPanes(nIndex) = New FPaneButtons
Case 1
arrPanes(nIndex) = New FPaneTotals
End Select
End If
e.item.Handle = arrPanes(nIndex).Handle
End Sub
|
Replies:
Posted By: Oleg
Date Posted: 04 March 2007 at 4:09am
Hi,
Do you have same message with ActiveX\DockingPane\VB.NET\DockingPane sample?
Please attach whole project to debug it
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: Oleg
Date Posted: 04 March 2007 at 4:11am
Ohh, seems problem in arrPanes(nIndex) line. You never get momory for arrPanes objects.
See our sample arrPanes in samples is array of child objects - not XtremeDockingPane.Pane
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: dloring
Date Posted: 06 March 2007 at 8:09am
Hi Oleg
I removbed the XtremeDockingPane.Pane from the declaration of arrPanes but I still get the same error message.
I have tried to make sure everything is as per the examples, but I can't get it to work.
Regards
David
|
Posted By: dloring
Date Posted: 06 March 2007 at 8:13am
Hi Oleg,
I have zipped the project in case you want to have a look at it. It's 785 KB. Can I attach it in the forum, or can I email it to you?
Regards
David
|
Posted By: dloring
Date Posted: 06 March 2007 at 8:22am
Hi Oleg,
If you need the SQL Server 2005 Express database it zips to 2 MB. Is this OK?
Regards
David
|
Posted By: Oleg
Date Posted: 06 March 2007 at 9:22am
Hi,
show me what you have in FMain_Load and DockingPanelManager_AttachPaneEvent now.
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: dloring
Date Posted: 06 March 2007 at 9:42am
Hi Oleg
Private Sub FMain_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
Try
Me.SeasonsTableAdapter.Fill(Me.GCBTallyDataSet.Seasons)
Me.BuyingTypesTableAdapter.Fill(Me.GCBTallyDataSet.BuyingTypes)
'Open the connection for the form
cnnData.Open()
Try
Dim paneA As XtremeDockingPane.Pane = DockingPanelManager.CreatePane(1, 200, 120, DockingDirection.DockBottomOf, Nothing)
paneA.Title = "Supplier Totals"
Dim paneB As XtremeDockingPane.Pane = DockingPanelManager.CreatePane(2, 200, 120, DockingDirection.DockRightOf, paneA)
paneB.Title = "Controls"
'DockingPanelManager.LoadState("DA Software", "GCOrders", "DPLayout")
Catch ex As Exception
MsgBox( "An error occured loading the Docking Panels: " & ex.Message, MsgBoxStyle.Information, gCST_AppTitle)
End Try
Catch ex As SqlClient.SqlException
MsgBox( "The system has thrown an exception when opening the connection to the database." & vbCrLf & vbCrLf & ex.Message _
& "[" & ex.ErrorCode & "]", MsgBoxStyle.Exclamation, gCST_AppTitle)
Me.Close()
End Try
End Sub
Private Sub DockingPanelManager_AttachPaneEvent(ByVal sender As Object, ByVal e As AxXtremeDockingPane._DDockingPaneEvents_AttachPaneEvent) Handles DockingPanelManager.AttachPaneEvent
Dim nIndex As Integer = e.item.Id - 1
If arrPanes(nIndex) Is Nothing Then
Select Case nIndex
Case 0
arrPanes(nIndex) = New FPaneButtons
Case 1
arrPanes(nIndex) = New FPaneTotals
End Select
End If
e.item.Handle = arrPanes(nIndex).Handle
End Sub
I also tried it with:
Dim paneA = DockingPanelManager.CreatePane(1, 200, 120, DockingDirection.DockBottomOf, Nothing)
That did not wrok either
|
Posted By: dloring
Date Posted: 06 March 2007 at 9:43am
Forgot to add:
Private arrPanes(1)
Changed the declaration
|
Posted By: Oleg
Date Posted: 07 March 2007 at 5:15am
try
Private arrPanes(2)
if will not help, attach whole project to debug.
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
Posted By: dloring
Date Posted: 09 March 2007 at 7:34pm
Hi Oleg,
How does one upload files?
David
|
Posted By: dloring
Date Posted: 09 March 2007 at 9:56pm
Hi Oleg
Immediately after passing through Dim paneA the 'Autos' look like this. Note the error!
Does this help?
- DockingPanelManager {AxXtremeDockingPane.AxDockingPane} AxXtremeDockingPane.AxDockingPane + AccessibilityObject {System.Windows.Forms.Control.ControlAccessibleObject} System.Windows.Forms.AccessibleObject AccessibleDefaultActionDescription Nothing String AccessibleDescription Nothing String AccessibleName Nothing String AccessibleRole Default {-1} System.Windows.Forms.AccessibleRole - ActivePane {"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."} XtremeDockingPane.Pane + Data {System.Collections.ListDictionaryInternal} System.Collections.IDictionary HelpLink Nothing String InnerException Nothing System.Exception Message "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." String Source "mscorlib" String StackTrace " at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData) at XtremeDockingPane._DDockingPane.get_ActivePane() at AxXtremeDockingPane.AxDockingPane.get_ActivePane()" String + TargetSite {System.Reflection.RuntimeMethodInfo} System.Reflection.MethodBase AllowDrop False Boolean Anchor 5 System.Windows.Forms.AnchorStyles + AutoScrollOffset {X = 0 Y = 0} System.Drawing.Point AutoSize False Boolean + BackColor "{Name=fffafdd2, ARGB=(255, 250, 253, 210)}" System.Drawing.Color BackgroundImage Nothing System.Drawing.Image BackgroundImageLayout Tile {1} System.Windows.Forms.ImageLayout + BindingContext {System.Windows.Forms.BindingContext} System.Windows.Forms.BindingContext Bottom 145 Integer + Bounds {X = 495 Y = 121 Width = 24 Height = 24} System.Drawing.Rectangle CanFocus False Boolean CanSelect False Boolean Capture False Boolean CausesValidation True Boolean CheckForIllegalCrossThreadCalls True Boolean + ClientRectangle {X = 0 Y = 0 Width = 24 Height = 24} System.Drawing.Rectangle + ClientSize {Width = 24 Height = 24} System.Drawing.Size CompanyName "AxXtremeDockingPane" String Container Nothing System.ComponentModel.IContainer + ContainingControl {GCOrders.FMain} System.Windows.Forms.ContainerControl ContainsFocus False Boolean ContextMenu Nothing System.Windows.Forms.ContextMenu ContextMenuStrip Nothing System.Windows.Forms.ContextMenuStrip + Controls {System.Windows.Forms.Control.ControlCollection} System.Windows.Forms.Control.ControlCollection Created False Boolean + Cursor {System.Windows.Forms.Cursor} System.Windows.Forms.Cursor + DataBindings {System.Windows.Forms.ControlBindingsCollection} System.Windows.Forms.ControlBindingsCollection + DefaultBackColor "{Name=Control, ARGB=(255, 236, 233, 216)}" System.Drawing.Color + DefaultFont {Name = "Microsoft Sans Serif" Size=8.25} System.Drawing.Font + DefaultForeColor "{Name=ControlText, ARGB=(255, 0, 0, 0)}" System.Drawing.Color + DisplayRectangle {X = 0 Y = 0 Width = 24 Height = 24} System.Drawing.Rectangle Disposing False Boolean Dock None {0} System.Windows.Forms.DockStyle EditMode False Boolean Enabled True Boolean Focused False Boolean + Font {Name = "Arial" Size=9.75} System.Drawing.Font + ForeColor "{Name=ControlText, ARGB=(255, 0, 0, 0)}" System.Drawing.Color Handle 395318 System.IntPtr HasAboutBox True Boolean HasChildren False Boolean Height 24 Integer Icons Nothing XtremeDockingPane.ImageManagerIcons ImageList Nothing Object ImeMode NoControl {0} System.Windows.Forms.ImeMode InvokeRequired False Boolean IsAccessible False Boolean IsDisposed False Boolean IsHandleCreated True Boolean IsMirrored False Boolean + LayoutEngine {System.Windows.Forms.Layout.DefaultLayout} System.Windows.Forms.Layout.LayoutEngine Left 495 Integer + Location {X = 495 Y = 121} System.Drawing.Point + Margin {System.Windows.Forms.Padding} System.Windows.Forms.Padding + MaximumSize {Width = 0 Height = 0} System.Drawing.Size + MinimumSize {Width = 0 Height = 0} System.Drawing.Size ModifierKeys None {0} System.Windows.Forms.Keys MouseButtons None {0} System.Windows.Forms.MouseButtons + MousePosition {X = 1121 Y = 534} System.Drawing.Point Name "DockingPanelManager" String + OcxState {System.Windows.Forms.AxHost.State} System.Windows.Forms.AxHost.State + Options {System.__ComObject} XtremeDockingPane.DockingPaneOptions + Padding {System.Windows.Forms.Padding} System.Windows.Forms.Padding + PaintManager {"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."} XtremeDockingPane.DockingPanePaintManager + PanelPaintManager {"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."} XtremeDockingPane.TabPaintManager Panes In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user. XtremeDockingPane.Pane PanesCount 0 Integer + Parent {System.Windows.Forms.Panel} System.Windows.Forms.Control + PreferredSize {Width = 24 Height = 24} System.Drawing.Size ProductName "AxXtremeDockingPane" String ProductVersion "10.2.0.0" String RecreatingHandle False Boolean Region Nothing System.Drawing.Region Right 519 Integer RightToLeft No {0} System.Windows.Forms.RightToLeft ScaleMode xtpScaleAuto {0} XtremeDockingPane.XTPScaleMode Site Nothing System.ComponentModel.ISite + Size {Width = 24 Height = 24} System.Drawing.Size TabIndex 24 Integer + TabPaintManager {"Attempted to read or write protected memory. This is often an indication that other memory is corrupt."} XtremeDockingPane.TabPaintManager TabStop True Boolean Tag Nothing Object Text "" String ToolTipContext Nothing XtremeDockingPane.ToolTipContext Top 121 Integer + TopLevelControl {GCOrders.FMDIMain} System.Windows.Forms.Control UseWaitCursor False Boolean Visible False Boolean VisualTheme ThemeOffice {1} XtremeDockingPane.VisualTheme Width 24 Integer + WindowTarget {System.Windows.Forms.Control.ControlNativeWindow} System.Windows.Forms.IWindowTarget + cnnData {System.Data.SqlClient.SqlConnection} System.Data.SqlClient.SqlConnection paneA Nothing XtremeDockingPane.Pane paneB Nothing XtremeDockingPane.Pane
|
Posted By: Oleg
Date Posted: 12 March 2007 at 2:14am
Hi,
Send project to mailto:support@codejock.com - support@codejock.com
------------- Oleg, Support Team CODEJOCK SOFTWARE SOLUTIONS
|
|