Logo
English Russian German French Spanish Italian
contact usprivacy
   Support Forums
chart
• Adjust flexgrid cell
• Animation
• Centering form text
• Coffee machine
• Creating fileshares
• Creating shortcuts
• Custom buttons
• Directory browser
• Disable mouse events
• File search by ext
• File transfer
• File watcher
• Formatting flexgrid
• Get Content Type
• Get HTML source
• Get modem port
• HTTP proxy
• ipconfig
• Large file split/merge
• MAPI
• MCI Sound Player
• Menu with images
• MP3 normalizer
• Net Send
• Netstat 2000
• No duplicate entries
• Outlook Address Book
• Set font color
• Shapes
• SOAP test
• Text-to-image
• Text file viewer
• Text find/replace
• UPS component
• View NT groups
• Word template
• Writing DNS control
    • Using DNS control
• Writing SMTP control
    • Sending email
    • Mailing list
• Writing WhoIs control
    • Using WhoIs control
• View HTML source
OISV - Organization of Independent Software Vendors - Contributing Member
VB projects - Shapes

Description: Writing the program that draws user-defined shapes on the form
Minimum requirements: vb5
Download: source code
Screenshot:
shapes(3017 bytes)
Project: Standard EXE
Controls: txtHeight (textbox), txtWidth (textbox), cmbStyle (combobox), shp (shape)
Code:
Private Sub cmbStyle_Click()
    shp.Shape = cmbStyle.ListIndex
End Sub

Private Sub Form_Load()
    cmbStyle.AddItem "Rectangle"
    cmbStyle.AddItem "Square"
    cmbStyle.AddItem "Oval"
    cmbStyle.AddItem "Circle"
    cmbStyle.AddItem "Rounded Rectangle"
    cmbStyle.AddItem "Rounded Square"
    cmbStyle.ListIndex = 0
    txtHeight = 500
    txtWidth = 500
End Sub

Private Sub txtHeight_Change()
    If Val(txtHeight) > 0 Then shp.Height = Val(txtHeight)
End Sub

Private Sub txtWidth_Change()
    If Val(txtWidth) > 0 Then shp.Width = Val(txtWidth)
End Sub

Copyright © 1996-2010 OstroSoft. All rights reserved. info@ostrosoft.com