From 6c5f8c6381166edf0824aed78a1c3f05b0c562d1 Mon Sep 17 00:00:00 2001 From: TheUltimateHacker Date: Wed, 27 May 2015 20:39:48 -0400 Subject: Draggable Windows in the BWM We're one step closer to the full Basic Window Manager implementation. I've created a UserControl called "TitleBar" for the BWM. This UserControl contains the window handling code for draggable windows, as well as a design-time settable AppName property that allows you to change the application display name (what text is shown on the titlebar). Shiftorium upgrades to unlock Draggable Windows will be added soon, but I have to clean the beast. --- shiftos_next/Terminal.Designer.vb | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) (limited to 'shiftos_next/Terminal.Designer.vb') diff --git a/shiftos_next/Terminal.Designer.vb b/shiftos_next/Terminal.Designer.vb index 7509fc4..61e68b7 100644 --- a/shiftos_next/Terminal.Designer.vb +++ b/shiftos_next/Terminal.Designer.vb @@ -25,9 +25,7 @@ Partial Class Terminal Me.components = New System.ComponentModel.Container() Me.terminaltext = New System.Windows.Forms.TextBox() Me.tmrfirstuse = New System.Windows.Forms.Timer(Me.components) - Me.pnltop = New System.Windows.Forms.Panel() - Me.lbtitle = New System.Windows.Forms.Label() - Me.pnltop.SuspendLayout() + Me.pnltop = New shiftos_next.Titlebar() Me.SuspendLayout() ' 'terminaltext @@ -38,10 +36,10 @@ Partial Class Terminal Me.terminaltext.Dock = System.Windows.Forms.DockStyle.Fill Me.terminaltext.Font = New System.Drawing.Font("Courier New", 8.25!) Me.terminaltext.ForeColor = System.Drawing.Color.White - Me.terminaltext.Location = New System.Drawing.Point(0, 30) + Me.terminaltext.Location = New System.Drawing.Point(0, 32) Me.terminaltext.Multiline = True Me.terminaltext.Name = "terminaltext" - Me.terminaltext.Size = New System.Drawing.Size(635, 388) + Me.terminaltext.Size = New System.Drawing.Size(635, 386) Me.terminaltext.TabIndex = 0 Me.terminaltext.Text = "ShiftOS Beta 1.0" ' @@ -51,25 +49,15 @@ Partial Class Terminal ' 'pnltop ' - Me.pnltop.BackColor = System.Drawing.Color.Gray - Me.pnltop.Controls.Add(Me.lbtitle) + Me.pnltop.AppName = "Terminal" Me.pnltop.Dock = System.Windows.Forms.DockStyle.Top Me.pnltop.Font = New System.Drawing.Font("Courier New", 8.25!) Me.pnltop.ForeColor = System.Drawing.Color.White Me.pnltop.Location = New System.Drawing.Point(0, 0) Me.pnltop.Name = "pnltop" - Me.pnltop.Size = New System.Drawing.Size(635, 30) + Me.pnltop.Size = New System.Drawing.Size(635, 32) Me.pnltop.TabIndex = 1 ' - 'lbtitle - ' - Me.lbtitle.AutoSize = True - Me.lbtitle.Location = New System.Drawing.Point(12, 9) - Me.lbtitle.Name = "lbtitle" - Me.lbtitle.Size = New System.Drawing.Size(63, 14) - Me.lbtitle.TabIndex = 0 - Me.lbtitle.Text = "Terminal" - ' 'Terminal ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -81,14 +69,11 @@ Partial Class Terminal Me.Name = "Terminal" Me.Text = "Terminal" Me.WindowState = System.Windows.Forms.FormWindowState.Maximized - Me.pnltop.ResumeLayout(False) - Me.pnltop.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents terminaltext As System.Windows.Forms.TextBox Friend WithEvents tmrfirstuse As System.Windows.Forms.Timer - Friend WithEvents pnltop As System.Windows.Forms.Panel - Friend WithEvents lbtitle As System.Windows.Forms.Label + Friend WithEvents pnltop As shiftos_next.Titlebar End Class -- cgit v1.2.3