Search VB 2010

Tuesday, January 08, 2013

Visual Basic Online Course - Reading / Receiving E-mails in Vb.Net

Visual Basic Online Course - Reading / Receiving E-mails in Vb.Net


I was able to finish the (send E-mail) part successfully, though I've not finished the attachment and the Html parts yet, but the (receiving / reading E-mails) part still out there somewhere I did not do it, though I managed to connect to POP3 servers and receive the +OK response successfully.

Full source code and tutorial about receiving E-mails using VB.net 2010 and POP3 Commands
1) Understanding E-mails - Settings - Start Coding
2) Receiving response from POP3 server
3) Retrieving the number of E-mails from your [Inbox]
4) Solving the POP3 connect\disconnect without errors
5)  Source Code Download
Notes :
-In order to get fully understanding to this topic, you need to read the whole 5 sections as they are already a summary to what i found there.
-There is no direct source code application using VB.Net to receive E-mails from POP3 Client, only this one is available.
- Microsoft did not offer a built-in function that enables you to receive E-mails Using POP3 Commands, so this is just a work around solution and it was tested on Hotmail.com and Gmail.com.
- Gmail.com sometimes uses a 2-steps verification methods, so i had to work that too here.

ENJOY
Regards/ Evry1falls

Thursday, October 18, 2012

Visual Basic 2010 - Button Sound / Music Play

Visual Basic 2010 - Button Sound

Visual Basic 2010 - Play sound on buttons
Visual Basic 2010 - Play sound on buttons

The code is simply goes like this

You can copy and paste in your (Click_Event) or whatever it is you wish (MouseClick - MouseHover - MouseLeave) :


  1. Dim MySound As New System.Media.SoundPlayer()  
  2.  
  3. MySound.SoundLocation = "path to the .Wav file"
  4. MySound.Load()
  5. MySound.Play()
  6. ' OR you can use this :
  7. Sub PlaySystemSound()
  8. My.Computer.Audio.PlaySystemSound(
    System.Media.SystemSounds.Asterisk)
     
  9. End Sub

Background playing 

It lets the application execute other code while the sound plays. The My.Computer.Audio.Play method allows the application to play only one background sound at a time; when the application plays a new background sound, it stops playing the previous background sound. You can also play a sound and wait for it to complete.

For Visual Basic 2010 and in general, when an application plays a looping sound, it should eventually stop the sound. For more information, see How to: Stop Playing Sounds in the Background in Visual Basic 2010.

Example

The My.Computer.Audio.Play method plays a sound. When AudioPlayMode.WaitToComplete is specified, My.Computer.Audio.Play waits until the sound completes before calling code continues.

Check that the file name references a .wav sound file on your system.
  1. Sub PlayBackgroundSoundFile()

    My.Computer.Audio.Play("C:\Waterfall.wav",
    AudioPlayMode.WaitToComplete)

    End Sub
The My.Computer.Audio.Play method plays a sound. When AudioPlayMode.WaitToComplete is specified, My.Computer.Audio.Play waits until the sound completes before calling code continues.
Check that the application resources include a .wav sound file named Waterfall.
  1. Sub PlayBackgroundSoundResource()

    My.Computer.Audio.Play(My.Resources.Waterfall,
    AudioPlayMode.WaitToComplete)

    End Sub


Here are some online Visual Basic lessons and courses :

Visual Basic Courses - Share