Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 150,133 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 2,191 people online right now. Registration is fast and FREE... Join Now!




VB 2005 Powerpacks 3.0

 
Reply to this topicStart new topic

VB 2005 Powerpacks 3.0

hdrakakis
14 Jul, 2008 - 06:26 AM
Post #1

New D.I.C Head
*

Joined: 14 Jul, 2008
Posts: 7

Hello everybody.
I am using powerpacks 3 with vb 2005.
i create i rectangleshape on runtime and i want to move it arround with mouse on runtime.
can you make me a suggestion ?
i dont know where to read about that.
Thank you for your help
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: VB 2005 Powerpacks 3.0
14 Jul, 2008 - 11:10 AM
Post #2

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
VB2005 is VB.NET so I'm moving this to the VB.NET Forum smile.gif
User is offlineProfile CardPM
+Quote Post

WayneSpangler
RE: VB 2005 Powerpacks 3.0
14 Jul, 2008 - 03:12 PM
Post #3

D.I.C Head
**

Joined: 22 Mar, 2008
Posts: 103



Thanked: 9 times
My Contributions
Look into gdi+, graphicspath and hittest.
User is offlineProfile CardPM
+Quote Post

hdrakakis
RE: VB 2005 Powerpacks 3.0
16 Jul, 2008 - 12:49 AM
Post #4

New D.I.C Head
*

Joined: 14 Jul, 2008
Posts: 7

Thanks.
I did search for GDI+ but i didn't find anything about power packs 3.0.
Can you suggest me anything else such as a sample code or even a book?

User is offlineProfile CardPM
+Quote Post

WayneSpangler
RE: VB 2005 Powerpacks 3.0
16 Jul, 2008 - 05:32 AM
Post #5

D.I.C Head
**

Joined: 22 Mar, 2008
Posts: 103



Thanked: 9 times
My Contributions
OK, I downloaded the controls and tried them. They are handeled like anything else you want to move. Try this:
CODE
Imports System.Windows.Forms

Public Class Form1

    Dim OldPosition As New Point(0, 0)
    Dim MouseDwn As Boolean = False

    Private Sub OvalShape1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles OvalShape1.MouseDown
        MouseDwn = True
        OldPosition = Cursor.Position
    End Sub

    Private Sub OvalShape1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles OvalShape1.MouseMove
        Dim ov As PowerPacks.OvalShape = sender
        If MouseDwn Then
            If Windows.Forms.MouseButtons.Left Then
                ov.Location -= (OldPosition - Cursor.Position)
                OldPosition = Cursor.Position
            End If
        End If
    End Sub

    Private Sub OvalShape1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles OvalShape1.MouseUp
        MouseDwn = False
    End Sub
End Class

User is offlineProfile CardPM
+Quote Post

hdrakakis
RE: VB 2005 Powerpacks 3.0
16 Jul, 2008 - 10:00 PM
Post #6

New D.I.C Head
*

Joined: 14 Jul, 2008
Posts: 7

Thank you so much.

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 01:51AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month