S
Steve Ricketts
Posted in languages.vb.upgrade but then I realized it was rarely used so I'm
reposting here.
I have a large number of VB6 apps that I would like to convert to VB.net.
All of them use a standard (here anyway) technique of calling a public sub
and passing the form reference byref so many frequently used subs/functions
can be used without regard to the calling form's name.
private sub Form_Load()
call registerForm(Form1)
end sub
In a common module...
public myForm as form
public sub registerForm(byRef theForm as Form)
set myForm = theForm
end sub
public sub otherSubs()
myForm.caption = "some title" & app.version...
myForm.lstRoles.clear
end sub
I've run a couple of these programs through VB.net 2008 and it warns me of
an error that my controls cannot be referenced because they are in the
generic namespace Form.
I'd like to know how a similar technique is written in .Net? Any direction
greatly appreciated.
Steve
reposting here.
I have a large number of VB6 apps that I would like to convert to VB.net.
All of them use a standard (here anyway) technique of calling a public sub
and passing the form reference byref so many frequently used subs/functions
can be used without regard to the calling form's name.
private sub Form_Load()
call registerForm(Form1)
end sub
In a common module...
public myForm as form
public sub registerForm(byRef theForm as Form)
set myForm = theForm
end sub
public sub otherSubs()
myForm.caption = "some title" & app.version...
myForm.lstRoles.clear
end sub
I've run a couple of these programs through VB.net 2008 and it warns me of
an error that my controls cannot be referenced because they are in the
generic namespace Form.
I'd like to know how a similar technique is written in .Net? Any direction
greatly appreciated.
Steve