Hayer,
I understand what you're trying to do. You've got your code running inside the default GameLoop function which is located in the Application.vb file and you want to access the controls on fMain.
This is straight forward to modify.
Open the Application.vb file and add the following line:
' DarkGDK.NET Startup project
'
Imports DarkGDK
Imports DarkGDK.Camera
Imports DGDKLib
''' <summary>
''' Our main application class
''' </summary>
''' <remarks></remarks>
Public Class Application
Public Shared _fMain As fMain
Now open the fMain.vb file in code view and add the following line to the 'Public Sub New()' function:
''' <summary>
''' Our main application's form. The form contains a DarkGDK ctlDarkDGKViewport
''' control which is responsible for initializing the DarkGDK.NET toolkit for you
''' To change any of the default settings for DarkGDK.NET, modify the control's
''' properties within the Windows Form Designer.
''' </summary>
''' <remarks></remarks>
Public Class fMain
''' <summary>
''' Default constructor for our form
''' </summary>
''' <remarks></remarks>
Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
Application._fMain = Me
End Sub
Now, in your Application.vb functions, to access the controls of the main form, just use the prefix shared variable before the control name etc.
i.e. _fMain.MyScrollbar.Value
Hope this helps.
Paul.