#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2015
    Posts
    6
    Rep Power
    0

    Wait for a form to close before calling again


    I have a form displaying some info. I would like said form to display, then wait until it closes and then have the mainform call the same 2nd form again wtih new information.

    Any assistance is appreciated. I have exhausted google with completely stupid results, none of which work/
  2. #2
  3. Not An Expert
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2015
    Posts
    404
    Rep Power
    3
    Hello and welcome to Dev Shed forums!

    Do you have any relevant code to share? If you share what you've tried so far, or the code you want to modify, it will make it easier for our users to give you advice

    Make sure to put it between [code] or [php] tags where appropriate. Thanks!
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2015
    Posts
    6
    Rep Power
    0
    Code:
    Public Function check_events()
    
            If event_notify = "1" Then
                Dim current_date_check As Date = DateTime.Today
                Dim check_count As String = "0"
                check_count = check_count + 1
                While check_count <= number_events
    
                    Dim start_date As String = event_ini.ReadValue("EVENTS", "event" & check_count & "_start_date")
                    Dim end_date As String = event_ini.ReadValue("EVENTS", "event" & check_count & "_end_date")
                    If start_date <= current_date_check Then
    
                        If end_date > current_date_check Then
    
                            'Display Event
                            EventNotification.lblDate.Text = event_array(check_count, 2)
                            EventNotification.lblDate.Refresh()
    
                            EventNotification.lblTime.Text = event_array(check_count, 3)
                            EventNotification.lblTime.Refresh()
    
                            EventNotification.lblTitle.Text = event_array(check_count, 4)
                            EventNotification.lblTitle.Refresh()
    
                            EventNotification.txtDesc.Text = event_array(check_count, 5)
                            EventNotification.txtDesc.Refresh()
    
                            EventNotification.link.Text = event_array(check_count, 6)
                            EventNotification.link.Refresh()
    
                            'Log Event info
                            write_to_log("Found event: Title - " & event_array(check_count, 4))
                            write_to_log("Prompted for event")
                            
    
                            EventNotification.Show()
    
    
                        End If
                    End If
                    check_count = check_count + 1
                End While
            End If
        End Function

    I want it to wait until the EventNotification form is closed to continue running the while loop.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2015
    Posts
    6
    Rep Power
    0
    Or, show multiple instances of EventNotification Form.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2015
    Posts
    6
    Rep Power
    0
    Hi,
    You can use threading concept use thread.sleep() method and perform other operation.

IMN logo majestic logo threadwatch logo seochat tools logo