Index: Splitter.cs
===================================================================
--- Splitter.cs	(revision 43245)
+++ Splitter.cs	(working copy)
@@ -21,6 +21,7 @@
 //
 // Authors:
 //	Jackson Harper (jackson@ximian.com)
+//  Jonathan Chambers (jonathan.chambers@ansys.com)
 //
 
 
@@ -28,6 +29,8 @@
 using System.ComponentModel;
 using System.ComponentModel.Design;
 using System.Drawing;
+using System.Drawing.Drawing2D;
+using System.Windows.Forms;
 
 
 namespace System.Windows.Forms {
@@ -38,8 +41,8 @@
 		#region  Fields
 		private int min_extra;
 		private int min_size;
-		private int move_start_x;
-		private int move_start_y;
+		private int cursor_offset_x;
+		private int cursor_offset_y;
 
 		private int thickness;
 		private bool moving;
@@ -47,6 +50,7 @@
 
 		private SplitterEventHandler on_splitter_moved;
 		private SplitterEventHandler on_splitter_moving;
+		private Form drag_form;
 
 		private Control adjacent;
 		#endregion	// Fields
@@ -54,13 +58,16 @@
 		#region Public Constructors
 		public Splitter ()
 		{
-			SetStyle (ControlStyles.UserPaint, true);
 			SetStyle (ControlStyles.StandardClick, true);
 			SetStyle (ControlStyles.StandardDoubleClick, true);
-			SetStyle (ControlStyles.AllPaintingInWmPaint, true);
 			SetStyle (ControlStyles.Selectable, false);
 
 			Dock = DockStyle.Left;
+			drag_form = new Form();
+			drag_form.FormBorderStyle = FormBorderStyle.None;
+			drag_form.MinimumSize = new Size(1,1);
+			drag_form.ShowInTaskbar = false;
+			drag_form.Paint+=new PaintEventHandler(drag_form_Paint);
 
 			min_extra = 25;
 			min_size = 25;
@@ -185,11 +192,15 @@
 			if (!moving && e.Button == MouseButtons.Left) {
 				adjacent = FindAdjacentControl ();
 
-				move_start_x = e.X;
-				move_start_y = e.Y;
+				cursor_offset_x = e.X;
+				cursor_offset_y = e.Y;
 
 				moving = true;
 				Capture = true;
+				drag_form.Height = this.Height;
+				drag_form.Width = this.Width;
+				drag_form.Location = PointToScreen(this.Location);
+				drag_form.Show();
 			}
 		}
 
@@ -198,40 +209,47 @@
 
 			base.OnMouseMove (e);
 			if (moving) {
-				int x_move = e.X - move_start_x;
-				int y_move = e.Y - move_start_y;
 
-				move_start_x = e.X;
-				move_start_y = e.Y;
+				Point splitterLocation;
 
-				if (horz) {
-					Top = Top + y_move;
-				} else {
-					Left = Left + x_move;	     
-				}
+				if (horz) 
+					splitterLocation = new Point(this.Location.X,e.Y-cursor_offset_y);
+				else 
+					splitterLocation = new Point(e.X-cursor_offset_x,this.Location.Y);
+				
+				drag_form.Location = PointToScreen(splitterLocation);
 
-				OnSplitterMoving (new SplitterEventArgs (e.X, e.Y, Left, Top));
+				OnSplitterMoving (new SplitterEventArgs (e.X, e.Y, splitterLocation.X, splitterLocation.Y));
+
 			}
 		}
 
 		protected override void OnMouseUp (MouseEventArgs e)
 		{
-			base.OnMouseDown (e);
+			base.OnMouseUp (e);
 			moving = false;
 			Capture = false;
+			
+			drag_form.Hide();
+			
+
+			if (horz)
+				Move (e.X, e.Y-cursor_offset_y);
+			else 
+				Move (e.X-cursor_offset_x, e.Y);
+
+			OnSplitterMoved(new SplitterEventArgs (e.X, e.Y, Location.X, Location.Y));
 			adjacent = null;
 		}
 
 		protected virtual void OnSplitterMoved (SplitterEventArgs e) {
 			if (on_splitter_moved != null)
 				on_splitter_moved (this, e);
-			Move (e.SplitX, e.SplitY);
 		}
 
 		protected virtual void OnSplitterMoving (SplitterEventArgs e) {
 			if (on_splitter_moving != null)
 				on_splitter_moving (this, e);
-			Move (e.SplitX, e.SplitY);
 		}
 
 		protected override void SetBoundsCore (int x, int y, int width, int height, BoundsSpecified specified)
@@ -254,29 +272,24 @@
 		#endregion	// Protected Instance Methods
 
 		#region Internal & Private Methods
-		private void Draw () {
-			using (Graphics pdc = Parent.CreateGraphics ()) {
-				pdc.FillRectangle (ThemeEngine.Current.ResPool.GetSolidBrush (Color.Red), ClientRectangle);
-			}
-		}
 
 		private void Move (int x, int y) {
 			if (adjacent == null)
 				return;
 
+			Point parentPoint = Parent.PointToClient(PointToScreen(new Point(x,y)));
+
 			if (horz) {
-				if (adjacent.Height == y)
+				if (adjacent.Height == parentPoint.Y)
 					return;
-				adjacent.Height = y;
+				adjacent.Height = parentPoint.Y;
 				return;
 			}
 
-			if (adjacent.Width == x)
+			if (adjacent.Width == parentPoint.X)
 				return;
 			
-			adjacent.Width = x;
-
-			Draw ();
+			adjacent.Width = parentPoint.X;
 		}
 
 		private Control FindAdjacentControl () {
@@ -404,7 +417,12 @@
                         add { on_splitter_moving += value; }
                         remove { on_splitter_moving -= value; }
                 }
-		#endregion
+		#endregion
+
+		private void drag_form_Paint(object sender, PaintEventArgs e)
+		{
+			e.Graphics.FillRectangle(new HatchBrush(HatchStyle.SmallCheckerBoard, Color.White,Color.Black),e.ClipRectangle);
+		}
 	}
 }
 
