This is a migrated thread and some comments may be shown as answers.

Flyout for winform

1 Answer 186 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
ardians
Top achievements
Rank 1
ardians asked on 01 May 2017, 04:04 AM

Hi, i'm just tried telerik trial & newbie in telerik winform. I've read and looked up the documentation manual but i dont found flyout.
i want to question, how to create flyout for winform like my attach files:

thanks you.

:)

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 01 May 2017, 12:00 PM
Hello,

Thank you for writing.

You can achieve the desired result by taking a screenshot of your screen and using it as a background to a form which is shown in a modal window. The SolidBrush class can help you to create the gray overlay. Please check my code snippet below showing how you can handle this scenario on your primary screen: 
public partial class Form1 : Form
{
    public Form1()
    {
        InitializeComponent();
    }
 
    private void radButton1_Click(object sender, EventArgs e)
    {
        Screen screen = Screen.PrimaryScreen;
        int ix, iy, iw, ih;
        ix = Convert.ToInt32(screen.WorkingArea.X);
        iy = Convert.ToInt32(screen.WorkingArea.Y);
        iw = Convert.ToInt32(screen.WorkingArea.Width);
        ih = Convert.ToInt32(screen.WorkingArea.Height);
        Bitmap image = new Bitmap(iw, ih, PixelFormat.Format32bppArgb);
        Graphics g = Graphics.FromImage(image);
        g.CopyFromScreen(ix, iy, ix, iy,
             new System.Drawing.Size(iw, ih),
             CopyPixelOperation.SourceCopy);
 
        Brush b = new SolidBrush(Color.FromArgb(180, 211, 211, 211));
        g.FillRectangle(b, new Rectangle(new Point(0, 0), image.Size));
        b.Dispose();
        g.Dispose();
 
        RadForm1 f = new RadForm1();
        f.ShowInTaskbar = false;
        f.StartPosition = FormStartPosition.Manual;
        f.BackgroundImage = image;
 
        f.FormBorderStyle = FormBorderStyle.None;
        f.Size = image.Size;
        f.Location = new Point(0, 0);
 
        f.ShowDialog();
    }
}

I hope this helps. Should you have further questions please do not hesitate to write back.

Regards,
Hristo
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
General Discussions
Asked by
ardians
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or