RazerWriter Posted June 27, 2003 Posted June 27, 2003 I am currently converting an old VB6 game into NET version. THank God that the project converter worked for this one! Still, it didn't help much. I have tons of lines to debug and correct. Now, one variable or component that NET could not find was the "StdFont" from vb6. This was VB's old font component. can't seem to find the location of it in NET. Can anyone help me here? ----------------------------------------------------------------- BTW - another question: how do I add or create references to public variables and objects from a class if I wanted to access them from a form? Quote
*Experts* Volte Posted June 27, 2003 *Experts* Posted June 27, 2003 It's System.Drawing.Font in .NET. Note that the architecture of .NET is totally different than VB6, so it is not the same exact Font class as VB6's. To create public variables, but them in a class as being shared:Class Declarations Public Shared publicVar As Integer End ClassThen, from any form you can access it with 'Declarations.PublicVar'. Quote
RazerWriter Posted June 27, 2003 Author Posted June 27, 2003 great, thanks. I tried the adding "shared" to the variables, that worked, but how come stand alone procedures don't show up when I try to call them from another object, let's say a form? They are all public, yet I can't access them! Sorry, I am well experienced in VB but I just got VbNET! Quote
RazerWriter Posted June 27, 2003 Author Posted June 27, 2003 Ohh wait!! I see now :) :eek: the variables within a public shared procedure must be declated shared as well. This is all coming clear now.... ah yes... I am now well-learnt in Vb.NET ... time to start programming with my new master skills!! :D Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.