如何在pictureBox上分区域?
点击该区域,打开一个新窗口。

解决方案 »

  1.   

    自己定义呗, Click的时候判断 mouse的xy坐标在那个块上就执行相应的操作.
      

  2.   

     Private Sub PictureBox1_MouseDoubleClick(ByVal sender As Object, ByVal e As MouseEventArgs) Handles PictureBox1.MouseDoubleClick
            If e.X > 41 AndAlso e.X < 184 AndAlso e.Y > 387 AndAlso e.Y < 219 Then
                Dim frm2 As New Form_customer_order()
                frm2.Show()
            End If
        End Sub不行
      

  3.   

    不会啊.        private void pictureBox2_MouseDoubleClick(object sender, MouseEventArgs e)
            {
                if ((e.X > 0 && e.X < 100) && (e.Y > 0 && e.Y < 100))
                {
                    Form2 ff = new Form2();
                    ff.Show();
                }
            }
      

  4.   

            private void pictureBox2_MouseEnter(object sender, EventArgs e)
            {
                this.Cursor = Cursors.Hand;
            }        private void pictureBox2_MouseLeave(object sender, EventArgs e)
            {
                this.Cursor = Cursors.Default;
            }
      

  5.   

            private void pictureBox1_MouseDoubleClick( object sender, MouseEventArgs e )
            {
                int x = e.X;
                int y = e.Y;
                if( ( x > 0 && x < 100 ) && ( y > 0 && y < 100 ) )
                {
                    this.Cursor = Cursors.Hand;
                }
                else
                {
                    this.Cursor = Cursors.Default;
                }
            }
    这个可以啊
      

  6.   

            private void pictureBox1_MouseMove( object sender, MouseEventArgs e )
            {
                int x = e.X;
                int y = e.Y;
                if( ( x > 0 && x < 100 ) && ( y > 0 && y < 100 ) )
                {
                    this.Cursor = Cursors.Hand;
                }
                else
                {
                    this.Cursor = Cursors.Default;
                }
            }