Orkut Profile Maker Without TIMERs  

Posted by Kunal Pradhan

Posting Projects seem to be Dumb , so i am posting the full tut ...1st download VB express edition 2008 then open new project and then from toolbar draw following -:
7 Textboxes
1 Button
1 Webbrowser

name these Textboxes From Their Properties windows as -:

vik-->the textbox to make string ..and set its visible value to hidden
fn--> First name
ln-->last name
no-->number
e1-->email
e2-->d

omain
pass--> password



and then change there text properties respectively

To navigate to the signup page , Double click on the button and Put this Code --> WebBrowser1.Navigate("https://www.google.com/accounts/NewAccount?continue=http%3A%2F%2Fwww.orkut.com%2FRedirLogin.aspx%3Fmsg%3D1&service=orkut&hl=en")

This will take us to the sign up page by clicking the button ..now the coding part of how to fill the form .. For that , Double Click on the Webbrowser and Write this Code -->


vik.Text = WebBrowser1.Url.ToString()
If vik.Text = "https://www.google.com/accounts/NewAccount?continue=http://www.orkut.com/RedirLogin.aspx?msg=1&service=orkut&hl=en" Then
WebBrowser1.Navigate("javascript:va
r vik=document.forms[0].elements;vik[1].value='" + fn.Text + no.Text + "';vik[2].value='" + ln.Text + "';vik[3].value='" + e1.Text + no.Text + e2.Text + "';vik[4].value='" + p.Text + "';vik[5].value='" + p.Text + "';vik[14].focus();void(0);")
End If
If vik.Text = "https://www.google.com/accounts/CreateAccount?continue=http://www.orkut.com/RedirLogin.aspx?msg=1&service=orkut&hl=en" Then
WebBrowser1.Navigate("https://www.google.com/accounts/ServiceLogin?continue=http%3A%2F%2Fwww.orkut.com%2FRedirLogin.aspx%3Fmsg%3D1&service=orkut&hl=en&t=null&passive=true&skipvpage=true&sendvemail=false")
End If

If vik.Text = "http://www.orkut.com/Terms.aspx?mode=signup" Then
My.Computer.FileSystem.WriteAllText(&amp
;quot;ids.txt", e1.Text + no.Text + e2.Text + vbNewLine, True)
My.Computer.FileSystem.WriteAllText("password.txt", p.Text + vbNewLine, True)
no.Text += 1
WebBrowser1.Navigate("javascript:document.getElementById('birthYear').value= '1980';document.getElementById('terms').checked= 'true' ;_submitForm(document.forms[0], 'acceptTerms', '')
end if
if vik.Text = "http://www.orkut.com/EditSummary.aspx" Then
WeBrowser1.Navigate("javascript:document.getElementById('gender0').click();javascript:document.getElementById('country').value='91';_submitForm(document.forms[2], 'update', '');void(0)")
end if

if vik.Text = "http://www.orkut.com/Home.aspx" Then
WeBrowser1.Navigate("http://www.orkut.com/Home.aspx")
end if
if vik.Text = "http://www.orkut.com/Home.aspx" Then
Webbrowser1.Navigate("https://www.google.com/accounts/NewAccount?continue=http%3A%2F%2Fwww.orkut.com%2FRedirLogin.aspx%3Fmsg%3D1&service=orkut&hl=en")
End If

the first code will make a string of the textbox with the url of the webbrowser so that the soft can execute a js on a particular link


U R done With The Coding Part


now build the app and close and save the project ..

then go to the location where the project is saved and then bin --> Release and See there the .exe app lies

thats ur app


njoi .

credits vix




Source code Status message changer for orkut  

Posted by Kunal Pradhan

Source code Status message changer for orkut

http://www.xtrmcoder.eu/Status_Changer.rar

credits xtreme coder

orkut profile maker tutorial  

Posted by Kunal Pradhan

Make a New Project
Add 7 Textboxes to it
In the name property of them, change it to:
fname
lname
email1
x
email2
pwd
cs

Change their Text Property to: [respectively]
First Name
Last Name
username
1
@yahoo.com
Password
Enter Captcha Here

Now create 2 Buttons
Change their Text property to:
Start
Create
Stop

Add 1 WebBrowser and 5 Timers

Edit Interval of Timers:
Timer1 > 8500
Timer2 > 3500
Timer3 > 6000
Timer4 > 3000
Timer5 > 2000
You can change the timer interval according to ur internet speed

Double click start button and type:
WebBrowser1.Navigate("https://www.google.com/accounts/NewAccount?continue=http%3A%2F%2Fwww.orkut.com%2FRedirLogin.aspx%3Fmsg%3D1&service=orkut&hl=en")
Timer1.Enabled = True

Double Click create button and Type:
WebBrowser1.Navigate("javascript:var kp=document.forms[0].elements;kp[19].value='" + cs.text + "';kp[25].click();void(0);")
Timer2.enabled = true

Double click Stop Button and Type:
WebBrowser1.Navigate("")
Timer1.Enabled = False
Timer2.Enabled = False
Timer3.Enabled = False
Timer4.Enabled = False
Timer5.Enabled = False

Double Click 1st Timer and Type:
If Timer1.enabled = true then
WebBrowser1.Navigate("javascript:var kp=document.forms[0].elements;kp[5].value='" + fname.Text + "';kp[6].value='" + lname.Text + "';kp[7].value='" + email1.Text + x.Text + email2.Text + "';kp[8].value='" + pwd.Text + "';kp[9].value='" + pwd.Text + "';kp[19].focus();void(0);")
cs.text = ""
cs.focus()
end if
Timer1.enabled = false

Double click 2nd Timer and Type:
If Timer2.enabled = true then
WebBrowser1.Navigate("https://www.google.com/accounts/ServiceLogin?continue=http%3A%2F%2Fwww.orkut.com%2FRedirLogin.aspx%3Fmsg%3D1&service=orkut&hl=en&t=null&passive=true&skipvpage=true&sendvemail=false")
end if
Timer2.enabled = false
timer3.enabled = true
Double click 3rd Timer and Type:
If Timer3.enabled = true then
WebBrowser1.Navigate("javascript:g=document.forms[0].elements;g[4].value='1980';g[5].checked=true;_submitForm(document.forms[0], 'acceptTerms', '');void(0)")
end if
Timer3.enabled = false
timer4.enabled = true

Double click 4th Timer and Type:
If Timer4.enabled = true then
WebBrowser1.Navigate("javascript:document.forms[2].elements[6].checked=true;document.forms[2].elements[16].value='91';_submitForm(document.forms[2], 'update', '');;")
end if
Timer4.enabled = false
timer5.enabled = true

Double click 5th Timer and Type:
If Timer5.enabled = true then
x.text += 1
WebBrowser1.Navigate("https://www.google.com/accounts/NewAccount?continue=http%3A%2F%2Fwww.orkut.com%2FRedirLogin.aspx%3Fmsg%3D1&service=orkut&hl=en")
end if
Timer5.enabled = false
timer1.enabled = true

Your Profile Maker is Ready!
Now Press Start Button
When Captcha is shown, enter captcha in the cs box and press create
other thing soft will do
when you want to stop, press stop Button'

Note: document form numbers can be changed by orkut by time.we will post tutorial on that later how to code the javascript even after document code has been changed.

c# video tutorials  

Posted by Kunal Pradhan

http://rapidshare.com/users/ERM977

Its a collection by someone found on net.
KPSofts is not responsible for any piracy content,If you are using it you must aware all copyrights are of original creator,not of KPSofts.KPSofts is none of related with the videos in any offense.

Create Captcha in Vb .Net  

Posted by Kunal Pradhan

Make a New Form
Make 1 Button, rename it as cmdDraw
Make 1 TextBox, rename it as txtSource
Make 1 PictureBox, rename it as picCaptcha(select the picture box
then go to properties, there will name

type the name there)

Now double click d form and remove all d text from the Coding part, if anything is der, just remove it

Now put d Code which is in dis page der:
Imports System.Drawing.Drawing2D
Imports System.Math

Public Class Form1
Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

Public Sub New()
MyBase.New()

'This call is required by the Windows Form Designer.
InitializeComponent()

'Add any initialization after the InitializeComponent() call

End Sub

'Form overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer

'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
Friend WithEvents picCaptcha As System.Windows.Forms.PictureBox
Friend WithEvents txtSource As System.Windows.Forms.TextBox
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents cmdDraw As System.Windows.Forms.Button

Private Sub InitializeComponent()
Me.picCaptcha = New System.Windows.Forms.PictureBox
Me.txtSource = New System.Windows.Forms.TextBox
Me.Label1 = New System.Windows.Forms.Label
Me.cmdDraw = New System.Windows.Forms.Button
CType(Me.picCaptcha, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'picCaptcha
'
Me.picCaptcha.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.picCaptcha.Location = New System.Drawing.Point(32, 40)
Me.picCaptcha.Name = "picCaptcha"
Me.picCaptcha.Size = New System.Drawing.Size(192, 64)
Me.picCaptcha.TabIndex = 0
Me.picCaptcha.TabStop = False
'
'txtSource
'
Me.txtSource.Location = New System.Drawing.Point(40, 8)
Me.txtSource.Name = "txtSource"
Me.txtSource.Size = New System.Drawing.Size(120, 20)
Me.txtSource.TabIndex = 1
Me.txtSource.Text = "Visual Basic"
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(8, 8)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(28, 13)
Me.Label1.TabIndex = 2
Me.Label1.Text = "Text"
'
'cmdDraw
'
Me.cmdDraw.Location = New System.Drawing.Point(176, 8)
Me.cmdDraw.Name = "cmdDraw"
Me.cmdDraw.Size = New System.Drawing.Size(64, 24)
Me.cmdDraw.TabIndex = 3
Me.cmdDraw.Text = "Draw"
'
'Form1
'
Me.AcceptButton = Me.cmdDraw
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
Me.ClientSize = New System.Drawing.Size(248, 109)
Me.Controls.Add(Me.cmdDraw)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.txtSource)
Me.Controls.Add(Me.picCaptcha)
Me.Name = "Form1"
Me.Text = "Form1"
CType(Me.picCaptcha, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()

End Sub

#End Region

' Make a captcha image for the text.
Private Function MakeCaptchaImge(ByVal txt As String, ByVal min_size As Integer, ByVal max_size As Integer, ByVal wid As Integer, ByVal hgt As Integer) As Bitmap
' Make the bitmap and associated Graphics object.
Dim bm As New Bitmap(wid, hgt)
Dim gr As Graphics = Graphics.FromImage(bm)
gr.SmoothingMode = Drawing2D.SmoothingMode.HighQuality

Dim rectf As New RectangleF(0, 0, wid, hgt)
gr.FillRectangle(Brushes.White, rectf)

' See how much room is available for each character.
Dim ch_wid As Integer = wid \ txt.Length

' Draw each character.
Dim rnd As New Random
For i As Integer = 0 To txt.Length - 1
Dim font_size As Single = rnd.Next(min_size, max_size)
Dim the_font As New Font("Arial", font_size, FontStyle.Bold)
DrawCharacter(txt.Substring(i, 1), gr, the_font, i * ch_wid, ch_wid, wid, hgt)
the_font.Dispose()
Next i

' Mess things up a bit.
Dim x As Integer = rnd.Next(16)
Do While x < wid
gr.DrawLine(Pens.Blue, x, 0, x, hgt)
x += 8 + rnd.Next(16)
Loop
Dim y As Integer = rnd.Next(16)
Do While y < hgt
gr.DrawLine(Pens.Blue, 0, y, wid, y)
y += 8 + rnd.Next(16)
Loop
For i As Integer = 1 To 20
Dim x1 As Integer = rnd.Next(wid)
Dim y1 As Integer = rnd.Next(hgt)
Dim x2 As Integer = rnd.Next(wid)
Dim y2 As Integer = rnd.Next(hgt)
gr.DrawLine(Pens.White, x1, y1, x2, y2)
Next i

gr.Dispose()

Return bm
End Function

' Draw a deformed character at this position.
Private Sub DrawCharacter(ByVal txt As String, ByVal gr As Graphics, ByVal the_font As Font, ByVal X As Integer, ByVal ch_wid As Integer, ByVal wid As Integer, ByVal hgt As Integer)
' Center the text.
Dim string_format As New StringFormat
string_format.Alignment = StringAlignment.Center
string_format.LineAlignment = StringAlignment.Center
Dim rectf As New RectangleF(X, 0, ch_wid, hgt)

' Convert the text into a path.
Dim graphics_path As New GraphicsPath
graphics_path.AddString(txt, the_font.FontFamily, _
CInt(Font.Style), the_font.Size, rectf, string_format)

' Make random warping parameters.
Dim rnd As New Random
Dim x1 As Single = CSng(X + rnd.Next(ch_wid) / 2)
Dim y1 As Single = CSng(rnd.Next(hgt) / 2)
Dim x2 As Single = CSng(X + ch_wid / 2 + rnd.Next(ch_wid) / 2)
Dim y2 As Single = CSng(hgt / 2 + rnd.Next(hgt) / 2)
Dim pts() As PointF = { _
New PointF(CSng(X + rnd.Next(ch_wid) / 4), CSng(rnd.Next(hgt) / 4)), _
New PointF(CSng(X + ch_wid - rnd.Next(ch_wid) / 4), CSng(rnd.Next(hgt) / 4)), _
New PointF(CSng(X + rnd.Next(ch_wid) / 4), CSng(hgt - rnd.Next(hgt) / 4)), _
New PointF(CSng(X + ch_wid - rnd.Next(ch_wid) / 4), CSng(hgt - rnd.Next(hgt) / 4)) _
}
Dim mat As New Matrix
graphics_path.Warp(pts, rectf, mat, WarpMode.Perspective, 0)

' Rotate a bit randomly.
Dim dx As Single = CSng(X + ch_wid / 2)
Dim dy As Single = CSng(hgt / 2)
gr.TranslateTransform(-dx, -dy, MatrixOrder.Append)
Static prev_angle As Integer = 0
Dim angle As Integer = prev_angle
Do While Abs(angle - prev_angle) < 30
angle = rnd.Next(-60, 60)
Loop
prev_angle = angle
Debug.WriteLine(angle)
gr.RotateTransform(angle, MatrixOrder.Append)
gr.TranslateTransform(dx, dy, MatrixOrder.Append)

' Draw the text.
gr.FillPath(Brushes.Blue, graphics_path)
gr.ResetTransform()
graphics_path.Dispose()
End Sub

Private Sub cmdDraw_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdDraw.Click
Dim txt As String = txtSource.Text
Dim bm As Bitmap = MakeCaptchaImge(txt, _
22, 30, _
picCaptcha.ClientSize.Width, _
picCaptcha.ClientSize.Height)
picCaptcha.Image = bm
End Sub

Orkut Basic terms gid uid tid pid aid etc  

Posted by Kunal Pradhan

Making an orkut application or using orkut you should know these basic terms used by orkut.

Terms:
uid- user identification
tid - thread identification
aid - the album identification
pid - photo in the album

Uses:
lists, testimonials, settings and updates use xid whereas all other
features use uid or gid.

gid- for images

Random and unity:
gid - not random
uid - random

gid an uid both are unique per user
GID is the number of your avatar picture

These will useful when you want to target users via social application or vb application

Learn VB .NET easy way Part -1 Tutorial  

Posted by Kunal Pradhan

Guide to start with VB .Net

First download and install VB .NET 2008 and required components (which comes in package)
http://www.microsoft.com/express/download/ (approx. 70 mb)

After installing you can see "Microsoft Visual Basic 2008 Express Edition" in your start menu.
Open it.

Click on "project..." which is on right side of label "create".
Choose windows forms application,give name whatever you want in below name box and press ok.
you can see window like this (click on image to enlarge)
On right side panel you can see its properties panel which shows property of selected element of project.
Also you can see a toolbox there.If you can't you can enable it viw view--> toolbox(CTRL+AL+X)

Now lets make our first simple application.

Add a button from tool bar.Click button and make a button of your size in form1's area.This is similar to make a rectangle in paint.
Now you have make graphix part
as an application has two parts graphix and codings
now lets move to coding part
Double click on button you made to open the coding part
double click will open the button's default coding event i.e. button1_click
Note: you can switch between coding and designer via view menu.

Now we will give user a message on pressing the button.

So message code will be

msgbox("your message")

like
msgbox("This is my first application")

Tip: you can choose msgbox type by giving secong argument
like
MsgBox("This is my first application", MsgBoxStyle.Information)

This shows the msgbox will be windows' default information style box.

so final code will be

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MsgBox("This is my first application", MsgBoxStyle.Information)
End Sub

Click on green arrow like play button on top to run your first application!

More options:
Project menu---> project name properties... contains useful options about your project
You can change application logo and important properties from properties of form1 (right click on form1's and area and select properties(the part where u drew button)

You can publish you application and can distribute within friends by build menu--->build application name example build windows application1

You ready to distribute application will be in D:\Documents and Settings\Kunal Pradhan\My Documents\Visual Studio 2008\Projects\"project name that you gave"\"project name that you gave"\bin\Release\application name.exe

you can send this exe file to all.

Next tutorial will be posted soon.Support us by informing friends about us.

Get all vb .net tutorials click here:List all

C Programming Tutorial (Algorithms)  

Posted by Kunal Pradhan

Find Area of a Circle

We need formula A= 3.14 * R * R

So Now we Will Put it in Algorithm

First we need a value of R so we will take it from user

Algorithm Starts :


1. Area <-- 1
2. Input R
3. Area <---3.14*R*R
4. Print Area
5. End

Find The Minimum from given two numbers
Logic : Scan two numbers from user,Compare them,Print the Minimum.


1. Input N1

2. Input N2

3. If N1>N2 Go to (6)

4. Print N1

5. Go to (7)

6. Print N2

7. End

Find The Minimum from given three numbers
Logic Compare two set of number one by one


1. Input N1
2. Input N2
3. Input N3
4. If N1>N2 Go to (8)
5. If N1>N3 Go to (11)
6. Print N1
7. Go to (12)
8. If N2>N3 Go to (11)
9. Print N2
10. Go to (12)
11. Print N3
12. End

Find Sum of First 100 odd numbers
Logic: Use a sum variable, use a counter , use another variable to give step value of two


1. count<--1
2. sum<--0
3. step <-- 1
4. sum<--sum+step
5.step<-- step + 2
6. count<--count+1
7. If count<=100 Go to (4)
8. Print Sum
9. End

Generate First N Fibonacci
Logic: Fibonacci :Total of No and its previous no

2+3=5
3+5=8
5+8=13

This is the formula of Fibonacci


1. Input N
2. Count<--2
3. F1<--0
4. F2<--1
5. Print F1
6. Print F2
7. F3<--F1+F2
8. Print F3
9.Count<--Count+1
10. F1<-- F2
11. F2 <-- F3
12. If Count< N Go to (7)
13. End

Addition of First 15 Numbers Divisable by 7
Logic: Use of MOD function to know whether the number is divisible by 7 or not


1. Count<--0
2. Sum <-- 0
3. Num <-- 1
4. Num<--Num+1
5. If (Num%7==0) Go to (7)
6. Go to (4)
7. Sum<--Sum+Num
8. Count<--Count+1
9. If Count < 13 then Go to (4)
10. Print Sum
11. End

Calculate Total Salary as Per Rules Given
Basic<=1500_________HRA 400
Basic>1500 & <6000___________HRA 1500
Basic >6000__________HRA 2000


DA
15 % _______ if Basic <= 2500 else 10 %

MA Rs. 200

Salary Formula: Basic +HRA +DA +MA


1. Input Basic
2. Salary<--0
3. HRA<--0
4. DA<--0
5. If Basic <=1500 Go to (9)
6. If Basic <6000 Go to (11)
7. HRA<--2000
8. Go to (12)
9. HRA<--400
10. Go to (12)
11. HRA<--1500
12. If Basic<=2500 Go to (15)
13. DA<--0.10*Basic
14. Go to (16)
15. DA<--0.15*Basic
16. Salary<--Basic+HRA+DA+200
17. Print Salary
18. End

Count Electricity Bill
Same as above but here Electricity bill

First 50 units 50p/unit
Next 50 0.75/u
Next 100 1.25/u
above 200 1.75/u
Fuel charge 40% of unit charge
Government tax 15% of unit and fuel charge
Meter rent 20 Rs.

1. Input Units
2. If Units <= 50 Go to (7)
3. If Units <=100 Go to (9)
4. If Units <= 200 Go to (11)
5. Unit_Charge<--50*0.50+50*0.75+100*1.25+(

Units-200)*1.75
6. Go to (12)
7. Unit_Charge<--Units*0.50
8. Go to (12)
9. Unit_Charge<--50*0.50+(Units-50)*0.75
10. Go to (12)
11. Unit_Charge<--50*0.50+50*0.75+(Units-100)*1.25
12. Fuel_Charge<--0.40*Unit_Charge
13. Govern_Tax<--0.15*(Fuel_Charge+Unit_Charge)
14. Bill<--Unit_Charge+Fuel_Charge+Govern_Tax+20
15. Print Bill
16. End

Read all C Programming tutorials Click here

C Programming Tutorial Part-1  

Posted by Kunal Pradhan

you know when we r talking about a new program we must know the keywords of that program, by using which we construct the program these keywords are defined in compiler, so here is the list of keywords used in C,

there are 32 keywords defined in standard C, and these are :=


auto double int struct break else long switch case enum register

typedef char extern return union const float short unsigned continue

for signed void default goto sizeof volatile do if static while

Now we will learn more about these keywords,

Data Types

there are five datatypes in C subset : character ( like A,B,c,d); integer(12,50,89675); floating point (12.564,0.9876); double floating point (12.7865234195) - the precision is more than simple floating point and value-less


the keywords for them are respectively char,int,float,double and void



now we have a very long list of the range of these keywords

i am giving just fews :-

the size of char type variable in memory is 1 byte and it's range :- -127 to 127
and the keywords signed and unsigned is used to define explicitly if negative sign will be present there or some other ways will be taken to represent the negative variable :- like - unsigned char ranges from 0 to 255


size of int type variable in the memory is 2 byte and ranges from -32767 to 32767 (if we dont tell the comiler explicitly then it takes it as signed i.e. with negative signs) and the size of float is 4 byte whereas the size of double is 8 byte

i am sure with lots of theory ur head is just buzzing now so we here give an example, how ur first c program should be



#include<>

void main()
{
printf("Hello world");
}


this will print Hello world in the output screen


now we analyse the program

at first line i have given #include<>

i am not gonna tell you guys what exactly this thing means right now, you will learn more when i start pre processor

for present information include is a pre processors directive and every pre processors must start with a '#' and that means we r including some files here, and in this case the file is stdio.h... the extension .h stands for header file

and stdio (standard input-output) is a special file stored in compiler which has some compiler defined functions which are related to input and output, we will learn about them later

Read all C Programming tutorials Click here

Virtual Software Development Guideline  

Posted by Kunal Pradhan

When we go to develop a working real life software remember following points and go ahead !!!

=> A software is the thing which automates something.
Steps:

+ Think your need.
+ Write your need.
+ Get info about available inbuilt functions to complete your need
+ If you cant get above use resources like google
+ Still if you are not getting develop your own
+ Develop whole code and according to that minimum UI that needed
+ Improve UI
+ Find Bugs
+ Correct Bugs
+ Find the points that worst user of your software can do it with your software
+ Protect your software from above one.
+ Put the locks to your software you want.
+ Do final test.
+ Release it.

Happy Software Developing

Javascript Tutorial Part-3  

Posted by Kunal Pradhan

objective: to learn the if..else statements...

what is if...else statements?
if else statements are used as conditional statements..

for example .. if a certain condition is true ...which script to run .. and if it is false then what to do ...
these statements are very useful !!!


IF STATEMENT

it tells the script what to do when a certain condition is true ...
this is how it should be used :
if (condition){the code that should execute if the condition is true.}

e.g.
javascript:var a=prompt("insert a number between 1-1000","Enter number");if (a<750){alert("number is less then 750")}



IF ElSE STATEMENT

it tells the script what to do when a certain condition is true ... and what to do if it is false.
this is how it should be used :
if (condition){the code that should execute if the condition is true.}else{code to execute if it is false}

e.g.
javascript:var a=prompt("insert a number between 1-1000","Enter a number");if (a<750){alert("number is less then 750")}else{alert("number greater then 750")}


Prompt function we can give default value as second element

like
javascript:prompt("Enter your name","kunal");void(0)

I have given my name as default value.

Read all javascript tutorials Click here

Javascript Tutorial Part-2  

Posted by Kunal Pradhan

Same function as alert

there is another function

"prompt"

prompt is useful to take some value from user


like javascript:prompt("Enter your name");void(0)

here we have written another function void(0) because
when we use javascript browser creates a new page
by writing void(0) we say to browser that we have to do nothing.just run the script and stay at same page


Taken value vis prompt we can store it and use it in future

e.g.

javascript:var a=prompt("Enter your name");alert("Hello "+a+" How are you?");void(0)

in above example we are taking user's name in variable a via prompt and then using it in second alert function

; is used to separate two javascripts


try yourself make your own javascripts using alert,+,variables,prompt

Read all javascript tutorials Click here

Javascript Tutorial Part-1  

Posted by Kunal Pradhan

Javascript is one the important part in making softwares,so in this ttopic I will teach it.

it is a scripting language designed to add interactivity to webpages and can be embedded directly into html pages.

How to find it???

It can be found as <> and via < language="javascript"> tag in body


How it is useful?

It is useful in make page extra ordinary.
but in our tutorials we will make the page automated using javascripts.

Lets make a simple script

basic : Declaring variables

What is variable?
a variable is like a 'container' for info u want to store.

we will store some values instead of biscuits

once you are declared variables,it can be used easily at any moment

javascript:var teacher="teaching you javascripts";alert(teacher);alert(teacher + "1");alert(teacher + "2")

run in above script i have declared teacher as a variable

declare variables code

var <>

e.g.
var tt
var ab

Give variable names as short as you can.
Keep them unique
Keep them clear,you should not confuse about them
like for sem marks give sm and final marks give fm


In above script
It will give alerts

alert()
function is used to popup a alert box.
like javascript:alert("this is an alert")

+ sign is used to join
It can join two variables
It can join variable with strings as we have done above
joined teacher variable with 1 and 2

We will talk about it later
now just concentrate on variables
make your own such scripts post it here

main use of variable we dont have to write a long things too many times as I did above
every time i have to write just variable teacher

instead of teacher i can give the variable name just t
so every time i have to write just t


javascript:var t="teaching you javascripts";alert(t);alert(t + "1");alert(t + "2")

tryout it yourself
Comment your created javascripts here

Read all javascript tutorials Click here

Orkut Mass Community Joiner  

Posted by Kunal Pradhan

Add 2 Buttons
Add 1 textbox
Add 3 Labels
And 1 webbrowser
Add 1 Status bar
Add 1 Progress Bar
Add 1 timer(optional)

Now Change the text of one button to start and one to stop

***Label Work You Can Do of your own from the project



Double Click On The Form and after "Public forrm1"
type
Dim uid As Integer = 1
Dim join As Integer = 0
Dim sec As Integer
Dim over As Boolean
Dim status As Integer = 0
Dim start As Boolean = False





Double Click On the Web browser and type

If start = True Then
Select Case status
Case 0
web1.Navigate("http://www.orkut.com/Community.aspx?cmm=" & uid)
status = 1
Case 1
status = 2
Case 2
web1.Navigate("javascript:mr=document.forms[1]; mr.action='CommunityJoin.aspx?Action.join&'+location.href.match(/cmm=\d*/gi); mr.submit(); void (0)")
status = 3
join = join + 1
Label3.Text = join & " Comminities joined in " & sec & " sec"
Case 3
uid = uid + 1
status = 0
End Select
End If
TextBox1.Text = uid





Double Click On textbox and type

uid = Val(TextBox1.Text)






Double Click On "Start" button and type

start = True
web1.Navigate("http://www.orkut.com")
time.Enabled = True





Double Click On "Stop" button and type

start = False
time.Enabled = False



Optional Service



double Click on timer and type

sec = sec + 1
Label3.Text = join & " Comminities joined in " & sec & " sec"



Add One Statuslabel and name it as "status1"
Select "Status Text Changed " Event From web browser
TYPE

status1.Text = web1.StatusText



Select "ProgressChanged" event from web browser
and type

ProgressBar1.Value = e.CurrentProgress



*********************************************************
NOTE:Change The name Of the webbrowser1 to web1

*********************************************************

whole project link
http://sunilpalon.110mb.com/mass_comm_joiner.zip

Credits:Xtreme Coder a.k.a Chetan Mendhe

Simple HTML Editor in VB .NET  

Posted by Kunal Pradhan

insert a Split Container or 2 Panels

then,

add a Menu Strip to both the panels..

and then add a ToolStrip

then add a Text Box to the first panel and a Web Browser (Preferably IE). Then in the toolstrip, add any buttons that yew want like new, open, save, save as etc.. etc.. in panel 1..


then add a button Preview to the toolstrip...

dbl click on preview and type the following....



WebBrowser1.DocumentText = TextBox1.Text



Then add a Label to panel 2...

set the text as..

' page title will appear here '

Then type the following after the above code that yew entered..



Label1.Text = WebBrowser1.DocumentTitle



add another label and set the text as..

' Double click on preview to view page title '

you are done..

Note:you can develop functions of other buttons

Reading From Text file VB .NET (Text file to Listbox)  

Posted by Kunal Pradhan

For reading id and password while making orkut related software or any other site related software use below code
FOR ID
If My.Computer.FileSystem.FileExists("id.txt") Then
Dim stream_reader As New IO.StreamReader("id.txt")
ListBox1.Items.AddRange(Split(stream_reader.ReadToEnd, _
vbCrLf))
ListBox1.SelectedIndex = 0
stream_reader.Close()
Else
My.Computer.FileSystem.OpenTextFileWriter("id.txt", True)
MsgBox("The Software has created files required for this Software, please fill required information in them, Then run this program, For now the program is Closing!", MsgBoxStyle.Critical, "Error!")
Me.Close()
End If

FOR PASSWORD
If My.Computer.FileSystem.FileExists("passwd.txt") Then
Dim stream_reader As New IO.StreamReader("passwd.txt")
ListBox2.Items.AddRange(Split(stream_reader.ReadToEnd, _
vbCrLf))
ListBox2.SelectedIndex = 0
stream_reader.Close()
Else
My.Computer.FileSystem.OpenTextFileWriter("passwd.txt", True)
MsgBox("The Software has created files required for this Software, please fill required information in them, Then run this program, For now the program is Closing!", MsgBoxStyle.Critical, "Error!")
Me.Close()
End If

Make softwares without timer in VB .NET  

Posted by Kunal Pradhan

Follow the steps given below and you will be able to navigate from google to yahoo then to msn :-

1. create a invisible textbox and name it anything (we use url as name here).
2. go to webbrowsers document completed event. there type the following code to navigate without timers..

if url.text.contains("google") then
msgbox("We are on google now!")
webbrowser1.navigate("http://www.yahoo.com")
end if

if url.text.contains("yahoo") then
msgbox("We are on yahoo now!")
webbrowser1.navigate("http://www.msn.com/")
end if

if url.text.contains("msn") then
msgbox("We are on msn now!")
end if

3. create a button and set its text property to "Google".
go to its click event and type the following code there -

webbrowser1.navigate("http://www.google.com/")



The total codes work is like this, when you press the button webbrowser will navigate to google.com and
when its on google it will show a msgbox that its on google, after that msgbox it will navigate to yahoo
and the process will again happen then after the msgbox this time it will navigate to msn and show a
msgbox there and stop.

Intro of the blog  

Posted by Kunal Pradhan

Its a blog from KPSofts.
Here we will teach you codings of softwares.
We will teach you various languages basically C,C# and VB .Net,javascript and java.
We will update tutorials everyday also we will teach you software developing via snapshots and video tutorials.

So get ready to step into software developing with KPSofts.

From developed Softwares visit our main website KPSofts

Regards,
Kunal Pradhan,Owner,KPSofts.