mirror of
https://github.com/raylib-cs/raylib-cs
synced 2025-09-09 03:01:41 -04:00
Tidying up project
- Added Release folder for important dlls that will be used in nuget package - Moved Rayforms into Examples folder - Added updated generator(WIP)
This commit is contained in:
58
Examples/RayForm.cs
Normal file
58
Examples/RayForm.cs
Normal file
@@ -0,0 +1,58 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
using static Raylib.Raylib;
|
||||
|
||||
namespace Raylib
|
||||
{
|
||||
class RayForm : Form
|
||||
{
|
||||
private Panel panel;
|
||||
|
||||
#region WinAPI Entry Points
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern IntPtr SetWindowPos(IntPtr handle, IntPtr handleAfter, int x, int y, int cx, int cy, uint flags);
|
||||
[DllImport("user32.dll")]
|
||||
private static extern IntPtr SetParent(IntPtr child, IntPtr newParent);
|
||||
[DllImport("user32.dll")]
|
||||
private static extern IntPtr ShowWindow(IntPtr handle, int command);
|
||||
|
||||
#endregion
|
||||
|
||||
public static void Run()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new RayForm());
|
||||
}
|
||||
|
||||
public RayForm()
|
||||
{
|
||||
panel = new Panel();
|
||||
panel.Size = new Size(640, 480);
|
||||
panel.Location = new Point(80, 10);
|
||||
panel.BackColor = System.Drawing.Color.Red;
|
||||
Controls.Add(panel);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// DrawControl
|
||||
//
|
||||
this.ClientSize = new System.Drawing.Size(284, 261);
|
||||
this.Name = "DrawControl";
|
||||
this.Load += new System.EventHandler(this.DrawControl_Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
private void DrawControl_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user