Click here to Skip to main content
15,914,608 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VBA, Excel creating new workbook/sheets Pin
Dave Kreskowiak9-Aug-04 6:14
mveDave Kreskowiak9-Aug-04 6:14 
GeneralRe: VBA, Excel creating new workbook/sheets Pin
Lord darkblade9-Aug-04 8:09
Lord darkblade9-Aug-04 8:09 
GeneralRe: VBA, Excel creating new workbook/sheets Pin
Dave Kreskowiak9-Aug-04 10:06
mveDave Kreskowiak9-Aug-04 10:06 
QuestionHow to merge two or more MP3 files in VB .Net Pin
tyagimanik9-Aug-04 3:31
tyagimanik9-Aug-04 3:31 
AnswerRe: How to merge two or more MP3 files in VB .Net Pin
Dave Kreskowiak9-Aug-04 6:09
mveDave Kreskowiak9-Aug-04 6:09 
QuestionHow to Draw a Line ??? Pin
Member 7660849-Aug-04 1:10
Member 7660849-Aug-04 1:10 
AnswerRe: How to Draw a Line ??? Pin
Dave Kreskowiak9-Aug-04 3:32
mveDave Kreskowiak9-Aug-04 3:32 
AnswerRe: How to Draw a Line ??? Pin
progload9-Aug-04 6:11
progload9-Aug-04 6:11 
Here's a user control that draws a 3D line like vb 6 has built-in.

'-------------------------------------
Imports System.Drawing
Public Class ThreeDLine
Inherits System.Windows.Forms.UserControl

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'UserControl overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
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()
'
'ThreeDLine
'
Me.Name = "ThreeDLine"
Me.Size = New System.Drawing.Size(472, 152)

End Sub

#End Region

Public Enum tOrientation
Horizontal
Vertical
End Enum

Public Property Orientation() As tOrientation
Get
Return m_Orientation
End Get
Set(ByVal Value As tOrientation)
m_Orientation = Value
'Set a "default" height and width
If m_Orientation = tOrientation.Horizontal Then
Me.Width = 120
Me.Height = 2
Else
Me.Width = 2
Me.Height = 100
End If
End Set
End Property

Private m_Orientation As tOrientation

Private Sub ThreeDLine_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint

'Draws the line

'Point Variables
Dim pL1 As Point
Dim pL2 As Point
Dim pL3 As Point
Dim pL4 As Point

'Create a pen, you can change the colours if they're wrong.
Dim DP As New Pen(System.Drawing.SystemColors.ControlDark)
Dim LP As New Pen(SystemColors.ControlLight)

'Determine orientation then set the height of the control
'Set the starting points for first and second lines:
If m_Orientation = tOrientation.Horizontal Then
Me.Height = 2 '(2 pixels)

pL1 = New Point(0, 0)
pL2 = New Point(1, 1)
pL3 = New Point(Me.Width - 1, 0)
pL4 = New Point(Me.Width, 1)
Else
Me.Width = 2

pL1 = New Point(0, 0)
pL2 = New Point(1, 1)
pL3 = New Point(0, Me.Height - 1)
pL4 = New Point(1, Me.Height)
End If

'Draw the lines. Simple.
e.Graphics.DrawLine(DP, pL1, pL3)
e.Graphics.DrawLine(LP, pL2, pL4)

End Sub

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

End Sub
End Class

'--------------------------

REF:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDrawing.asp




Generalusers login from which computer or ip address Pin
stchow8-Aug-04 19:33
stchow8-Aug-04 19:33 
GeneralRe: users login from which computer or ip address Pin
Dave Kreskowiak9-Aug-04 4:34
mveDave Kreskowiak9-Aug-04 4:34 
QuestionIs the original BASIC an interpreted language? Pin
Link26008-Aug-04 11:45
Link26008-Aug-04 11:45 
AnswerRe: Is the original BASIC an interpreted language? Pin
Nick Seng8-Aug-04 16:13
Nick Seng8-Aug-04 16:13 
GeneralRe: Is the original BASIC an interpreted language? Pin
Colin Angus Mackay9-Aug-04 1:59
Colin Angus Mackay9-Aug-04 1:59 
GeneralRe: Is the original BASIC an interpreted language? Pin
Nick Seng9-Aug-04 15:05
Nick Seng9-Aug-04 15:05 
GeneralRe: Is the original BASIC an interpreted language? Pin
Colin Angus Mackay9-Aug-04 20:54
Colin Angus Mackay9-Aug-04 20:54 
GeneralRe: Is the original BASIC an interpreted language? Pin
Nick Seng9-Aug-04 21:14
Nick Seng9-Aug-04 21:14 
GeneralRe: Is the original BASIC an interpreted language? Pin
Colin Angus Mackay9-Aug-04 23:59
Colin Angus Mackay9-Aug-04 23:59 
QuestionHow to query on XML Datasource Pin
iwanandr8-Aug-04 10:58
iwanandr8-Aug-04 10:58 
AnswerRe: How to query on XML Datasource Pin
progload8-Aug-04 17:23
progload8-Aug-04 17:23 
Generalicon Pin
bassemhoussam7-Aug-04 22:29
bassemhoussam7-Aug-04 22:29 
GeneralSkinning Windows Forms Pin
Anonymous7-Aug-04 18:35
Anonymous7-Aug-04 18:35 
Generaldisplay Outlook NoteItem at loading Pin
vancouver7777-Aug-04 14:41
vancouver7777-Aug-04 14:41 
GeneralIm looking for a vb.net tutorial Pin
Tom Dziedzic7-Aug-04 12:53
Tom Dziedzic7-Aug-04 12:53 
GeneralRe: Im looking for a vb.net tutorial Pin
gthompson20057-Aug-04 14:18
gthompson20057-Aug-04 14:18 
GeneralMMC Snap-in Initialization Problem (VB 6) Pin
raheela7-Aug-04 9:35
raheela7-Aug-04 9:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.