コード例 #1
0
        private void lineControl1_MouseHover(object sender, EventArgs e)
        {
            l2          = new LineControl2();
            l2.Name     = "CommentLine";
            l2.Size     = new Size(30, 80);
            l2.Location = new Point(((LineControl)sender).PointToScreen(((MouseEventArgs)e).Location).X, ((LineControl)sender).PointToScreen(((MouseEventArgs)e).Location).Y - l2.Height);
            this.Controls.Add(l2);

            lbl          = new Label();
            lbl.Name     = "CommentLabel";
            lbl.Size     = new Size(250, 80);
            lbl.Location = new Point(l2.Left + l2.Width, l2.Top - lbl.Height);
            lbl.Text     = "登録情報 :売上情報" + Environment.NewLine + "集計キー :契約番号";
            this.Controls.Add(lbl);
        }
コード例 #2
0
        private void LineControl_MouseHover(object sender, EventArgs e)
        {
            l2          = new LineControl2();
            l2.Name     = "CommentLine";
            l2.Size     = new Size(10, 60);
            l2.Location = new Point(this.ParentForm.PointToClient(Cursor.Position).X, this.ParentForm.PointToClient(Cursor.Position).Y - l2.Height);
            this.ParentForm.Controls.Add(l2);

            lbl             = new Label();
            lbl.Name        = "CommentLabel";
            lbl.Size        = new Size(150, 30);
            lbl.BorderStyle = BorderStyle.FixedSingle;
            lbl.Location    = new Point(l2.Left + l2.Width, l2.Top - lbl.Height);
            lbl.Text        = "登録情報 :売上情報" + Environment.NewLine + "集計キー :契約番号";
            this.ParentForm.Controls.Add(lbl);
        }