HTML Link Creator

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.
20 posts Page 1 of 2
User avatar
Livengood
Serious Programmer
Serious Programmer
Posts: 445
Joined: Tue Feb 16, 2010 6:24 am

HTML Link Creator
Livengood
Well i post this in the source code section, but i am here to explain the coding more and heres my tutorial :)

More of the less, you need an alright, simple GUI for :)
So the look of this program is going to be abit like this :
Image

Items Needed :
> 4 Textboxs
> 2 Buttons
> 4 Labels
> 2 Check Boxs

Now lets get to the fun stuff :D

First off i am going to start of with the settings, this is one of the most important parts of this program because i provides the " for the link or the image link.
So we are going to name this Quotes :
Image

Coding TIme :)
This was a really simple coding,
Checkbox1 : * This is the Linke To Image Check Box *
Code: Select all
If Checkedbox2.Checked = True Then
            TextBox3.Enabled = True
            TextBox2.Enabled = False
        Else
            TextBox3.Enabled = False
            TextBox2.Enabled = True
        End If
This is going to be telling the program to enable and disable the textboxs that are not needed. For example, lets say you are going to make a image link. This coding is going to disable the textbox that contains the link text and change it to the image.

Button2.Click
Code: Select all
textbox4.Copy()
in my coding i had named textbox4 this, txt_code.Copy()

Button1.click *this is one of the most important peaces of the code, This will be peacing together the HTML code for the link or image.
Code: Select all
        If TextBox1.Text = "" Then
            MsgBox("You must have a link", MsgBoxStyle.Information, Title:="Error")
        Else
            If TextBox1.Text.Contains("http://") Then
                If TextBox2.Enabled = True Then
                    If TextBox2.Text = "" Then
                        MsgBox("You must have text", MsgBoxStyle.Information, Title:="Error")
                    Else
                        txt_code.Text = "<a href=" + My.Settings.Quote + TextBox1.Text + My.Settings.Quote
                        If CheckBox1.Checked = True Then
                            txt_code.Text += " target=" + My.Settings.Quote + "_blank" + My.Settings.Quote
                        Else
                            txt_code.Text += " target=" + My.Settings.Quote + "_self" + My.Settings.Quote
                        End If
                        txt_code.Text += ">" + TextBox2.Text + "</a>"
                    End If
                Else
                    If TextBox3.Text = "" Then
                        MsgBox("You must have a image url", MsgBoxStyle.Information, Title:="Error")
                    Else
                        txt_code.Text = "<a href=" + My.Settings.Quote + TextBox1.Text + My.Settings.Quote
                        If CheckBox1.Checked = True Then
                            txt_code.Text += " target=" + My.Settings.Quote + "_blank" + My.Settings.Quote
                        Else
                            txt_code.Text += " target=" + My.Settings.Quote + "_self" + My.Settings.Quote
                        End If
                        txt_code.Text += ">" + "<img " + "src=" + My.Settings.Quote + TextBox3.Text + My.Settings.Quote + ">" + "</a>"
                    End If
                End If
            Else
                MsgBox("You must have a valid link", MsgBoxStyle.Information, Title:="Error")
            End If
        End If
This coding is making sure that the textbox's are not empty and will be giving you a message box, if so.
this peace of coding :
Code: Select all
txt_code.Text = "<a href=" + My.Settings.Quote + TextBox1.Text + My.Settings.Quote
                        If CheckBox1.Checked = True Then
                            txt_code.Text += " target=" + My.Settings.Quote + "_blank" + My.Settings.Quote
                        Else
                            txt_code.Text += " target=" + My.Settings.Quote + "_self" + My.Settings.Quote
                        End If
                        txt_code.Text += ">" + "<img " + "src=" + My.Settings.Quote + TextBox3.Text + My.Settings.Quote + ">" + "</a>"
This is peacing together the coding to the HTML image coding.

The Link Code to this :
Code: Select all
txt_code.Text = "<a href=" + My.Settings.Quote + TextBox1.Text + My.Settings.Quote
                        If CheckBox1.Checked = True Then
                            txt_code.Text += " target=" + My.Settings.Quote + "_blank" + My.Settings.Quote
                        Else
                            txt_code.Text += " target=" + My.Settings.Quote + "_self" + My.Settings.Quote
                        End If
                        txt_code.Text += ">" + TextBox2.Text + "</a>"
This is peacing together the coding to the HTML link coding.

This is it :D, there is many ways to make this coding to make the html code more dificult :D
Which i can make later on in the future.

I am giving a thanks out to 35000vr for thinking of the idea to put in the coding for the copy to clip board. 35000vr was in team viewer at the time i was making this :D. Thank you 35000vr cooll;
HTML Link Creator UPDATED.zip
You do not have the required permissions to view the files attached to this post.
Image
User avatar
35000vr
Top Poster
Top Poster
Posts: 176
Joined: Sat Mar 06, 2010 5:09 pm

Re: HTML Link Creator
35000vr
When I gave a point sorry i didn't mean to do 0 i don't know how to do it.
‼ <----- Copy it,it is together and if you backspace it it will both erase
☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !"<-----Some Cool symbols.
♂<-----Boy Symbol :)
²ƽ<--------Mini 2 and 5!
ð<----Not sure what it is.
☺☻<-----Smiles
♪♫<----Music Notes
Others:ß┬ƒ○║■ã¿┼↑
User avatar
mikethedj4
VIP - Site Partner
VIP - Site Partner
Posts: 2592
Joined: Thu Mar 25, 2010 4:36 am

Re: HTML Link Creator
mikethedj4
Very nice, I'm a big coder myself, and I personally think this could help people learn HTML in some way, or simply have them crap, but most importantly it'll be helpful to people. This definitely earns reputation points.
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: HTML Link Creator
mandai
You might also want to put in support for some of these attributes:
http://www.w3schools.com/tags/tag_a.asp
User avatar
Livengood
Serious Programmer
Serious Programmer
Posts: 445
Joined: Tue Feb 16, 2010 6:24 am

Re: HTML Link Creator
Livengood
mandai wrote:
You might also want to put in support for some of these attributes:
http://www.w3schools.com/tags/tag_a.asp
i will have to do that :D
Image
User avatar
reptilon
Just Registered
Just Registered
Posts: 5
Joined: Thu Jan 21, 2010 5:38 pm

Re: HTML Link Creator
reptilon
Good tut =) keep up the good work
Lewis
Coding God
Coding God
Posts: 1564
Joined: Sun Dec 20, 2009 2:12 pm

Re: HTML Link Creator
Lewis
This is pretty nifty :)
Image
User avatar
tsuyoka
Member
Member
Posts: 40
Joined: Sat May 22, 2010 6:56 pm

Re: HTML Link Creator
tsuyoka
Awsome! love it! it helped me learn html coding.
User avatar
Codex
Coding God
Coding God
Posts: 2028
Joined: Wed Mar 31, 2010 5:50 pm

Re: HTML Link Creator
Codex
Its good, will you add more functions ?
We shall let the revolution begin.. the revolution for freedom, freedom against censorship. We shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender
User avatar
XTechVB
VIP - Site Partner
VIP - Site Partner
Posts: 727
Joined: Thu May 20, 2010 10:32 am

Re: HTML Link Creator
XTechVB
codeXvideos wrote:
Its good, will you add more functions ?
check out mine viewtopic.php?f=38&t=2393
You can find me on Facebook or on Skype mihai_92b
20 posts Page 1 of 2
Return to “Tutorials”