Or, even better (well, different anyhow...)
and, with the shortcut
Dim nl As String = Environment.NewLine
(notice that, in this example, the new line is of Type String and not Char, for what its worth)
The reason for this is that using global (or application) level variables breaks encapsulation. They're thinking is that if too many things have asscess to something, there's more of a chance of it being corrupted. I think it really all comes down to preference. Sure, using a code mdoule to hold...
For the first statement to work you'll have to first change the constructor (or add an overloaded one) on Form2...
#Region " Windows Form Designer generated code "
Public Sub New(ByVal whatever As[your Type])
Or, if the form you need to use the variable on is "related" to the form that contains the variable, you could get it through the Owner property. You'll have to make sure that when you call the forms's Show method, you pass the parameter for the owner.
Then, in Form2 when...
It's really pretty simple. Just put something like this the Form's (and any controls that may be on the Form) MouseMove event:
Dim ptLocationOnForm As New System.Drawing.Point
Dim ptLOcationOnScreen As New System.Drawing.Point
'To get the mouse location relative to the Form