[VB.Net]

Discussion in 'Mixed Languages' started by ryuuichie, May 24, 2013.

  1. ryuuichie

    ryuuichie MDL Novice

    Jan 25, 2013
    23
    0
    0
    Hey guys. I am currently making a program that send email (thru SMTP) and I'm halfway done with it.
    But, I wanted to add multi-threading to it so that when the program is in the process of sending the email, the program is still responsive.

    I did attempt multi-threading but, yea, I failed. No errors were found but it won't just do what I want it to do. The program is still unresponsive.


    My question may sound noobish to people out there, but I'm just a beginner at this thing. Hope you understand :tea:
     
  2. stevemk14ebr

    stevemk14ebr MDL Senior Member

    Jun 23, 2010
    267
    48
    10
    the easiest way is just to use a background worker from the tools section in the gui builder, then do your send mail code in there, you could actually program another thread but for your purposes i think background worker is the easiest
     
  3. Muerto

    Muerto MDL Debugger

    Mar 7, 2012
    1,858
    2,112
    60
    #3 Muerto, May 24, 2013
    Last edited: Aug 22, 2021
    ...
     
  4. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,460
    420
    60
    I think The Dev can help you with it. I know he knows how to do cross thread stuff the right way :p If you have anything else just ask me also. I love VB.NET :cool:
     
  5. ryuuichie

    ryuuichie MDL Novice

    Jan 25, 2013
    23
    0
    0
    What did I do wrong?

    help.jpg
     
  6. PAYMYRENT

    PAYMYRENT MDL Developer

    Jul 28, 2009
    1,460
    420
    60
    The Timer.Stop() needs to be Invoked in order for it to function properly - Also create Private Shared global variables to be on the safe side of things - The way you have it now it does a cross thread call to get the information in your text boxes.
     
  7. Muerto

    Muerto MDL Debugger

    Mar 7, 2012
    1,858
    2,112
    60
    #7 Muerto, May 24, 2013
    Last edited: Aug 22, 2021
    ...
     
  8. ryuuichie

    ryuuichie MDL Novice

    Jan 25, 2013
    23
    0
    0
  9. Muerto

    Muerto MDL Debugger

    Mar 7, 2012
    1,858
    2,112
    60
    #9 Muerto, May 25, 2013
    Last edited: Aug 22, 2021
    ...