fork download
  1. '参照設定に System.Design.dll が必要。
  2. Imports System.Windows.Forms.Design
  3. Imports System.ComponentModel
  4.  
  5. <Designer(GetType(MyTextBoxDesigner))> _
  6. Public Class MyTextBox
  7. Inherits TextBox
  8.  
  9. Protected Overrides ReadOnly Property DefaultSize() As System.Drawing.Size
  10. Get
  11. Return New Size(120, 19)
  12. End Get
  13. End Property
  14.  
  15. Public Overloads Property Size() As Size
  16. Get
  17. Return MyBase.Size
  18. End Get
  19. Set(ByVal value As Size)
  20. End Set
  21. End Property
  22.  
  23. End Class
  24.  
  25. Friend Class MyTextBoxDesigner
  26. Inherits ControlDesigner
  27.  
  28. Public Overrides ReadOnly Property SelectionRules() As System.Windows.Forms.Design.SelectionRules
  29. Get
  30. Return MyBase.SelectionRules And Not SelectionRules.AllSizeable
  31. End Get
  32. End Property
  33.  
  34. End Class
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty