#region 无边框拖动效果 [DllImport("user32.dll")]//拖动无窗体的控件 public static extern bool ReleaseCapture(); [DllImport("user32.dll")] public static extern bool SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam); public const int WM_SYSCOMM
1)窗口去除边框 在组件属性中FormBorderStyle设为None 2)窗口随着鼠标移动而动 添加引用using System.Runtime.InteropServices; 在初始化控件{InitializeComponent();}代码后添加 [DllImport("user32.dll")] public static extern bool ReleaseCapture(); [DllImport("user32.dll")] public stat
public void start(Stage stage) throws Exception { longStart(); Parent root = FXMLLoader.load(getClass().getResource("FXMLDocument.fxml")); Scene scene = new Scene(root); stage.setScene(scene); stage.initStyle(StageStyle.UNDECORATED);//设定窗口无边框 st