I'm not sure how to wrap SFML's window or embed SFML into a Form. Do you mean to make a Form project and ignore the actual Form? Because I've been trying this but I'm not sure what to pass.
If you read the documentation or search around (I already posted multiple examples of this in the .Net forum) it is already well explained.
Sadly there is next to nothing on the internet that has much on this
Really?How is the contextmenu/button/whatever form object is actually drawn?
In WinForms every single control is an actual window that the OS has created and embedded within another window. Whether SFML creates a window itself or uses an existing window the graphics initialization part is the same (creating an opengl context with the handle of whatever window it is using). So to embed SFML in a WinForms project all you do is pass the handle of the control to the constructor. Then the OpenGL rendering takes over for drawing that window's contents (or control as it is also a window).
And really, if you want to integrate WinForms with SFML it is best to already know how WinForms works so I won't be explaining that here. But I just took 5 minutes and wrote the following example (exactly how I already explained to do it) which shows opening a native context menu. The code should be self explanatory and give you enough to get started.
using System.Windows.Forms;using SFML.System;using SFML.Window;using SFML.Graphics;namespace Example
{ static class ContextExample
{ public static void Main
() { var window
= new Form
() { Text
= "Native Context Menu Example",
Size
= new System.Drawing.Size(500,
500) }; window
.Show(); var renderWindow
= new RenderWindow
(window
.Handle); renderWindow
.SetVerticalSyncEnabled(true); var button
= new RectangleShape
(new Vector2f
(150,
30)) { FillColor
= Color
.Blue,
Position
= new Vector2f
(150,
200) }; var text
= new Text
("Right Click",
new Font
("C:/Windows/Fonts/Arial.ttf")) { Color
= Color
.Black,
CharacterSize
= 20,
Position
= new Vector2f
(150,
200) }; var menu
= new ContextMenu
(new MenuItem
[] { new MenuItem
("Red",
(e, sender
) => { button
.FillColor = Color
.Red; }),
new MenuItem
("Blue",
(e, sender
) => { button
.FillColor = Color
.Blue; }) }); renderWindow
.MouseButtonPressed += (sender, e
) => { var worldLocation
= renderWindow
.MapPixelToCoords(new Vector2i
(e
.X, e
.Y)); if (e
.Button == Mouse
.Button.Right && button
.GetGlobalBounds().Contains(worldLocation
.X, worldLocation
.Y)) { menu
.Show(window,
new System.Drawing.Point(e
.X, e
.Y)); } }; while (window
.Visible) { Application
.DoEvents(); renderWindow
.DispatchEvents(); renderWindow
.Clear(Color
.White); renderWindow
.Draw(button
); renderWindow
.Draw(text
); renderWindow
.Display(); } } }}