Click here to Skip to main content
15,888,020 members
Home / Discussions / C#
   

C#

 
Questionlove c# Pin
lw8315-Jun-06 22:47
lw8315-Jun-06 22:47 
AnswerRe: love c# Pin
J4amieC5-Jun-06 23:06
J4amieC5-Jun-06 23:06 
Questionits urgent Pin
neelus5-Jun-06 21:22
neelus5-Jun-06 21:22 
AnswerRe: its urgent Pin
Christian Graus5-Jun-06 22:07
protectorChristian Graus5-Jun-06 22:07 
Questiontutorial for JavaScript Pin
foysal mamun5-Jun-06 21:06
foysal mamun5-Jun-06 21:06 
AnswerRe: tutorial for JavaScript Pin
Mairaaj Khan5-Jun-06 21:36
professionalMairaaj Khan5-Jun-06 21:36 
AnswerRe: tutorial for JavaScript Pin
J4amieC5-Jun-06 22:11
J4amieC5-Jun-06 22:11 
QuestionSHBrowseForFolder in C#!! VB6 -> C# help! Pin
suguimoto5-Jun-06 21:04
suguimoto5-Jun-06 21:04 
Hello!

I have the code below, but I really don´t know how to make it work in C#.
"Type" in C# is like "struct" ??
Should I use "ref BrouseInfo lpbi" in order to refer to my "struct" or "Type" in the SHBrowseForFolder calling and/or declaration???



Const BIF_RETURNONLYFSDIRS = 1
Const BIF_DONTGOBELOWDOMAIN = 2
Const MAX_PATH = 260

Private Declare Function SHBrowseForFolder Lib "shell32" ( _
lpbi As BrowseInfo) As Long

Private Declare Function SHGetPathFromIDList Lib "shell32" ( _
ByVal pidList As Long, _
ByVal lpBuffer As String) As Long

Private Declare Function lstrcat Lib "kernel32" Alias "lstrcatA" ( _
ByVal lpString1 As String, _
ByVal lpString2 As String ) As Long

'Tipo para def
Private Type BrowseInfo
hWndOwner As Long
pIDLRoot As Long
pszDisplayName As Long
lpszTitle As Long
ulFlags As Long
lpfnCallback As Long
lParam As Long
iImage As Long
End Type


nextcode :

Private Sub cmdSearchFolder_Click()
Dim lpIDList As Long
Dim sBuffer As String
Dim szTitle As String
Dim tBrowseInfo As BrowseInfo

'Personaliza a procura
szTitle = "Type the source folder for the search : "
With tBrowseInfo
.hWndOwner = Me.hWnd
.lpszTitle = lstrcat(szTitle, "")
.ulFlags = BIF_RETURNONLYFSDIRS + BIF_DONTGOBELOWDOMAIN
End With


lpIDList = SHBrowseForFolder(tBrowseInfo)

If (lpIDList) Then
sBuffer = Space(MAX_PATH)
SHGetPathFromIDList lpIDList, sBuffer
sBuffer = Left(sBuffer, InStr(sBuffer, vbNullChar) - 1)
'This is the Textbox
txtFolder.Text = sBuffer
End If

End Sub


AnswerRe: SHBrowseForFolder in C#!! VB6 -> C# help! Pin
stancrm5-Jun-06 22:57
stancrm5-Jun-06 22:57 
GeneralRe: SHBrowseForFolder in C#!! VB6 -> C# help! Pin
suguimoto5-Jun-06 22:59
suguimoto5-Jun-06 22:59 
QuestionUrgent:TreeListView Control [modified] Pin
Anilesh5-Jun-06 20:45
Anilesh5-Jun-06 20:45 
QuestionVery Urgent Pin
Shiv55-Jun-06 19:57
Shiv55-Jun-06 19:57 
AnswerRe: Very Urgent Pin
Christian Graus5-Jun-06 20:46
protectorChristian Graus5-Jun-06 20:46 
QuestionInstallation start Pin
TheEagle5-Jun-06 19:24
TheEagle5-Jun-06 19:24 
AnswerRe: Installation start Pin
stancrm5-Jun-06 20:29
stancrm5-Jun-06 20:29 
QuestionUse MemoryStream to Clone a compound object Pin
Bob_Sun5-Jun-06 17:04
Bob_Sun5-Jun-06 17:04 
QuestionHow can I time a function? Pin
User 5838525-Jun-06 15:28
User 5838525-Jun-06 15:28 
AnswerRe: How can I time a function? Pin
Limey4205-Jun-06 17:53
Limey4205-Jun-06 17:53 
AnswerRe: How can I time a function? Pin
RSindia5-Jun-06 21:10
RSindia5-Jun-06 21:10 
GeneralRe: How can I time a function? Pin
User 5838525-Jun-06 21:17
User 5838525-Jun-06 21:17 
AnswerRe: How can I time a function? Pin
alwz_nikhil5-Jun-06 21:12
alwz_nikhil5-Jun-06 21:12 
QuestionHow do i position the output of a Response.Write() [modified] Pin
Red_Wizard_Shot_The_Food5-Jun-06 12:57
Red_Wizard_Shot_The_Food5-Jun-06 12:57 
AnswerRe: How do i position the output of a Response.Write() [modified] Pin
Christian Graus5-Jun-06 13:38
protectorChristian Graus5-Jun-06 13:38 
AnswerRe: How do i position the output of a Response.Write() [modified] Pin
liuqm.china5-Jun-06 16:29
liuqm.china5-Jun-06 16:29 
QuestionHow to show selected rectangle? Pin
Susuko5-Jun-06 12:50
Susuko5-Jun-06 12:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.