Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Creating custom BorderlessForm

Creating custom BorderlessForm

Scheduled Pinned Locked Moved Visual Basic
visual-studiodesignhelpworkspace
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mo1492
    wrote on last edited by
    #1

    I'm trying to create a CustomBorderlessForm and paint myself. I've gotten the basic functionality to work but have this issue. I have derived a TestForm from the custom BorderlessForm and when dropping a menustrip or toolstrip onto the TestForm, these controls dock at the top of the form overlaying the title area which I draw myself. I have tried a number of solutions with no success and now I am just trying to do the simplest thing I can think of. I have created a property on the BorderlessForm to Enable or Disable showing a MenuStrip. When Enabled on the derived TestForm, I create a MenuStrip and place it on the TesForm at a specific location. This works but I cannot edit the MenuStrip from the Designer. Below is code for a custom ParentControlDesigner in which I am trying to EnableDesignMode to allow editing of the MenuStrip. However it still does not work. I have tried debugging into BorderlessFormDesigner below but the Designer does not hit the break point within Initialize(). To do this I have setup the project in MyProject to execute a new instance of VS and load the project. Within the new instance of VS I open the TestForm in the Designer but the Designer does not hit the break point. I've tried setting a break point in both the first and second instance. I've done this sort of thing before with other projects with success. I'm guessing maybe these controls to not support this type of functionality. If this is possible I would appreciate some advice. Thank you. Here is the code excluding the BorderlessForm.Designer.vb code.

    Imports System.ComponentModel
    Imports System.ComponentModel.Design
    Imports System.Runtime.CompilerServices
    Imports System.Windows.Forms.Design
    Imports System.Windows.Forms.Design.Behavior
    _
    _
    Public Class BorderlessForm
    ', GetType(ParentControlDesigner))> _

    Const ConstGridBorderlessTitle As String = "BorderlessForm"
    
    ' The MenuStrip object and access for the Designer
    Private \_MenuStrip As MenuStrip
    \_
    Public ReadOnly Property MenuStrip1() As MenuStrip
        Get
            Return Me.\_MenuStrip
        End Get
    End Property
    
    ' The property to enable showing a MenuStrip
    
    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups