public ToolTip() { base.BackColor = SystemColors.Info; base.ForeColor = SystemColors.InfoText; //base.set_BorderStyle(BorderStyle.FixedSingle); base.BorderStyle = (BorderStyle.FixedSingle); base.Text = ""; this.m_textAlignment = HorizontalAlignment.Left; this.m_showLocation = Resco.Controls.OutlookControls.ShowLocation.TopLeft; this.m_minimizeBox = false; this.m_showTitle = false; this.m_titleText = ""; this.m_titleFont = new Font(this.Font.Name, this.Font.Size, FontStyle.Bold); this.m_titleHeight = 0x10; this.m_titleBackColor = SystemColors.ActiveCaption; this.m_titleForeColor = SystemColors.ActiveCaptionText; this.m_gradientBackColor = new GradientColor(); this.m_gradientBackColor.PropertyChanged += new EventHandler(this.m_gradientBackColor_PropertyChanged); this.m_useGradient = false; this.m_style = ToolTipStyle.Normal; }
private void InitDrawShadowMask(Graphics gr, Rectangle aRect, Point anOffset) { GradientColor color = new GradientColor(); color.FillDirection = FillDirection.Vertical; color.StartColor = Color.FromArgb(0x9c, 0x9c, 0x9c); color.EndColor = Color.White; int height = aRect.Height / 3; Rectangle rc = new Rectangle(anOffset.X, anOffset.Y, aRect.Width, height); Rectangle rectangle2 = new Rectangle(anOffset.X, (anOffset.Y + aRect.Height) - height, aRect.Width, height); Rectangle rect = new Rectangle(anOffset.X, rc.Bottom, aRect.Width, rectangle2.Top - rc.Bottom); using (SolidBrush brush = new SolidBrush(Color.White)) { gr.FillRectangle(brush, rect); } color.DrawGradient(gr, rc); color.StartColor = Color.White; color.EndColor = Color.FromArgb(0x9c, 0x9c, 0x9c); color.DrawGradient(gr, rectangle2); }
public InkBox() { this.m_lastPositon = new Point(0, 0); this.Width = 200; this.Height = 80; this.m_ImageSize = new System.Drawing.Size(this.Width, this.Height); this.BackColor = Color.White; this.ForeColor = Color.Black; this.m_gradientBackColor = new GradientColor(); this.m_gradientBackColor.PropertyChanged += new EventHandler(this.m_gradientBackColor_PropertyChanged); this.m_useGradient = false; this.m_penWidth = 0; this.InitScrollBar(); Graphics graphics = base.CreateGraphics(); this.m_IsQvga = graphics.DpiX == 96f; graphics.Dispose(); graphics = null; this.CreateMemoryBitmap(); this.CreateGdiObjects(); this.CreatePenObjects(); }