How To Make Your Form Shake In VB.NET




Use this code to make a form shake. It is fun to use and can be used under any event.

codes :

'By LeSaN
'Easy code to make a form shake

Dim a As Integer 'Declaring integer "a"

While a < 10 'Starting a "while loop"

'Setting our form's X position to 20 'pixels to right from it's current position.            
Me.Location = New Point(Me.Location.X + 20, Me.Location.Y)
            
'Telling a program to sleep for 50 miliseconds before 'continuing
System.Threading.Thread.Sleep(50)

'Setting our form's X position to 20 'pixels to left from it's current position.
Me.Location = New Point(Me.Location.X - 20, Me.Location.Y)

'Telling a program to sleep for 50 miliseconds before continuing            
System.Threading.Thread.Sleep(50)
            
a += 1 'Increasing integer "a" by 1 after each loop
        
End While


Here is a preview:



--------------------------------------------------------------------------------------

How To Make A Text To Speech Program In Visual Basic 2008 / 2010 - Text To Speech

text to speech

This is a nice program ever for beginners i was amazed when i made this program at first , this is a simple program and its very useful . This program reads text's in a text box when you click a button,  the voice is Microsoft "SAPI" you can make many features in this program after learning the basic of  this program . so lets get started

1 . open visual basic 2008 / visual basic 2010

2 . create a new project and name it whatever you want i prefer Text To Speech

Visual basic noobs - Basic web browser

This is my first tutorial in the Visual basic noobs series. So lets get this started!

First, open your program for visual basic, it can be visual basic express or visual studio.


After it finishes loading, you should see something like this. (It varies based on what program you have.)

How To Make A Aero Form In VB.NET

Today i will teach you how to make a aero form in visual basic 2008 / visual basic 2010 but for this program you should have Microsoft Windows Vista or Microsoft Windows 7 so remember you should have one of these operating systems . this is a very simple tutorial and this thing is pretty awesome you will love it . now lets start the work

1 . Now open visual basic 2008 / visual basic 2010
2 . create a new project name it whatever you want
3 . double click on your form
4 . delete everything in the code and paste this


Imports System.Runtime.InteropServices

Public Class Form1
     Public Structure MARGINS
        Public LeftWidth As Integer
        Public RightWidth As Integer
        Public TopHeight As Integer
        Public Buttomheight As Integer
    End Structure

     Public Shared Function DwmExtendFrameIntoClientArea(ByVal hWnd As IntPtr, ByRef pMarinset As MARGINS) As Integer
    End Function

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Try
            Me.BackColor = Color.Black
            Dim margins As MARGINS = New MARGINS
            margins.LeftWidth = -1
            margins.RightWidth = -1
            margins.TopHeight = -1
            margins.Buttomheight = -1
            Dim result As Integer = DwmExtendFrameIntoClientArea(Me.Handle, margins)
        Catch ex As Exception
            MsgBox("you don't have aero enabled", vbCritical, "Fatal Error")
            Application.Exit()
        End Try
    End Sub
End Class
6 . now click debug and you are done

How To Make A PDF Reader In VB.NET

This is a very easy program and to make it  you need adobe reader and it should be installed in your pc . now start visual basic and create a new project name it whatever you want and the form will load now click the toolbox and right click inside the tool box and click Choose Items.. then a new tabbed windows will pop up ...

Now click COM Components tab and search for adobe reader and tick it and click ok ..

Text editor with HTML & VB.Net functions - Still in development

This is a text editor im still working on, you can program VB.Net and HTML in it there is preview for the HTML so you can easier make websites

I just wanted to share this program with you, but remember the program is still in early state and will probaly be updated on the site, the program itself dont have an updater (yet)



The Basics Of HTML (Hyper Text Markup Language)

HTML - hyper text markup language its the basics of a website so you should learn HTML before you start making website . today i am going to teach you the basics of HTML and to make a simple HTML website using notepad .

1 . open notepad

2 . copy and paste this code into your notepad

<html> 

<head> 
<title>this is my first web page</title>
</head> 

<body>

</body> 
</html>



How To Make A Very Simple Web Browser In Visual Basic

First add 5 buttons name them

Back
Forward
Refresh
Stop
Go

then add 1 textbox and 1 webbrowser

Now drag the webbrowser to the middle and expand it a little. Then line up the button in this order
                                                     ___________________
Back   Forward    Refresh   Stop  |___________________|  Go

Now double click back and add this code

Webbrowser1.GoBack

Now double click forward and add this code

Webbrowser1.GoForward

Now double click refresh add and this code

Webbrowser1.Refresh

Now Double Click Go and add this code

Webbrowser1.Navigate(Textbox1.Text)

Now if you start the app it should work!

How To Make A Folder Locker In VB.NET

Creating a program that can lock your folders and unlock them again

1. Open Visual Studio or Visual Basic.
2. Create a new windows form project and name it whatever you want.

Now to add the controls.
1. Add 3 buttons set the text on them to "Lock" and the second button "Unlock". And on the last button you write "Browse".
2. Add 2 textboxes and clear them for text.
3. Add 2 labels, write in Label1 "Folder Destination" and put it above Textbox1, Write in Label2 "Folder Name".
4. Add a folderbrowser dialog
6. Add this code to the button that says "Lock".
Dim text1 as string = ".{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}"
Shell("cmd /c" & "ren " & TextBox1.Text & " " & TextBox2.Text & Text1) 
Shell("cmd /c" & "attrib +s +h " & TextBox1.Text & ".{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}\*.*" & " /S /D") 
Shell("cmd /c" & "attrib +s +h " & TextBox1.Text & ".{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}" & " /S /D")
What this does is, it open shell and execute a command in command prompt that will first change the name of the folder and then hide it, it lock the folder and hide it completly, you will NOT be able to find the folder by going to folder options and select show hidden folders, so remember where the folder you lock is.
7. Add this code to the button that says "Unlock".
Dim text1 as string = ".{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}"
Shell("cmd /c" & "attrib -s -h " & TextBox1.Text & ".{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}" & " /S /D") 
Shell("cmd /c" & "attrib -s -h " & TextBox1.Text & ".{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}\*.*" & " /S /D") 
System.Threading.Thread.Sleep(1000) 
Shell("cmd /c" & "ren " & TextBox1.Text & Text1 & " " & TextBox2.Text)
What this does is it does the reversed of what the "Lock" button did it will unlock the folder.
8. Now the code for the button that says "Browse" add this code
FolderBrowserDialog1.ShowDialog() TextBox1.Text = FolderBrowserDialog1.SelectedPath last = Path.GetFileName(FolderBrowserDialog1.SelectedPath) TextBox2.Text = last TextBox1.Text = TextBox1.Text.Replace(".{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}", "") 
TextBox2.Text = TextBox2.Text.Replace(".{2559a1f2-21d7-11d4-bdaf-00c04f60b9f0}", "")
What this does it it open the folderbrowser dialog and put the full path of the folder you selected into textbox1.text and put the name of the selected folder in textbox2.text. When your done it should look kinda like mine, i have some added feautures which i will make a tutorial on later.
Folder Locker , VB.NET
Please dont repost without giving credits to the right website, thank you
Written and coded by: AnoPem