Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - sashadgt

Pages: [1]
1
DotNet / Re: Render SMFL WIndows into Panel or something like this
« on: August 21, 2013, 07:01:25 pm »
A big thanks to you  for fixing my very very stupid mistake, thats what a few months without programming can do xD

2
DotNet / Re: Render SMFL WIndows into Panel or something like this
« on: August 21, 2013, 06:26:03 pm »
Yes i have tried that and it throws me a null pointer exepcion at sfml related events
here is the code

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using SFML.Graphics;
using SFML.Window;

namespace USERCTEST
{
    public partial class UserControl1 : UserControl
    {
        public SFML.Graphics.RenderWindow renderwindow;
        public UserControl1()
        {
            InitializeComponent();
            SFML.Graphics.RenderWindow renderwindow = new SFML.Graphics.RenderWindow(this.Handle);
        }

        protected override void OnPaint(System.Windows.Forms.PaintEventArgs e)
        {
            System.Windows.Forms.Application.DoEvents();
            renderwindow.DispatchEvents();
            renderwindow.Clear(SFML.Graphics.Color.Green);
            renderwindow.Display();
        }
        protected override void OnPaintBackground(System.Windows.Forms.PaintEventArgs pevent)
        {
           
        }
    }
}

3
DotNet / Re: Render SMFL WIndows into Panel or something like this
« on: August 21, 2013, 05:41:57 pm »
Yes i have seen this example, but what i need is the ability to use form builder with sfml, the same funcionality that panel has but with sfml in it. Right now i'm trrying to create a UserControl using the code that you have posted there without having to rely on form.
I dont know if i'm explaning myself well but what  ineed is
A container class with sfml inside that i does everything by itself and i can simply drag n drop to a form
Thanks.

4
DotNet / Render SMFL WIndows into Panel or something like this
« on: August 21, 2013, 12:04:25 am »
Hello i'm new here and the past few days i started working on small project using sfml 2.1 and c#.
The problem that i have is that i can't render a SFML window into a Panel, i have looked at forum and i have found some examples that didnt work for me, does someone have an example of that?
Thanks.

PS(I tried doing the same thing using Forms and making the RenderForm  MDIChild,it works but the scrollbars that i put in there and anchored them don't autoresize anymore)

Pages: [1]
anything