Sorry, the Forum is closed :(

Unfortunately, the forum is now closed.

Please read the following post for further details.

We apologize for the inconvenience.
The SharpDX team.
Welcome, Guest
Username: Password: Remember me
Welcome to the general discussions!
  • Page:
  • 1

TOPIC: Windows Forms

Windows Forms 1 year 4 months ago #1307


  • Posts:5
  • newb's Avatar
  • newb
  • Fresh Boarder
  • OFFLINE
Probably a silly question, but does SharpDX use windows Forms?
So, in order to get user input from the message pump I just need to add a message filter, or override WndProc.


Or do I have to use P/Invoke?
The administrator has disabled public write access.

Re: Windows Forms 1 year 4 months ago #1316


  • Posts:5
  • newb's Avatar
  • newb
  • Fresh Boarder
  • OFFLINE
What I understand is, user input is better captured through the windows message pump, rather than direct input. And overriding WndProc (WinForms) is the proper way to capture windows messages in a c# environment. Ergo, if I'm targeting windows as my platform, I'd be better off using a Form as my drawing surface. I see there is a RenderForm class in SharpDX, that must be the equivalent of the RenderForm in SlimDX, so I'd be using that.

So, is that all correct or am I off the mark?
The administrator has disabled public write access.

Re: Windows Forms 1 year 4 months ago #1321


  • Posts:843 Thank you received: 1
  • xoofx's Avatar
  • xoofx
  • Administrator
  • OFFLINE
SharpDX doesn't force you to use Windows forms, but all samples are using SharpDX.Window.RenderForm which is a Windows Form (The toolkit is using it as well). For keyboard input, I wouldn't bother more than just subscribing to KeyDown/KeyUp events on the form, it is almost the same thing than hooking WndProc, just a level of indirection without the mess of it.
The administrator has disabled public write access.

Re: Windows Forms 1 year 4 months ago #1336


  • Posts:5
  • newb's Avatar
  • newb
  • Fresh Boarder
  • OFFLINE
Cool, thanks for the reply.
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 0.227 seconds