2014-02-25 58 views

回答

0

因为我认为你想创建一个castum形式,这很容易,我做到了,因为你在da pic中看到....你所要做的就是让da形式的flatstyle是“none”

并从da工具箱中拖动一个面板使其停靠并使其颜色比da形式的颜色更深并且将3个按钮(关闭,最大化,最小化)并写入他们的代码,但对不起,我没有记住他们面包车搜索.....那么你必须把一些代码移动DA形式,当你点击和移动你把大面板和DA代码是2份

1- varibless

2-正常码

1- the varilbels 
================== 
Public Class your_form 
    Dim x, y As Integer 
    Dim newpoint As New System.Drawing.Point 
=============================================== 
2-normal codes 
    Private Sub Panel1_MouseDown(sender As Object, e As MouseEventArgs) Handles Panel1.MouseDown 
     x = Control.MousePosition.X - Me.Location.X 
     y = Control.MousePosition.Y - Me.Location.Y 
    End Sub 
    Private Sub Panel1_MouseMove(sender As Object, e As MouseEventArgs) Handles Panel1.MouseMove 
     If e.Button = Windows.Forms.MouseButtons.Left Then 
      newpoint = Control.MousePosition 
      newpoint.X -= (x) 
      newpoint.Y -= (y) 
      Me.Location = newpoint 
     End If 
    End Sub 
======================================= 

1