[UPDATED] computer texter [Now With Source Code!]

Heres your chance to share your own tutorials with the community. Just post them on here. If your lucky they may even be posted on the main site.
60 posts Page 1 of 6
User avatar
challengy
VIP - Donator
VIP - Donator
Posts: 15
Joined: Fri Dec 25, 2009 3:53 am

SOURCE: http://www.mediafire.com/file/ntdj2mdkn ... texter.zip

This program Sends text messages to a cellphone with a gmail account. all you have to do is enter information in according to what the labels say.

You Will Need 2 Forms

For Form1:
Add 6 TextBoxes
Add 2 Buttons
Add 6 Labels

Arange the controls onto the form as shown in this picture: Image

Put this before the Public Class Form1:
Imports System.Net.Mail

(After Public Class Form1) Use this code for button2 click event:
Code: Select all
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim AnEmailMessage As New MailMessage
        Dim TheTelephoneNumber As String = TextBox3.Text
        Dim MyCarrier As String = TextBox4.Text
        Dim at As String = "@"

        AnEmailMessage.From = New MailAddress(TextBox1.Text)
        AnEmailMessage.To.Add(TheTelephoneNumber + at + MyCarrier)
        AnEmailMessage.Subject = (TextBox5.Text)
        AnEmailMessage.Body = (TextBox6.Text)
        AnEmailMessage.Priority = MailPriority.High

        Dim SimpleSMTP As New SmtpClient("smtp.gmail.com")
        SimpleSMTP.Port = 587
        SimpleSMTP.EnableSsl = True
        SimpleSMTP.Credentials = New System.Net.NetworkCredential(TextBox1.Text, TextBox2.Text)

        SimpleSMTP.Send(AnEmailMessage)
        MsgBox("The message was sent.", MsgBoxStyle.OkOnly, "Message Sent !")
    End Sub

Use this code for button1 click event:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Form2.Show()
    End Sub
For Form 2
Add 8 GroupBoxes
Add 8 Labels

Arange the controls onto the form as shown in this picture: Image

(No Code Needed For Form2)
Last edited by challengy on Sat Feb 27, 2010 10:57 pm, edited 2 times in total.
User avatar
azenis
Just Registered
Just Registered
Posts: 4
Joined: Wed Dec 02, 2009 9:30 pm

Re: computer texter
azenis
i doubt this works AT ALL. sorry.
User avatar
Nery
Co-Admin Moderator
Co-Admin Moderator
Posts: 1117
Joined: Mon Sep 07, 2009 8:11 pm

Re: computer texter
Nery
Why wouldn't it work?
User avatar
challengy
VIP - Donator
VIP - Donator
Posts: 15
Joined: Fri Dec 25, 2009 3:53 am

Re: computer texter
challengy
it works i've tested it
User avatar
Nery
Co-Admin Moderator
Co-Admin Moderator
Posts: 1117
Joined: Mon Sep 07, 2009 8:11 pm

Re: computer texter
Nery
Yes it does work... :) Nice tutorial!
But what you mean with "computer texter" in the title? Shouldn't you change it to "E-Mail Sender" or something?
User avatar
challengy
VIP - Donator
VIP - Donator
Posts: 15
Joined: Fri Dec 25, 2009 3:53 am

Re: computer texter
challengy
the program is supposed to send "text" messages to a cellphone so... when i was making the thread, i just thought of a random relative name :)
User avatar
Nery
Co-Admin Moderator
Co-Admin Moderator
Posts: 1117
Joined: Mon Sep 07, 2009 8:11 pm

Re: computer texter
Nery
Oh! It is for a cellphone? I thought it was for sending e-mails... Maybe you should write some introduction for your tutorial and explain what it does?
User avatar
rocky4126
VIP - Donator
VIP - Donator
Posts: 258
Joined: Mon Nov 16, 2009 7:39 pm

Re: computer texter
rocky4126
hi and welcome to codenstuff! I am currently having a problem, I have developed the program but I am getting this exception

visit: http://farm3.static.flickr.com/2754/427 ... de34_o.jpg for the image for some reason the img code isn't working :S If anyone else cares to do it for me then I would be eternally greatfull!
Image
User avatar
rocky4126
VIP - Donator
VIP - Donator
Posts: 258
Joined: Mon Nov 16, 2009 7:39 pm

Re: computer texter
rocky4126
I just noticed it is a problem with the security, I tried MS' suggestion: Make an exception but the rest of it I do NOT get from them. I also added this code:
Code: Select all
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If My.Computer.Network.IsAvailable = True Then
            Me.Text = "network: " & "online: You are on: " & My.Computer.Name
        End If
    End Sub 
Image
Lewis
Coding God
Coding God
Posts: 1564
Joined: Sun Dec 20, 2009 2:12 pm

Re: computer texter
Lewis
If this works it is very cool!
Image
60 posts Page 1 of 6
Return to “Tutorials”