Sorry about the no-edits, I'll be more careful.
Ok, I read the last post. You have to understand, that dot net is a little confusing. I simplified the code to get a better understanding and to better my question. Here is my complete application.
Please note that in the _closing procedure, I had to use window.close. If I do not, then after closing the form, the application remains in memory, as I checked the windows task manager. So it's important to explicitly shutdown the sfml window control.
My problem in understanding this is in relation to a standard windows forms application. From what I understood, in a net application, if the last form closes, then everything shuts down with it. Since the program remained in memory, i was not sure if I had to have a specific way to handle all this, including any special exception handling.
So now that I have this. Is it necessary to make any other considerations for initialization, shutdown, or the possibility of exceptions?
Imports SFML
Imports SFML
.WindowImports SFML
.GraphicsPublic Class Form1
Private rh
As New Control
' rs = renderhost Private WithEvents window
As RenderWindow
Private Sub Form1_FormClosing
(ByVal sender
As Object,
ByVal e
As System
.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing window
.Close() End Sub Private Sub Form1_Load
(ByVal sender
As Object,
ByVal e
As System
.EventArgs) Handles Me.Load rh
.Size = New Size
(640,
360) Me.Controls.Add(rh
) rh
.Location = New Point
(0,
0) window
= New RenderWindow
(rh
.Handle) window
.SetVerticalSyncEnabled(True) Me.Show() While window
.IsOpen Application
.DoEvents() window
.DispatchEvents() window
.Clear() window
.Display() End While End Sub