View Single Post
 
Old 04-08-2015, 11:52 PM
zacacp zacacp is offline
Newcomer
 
Join Date: Jan 2015
Posts: 6
Default Picturebox class for Trigers.

I dont know how to write an event from form1 into the class, i try with the "withevents" but doesnt work.

the code is simple and explain it better.

Code:
Public Class TRIGER
    Inherits PictureBox

    Public WithEvents CHARACTER As PictureBox = form1.CHARACTER

    Private Sub form1_CHARACTER_locationchanged(sender As Object, e As EventArgs) Handles CHARACTER.LocationChanged

        If form1.CHARACTER.Bounds.IntersectsWith(Me.Bounds) Then

         -SOMETHING

        End If
    End Sub
Reply With Quote