We help IT Professionals succeed at work.

How to call new form in VB2013?

Burzhuin
Burzhuin asked
on
122 Views
Last Modified: 2017-05-11
I have a little bit strange question. I have to call a Form that is designed in VB2013 from VB2010 project. In the Form Load I placed Stop statement to halt the execution. But it looks to me Stop was stepped over.  The execution never halted. Any suggestions?
Comment
Watch Question

Fernando SotoRetired
CERTIFIED EXPERT
Distinguished Expert 2017

Commented:
Why not use a Breakpoint in place of the Stop statement?
CERTIFIED EXPERT

Commented:
Show code please.
Are you executing an app that was built in VB2013?
Or trying to add the 2013 form to a 2010 project?

Author

Commented:
This is how I am calling the form from VB2010:
 Private Sub TopStripExceptions_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles menExceptionSearch.Click
        Try

            ' Dim sfd As New SearchFieldsDirectory
            'TrackerDirectory.UserDirectory.LoginUser = (New ExceptionUserDirectory).GetUserbyLoginID(_UserName)
            'MessageBox.Show(sfd.ExceptionTypeList.Count().ToString())
            Dim frm As New Nwh.Member.Utility.ExceptionTracker.Views.frmSearch
            'Stop
            frm.SearchModel = TrackerDirectory
            frm.MdiParent = Me
            frm.Show()
        Catch ex As Exception
            MessageBox.Show(ex.ToString)
            _activityLog.WriteToErrorLog("Exception Tracker Search Form", ex)
        End Try

    End Sub

and here is my code in Form Load VB2013:

Private Sub frmSearch_Load(sender As Object, e As EventArgs) Handles Me.Load
        ' Dim searchModel As New SearchFieldsDirectory
        'Dim searchVM As New SearchPanelVM
        Stop
        'MsgBox("User is: " & searchVM.User.ToString())
        searchVM.searchModel = searchModel
        '12/1/2015
        searchVM.User = SearchModel.UserDirectory.LoginUser
        MsgBox("User is: " & searchVM.User.ToString())



        SearchPanelView1.DataContext = searchVM
        ' MessageBox.Show(searchModel.ExceptionTypeList.Count.ToString())

      GetUsrRole()

    End Sub
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.