Results 1 to 3 of 3

Thread: Passing items from form a to b

  1. #1

    Thread Starter
    Fanatic Member carlblanchard's Avatar
    Join Date
    Sep 2003
    Location
    Bournemouth (UK)
    Posts
    539

    Passing items from form a to b

    Hey all hows life going ????

    I still having trouble in passing items basically an ID from one form to another using a MDI control feature as below

    ---------------------------------------------------------------------------
    Used to call the mdi form
    ---------------------------------------------------------------------------

    Dim parent As MainApplication = CType(Me.MdiParent, MainApplication)
    parent.ShowSingleInstance(GetType(AppointmentDetails), intRecordId)
    ---------------------------------------------------------------------------

    ---------------------------------------------------------------------------
    Deals with the mdi form
    ---------------------------------------------------------------------------
    For Each child As Form In Me.MdiChildren
    If child.GetType Is childType Then
    'already loaded so bring to foreground
    child.Activate()
    Return
    End If
    Next
    'not loaded yet so create
    Dim frm As Form = Activator.CreateInstance((childType), PassedValue)
    frm.MdiParent = Me
    frm.Show()
    ---------------------------------------------------------------------------
    I need to pass an ID to via this to the opening page can anyone shed anylight on the topic Code examples would be really good

    Thanks All
    I am curretly building a defect management system for software and web developers,
    If you wana try it out (beta test) and keep it for free just send me a message

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Declare IDvariable in a module ?

  3. #3
    Lively Member
    Join Date
    Sep 2003
    Location
    Chicago, IL
    Posts
    64
    Check some of my other posts about maintaining a reference to forms. that should do what you need it to
    Mike Stammer

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