Results 1 to 4 of 4

Thread: [RESOLVED] Couple of questions

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2025
    Posts
    182

    Resolved [RESOLVED] Couple of questions

    Question 1: I have created a Dialog (Splash Screen) but once I closed the Design file then I'm not able to reopen the created DLG. I see the files in MyProject, so it's not that they are not there, but like VS can't see them.

    Question 2: I have added classes to the project, but those classes are not part of the compile. What includes those new classes into the build?

    EDIT:
    Question 3: I have a huge amount of API function within a "Defines" module. Now it appears that other classes don't see them. Do I have to place them in every class to work? Seems odd if I do.

    Thanks for all your help. VB is new, I'm a 10 year VBA guy sharp learning curve.

    EDIT: Should the added classes be in the Solution items section? I would think they would appear in the project section. Sorry for the edits, question come up and rather than create a new thread this seems simpler
    Last edited by FunkMonkey; Mar 17th, 2025 at 06:19 PM.

  2. #2
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,796

    Re: Couple of questions

    A solution can consist of one or more projects. In your case, you have one project in the solution, which is the typical case. Having multiple projects allows one to be dependent on another, and so forth, but that's kind of irrelevant to you, at this point.

    Anything within a module should be visible to everything, so long as they are declared Public. If they are Private, then that would be a problem.

    Question 2 baffles me. I've never tried, nor succeeded, to add a class to a project such that it wasn't part of the project. I'm not sure how you managed that. You can exclude a class from a project in Solution Explorer on the right click menu, but it won't start excluded...unless you added it outside of the project, I suppose, though I'd have to try that. How did you add the class? Add New Item should allow you to add a class, in which case it is part of the project.

    Normally, for Question 1, you just click on the form in Solution Explorer, so that one has me baffled, as well, as I would expect that you have already tried that.
    My usual boring signature: Nothing

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Mar 2025
    Posts
    182

    Re: Couple of questions

    Quote Originally Posted by Shaggy Hiker View Post
    A solution can consist of one or more projects. In your case, you have one project in the solution, which is the typical case. Having multiple projects allows one to be dependent on another, and so forth, but that's kind of irrelevant to you, at this point.

    Anything within a module should be visible to everything, so long as they are declared Public. If they are Private, then that would be a problem.

    Question 2 baffles me. I've never tried, nor succeeded, to add a class to a project such that it wasn't part of the project. I'm not sure how you managed that. You can exclude a class from a project in Solution Explorer on the right click menu, but it won't start excluded...unless you added it outside of the project, I suppose, though I'd have to try that. How did you add the class? Add New Item should allow you to add a class, in which case it is part of the project.

    Normally, for Question 1, you just click on the form in Solution Explorer, so that one has me baffled, as well, as I would expect that you have already tried that.
    Thanks Shaggy. Let me see if I can make things clearer.

    Question 1: Resolved. Appears that the frame was not showing up, but then after I moved the *vb file in the solution explorer it showed up. Seems odd to me but as long as it's there I don't care how it got there.

    Question 2: Perhaps I'm not addressing it correctly. They show up in the solution explorer, but I was thinking they should be under the "Project" information. Hope that helps?

    Anything within a module should be visible to everything, so long as they are declared Public. If they are Private, then that would be a problem.
    That's not the case, at least not what I'm seeing. See below:

    Code:
    Public Class ClsEPIQ
    
    
    ...
    
    **** This should cause a compiler error as [m_pClsIE] is not defined, but there are no errors in this file.
    
        Private Sub BTN_ASSIGN_TO_Click()
    
            Dim bStatus As Boolean
    
            On Error GoTo Err_Hndlr
    
            If (GetIsDebug()) Then
                Debug.Print("FRM_ClsEPIQ [BTN_ASSIGN_TO_Click Enter]" & vbCrLf)
            End If
    
            If (GetAbortRun() = True) Then
                GoTo Clean_Exit
            End If
    
            bStatus = False
            InitializeProgressBar(22)
    
            Call UpdateRunControls(eRUN_GENERIC_MESSAGE, cID_EDIT_ALL_FIELDS, PINumber)
            If (m_pClsIE.SelectToolbarItem(cID_MENU_MORE, cID_EDIT_ALL_FIELDS) = False And GetAbortRun() = False) Then
    
    
                Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "Deleteing Name", PINumber)
                If (m_pClsIE.PressButton(eELEMENT_ID, cID_REMOVE_PI_MANAGER) = False And GetAbortRun() = False) Then
    
                    Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "Adding [Nuero PPE] to Investigation Manager", PINumber)
                    If (m_pClsIE.WrComboBoxDropDownSelectElementItem(eELEMENT_NAME, "SJM_COMPLAINTS_PI_PI_MANAGER_AUTOCOMPLETE", "Neuro PPE") = False And GetAbortRun() = False) Then
    
    
                        Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "Opening Message Block", PINumber)
                        If (m_pClsIE.SelectToolbarItem(cCLASS_COMMENT_HISTORY, cID_EXPAND_COLLAPSE_COMMENTS_HISTORY) = False And GetAbortRun() = False) Then
    
    
                            Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "Opening Add Commnet", PINumber)
                            If (m_pClsIE.PressButton(eELEMENT_CLASS, cCLASS_ADD_COMMENT, 1) = False And GetAbortRun() = False) Then
    
    
                                Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "Adding comment", PINumber)
                                'Populate the Investigation # combobox with the anysis changes
                                If (m_pClsIE.WrTextBox(cNAME_ETQ_COMMENT, "Updating Investiation Manager") = False And GetAbortRun() = False) Then
    
    
                                    If (m_pClsIE.SelectToolbarItem(cCLASS_COMMENT_HISTORY, cID_EXPAND_COLLAPSE_COMMENTS_HISTORY) = False And GetAbortRun() = False) Then
    
    
                                        Call UpdateRunControls(eRUN_GENERIC_MESSAGE, cMSG_SAVING_AND_CLOSING_TAB, PINumber)
                                        If (m_pClsIE.SelectToolbarItem(cID_SAVE_AND_CLOSE_PI) = False And GetAbortRun() = False) Then
    
    
                                            DialogWaitOpen("embeddedViewDialog")
    
                                            Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "Canceling the Dialog Box", PINumber)
                                            If (m_pClsIE.PressButton(eELEMENT_ID, cID_RE_ROUTE_CANCEL) = False And GetAbortRun() = False) Then
    
                                                Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "Selecting the PIM", PINumber)
                                                If (m_pClsIE.ClickCheckBox(cID_SELECT_ALL, cCHECKBOX_CHECK, True) = False And GetAbortRun() = False) Then
    
                                                    Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "Routing the PIM", PINumber)
                                                    If (m_pClsIE.SelectMenubarItem(cID_MENUACTION_SELECTED_DOCUMENT, cID_RE_ROUTE) = False And GetAbortRun() = False) Then
    
                                                        Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "Selecting re-route for {0}", PINumber)
                                                        If (m_pClsIE.WrComboBoxDropDownSelectNoElementItem(eELEMENT_ID, cID_PHASE_REROUTE_TEXT_BOX, cMAIN_INVESTIGATION) = False And GetAbortRun() = False) Then
    
                                                            Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "Updating Comment", PINumber)
                                                            If (m_pClsIE.WrTextBox(cNAME_ROUTE_DIALOG_SELECTED_DOCUMENTS_COMMENT, FRM_ClsEPIQ.NewComment) = False And GetAbortRun() = False) Then
    
                                                                Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "Pressing OK", PINumber)
                                                                If (m_pClsIE.PressButton(eELEMENT_ID, cID_RE_ROUTE_OK) = False And GetAbortRun() = False) Then
                                                                    Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "Selecting {0} from list", PINumber)
                                                                    Call m_pClsIE.SelectPIFromList(cID_DIV_VIRTUAL_CONTAINER, PINumber)
    
                                                                Else
                                                                    If (GetAbortRun() = False) Then
                                                                        bStatus = True
                                                                        SetAbortRun() = True
                                                                    End If
                                                                    UpdateRunCtrlLoop(2)
                                                                    Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "PressButton Failure", "BTN_ASSIGN_TO_Click")
                                                                End If
    
                                                            Else
                                                                If (GetAbortRun() = False) Then
                                                                    bStatus = True
                                                                    SetAbortRun() = True
                                                                End If
                                                                UpdateRunCtrlLoop(4)
                                                                Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "WrTextBox Failure", "BTN_ASSIGN_TO_Click")
                                                            End If
    
                                                        Else
                                                            If (GetAbortRun() = False) Then
                                                                bStatus = True
                                                                GetAboSetAbortRunrtRun() = True
                                                            End If
                                                            UpdateRunCtrlLoop(6)
                                                            Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "WrComboBoxDropDownSelectNoElementItem Failure", "BTN_ASSIGN_TO_Click")
                                                        End If
    
                                                    Else
                                                        If (GetAbortRun() = False) Then
                                                            bStatus = True
                                                            SetAbortRun() = True
                                                        End If
                                                        UpdateRunCtrlLoop(8)
                                                        Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "SelectMenubarItem Failure", "BTN_ASSIGN_TO_Click")
                                                    End If
    
                                                Else
                                                    If (GetAbortRun() = False) Then
                                                        bStatus = True
                                                        SetAbortRun() = True
                                                    End If
                                                    UpdateRunCtrlLoop(10)
                                                    Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "ClickCheckBox Failure", "BTN_ASSIGN_TO_Click")
                                                End If
    
                                            Else
                                                If (GetAbortRun() = False) Then
                                                    bStatus = True
                                                    SetAbortRun() = True
                                                End If
                                                UpdateRunCtrlLoop(12)
                                                Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "PressButton Failure", "BTN_ASSIGN_TO_Click")
                                            End If
    
                                        Else
                                            If (GetAbortRun() = False) Then
                                                bStatus = True
                                                SetAbortRun() = True
                                            End If
                                            UpdateRunCtrlLoop(14)
                                            Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "SelectToolbarItem Failure", "BTN_ASSIGN_TO_Click")
                                        End If
    
                                    Else
                                        If (GetAbortRun() = False) Then
                                            bStatus = True
                                            SetAbortRun() = True
                                        End If
                                        UpdateRunCtrlLoop(16)
                                        Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "SelectToolbarItem Failure", "BTN_ASSIGN_TO_Click")
                                    End If
    
                                Else
                                    If (GetAbortRun() = False) Then
                                        bStatus = True
                                        SetAbortRun() = True
                                    End If
                                    UpdateRunCtrlLoop(18)
                                    Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "WrTextBox Failure", "BTN_ASSIGN_TO_Click")
                                End If
    
                            Else
                                If (GetAbortRun() = False) Then
                                    bStatus = True
                                    SetAbortRun() = True
                                End If
                                UpdateRunCtrlLoop(19)
                                Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "PressButton Failure", "BTN_ASSIGN_TO_Click")
                            End If
    
                        Else
                            If (GetAbortRun() = False) Then
                                bStatus = True
                                SetAbortRun() = True
                            End If
                            UpdateRunCtrlLoop(20)
                            Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "SelectToolbarItem Failure", "BTN_ASSIGN_TO_Click")
                        End If
    
                    Else
                        If (GetAbortRun() = False) Then
                            bStatus = True
                            SetAbortRun() = True
                        End If
                        Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "WrComboBoxDropDownSelectElementItem Failure", "BTN_ASSIGN_TO_Click")
                        UpdateRunCtrlLoop(21)
                    End If
    
                Else
                    If (GetAbortRun() = False) Then
                        bStatus = True
                        SetAbortRun() = True
                    End If
                    UpdateRunCtrlLoop(22)
                    Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "PressButton Failure", "BTN_ASSIGN_TO_Click")
                End If
    
            Else
                If (GetAbortRun() = False) Then
                    bStatus = True
                    SetAbortRun() = True
                End If
                UpdateRunCtrlLoop(23)
                Call UpdateRunControls(eRUN_GENERIC_MESSAGE, "SelectToolbarItem Failure", "BTN_ASSIGN_TO_Click")
            End If
    
    
    
    
            If (GetIsDebug()) Then
                Debug.Print("FRM_ClsEPIQ [BTN_ASSIGN_TO_Click Exit]" & vbCrLf)
            End If
    
    
    Clean_Exit:
    
            Call UpdateRunControls(eRUN_EDIT_TASK, cMSG_TAB_UPDATED, PINumber)
    
    
            Exit Sub
    I tried to instanciate a class ClsEPIQ from the main form but it does not recognize the class and errors.

    From one of my buttons as a test
    Code:
    Dim myEPIQ As clsEPIQ = New clsEPIQ
    See anything wrong. Not in the long line of code, that works VBA code being ported to VB. Hopefully I made a little more sense.

  4. #4
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    39,796

    Re: Couple of questions

    I think this is now part of a different thread. I suspect that this comes down to the organization of files within the solution, and a screenshot would likely help, so I mentioned that in the other thread.
    My usual boring signature: Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width