This is a migrated thread and some comments may be shown as answers.

trying to open new window form

5 Answers 167 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Monika
Top achievements
Rank 1
Monika asked on 28 Mar 2008, 09:34 PM
I'm workin on a windows application and using dock panal. I have button and images under dock panel and firing button_click, images_click events. It opens the new window form. In windows-Vista, the functinaolity is running as I want. But when I installed the application in windows-XP, the events don't fire. Application hangs up. Any body has any idea?

5 Answers, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 31 Mar 2008, 08:23 AM
Hi Monika,

We have not found any issues related to events of child controls hosted in a DockPanel object. If you continue to experience it, please send me a simple project to reproduce it locally. It will allow me to address any potential issue faster.

Thank you in advance.

Sincerely yours,
Julian Benkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Monika
Top achievements
Rank 1
answered on 02 Apr 2008, 07:14 PM

Julian,
I have a groupboxs in my application and docking manager is in one of the groupbox say groupbox1. I set the groupbox1.visible to false. And in code I set it's to true. Whenever I changed the visible property of groupbox, any events of button in dock panel doesn't fire. Application hangs up. Here is a test application...
Test.vb

Imports

Telerik

Public

Class TestForm

Public Sub New()

InitializeComponent()

End Sub

Private Sub TestForm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Me.GroupBoxProductDetail.Visible = True

End Sub

 

Private Sub rbtnColorOptions_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbtnColorOptions.Click

MessageBox.Show(

"Hello")

End Sub

 

End

Class


Test.designer.vb

<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _

Partial

Class TestForm

Inherits System.Windows.Forms.Form

'Form overrides dispose to clean up the component list.

<System.Diagnostics.DebuggerNonUserCode()> _

Protected Overrides Sub Dispose(ByVal disposing As Boolean)

Try

If disposing AndAlso components IsNot Nothing Then

components.Dispose()

End If

Finally

MyBase.Dispose(disposing)

End Try

End Sub

'Required by the Windows Form Designer

Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer

'It can be modified using the Windows Form Designer.

'Do not modify it using the code editor.

<System.Diagnostics.DebuggerStepThrough()> _

Private Sub InitializeComponent()

Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(TestForm))

Me.GroupBoxProductDetail = New System.Windows.Forms.GroupBox

Me.DockingManager1 = New Telerik.WinControls.Docking.DockingManager

Me.DockPanel3 = New Telerik.WinControls.Docking.DockPanel

Me.rbtnColorOptions = New Telerik.WinControls.UI.RadButton

Me.DockPanel4 = New Telerik.WinControls.Docking.DockPanel

Me.GroupBoxProductDetail.SuspendLayout()

CType(Me.DockingManager1, System.ComponentModel.ISupportInitialize).BeginInit()

Me.DockingManager1.PrimarySiteComponent.SuspendLayout()

Me.DockingManager1.SuspendLayout()

Me.DockPanel3.SuspendLayout()

CType(Me.rbtnColorOptions, System.ComponentModel.ISupportInitialize).BeginInit()

Me.SuspendLayout()

'

'GroupBoxProductDetail

'

Me.GroupBoxProductDetail.Controls.Add(Me.DockingManager1)

Me.GroupBoxProductDetail.Location = New System.Drawing.Point(12, 12)

Me.GroupBoxProductDetail.Name = "GroupBoxProductDetail"

Me.GroupBoxProductDetail.Size = New System.Drawing.Size(818, 445)

Me.GroupBoxProductDetail.TabIndex = 3

Me.GroupBoxProductDetail.TabStop = False

Me.GroupBoxProductDetail.Visible = False

'

'DockingManager1

'

Me.DockingManager1.ActiveDocument = Nothing

Me.DockingManager1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None

Me.DockingManager1.BorderStyle = System.Windows.Forms.BorderStyle.None

Me.DockingManager1.LayoutTree = resources.GetString("DockingManager1.LayoutTree")

Me.DockingManager1.Location = New System.Drawing.Point(3, 16)

Me.DockingManager1.Name = "DockingManager1"

'

'DockingManager1.PrimarySite

'

Me.DockingManager1.PrimarySiteComponent.ActiveDocument = Nothing

Me.DockingManager1.PrimarySiteComponent.Controls.Add(Me.DockPanel4)

Me.DockingManager1.PrimarySiteComponent.Controls.Add(Me.DockPanel3)

Me.DockingManager1.PrimarySiteComponent.Location = New System.Drawing.Point(0, 0)

Me.DockingManager1.PrimarySiteComponent.Name = "PrimarySite"

Me.DockingManager1.PrimarySiteComponent.PresenterMinSize = 25

Me.DockingManager1.PrimarySiteComponent.TabIndex = 0

Me.DockingManager1.Size = New System.Drawing.Size(812, 415)

Me.DockingManager1.SizeWeight = 0.5

Me.DockingManager1.TabIndex = 0

Me.DockingManager1.Text = "DockingManager2"

Me.DockingManager1.ThemeName = "Office2007Silver"

'

'DockPanel3

'

Me.DockPanel3.AutoScroll = True

Me.DockPanel3.BackColor = System.Drawing.SystemColors.Control

Me.DockPanel3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None

Me.DockPanel3.CaptionVisible = False

Me.DockPanel3.CloseButtonVisible = False

Me.DockPanel3.Controls.Add(Me.rbtnColorOptions)

Me.DockPanel3.Description = Nothing

