i m new to delphi.i have coded in vb,php, c etc..now i have to learn delphi.I was wondering if there are any good websites or books, where I could learn the delphi.. ???

[QUOTE=Animal Mother;1505323]Yip, that is true Sorry about that. :confused:

Thanx Luc001[/QUOTE]
thanks animal mother. it paints tabpage header. but it doesnt paint remaining part of the tab control... is ther any solution to this..

how can i add color to the TabControl..?
we can add color to the TabPage but how to Tab control.

set MaximumSize=500,500
MinimumSize=500,500

change 500 with ur value.

set the MaximumSize and MinimumSize property on the form to ur form size .

no. u need not use any variable. that is static. write it in the try catch function.

set FormBoarderStyle to FixedToolWindow

when you lists the program add this code.
[code]list.tag=uninstallstring[/code]

later you can directly retrieve the uninstall string from the items tag.
for ex. if u want to run uninstaller
[code]
uninstallpath=frmmain.listview1.selecteditems(0).tag
Shell(uninstallpath)
[/code]

Add a ContextMenuStrip and add items to it nd double click nd write the code. then click on ListView1 and set the ContextMenuStrip property to ur newly created contextmenustrip. then run the program, rightclick on the item. Rightclcik will be ther..

thank u all. Both works fine...

close the database connection before end sub of OK.

[CODE]DbCon.Close()[/CODE]

how do i get the full path of running process in task manager.

i m doing my final year project on "PC Maintenance Utilities" . Plz suggest me one good name for my project.

it contains following modules:

Junk Cleaner
Privacy cleaner(browsers)
Uninstaller
Startup
Auto shutdown/reminder
System restore
service manager
process manager
security tools
Duplicate file finder
disk analyzer
empty folder analyzer
and many other tools..

[QUOTE=codeorder;1484209]Check out [URL="

Anyone Plz help...

How can i extract Target Path of Existing Shortcuts on the desktop.

[QUOTE=codeorder;1479684]See if this helps.
[B]1 ListBox, 1 Button[/B]
[CODE]Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    getMyCoolFiles("C:\", ListBox1)
    '// getMyCoolFiles(path of the folder you want to search, the ListBox to use for adding your found files to)
End Sub

Private Sub getMyCoolFiles(ByVal selectedDirectoryToSearch As String, ByVal ListBoxForFoundFiles As ListBox)
    ListBoxForFoundFiles.Items.Clear()
    Dim myCoolFolder As New IO.DirectoryInfo(selectedDirectoryToSearch)
    For Each foundDirectory In myCoolFolder.GetDirectories '// loop thru all top directories.
        Try
            '// search top directory and subfolders.
            For Each myFoundFile As IO.FileInfo In foundDirectory.GetFiles("*.*", IO.SearchOption.AllDirectories)
                ListBoxForFoundFiles.Items.Add(myFoundFile.FullName) '// add File to ListBox.
            Next
        Catch ex As UnauthorizedAccessException
            'MsgBox(ex.Message) '// display Folders that have been Denied accessed to.
        End Try
    Next
    MsgBox("Total Files: " & CInt(ListBoxForFoundFiles.Items.Count).ToString("#,###,###")) '// display Total File Count.
End Sub

End Class[/CODE][/QUOTE]

Thank U. it works.

[QUOTE=Momerath;1479586]Post how you did it.[/QUOTE]

1)
[code]
ListBox2.Items.Clear()
Dim myCoolFolder As String = "F:\"

    For Each myCoolFile As String In My.Computer.FileSystem.GetFiles(myCoolFolder,             FileIO.SearchOption.SearchAllSubDirectories, "*.*")
        Try
            ListBox2.Items.Add(myCoolFile)
        Catch ex As UnauthorizedAccessException
            MsgBox(ex.Message)
        End Try
    Next

    MsgBox("Total Files: " & CInt(ListBox2.Items.Count).ToString("#,###,###"))

[/code]

Error: Access to the path 'F:\System Volume Information\' is denied.

2)
[code]
ListBox2.Items.Clear()
Dim myCoolFolder As String = "F:\"
Try
For Each myCoolFile As String In My.Computer.FileSystem.GetFiles(myCoolFolder, FileIO.SearchOption.SearchAllSubDirectories, ".")

            ListBox2.Items.Add(myCoolFile)
     Catch ex As UnauthorizedAccessException
        MsgBox(ex.Message)

    Next
    End Try

    MsgBox("Total Files: " & CInt(ListBox2.Items.Count).ToString("#,###,###"))

[/code]

Errors:
1) 'For' must end with Next
2) 'Next' must be preceded by a matching 'For'

