VB.NET School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

 

Code Snippets

  

VB.NET Source Code


You're Browsing As A Guest! Register Now...
Become a VB.NET Expert!

Join 353,816 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 3,502 people online right now.Registration is fast and FREE... Join Now!




Add a richtextbox to application desktop toolbar dynamicly

Submitted By: m2s87
Actions:
Rating:
Views: 4,591

Language: VB.NET

Last Modified: January 26, 2007
Instructions: To make i work, you need a snippet from here:
http://www.dreamincode.net/code/snippet895.htm

Snippet


  1. Option Strict Off
  2. Public Class Form1
  3.  
  4.     Private Sub laetud(ByVal sender As System.Object, ByVal e As System.EventArgs)
  5.         Dim x As New Button
  6.         Dim label1 As New Label
  7.         Dim RichTextBox1 As New System.Windows.Forms.RichTextBox
  8.         '
  9.         'Label1
  10.         '
  11.         With label1
  12.             .AutoSize = True
  13.             .Location = New System.Drawing.Point(6, 13)
  14.             .Name = "Label1"
  15.             .Size = New System.Drawing.Size(76, 13)
  16.             .TabIndex = 1
  17.             .Text = "Static notepad"
  18.         End With
  19.         '
  20.         'RichTextBox1
  21.         '
  22.         With RichTextBox1
  23.             .Location = New System.Drawing.Point(6, 30)
  24.             .Name = "RichTextBox1"
  25.             .Size = New System.Drawing.Size(200, 120)
  26.             .TabIndex = 2
  27.             .Text = ""
  28.         End With
  29.  
  30.         label1.Parent = sender
  31.         RichTextBox1.Parent = sender
  32.     End Sub
  33.  
  34.     Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  35.         Dim x As New m2s87
  36.         x.DockMode = m2s87.DockWhere.RIGHT
  37.         x.FormBorderStyle = Windows.Forms.FormBorderStyle.None
  38.         AddHandler x.Load, AddressOf laetud
  39.         x.BackColor = System.Drawing.Color.FromArgb(255, 200, 200, 200)
  40.         x.Show()
  41.     End Sub
  42. End Class
  43.  

Copy & Paste


Comments

jmcc2k 2008-11-13 02:04:53

See ShellAppBar component from http://www.ssware.com/shlobj/shlobj.htm for quickly converting all your forms to appbars with full auto-hide and drag-docking functionality.


Add comment


You must be registered and logged on to </dream.in.code> to leave comments.





Live VB.NET Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month