Me.DockPanel3.DockState = Telerik.WinControls.Docking.DockState.Docked

Me.DockPanel3.DropDownButtonVisible = False

Me.DockPanel3.HideButtonVisible = False

Me.DockPanel3.ID = New System.Guid("4fa493ef-0341-4246-b818-badb90a26be8")

Me.DockPanel3.Image = Nothing

Me.DockPanel3.Location = New System.Drawing.Point(1, 1)

Me.DockPanel3.Name = "DockPanel3"

Me.DockPanel3.PreferredDockSize = New System.Drawing.Size(100, 200)

Me.DockPanel3.PreferredFloatSize = New System.Drawing.Size(150, 300)

Me.DockPanel3.Size = New System.Drawing.Size(688, 413)

Me.DockPanel3.TabIndex = 0

Me.DockPanel3.TabStripVisible = False

Me.DockPanel3.Text = "DockPanel3"

'

'rbtnColorOptions

'

Me.rbtnColorOptions.DisplayStyle = Telerik.WinControls.DisplayStyle.ImageAndText

Me.rbtnColorOptions.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))

Me.rbtnColorOptions.ImageAlignment = System.Drawing.ContentAlignment.MiddleLeft

Me.rbtnColorOptions.Location = New System.Drawing.Point(76, 213)

Me.rbtnColorOptions.Name = "rbtnColorOptions"

Me.rbtnColorOptions.Size = New System.Drawing.Size(89, 31)

Me.rbtnColorOptions.TabIndex = 15

Me.rbtnColorOptions.Text = "Test"

Me.rbtnColorOptions.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter

Me.rbtnColorOptions.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay

Me.rbtnColorOptions.ThemeName = "Office2007Black"

'

'DockPanel4

'

Me.DockPanel4.BackColor = System.Drawing.SystemColors.Control

Me.DockPanel4.CloseButtonVisible = False

Me.DockPanel4.Description = Nothing

Me.DockPanel4.DockState = Telerik.WinControls.Docking.DockState.Docked

Me.DockPanel4.DropDownButtonVisible = False

Me.DockPanel4.ID = New System.Guid("7975c397-c2e8-496b-a3ce-3b567326cbcf")

Me.DockPanel4.Image = Nothing

Me.DockPanel4.Location = New System.Drawing.Point(695, 21)

Me.DockPanel4.Name = "DockPanel4"

Me.DockPanel4.PreferredDockSize = New System.Drawing.Size(118, 393)

Me.DockPanel4.PreferredFloatSize = New System.Drawing.Size(150, 300)

Me.DockPanel4.RightToLeft = System.Windows.Forms.RightToLeft.Yes

Me.DockPanel4.Size = New System.Drawing.Size(116, 393)

Me.DockPanel4.TabIndex = 1

Me.DockPanel4.TabStripVisible = False

Me.DockPanel4.Text = "Custom Products"

'

'TestForm

'

Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)

Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font

Me.ClientSize = New System.Drawing.Size(857, 476)

Me.Controls.Add(Me.GroupBoxProductDetail)

Me.Name = "TestForm"

Me.Text = "TestForm"

Me.GroupBoxProductDetail.ResumeLayout(False)

Me.DockingManager1.PrimarySiteComponent.ResumeLayout(False)

CType(Me.DockingManager1, System.ComponentModel.ISupportInitialize).EndInit()

Me.DockingManager1.ResumeLayout(False)

Me.DockPanel3.ResumeLayout(False)

Me.DockPanel3.PerformLayout()

CType(Me.rbtnColorOptions, System.ComponentModel.ISupportInitialize).EndInit()

Me.ResumeLayout(False)

End Sub

Friend WithEvents GroupBoxProductDetail As System.Windows.Forms.GroupBox

Friend WithEvents DockingManager1 As Telerik.WinControls.Docking.DockingManager

Friend WithEvents DockPanel3 As Telerik.WinControls.Docking.DockPanel

Friend WithEvents rbtnColorOptions As Telerik.WinControls.UI.RadButton

Friend WithEvents DockPanel4 As Telerik.WinControls.Docking.DockPanel

End

Class

Thanks..

0
Julian Benkov
Telerik team
answered on 04 Apr 2008, 03:26 PM
Hello Monika,

We have tested your sample code and all works fine. Please build a new form with the desired layout and reattach all events. It could be the case that the current design layout of the form is invalid.

If you have additional questions, please contact us.

Sincerely yours,
Julian Benkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Monika
Top achievements
Rank 1
answered on 04 Apr 2008, 08:56 PM
This test code runs in windows vista perfectly but not in windows xp. Did you try to run on windows xp?
0
Martin Vasilev
Telerik team
answered on 07 Apr 2008, 01:36 PM
Hi Monika,

Thank you for writing.

I have tested the provided code again and have determined that it has an invalid design layout. In Windows XP it builds without any exceptions, but at runtime it freezes and does not display the docking windows and the group box properly.

I have only recreated the DockingManager in the same form with two DockPanels and one button (as your example) and everything gets to work normally. The button's click event ia raised without any problems too. Please try to recreate the DockingManager in your actual project and let me know if that does not solve your problem.

Do not hesitate to contact me again if you need additional assistance.

All the best,
Martin Vasilev
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Dock
Asked by
Monika
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Monika
Top achievements
Rank 1
Martin Vasilev
Telerik team
Share this question
or