Hi,
I am using VS 2008 conversion wizard to convert a VB6 project to VB.net 2008. I have encountered a problem in the converted VB.net project. The Load event of a ‘form’ is not rising (in a specific scenario) in the converted VB.net version in comparison to the previous (VB6) implementation. The problem scenario is when I call a subroutine “SetLabelPos()” in ‘form1’ from ‘MainForm’:
Form1.SetLabelP os()
In this function I set position of label on form1:
Label1.Top = 350
When this line executes it raises the load event of form1 (in VB6 and not in VB.net), which performs some lengthy tasks and then returns control to the next line in “SetLabelPos” subroutine.
I have attached a sample VB6 project with this post, which demonstrates the scenario. I need reasoning (as why the same code acts differently in .net version i.e. Load event of the form is not raised) and work around for this situation.
Thanks
Hassan
I am using VS 2008 conversion wizard to convert a VB6 project to VB.net 2008. I have encountered a problem in the converted VB.net project. The Load event of a ‘form’ is not rising (in a specific scenario) in the converted VB.net version in comparison to the previous (VB6) implementation. The problem scenario is when I call a subroutine “SetLabelPos()” in ‘form1’ from ‘MainForm’:
Form1.SetLabelP os()
In this function I set position of label on form1:
Label1.Top = 350
When this line executes it raises the load event of form1 (in VB6 and not in VB.net), which performs some lengthy tasks and then returns control to the next line in “SetLabelPos” subroutine.
I have attached a sample VB6 project with this post, which demonstrates the scenario. I need reasoning (as why the same code acts differently in .net version i.e. Load event of the form is not raised) and work around for this situation.
Thanks
Hassan
Comment