[QUOTE=Momerath;1479578]Catch the exception inside the for loop, not outside.[/QUOTE]
It does not work... Again same error..

[code]
ListBox2.Items.Clear()
Dim myCoolFolder As String = "F:\"
Try
For Each myCoolFile As String In My.Computer.FileSystem.GetDirectories _
(myCoolFolder, FileIO.SearchOption.SearchAllSubDirectories, ".")
ListBox2.Items.Add(myCoolFile)
Next
Catch ex As UnauthorizedAccessException
MsgBox(ex.Message)
End Try
MsgBox("Total Files: " & CInt(ListBox2.Items.Count).ToString("#,###,###"))
[/code]

This code is for listing all folders including subfolders.
but when i run this code i m getting error "Access to Path F:\System Volume Information is Denied"
How can i ignore this folder and continue scan.?
is ther any solution for this error?
Any help would be greatly appreciated.

[QUOTE=Ashu26;1479136]One more Help Sir..
how can i get all folders including subfolders.but i do not want list files.[/QUOTE]
I got it...

[QUOTE=codeorder;1479123]Even w/the code I posted to "[B]allow cross threading[/B]"?
[CODE] Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Control.CheckForIllegalCrossThreadCalls = False '// allow cross threading.
End Sub[/CODE][/QUOTE]
One more Help Sir..
how can i get all folders including subfolders.but i do not want list files.

[QUOTE=codeorder;1479123]Even w/the code I posted to "[B]allow cross threading[/B]"?
[CODE] Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Control.CheckForIllegalCrossThreadCalls = False '// allow cross threading.
End Sub[/CODE][/QUOTE]

Thank u very much. It works fine . I had forgot to copy that line.

[QUOTE=codeorder;1479109]See if this helps.
[B]1 Button, 1 ListBox, 1 BackgroundWorker[/B]
[CODE]Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    Control.CheckForIllegalCrossThreadCalls = False '// allow cross threading.
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    BackgroundWorker1.RunWorkerAsync() '// Start BackgroundWorker.
End Sub

Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
    ListBox1.Items.Clear() '// clear ListBox.
    Dim myCoolFolder As String = "C:\Program Files" '// your Folder.
    Try
        For Each myCoolFile As String In My.Computer.FileSystem.GetFiles _
                                         (myCoolFolder, FileIO.SearchOption.SearchAllSubDirectories, "*.*")
            ListBox1.Items.Add(myCoolFile) '// add File with FullPath.
        Next
    Catch ex As UnauthorizedAccessException
        MsgBox(ex.Message)
    End Try
    MsgBox("Total Files: " & CInt(ListBox1.Items.Count).ToString("#,###,###"))
End Sub

End Class[/CODE][/QUOTE]

Thanks for ur help. But ther is one error in ListBox1.
Error:
Cross-thread operation not valid: Control 'ListBox1' accessed from a thread other than the thread it was created on

How can i solve this error

[QUOTE=codeorder;1479088][CODE] FileSize = CInt(GetSize(MyFile)).ToString("#,###,###,###") & " KB"[/CODE][/QUOTE]
Thank U. It Works...

How do I insert commas to numbers so I can convert 1000 to 1,000 or 1000000 to 1,000,000.

[CODE] FileSize = GetSize(MyFile).ToString & " KB" [/CODE]

the output would be "6652 KB"

i m trying to get output 6,652 KB

Plz try to modify this code only.

[QUOTE=codeorder;1478546]Since you have not mentioned which control to add the Files to, I will also use a ListBox.
[CODE] Dim myCoolFolder As String = "C:\Program Files" '// your Folder.
Try
For Each myCoolFile As String In My.Computer.FileSystem.GetFiles _
(myCoolFolder, FileIO.SearchOption.SearchAllSubDirectories, ".")
'ListBox1.Items.Add(IO.Path.GetFileName(myCoolFile)) '// add only File Name with extension.
ListBox1.Items.Add(myCoolFile) '// add File with FullPath.
Next
Catch ex As UnauthorizedAccessException
MsgBox(ex.Message)
End Try
MsgBox("Total Files: " & CInt(ListBox1.Items.Count).ToString("#,###,###")[/CODE]
To only search the Top Folder and not the SubFolders as well, change [ICODE]FileIO.SearchOption.SearchAllSubDirectories[/ICODE] to: [ICODE] FileIO.SearchOption.SearchTopLevelOnly[/ICODE][/QUOTE]

But it doesn't work when the Directory has many Subdirectory.System/Program gets hanged. Is ther any soulution for this.

How to list all files in a folder including subfolder files.

I am working on Final year project for graduation. Project on a System Cleaner.
how to make stylish form in vb.net 2010..

k