Jump to content

Check out our Community Blogs


Member Since 13 Apr 2010
Offline Last Active Aug 31 2014 07:45 AM

#657188 Online Privacy SOPA is back (OK CISPA)

Posted by CriticalError on 22 April 2013 - 11:57 AM

Well I am not sure how USA politics works, but providing it never passes I will be calm and comfortable..

  • 1

#637826 Redirect if page name changed?

Posted by CriticalError on 05 September 2012 - 08:49 AM

It was not CriticalError (Sorry -;P) Would you please share how did you do solve it?


Well I use a CMS called RazorC, I made a new table which contains the old pages names, then if someone went to a old page name say this one > http://www.thecoding...p/c-sharpsyntax the page "c-sharpsyntax" no longer exist so it will check the new table to see if it exist there if it does it will check the new URL and do a 301 redirect to the new URL.
  • 1

#636155 [DEBATE] Is there a "World SuperPower" or is it made up?

Posted by CriticalError on 15 August 2012 - 04:15 PM

War is a good thing but it is a very bad thing. First, people don't wish for a war. People from the top wish for a war. Why? Because they see the money in it. Why there was war in Iraq? Because of oil. They were saying there was a war because of terrorism but that is stupid. There will always be the terrorists in this world. The only good thing that cames from the war is new technology. Do you know that every single country that starts the war has their economy in dropping direction? When they starts the war, economy is very poor, but when they are finishing that war, economy is starting to get better then it was before the war. It is all about the money. Look at the dollars. Before the war in Iraq dollars was strong (at least here in Croatia) as Euro is today. That was at the beggining of 2003. As months have passing dollar was dropping. Now when US Army is starting to retreaet from middle East, economy is starting to get better. Many people were killed because of that stupidity. There will always be wars, because humanity is stupid. So you should not think about which country is stronger in war, you should think how can you change this idiotic world.

Really good point (Y)
  • 1

#632414 Google Vs Facebook Ads

Posted by CriticalError on 26 June 2012 - 03:01 AM

So I recently launched my website http://www.thecodingguys.net

I got free $50 (£32) Facebook advertising credit from my host and I got another £50 Google advertising credit from Google after clicking an ad :)

OK so the point here is for those of you who want to decide on the best advertising company I will break it down do the best one I think.

Before I started advertising, I made sure my website worked !00% and made sure Google Analytic was on my website (Important very useful!) and submitted my website to, Bing and Google search engines. Next I started with Advertising on Google. when you advertise on Google you select your budget a day I set mine to £10 a day (it can go up a little) then you get set the CPC (Cost-Per-Click) that your going to pay. However it is best to let Google do this.

Now the CPC works on a bidding system, the more you pay, the more your advert is shown. The less you pay, your ad will probably not show. CPC can range between 0.50 and £1.10, You also pick keywords like HTML, PHP etc, so when someone search this they will see my ad on the side.

Now if you put keywords like Justin Bieber, **, ** etc, then the CPC will increase (if Google is setting it for you) because these are competitive words.

Now the thing I realized with Google Adwords was that for new people it can be confusing, I find it very confusing still, The UI is very confusing there is a lot of sh** to get used to. Now the first time I advertised my advert was shown 21,000 times (that's a lot!!, but remember I only pay for CPC), so my ad was shown 21,000 times, how many people came to my website? Well out of that I got 41 clicks. So from this you can see people are more interested in searching for their own sh** not even the ads.

Now since the last 4 days I have made 143 clicks in total, and the amount of people which viewed my ad was..........drum roll.............95,751!! Oh Yes..I spent £24 out of my £50.

OK so Facebook advertising now. Well I have to say their UI was not that scary and you can get used to it within minutes. The first day my ad got 58 clicks! with and it reached around 100k people, now it has 173 clicks and has reached 200k+ people. I only started facebook advertising on Sunday, so it's been good. The good think I like about FB advertising is that you can put an cap on your account, my account will not spend more than £32 (that's my coupon credit) with Google you will have to stop it yourself, so your credit card could get charged.

Both are very good, but for some reason I would pick Facebook, a lot more people, and better UI.

