Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Draw an arrow within a box

Posted on December 20, 2013October 26, 2015 By David Kittell
Imports System.Drawing
Imports System.Drawing.Drawing2D

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Private Sub Form1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
	' Create pen.
	Dim blackPen As New Pen(Color.Black, 3)

	' Create triangle.
	Dim point1 As New Point(15, 65)
	Dim point2 As New Point(100, 150)
	Dim point3 As New Point(195, 65)
	Dim myGraphicsPath As New GraphicsPath
	myGraphicsPath.AddLine(point1.X, point1.Y, point2.X, point2.Y)
	myGraphicsPath.AddLine(point1.X, point1.Y, point3.X, point3.Y)
	myGraphicsPath.AddLine(point3.X, point3.Y, point2.X, point2.Y)
	Dim myRegion As New Region(myGraphicsPath)
	Dim myBrush As New SolidBrush(Color.Red)
	e.Graphics.FillRegion(myBrush, myRegion)

	' Create rectangle.
	Dim rect As New Rectangle(5, 5, 200, 200)

	' Draw rectangle to screen.
	e.Graphics.DrawRectangle(blackPen, rect)
End Sub
End Class
Originally Posted on December 20, 2013
Last Updated on October 26, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code VB.NET

Post navigation

Previous post
Next post

Related Posts

PowerShell – Script for adding/removing/viewing entries to the hosts file.

Posted on March 7, 2019

As a web developer you often have to use a host file, this script helps assist a safe and fast change with little effort. # # Powershell script for adding/removing/showing entries to the hosts file. # # Known limitations: # – does not handle entries with comments afterwards ("<ip> <host>…

Read More

Token String

Posted on July 8, 2014October 26, 2015

This PHP function will assist in splitting a string based on characters. $string = "This istan examplenstring"; /* Use tab and newline as tokenizing characters as well */ $tok = strtok($string, " nt"); while ($tok !== false) { echo "Word=$tok<br />"; $tok = strtok(" nt"); } $first_token = strtok(‘/something’, ‘/’);…

Read More

LDAP Dates Converted

Posted on July 25, 2013October 26, 2015

Dates that look like 127524839567199000 (pwdLastSet, accountExpires, lastLogonTimestamp, etc.) IF( B16>0 ,B16/864000000000 – 109205 ,"" ) Example: 130186556607343750 converts to 40921.80861 40921.80861 in Excel with cell formatting of Date/Time will show as January 13th, 2012 7:24 PM Dates that look like 20050210223453.0Z (whenChanged) DATEVALUE( CONCATENATE( (LEFT(TRIM(B9),4)) ,"-" ,(RIGHT(LEFT(TRIM(B9),6),2)) ,"-" ,RIGHT(LEFT(TRIM(B9),8),2)…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes