Click here to Skip to main content
15,892,809 members
Articles / Programming Languages / Visual Basic

Text Cursor (xCursor)

Rate me:
Please Sign up or sign in to vote.
4.72/5 (22 votes)
7 Jan 2009CPOL4 min read 67.1K   2.6K   62  
A semi-transparent cursor that displays text based on property settings
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class xCursorDemo
	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(xCursorDemo))
		Me.DragLabel = New System.Windows.Forms.Label
		Me.Label1 = New System.Windows.Forms.Label
		Me.Label2 = New System.Windows.Forms.Label
		Me.AnotherDrag = New System.Windows.Forms.Label
		Me.DropLabel = New System.Windows.Forms.Label
		Me.GreekLabel = New System.Windows.Forms.Label
		Me.SuspendLayout()
		'
		'DragLabel
		'
		Me.DragLabel.AllowDrop = True
		Me.DragLabel.Location = New System.Drawing.Point(26, 44)
		Me.DragLabel.Name = "DragLabel"
		Me.DragLabel.Size = New System.Drawing.Size(152, 46)
		Me.DragLabel.TabIndex = 1
		Me.DragLabel.Text = "This is a large chunk of text" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "to be used to demonstrate the" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "use of the xCursor." & _
		  ""
		'
		'Label1
		'
		Me.Label1.AllowDrop = True
		Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Label1.Location = New System.Drawing.Point(16, 19)
		Me.Label1.Name = "Label1"
		Me.Label1.Size = New System.Drawing.Size(162, 16)
		Me.Label1.TabIndex = 2
		Me.Label1.Text = "Drag the text below..."
		'
		'Label2
		'
		Me.Label2.AllowDrop = True
		Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.Label2.Location = New System.Drawing.Point(225, 19)
		Me.Label2.Name = "Label2"
		Me.Label2.Size = New System.Drawing.Size(162, 16)
		Me.Label2.TabIndex = 3
		Me.Label2.Text = "Into this panel..."
		'
		'AnotherDrag
		'
		Me.AnotherDrag.AllowDrop = True
		Me.AnotherDrag.Font = New System.Drawing.Font("Engravers MT", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.AnotherDrag.Location = New System.Drawing.Point(26, 101)
		Me.AnotherDrag.Name = "AnotherDrag"
		Me.AnotherDrag.Size = New System.Drawing.Size(221, 16)
		Me.AnotherDrag.TabIndex = 4
		Me.AnotherDrag.Text = "Another Test Drag Label"
		'
		'DropLabel
		'
		Me.DropLabel.AllowDrop = True
		Me.DropLabel.BackColor = System.Drawing.Color.LightGray
		Me.DropLabel.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
		Me.DropLabel.Location = New System.Drawing.Point(234, 39)
		Me.DropLabel.Name = "DropLabel"
		Me.DropLabel.Size = New System.Drawing.Size(186, 46)
		Me.DropLabel.TabIndex = 5
		'
		'GreekLabel
		'
		Me.GreekLabel.AllowDrop = True
		Me.GreekLabel.Font = New System.Drawing.Font("Microsoft Sans Serif", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
		Me.GreekLabel.Location = New System.Drawing.Point(26, 127)
		Me.GreekLabel.Name = "GreekLabel"
		Me.GreekLabel.Size = New System.Drawing.Size(394, 405)
		Me.GreekLabel.TabIndex = 6
		Me.GreekLabel.Text = resources.GetString("GreekLabel.Text")
		'
		'Form1
		'
		Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
		Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
		Me.ClientSize = New System.Drawing.Size(475, 541)
		Me.Controls.Add(Me.GreekLabel)
		Me.Controls.Add(Me.DropLabel)
		Me.Controls.Add(Me.AnotherDrag)
		Me.Controls.Add(Me.Label2)
		Me.Controls.Add(Me.Label1)
		Me.Controls.Add(Me.DragLabel)
		Me.Name = "Form1"
		Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
		Me.Text = "xCursor Demo"
		Me.ResumeLayout(False)

	End Sub
	Friend WithEvents DragLabel As System.Windows.Forms.Label
	Friend WithEvents Label1 As System.Windows.Forms.Label
	Friend WithEvents Label2 As System.Windows.Forms.Label
	Friend WithEvents AnotherDrag As System.Windows.Forms.Label
	Friend WithEvents DropLabel As System.Windows.Forms.Label
	Friend WithEvents GreekLabel As System.Windows.Forms.Label

End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions