Change height with mouse
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Change height with mouse

  1. #1
    Join Date
    Nov 2017
    Posts
    1

    Question Change height with mouse

    Hi guys,

    I am new to visual basic 2017. I have managed to programmatically draw a vertical rectangle / line:

    Code:
    Public Class Form1
    
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Dim myPen As Pen
    myPen = New Pen(Drawing.Color.Blue, 5)
    
    Dim myGraphics As Graphics = Me.CreateGraphics
    
    myGraphics.DrawRectangle(myPen, 100, 100, 1, 50)
    End Sub
    End Class
    ---------------

    Is it possible to change its height by a user with the help of the mouse during runtime?

    Thanks!!!!
    Last edited by 2kaud; November 19th, 2017 at 08:08 AM.

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,263

    Re: Change height with mouse

    Quote Originally Posted by Boddah View Post
    Hi guys,

    I am new to visual basic 2017. I have managed to programmatically draw a vertical rectangle / line:

    Code:
    Public Class Form1
    
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Dim myPen As Pen
    myPen = New Pen(Drawing.Color.Blue, 5)
    
    Dim myGraphics As Graphics = Me.CreateGraphics
    
    myGraphics.DrawRectangle(myPen, 100, 100, 1, 50)
    End Sub
    End Class
    ---------------

    Is it possible to change its height by a user with the help of the mouse during runtime?

    Thanks!!!!
    Sorry for the late reply, but here is a small small sample
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This a Codeguru.com survey!


On-Demand Webinars (sponsored)