OK since i launched my website I have had 500 visits, and now since yesterday I got another 277 visits. Average stay time was 5 minutes. Browser was Google, Firefox, and IE. Whatever you do make sure you are using Google Analytic for your website, this information is so useful tells our everything, OS, Screen Resolution, Page Speed, etc.

You can exclude yourself from Google Analytic there is a addon for the Chrome browser.
  • 2

#563005 How to make a advanced tabbed notepad in Visual Basic 2010/ 2008

Posted by CriticalError on 06 July 2010 - 04:15 AM

Hello Programmers! In this tutorial I am going to show you how to make an advanced tabbed notepad in visual basic 2010 / 2008. (PDF and actual programme is at the bottom!
Let’s get started.

I will split this tutorial in to two (2) parts

PART A the design and behaviour of our application

And PART B the coding.

Let’s get started.
PART A –Design & Behaviour

Open VB and go to File>New Project>Windows Form Application> Call it whatever you like.

OK Click Form 1 and resize it to around 683,448. Then in the properties panel of Form 1 were it says minimum size change that to 683,448. Now in the properties panel go to MaximizeBox Change this to False. Then change the text of Form 1 to whatever you like.
OK done.
Now insert:

1 Menustrip
1 Tabcontrol.
1 SavefileDialog

OK now on the Menustrip we want:


Now Under File we want:

Add Tab
Remove Tab

Under Edit we want:

(Then right click insert separator)
Clear All
Select All

Under Format:


(We don’t need anything under About)

Now moving on to the Tabcontrol (TC) make the TC 667, 52 (width x Height) in the properties menu. OK now where it says Name Change it to Tabcontrol2. Then where it says Anchor change this to left, top, right. Now in the TC properties menu where it says collection click it and add another tab. Now we name each tab:


(In the right order please)
It should now look like this.


OK Now let’s go back to the Menustrip:
Click File>Add Tab>
Now when you click Add tab go to its properties. In the properties at the bottom it says ShortcutKey change it to Ctrl+Shift +A. Now you can do the same for the rest but make sure that you give them different shortcut keys. Here is mine.

Now we need some buttons in TabControl2 Under the Home Tab
Add 4 Buttons
Name them:

Add Tab
Remove Tab

OK Once you have added the buttons you might want to make sure that they are all same size this is what we do at the top of Visual Basic there is a bar called Layout

This one if you don’t have it go to View>Toolars>layout
Now click all Four Buttons. (Ctrl and click each one)
Then on the toolbar bar click:
Remove horizontal spacing.



Make same size
Make same width
Make same Height

You can’t see the text but hover over each one and a tooltip will show.

Now you can add more buttons for the rest of the tabs (Edit, Format) your adding the same data from the menustrip once you done it should look like this.


OK Last but not least add another tabcontrol then click the white triangle in the top right corner of the TC and click Remove Tab (both of them). Then in the properties click Anchor and set to Top, Left,right,Bottom.
Then resize the Tabcontrol to fit the document. Should now look like this:

image 6..JPG
Now last this is go to top of VB Go to Project>Add New Item>About Box
Edit the information in the about box it is pretty straight forward.


Now Double click Form1
At the top where it says
Public Class Form1
add at the bottom
Dim I As Integer = 1
Now under
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub
We want to add

Dim Edit As New RichTextBox
        TabControl1.TabPages.Add(1, "Page " & I)
        TabControl1.SelectTab(I - 1)
        Edit.Name = "TE"
        Edit.Dock = DockStyle.Fill
        I = I + 1
Now this is going to add a page for us in the TabControl1
Now go back the design view and click the menustrip1 and under File double click Add Tab
And this code
Dim Edit As New RichTextBox
        TabControl1.TabPages.Add(1, "Page " & I)
        TabControl1.SelectTab(I - 1)
        Edit.Name = "TE"
        Edit.Dock = DockStyle.Fill
        I = I + 1
If you noticed this is the same code as the first one hehe:P:P
Now go back and double click Remove Tab
Add this code
If TabControl1.TabCount = 1 Then
            MsgBox("Error You Can't Remove The Last Page", MsgBoxStyle.Critical)
‘Now you can change the message to whatever you like
‘This code will not allow us to remove the last tabpage which automatically loads
‘If it did an error would occur.

            Exit Sub

        End If

‘This bottom code is telling it to remove the selected tab and countdown minus (-) 1 (one)
        TabControl1.SelectTab(TabControl1.TabPages.Count - 1)
        I = I - 1
Now go back to Menustrip1 and Double click Open add this
Dim OpenFileDialog1 As New OpenFileDialog
        Dim AllText As String = "", LineOfText As String = ""
‘This bottom code is telling it to search each and ever file type
        OpenFileDialog1.Filter = "All Files|*.*"
‘This bottom code basically shows the opendialog box
            FileOpen(1, OpenFileDialog1.FileName, OpenMode.Input)
            Do Until EOF(1)
                LineOfText = LineInput(1)
                AllText = AllText & LineOfText & vbCrLf
            CType(TabControl1.SelectedTab.Controls.Item(0), RichTextBox).Text = AllText

        End Try
Now go back and double click save add this code
Dim SaveFileDialog1 As New SaveFileDialog
‘The bottom code is shows which file types we can save it as you can add
‘More file types by using the same method
‘You can add html and other types if you like
        SaveFileDialog1.Filter = "Rich Text Files|*.rtf|Text Files|*.txt"
‘This tells it to show the dialog basically remember when you got
‘Something called “show Dialog” You can’t go back to the main programme without ‘closing
‘The first dialog showing
        FileOpen(1, SaveFileDialog1.FileName, OpenMode.Output)
        PrintLine(1, CType(TabControl1.SelectedTab.Controls.Item(0), RichTextBox).Text)
OK now go back to menustrip1 and double click Exit add this:
Dim msg As String
        Dim title As String
        Dim style As MsgBoxStyle
        Dim response As MsgBoxResult
        msg = "Are you sure?"   ' shows your message you can change it
        style = MsgBoxStyle.Information Or _
            MsgBoxStyle.YesNo ‘The dialog will be a Yes No answer
        title = "Youtite"   ' What did you name you application?
        response = MsgBox(msg, style, title)
        If response = MsgBoxResult.Yes Then   ' if the user chooses Yes it is going to execute the Me.Close() which will close the programme
‘Else it will still show up.
        End If
Now back to Menustrip1 Click on Edit
Double Click undo
Enter this:
CType(TabControl1.SelectedTab.Controls.Item(0), RichTextBox).Undo()
Ok now the code for this is simple for the rest of the items on Menustri p1 Edit

Just copy that and at the after the (dot) . Put like Redo() Select All () etc..
For Delete the code is same as cut here:
CType(TabControl1.SelectedTab.Controls.Item(0), RichTextBox).cut()
No clear All is different
Go to Menu strip1 and Edit>Clear all
Enter this code:
‘This will emplty the selected Tab text
CType(TabControl1.SelectedTab.Controls.Item(0), RichTextBox).Text = “”
Now move on to Format
Double Click Font
Enter this
If TabControl1.TabCount = 0 Then

        End If

        Dim FS As New FontDialog
        CType(TabControl1.SelectedTab.Controls.Item(0), RichTextBox).Font = FS.Font
Now go back to Format and Double click Colour
Enter this:
If TabControl1.TabCount = 0 Then

        End If
        Dim FC As New ColorDialog
        CType(TabControl1.SelectedTab.Controls.Item(0), RichTextBox).ForeColor = FC.Color
Now last but Not least the about Box we made we need to call that:
Go to Menustrip one and double click about
‘This basically shows the dialog
Now for those buttons Just copy and paste the same code that we have just inserted for the right buttons and then you’re done!

If you need any help just ask here or PM me I will be happy to help.

(Sorry for any bad bad mistakes)

You can see the one I made and the PDF of this document



( YouTube - Advanced Notepad in Visual Basic 2010 / 2008.) <<

Attached Thumbnails

  • Image1..JPG
  • image4..JPG

Attached Files

  • 1

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download