Results 1 to 4 of 4

Thread: Passing parameters to parent form

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2002
    Location
    Palermo, Italy
    Posts
    325

    Passing parameters to parent form

    Let's suppose I have form1. This form shows form2 by:
    VB Code:
    1. dim f2 as new form2
    2. f2.showdialog()
    Now form2 is showed and performs its task returning an object and I want to return this object to form1. How I can do?

    thx
    Xmas.
    Learn, this is the Keyword...

  2. #2

  3. #3
    New Member
    Join Date
    Dec 2002
    Posts
    11
    forms usually arenot intended to return values or objects to their callers. you might consider other means in vb.net like classes or modules. however if you want to do it with a form, one way is to define a shared field in your first form (form1) and from form2 do whatever it senses. be aware that a shared field is associated to a type not to an instance.

  4. #4
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    aaah cool Edneeis! I was always doing these through delegates...

    gotto take a look at that shadows keyword
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

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