vb tricks

Status
Not open for further replies.

Manojap

Broken In
Pls copy paste these code to ur visual basic form’s code section.

1.Invoke folder selection dialog box to ur Visual Basic application / use of windows handles

Private Type BROWSEINFO
hOwner As Long
pidlRoot As Long
pszDisplayName As String
lpszTitle As String
ulFlags As Long
lpfn As Long
lParam As Long
iImage As Long
End Type
Private Const BIF_RETURNONLYFSDIRS = &H1
Private Declare Function SHGetPathFromIDList Lib "SHELL32.DLL" Alias "SHGetPathFromIDListA" (ByVal pidl As Long, ByVal pszPath As String) As Long
Private Declare Function SHBrowseForFolder Lib "SHELL32.DLL" Alias "SHBrowseForFolderA" (lpBrowseInfo As BROWSEINFO) As Long 'ITEMIDLIST

Public Function BrowseFolder(hWnd As Long, szDialogTitle As String) As String
' Syntax: StrVar = BrowseFolder(hWnd, StrVar)
On Local Error Resume Next
Dim X As Long, BI As BROWSEINFO, dwIList As Long, szPath As String, wPos As Integer
BI.hOwner = hWnd
BI.lpszTitle = szDialogTitle
BI.ulFlags = BIF_RETURNONLYFSDIRS
dwIList = SHBrowseForFolder(BI)
szPath = Space$(512)
X = SHGetPathFromIDList(ByVal dwIList, ByVal szPath)
If X Then
wPos = InStr(szPath, Chr(0))
BrowseFolder = Trim(Left$(szPath, wPos - 1))
Else
BrowseFolder = vbNullString
End If
End Function

Private Sub Form_Click()
Dim sFileName As String
sFileName = BrowseFolder(Me.hWnd, "Select the folder to Protect")

End Sub


2.Function to Check whether a folder exist or not , this function will return true if the folder exist.Pls modify above code..

Public Function IsFolderExists(FolderName As String) As Boolean
Dim fs
Set fs = CreateObject("Scripting.FileSystemObject")
IsFolderExists = fs.FolderExists(FolderName)
End Function

Private Sub Form_Click()
Dim sFileName As String
sFileName = BrowseFolder(Me.hWnd, "Select the folder to Protect")
MsgBox (IsFolderExists(sFileName))
End Sub

3.Run a weblink or mailto link using shell command from Visual Basic application/set hypperlink.

General Declaration section
Private Declare Function ShellExecute Lib "SHELL32.DLL" Alias "ShellExecuteA" _
(ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As
Long
Private Const AppName = "Dictionary"


Private Sub mail_Click()
ShellExecute 0, "Open", "mailto:" & mail.Caption, vbNullString, vbNullString, vbNormal
End Sub

Private Sub web_Click()
ShellExecute 0, "Open", web.Caption, vbNullString, vbNullString, vbNormal
End Sub
Private Sub Form_Load()
mail.caption=�maojap.nair@gmail.com�
web.caption=�*www.manojapnair.bravehost.com�
End Sub
:roll: :roll:
 

//siddhartha//

Stabbing my shoe
Can anybody suggest me VB.NET tricks for making a simple calculator for calculating marks and percentage of exam results for 7 subjects...
 
OP
Manojap

Manojap

Broken In
rajkumar_personal said:
Why don't u mention that u have copied the sources from VB progs written by others ?

All of this **** can be easily located on
www.planetsourcecode.com

MENTION the place u have copied stuff.......ALWAYS !!!


The program is completely my own,who says it found on palnet....manoj
 
T

Tux

Guest
I am developed a TIC TAC TOE game with AI.
Computers responds to our steps wisley.
But its a 250 + pg code.
Any body wants it.
 

rajkumar_personal

Ignorance is BLISS !!
Yeah.............................
I'm Interested in ur program Tux !
Plz mail it to me since I guess it would be difficult to post the bulky document here !
Plz include all the forms and other files in a zip archieve !
 
T

Tux

Guest
rajkumar_personal said:
Yeah.............................
I'm Interested in ur program Tux !
Plz mail it to me since I guess it would be difficult to post the bulky document here !
Plz include all the forms and other files in a zip archieve !

I've sent it. There is still a bug.
And I just can't correct it.
Though the bug don't create problem.
 
T

Tux

Guest
tuxfan said:
Yes mr Tux aka Ash :D I want it. How can you send it to me?


why don't u give your email id.
and thank that u r my fan.
U R TUXFAN
and i am TUX.
And also delete aka ash
 

technovice

Broken In
Hi!! Tux
Can i get the game too!
It would be great if you can provide the source code with it!
i'll pm my email id if its ok with you!
 
T

Tux

Guest
Send it buddy. I'll give you the whole
source code and forms along.
Its OK . Send your email-id.
 
T

Tux

Guest
DAMN TIRED of sending it to people.
But that doesn't means u won't get it.

Log on to
tictactoetux@rediffmail.com
with the password "thanku" and download
the massage from "SNEHASIS GHOSH"
with no subject. Download the attacment and check it out
 

igeek

Broken In
Tux said:
hOW WAS TH PROG. sOMEONE REPLY PLZ
I just downloaded it & tried it. It looks ok but its just sort of basic, no? I was able to beat it in 4 straight moves 5 times before getting a draw the 6th time. When you mentioned AI, I thought something hi-fi, you know..... :wink:

Still, its not bad!!! :D
 
T

Tux

Guest
igeek said:
Tux said:
hOW WAS TH PROG. sOMEONE REPLY PLZ
I just downloaded it & tried it. It looks ok but its just sort of basic, no? I was able to beat it in 4 straight moves 5 times before getting a draw the 6th time. When you mentioned AI, I thought something hi-fi, you know..... :wink:

Still, its not bad!!! :D

I know I know.
Its damn basic.
But Read the README. U'll know why.
 
Status
Not open for further replies.
Top Bottom