Radmenu as mdi child forms do not maximize when loaded

8 posts, 0 answers
  1. MVeranis
    MVeranis avatar
    14 posts
    Member since:
    Jun 2006

    Posted 04 Feb 2011 Link to this post

    Hello,
    i'm having a crazy time trying to get my child forms to be maximized.

    i have: windows form as mdi parent  - windowstate set to maximum.
    on it is a radmenu.
    i have a child windows form in which the windowstate is set to maximize.

    i do the below code to load the child:
            
    frmCPBase.MdiParent = Me
    frmCPBase.WindowState = FormWindowState.Maximized
    gsResize(frmCPBase, frmCPBase.pnlMain)
    frmCPBase.Show()
      
        Public Sub gsResize(ByVal aoForm As Form, ByVal aoPnl As Panel)
            Try
                '* Center the MDI Child
                If aoForm.WindowState = 2 Then      'maximized
                    Dim yInt As Integer = Screen.PrimaryScreen.WorkingArea.Height / 2 - aoForm.Height / 2
      
      
                    aoForm.Location = New Point(Screen.PrimaryScreen.WorkingArea.Width / 2 - aoForm.Width / 2, 120) 
                    If aoForm.Location.X < 0 Then
                        aoForm.Location = New Point(0, aoForm.Location.Y)
                    End If
                    If aoForm.Location.Y < 0 Then
                        aoForm.Location = New Point(aoForm.Location.X, 0)
                    End If
                    If aoForm.Left < 0 Then
                        aoForm.Location = New Point(0, aoForm.Location.Y)
                    End If
                End If
      
                '* Center the frame
                If aoForm.WindowState = 2 Then
                    aoPnl.Location = New Point((aoForm.Width / 2) - (aoPnl.Width / 2), (aoForm.Height / 2) - (aoPnl.Height / 2))
                Else
                    aoPnl.Location = New Point((aoForm.Width / 2) - (aoPnl.Width / 2), (aoForm.Height / 2) - (aoPnl.Height / 2))
                End If
      
            Catch ex As Exception
      
            End Try
      
        End Sub

    but when i run, the child is NOT maximized. when i maximize the mdi form (running by clicking the control max button on the mdi form), THEN the child form is maximized.

    i did this with another menu - exactly the same only NOT using the radmenu and it works fine. is there something in the radmenu you need to set for this??

    thanks for ANY help - i'm about to get rid of the telerik radmenu...if i cannot resolve. i have it set up as the "main menu=true"

    i have the radmenu set up as:
    <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
    Partial Class frmMain
        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()
            Me.components = New System.ComponentModel.Container()
            Me.RadMenuItem4 = New Telerik.WinControls.UI.RadMenuItem()
            Me.RadMenuItem5 = New Telerik.WinControls.UI.RadMenuItem()
            Me.RadMenuItem3 = New Telerik.WinControls.UI.RadMenuItem()
            Me.RadMenuHeaderItem1 = New Telerik.WinControls.UI.RadMenuHeaderItem()
            Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
            Me.cbMarkets = New Telerik.WinControls.UI.RadMenuComboItem()
            Me.RadMenuItem2 = New Telerik.WinControls.UI.RadMenuItem()
            Me.pnl2ndWithLogosAndMenu = New Telerik.WinControls.UI.RadPanel()
            Me.pnlRightInfo = New Telerik.WinControls.UI.RadPanel()
            Me.btnHelp = New Telerik.WinControls.UI.RadButton()
            Me.btnUser = New Telerik.WinControls.UI.RadButton()
            Me.lblDateandTime = New Telerik.WinControls.UI.RadLabel()
            Me.RadMenu1 = New Telerik.WinControls.UI.RadMenu()
            Me.RadMenuItem1 = New Telerik.WinControls.UI.RadMenuItem()
            Me.RadMenuItem6 = New Telerik.WinControls.UI.RadMenuItem()
            Me.pnlFirstBackground = New Telerik.WinControls.UI.RadPanel()
            CType(Me.pnl2ndWithLogosAndMenu, System.ComponentModel.ISupportInitialize).BeginInit()
            Me.pnl2ndWithLogosAndMenu.SuspendLayout()
            CType(Me.pnlRightInfo, System.ComponentModel.ISupportInitialize).BeginInit()
            Me.pnlRightInfo.SuspendLayout()
            CType(Me.btnHelp, System.ComponentModel.ISupportInitialize).BeginInit()
            CType(Me.btnUser, System.ComponentModel.ISupportInitialize).BeginInit()
            CType(Me.lblDateandTime, System.ComponentModel.ISupportInitialize).BeginInit()
            CType(Me.RadMenu1, System.ComponentModel.ISupportInitialize).BeginInit()
            CType(Me.pnlFirstBackground, System.ComponentModel.ISupportInitialize).BeginInit()
            Me.pnlFirstBackground.SuspendLayout()
            Me.SuspendLayout()
            '
            'RadMenuItem4
            '
            Me.RadMenuItem4.AutoSize = False
            Me.RadMenuItem4.Bounds = New System.Drawing.Rectangle(0, 0, 150, 24)
            Me.RadMenuItem4.Class = ""
            Me.RadMenuItem4.Name = "RadMenuItem4"
            Me.RadMenuItem4.Text = "Cycle Processing"
            '
            'RadMenuItem5
            '
            Me.RadMenuItem5.AutoSize = False
            Me.RadMenuItem5.Bounds = New System.Drawing.Rectangle(0, 0, 150, 24)
            Me.RadMenuItem5.Class = ""
            Me.RadMenuItem5.Name = "RadMenuItem5"
            Me.RadMenuItem5.Padding = New System.Windows.Forms.Padding(0, 2, 0, 2)
            Me.RadMenuItem5.Text = "Dunning"
            '
            'RadMenuItem3
            '
            Me.RadMenuItem3.AutoSize = False
            Me.RadMenuItem3.Bounds = New System.Drawing.Rectangle(0, 0, 150, 24)
            Me.RadMenuItem3.Class = ""
            Me.RadMenuItem3.Name = "RadMenuItem3"
            Me.RadMenuItem3.Padding = New System.Windows.Forms.Padding(0, 2, 0, 2)
            Me.RadMenuItem3.Text = "Carrier Provisioning"
            '
            'RadMenuHeaderItem1
            '
            Me.RadMenuHeaderItem1.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.FitToAvailableSize
            Me.RadMenuHeaderItem1.Class = ""
            Me.RadMenuHeaderItem1.DisplayStyle = Telerik.WinControls.DisplayStyle.Text
            Me.RadMenuHeaderItem1.Name = "RadMenuHeaderItem1"
            Me.RadMenuHeaderItem1.Padding = New System.Windows.Forms.Padding(5, 5, 0, 0)
            Me.RadMenuHeaderItem1.Text = "Market"
            '
            'Timer1
            '
            '
            'cbMarkets
            '
            Me.cbMarkets.Class = ""
            '
            '
            '
            Me.cbMarkets.ComboBoxElement.ArrowButtonMinWidth = 16
            Me.cbMarkets.ComboBoxElement.DefaultValue = Nothing
            Me.cbMarkets.ComboBoxElement.EditorElement = Me.cbMarkets.ComboBoxElement
            Me.cbMarkets.ComboBoxElement.EditorManager = Nothing
            Me.cbMarkets.ComboBoxElement.Focusable = True
            Me.cbMarkets.ComboBoxElement.MaxValue = Nothing
            Me.cbMarkets.ComboBoxElement.MinValue = Nothing
            Me.cbMarkets.ComboBoxElement.NullTextColor = System.Drawing.SystemColors.GrayText
            Me.cbMarkets.ComboBoxElement.NullValue = Nothing
            Me.cbMarkets.ComboBoxElement.OwnerOffset = 0
            Me.cbMarkets.ComboBoxElement.Value = Nothing
            Me.cbMarkets.Name = "cbMarkets"
            Me.cbMarkets.Text = ""
            '
            'RadMenuItem2
            '
            Me.RadMenuItem2.AutoSize = False
            Me.RadMenuItem2.Bounds = New System.Drawing.Rectangle(0, 0, 150, 24)
            Me.RadMenuItem2.Class = ""
            Me.RadMenuItem2.Name = "RadMenuItem2"
            Me.RadMenuItem2.Padding = New System.Windows.Forms.Padding(0, 2, 0, 2)
            Me.RadMenuItem2.Text = "Trans Processing"
            '
            'pnl2ndWithLogosAndMenu
            '
            Me.pnl2ndWithLogosAndMenu.BackColor = System.Drawing.Color.Transparent
            Me.pnl2ndWithLogosAndMenu.BackgroundImage = Global.WindowsApplication1.My.Resources.Resources.ClientUtil_Heading
            Me.pnl2ndWithLogosAndMenu.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None
            Me.pnl2ndWithLogosAndMenu.Controls.Add(Me.pnlRightInfo)
            Me.pnl2ndWithLogosAndMenu.Controls.Add(Me.RadMenu1)
            Me.pnl2ndWithLogosAndMenu.Location = New System.Drawing.Point(0, 0)
            Me.pnl2ndWithLogosAndMenu.Name = "pnl2ndWithLogosAndMenu"
            Me.pnl2ndWithLogosAndMenu.Size = New System.Drawing.Size(996, 114)
            Me.pnl2ndWithLogosAndMenu.TabIndex = 12
            Me.pnl2ndWithLogosAndMenu.ThemeName = "Windows7"
            '
            'pnlRightInfo
            '
            Me.pnlRightInfo.Controls.Add(Me.btnHelp)
            Me.pnlRightInfo.Controls.Add(Me.btnUser)
            Me.pnlRightInfo.Controls.Add(Me.lblDateandTime)
            Me.pnlRightInfo.Location = New System.Drawing.Point(577, 68)
            Me.pnlRightInfo.Name = "pnlRightInfo"
            Me.pnlRightInfo.Size = New System.Drawing.Size(360, 18)
            Me.pnlRightInfo.TabIndex = 6
            CType(Me.pnlRightInfo.GetChildAt(0).GetChildAt(1), Telerik.WinControls.Primitives.BorderPrimitive).Visibility = Telerik.WinControls.ElementVisibility.Hidden
            '
            'btnHelp
            '
            Me.btnHelp.Location = New System.Drawing.Point(300, 0)
            Me.btnHelp.Name = "btnHelp"
            '
            '
            '
            Me.btnHelp.RootElement.ToolTipText = "Click for HELP"
            Me.btnHelp.Size = New System.Drawing.Size(48, 18)
            Me.btnHelp.TabIndex = 7
            Me.btnHelp.Text = "HELP"
            '
            'btnUser
            '
            Me.btnUser.Location = New System.Drawing.Point(250, 0)
            Me.btnUser.Name = "btnUser"
            '
            '
            '
            Me.btnUser.RootElement.ToolTipText = "Click to LOG OUT"
            Me.btnUser.Size = New System.Drawing.Size(48, 18)
            Me.btnUser.TabIndex = 6
            Me.btnUser.Text = "UserName"
            '
            'lblDateandTime
            '
            Me.lblDateandTime.AutoSize = False
            Me.lblDateandTime.ForeColor = System.Drawing.Color.White
            Me.lblDateandTime.Location = New System.Drawing.Point(3, 1)
            Me.lblDateandTime.Name = "lblDateandTime"
            '
            '
            '
            Me.lblDateandTime.RootElement.ForeColor = System.Drawing.Color.White
            Me.lblDateandTime.Size = New System.Drawing.Size(234, 16)
            Me.lblDateandTime.TabIndex = 3
            Me.lblDateandTime.Text = "Date and Time here"
            Me.lblDateandTime.TextAlignment = System.Drawing.ContentAlignment.MiddleRight
            '
            'RadMenu1
            '
            Me.RadMenu1.Dock = System.Windows.Forms.DockStyle.Bottom
            Me.RadMenu1.Items.AddRange(New Telerik.WinControls.RadItem() {Me.RadMenuItem1, Me.RadMenuItem2, Me.RadMenuItem3, Me.RadMenuItem4, Me.RadMenuItem5, Me.RadMenuItem6, Me.RadMenuHeaderItem1, Me.cbMarkets})
            Me.RadMenu1.Location = New System.Drawing.Point(0, 64)
            Me.RadMenu1.Name = "RadMenu1"
            Me.RadMenu1.Size = New System.Drawing.Size(996, 50)
            Me.RadMenu1.TabIndex = 0
            Me.RadMenu1.Text = "RadMenu1"
            Me.RadMenu1.ThemeName = "Windows7"
            '
            'RadMenuItem1
            '
            Me.RadMenuItem1.AutoSize = False
            Me.RadMenuItem1.Bounds = New System.Drawing.Rectangle(0, 0, 150, 24)
            Me.RadMenuItem1.Class = ""
            Me.RadMenuItem1.Name = "RadMenuItem1"
            Me.RadMenuItem1.Padding = New System.Windows.Forms.Padding(4, 2, 0, 2)
            Me.RadMenuItem1.Text = "System Profiles"
            '
            'RadMenuItem6
            '
            Me.RadMenuItem6.AutoSize = False
            Me.RadMenuItem6.Bounds = New System.Drawing.Rectangle(0, 0, 100, 24)
            Me.RadMenuItem6.Class = ""
            Me.RadMenuItem6.MdiList = True
            Me.RadMenuItem6.Name = "RadMenuItem6"
            Me.RadMenuItem6.Text = "Forms"
            '
            'pnlFirstBackground
            '
            Me.pnlFirstBackground.BackgroundImage = Global.WindowsApplication1.My.Resources.Resources.PageHeading_Topstrip2
            Me.pnlFirstBackground.Controls.Add(Me.pnl2ndWithLogosAndMenu)
            Me.pnlFirstBackground.Location = New System.Drawing.Point(0, 0)
            Me.pnlFirstBackground.Name = "pnlFirstBackground"
            Me.pnlFirstBackground.Size = New System.Drawing.Size(999, 114)
            Me.pnlFirstBackground.TabIndex = 15
            Me.pnlFirstBackground.Text = "RadPanel2"
            Me.pnlFirstBackground.ThemeName = "Windows7"
            '
            'frmMain
            '
            Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
            Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
            Me.ClientSize = New System.Drawing.Size(892, 526)
            Me.Controls.Add(Me.pnlFirstBackground)
            Me.IsMdiContainer = True
            Me.Name = "frmMain"
            Me.Text = "Client Utility Center"
            Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
            CType(Me.pnl2ndWithLogosAndMenu, System.ComponentModel.ISupportInitialize).EndInit()
            Me.pnl2ndWithLogosAndMenu.ResumeLayout(False)
            Me.pnl2ndWithLogosAndMenu.PerformLayout()
            CType(Me.pnlRightInfo, System.ComponentModel.ISupportInitialize).EndInit()
            Me.pnlRightInfo.ResumeLayout(False)
            CType(Me.btnHelp, System.ComponentModel.ISupportInitialize).EndInit()
            CType(Me.btnUser, System.ComponentModel.ISupportInitialize).EndInit()
            CType(Me.lblDateandTime, System.ComponentModel.ISupportInitialize).EndInit()
            CType(Me.RadMenu1, System.ComponentModel.ISupportInitialize).EndInit()
            CType(Me.pnlFirstBackground, System.ComponentModel.ISupportInitialize).EndInit()
            Me.pnlFirstBackground.ResumeLayout(False)
            Me.ResumeLayout(False)
      
        End Sub
        Friend WithEvents RadMenuItem4 As Telerik.WinControls.UI.RadMenuItem
        Friend WithEvents RadMenuItem5 As Telerik.WinControls.UI.RadMenuItem
        Friend WithEvents RadMenuItem3 As Telerik.WinControls.UI.RadMenuItem
        Friend WithEvents RadMenuHeaderItem1 As Telerik.WinControls.UI.RadMenuHeaderItem
        Friend WithEvents Timer1 As System.Windows.Forms.Timer
        Friend WithEvents cbMarkets As Telerik.WinControls.UI.RadMenuComboItem
        Friend WithEvents RadMenuItem2 As Telerik.WinControls.UI.RadMenuItem
        Friend WithEvents pnl2ndWithLogosAndMenu As Telerik.WinControls.UI.RadPanel
        Friend WithEvents pnlRightInfo As Telerik.WinControls.UI.RadPanel
        Friend WithEvents btnHelp As Telerik.WinControls.UI.RadButton
        Friend WithEvents btnUser As Telerik.WinControls.UI.RadButton
        Friend WithEvents lblDateandTime As Telerik.WinControls.UI.RadLabel
        Friend WithEvents RadMenu1 As Telerik.WinControls.UI.RadMenu
        Friend WithEvents RadMenuItem1 As Telerik.WinControls.UI.RadMenuItem
        Friend WithEvents RadMenuItem6 As Telerik.WinControls.UI.RadMenuItem
        Friend WithEvents pnlFirstBackground As Telerik.WinControls.UI.RadPanel
    End Class




  2. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 05 Feb 2011 Link to this post

    Hello,

    Please can you try this simple exmaple and see if it works ok for you.

    Main Designer
    <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
    Partial Class Main
        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()
            Me.RadMenu1 = New Telerik.WinControls.UI.RadMenu()
            Me.RadMenuItem1 = New Telerik.WinControls.UI.RadMenuItem()
            CType(Me.RadMenu1, System.ComponentModel.ISupportInitialize).BeginInit()
            Me.SuspendLayout()
            '
            'RadMenu1
            '
            Me.RadMenu1.Items.AddRange(New Telerik.WinControls.RadItem() {Me.RadMenuItem1})
            Me.RadMenu1.Location = New System.Drawing.Point(0, 0)
            Me.RadMenu1.Name = "RadMenu1"
            Me.RadMenu1.Size = New System.Drawing.Size(672, 20)
            Me.RadMenu1.TabIndex = 2
            Me.RadMenu1.Text = "RadMenu1"
            '
            'RadMenuItem1
            '
            Me.RadMenuItem1.Class = ""
            Me.RadMenuItem1.Name = "RadMenuItem1"
            Me.RadMenuItem1.Text = "Launch MDI Child"
            '
            'Main
            '
            Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
            Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
            Me.ClientSize = New System.Drawing.Size(672, 492)
            Me.Controls.Add(Me.RadMenu1)
            Me.IsMdiContainer = True
            Me.Name = "Main"
            Me.Text = "Form1"
            CType(Me.RadMenu1, System.ComponentModel.ISupportInitialize).EndInit()
            Me.ResumeLayout(False)
            Me.PerformLayout()
      
        End Sub
        Friend WithEvents RadMenu1 As Telerik.WinControls.UI.RadMenu
        Friend WithEvents RadMenuItem1 As Telerik.WinControls.UI.RadMenuItem
      
    End Class

    Main .vb
    Public Class Main
      
        Private Sub Main_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
      
        End Sub
      
        Private Sub RadMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadMenuItem1.Click
            Dim child As New Child()
            child.MdiParent = Me
            child.WindowState = FormWindowState.Maximized
            child.Show()
        End Sub
      
    End Class

    Child designer
    <Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
    Partial Class Child
        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()
            Me.RadLabel1 = New Telerik.WinControls.UI.RadLabel()
            CType(Me.RadLabel1, System.ComponentModel.ISupportInitialize).BeginInit()
            Me.SuspendLayout()
            '
            'RadLabel1
            '
            Me.RadLabel1.Location = New System.Drawing.Point(24, 27)
            Me.RadLabel1.Name = "RadLabel1"
            Me.RadLabel1.Size = New System.Drawing.Size(120, 16)
            Me.RadLabel1.TabIndex = 0
            Me.RadLabel1.Text = "I am a MDI Child Form"
            '
            'Child
            '
            Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
            Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
            Me.ClientSize = New System.Drawing.Size(367, 298)
            Me.Controls.Add(Me.RadLabel1)
            Me.Name = "Child"
            Me.Text = "Child"
            CType(Me.RadLabel1, System.ComponentModel.ISupportInitialize).EndInit()
            Me.ResumeLayout(False)
            Me.PerformLayout()
      
        End Sub
        Friend WithEvents RadLabel1 As Telerik.WinControls.UI.RadLabel
    End Class

    Child.vb
    Public Class Child
      
    End Class

    regards,
    Richard
  3. UI for WinForms is Visual Studio 2017 Ready
  4. MVeranis
    MVeranis avatar
    14 posts
    Member since:
    Jun 2006

    Posted 07 Feb 2011 Link to this post

    thanks for the help. i tried the example you sent and it worked fine. what i did find out is that if you have a radMenu on a radPanel, it will not maximize the child. if there is not a radMenu directly on the form, it does not play nice. i have the radMenu on a radPanel to add logo and other info on the top of the form. i faked it out by placing a radmenu on the bottom of the page which is not used and built my radMenu in a radPanel as my main menu. that acts just as it should loading children. not pretty but it works.
  5. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 10 Feb 2011 Link to this post

    Hi Mary,

    Thank you for your posts.

    I was able to reproduce this behavior on my end. However the reason seems to be the gsResize() function that you are using. I am not sure what is the point of relocating the maximized window but you can try not moving the child window but only the panel:

    Public Sub gsResize(ByVal aoForm As Form, ByVal aoPnl As Panel)
            Try
                aoPnl.Location = New Point((aoForm.Width / 2) - (aoPnl.Width / 2), (aoForm.Height / 2) - (aoPnl.Height / 2))
            Catch ex As Exception
     
            End Try
     
        End Sub

    If you do not wish to change the gsResize() function then you can try setting the maximized state of the child window after the function was called:

    gsResize(frmCPBase, frmCPBase.pnlMain)
    frmCPBase.WindowState = FormWindowState.Maximized

    I hope this will help you. If you have any further questions, do not hesitate to write.

    All the best,
    Ivan Todorov
    the Telerik team
    Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
  6. MVeranis
    MVeranis avatar
    14 posts
    Member since:
    Jun 2006

    Posted 10 Feb 2011 Link to this post

    thank you for following up on this. i've come up with a workable solution for me.

    not sure if this is a bug or what but if the radmenu is not directly on the form, it does not maximze the child even if set to do so, nor does it set the sizes correctly. i cannot always set this to maximize as the user may want it to be minimized.

    my solution - basically I:
    • have one radmenu docked to the bottom with no items in it - directly on the form. this makes it behave correctly - without it, the 2nd menu/children do not do what they should
    • have a radPanel - put my graphics, etc...items i wanted in the panel -
    • have a radMenu on the radPanel docked to the bottom with my items
    • children set to maximize.
    • just show it - the only thing i needed in the Resize event was to set the top when NOT maximized.
    • so there's no need to set any sizes

    thanks for your help on this.

  7. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 15 Feb 2011 Link to this post

    Hello Mary,

    I am glad you have sorted this out. If you have any other questions, do not hesitate to ask.

    @Richard: Thank you for your assistance.

    Best wishes,
    Ivan Todorov
    the Telerik team
    Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
  8. Victoria F
    Victoria F avatar
    46 posts
    Member since:
    May 2010

    Posted 12 Jun 2012 Link to this post

    Guys ,

    Do you have a simple solution to change theme or background color of existing Frame with RibbonBar menu. Just anything that let people recognize that they switched the mode.

    So I tried to change theme on Load event .. does not work .. SImple  BackColor does not work  also.
    Do you have any simple solution for it?  
    private void RadForm_Frame_Load(object sender, EventArgs e)
     {
        radMenu1.ThemeName = "Vista";
        radRibbonBar1.ThemeName = "Vista";
    }

    Thank you ,
    Victoria.
  9. Ivan Todorov
    Admin
    Ivan Todorov avatar
    688 posts

    Posted 14 Jun 2012 Link to this post

    Hello Victoria,

    In order for the ThemeName property to work correctly, you should first load the theme that you want to use. This can be achieved by dropping the desired theme component from the toolbox to the form in Visual Studio's designer. If the theme you are using using is not in the toolbox, then you should it load it as it is described in this help article.

    If this doesn't help, please provide more details about your scenario and requirements and I will do my best to assist you.

    Regards,
    Ivan Todorov
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Back to Top
UI for WinForms is Visual Studio 2017 Ready