Click here to Skip to main content
15,895,667 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: OLEDb provider for Sybase on Framework 1.1 Pin
Dave Kreskowiak18-Mar-07 12:01
mveDave Kreskowiak18-Mar-07 12:01 
QuestionHow to browse Active Directory from VB.Net Pin
®ol@nd17-Mar-07 4:25
®ol@nd17-Mar-07 4:25 
Answer[Message Deleted] Pin
Mudsoad17-Mar-07 7:25
Mudsoad17-Mar-07 7:25 
GeneralRe: How to browse Active Directory from VB.Net Pin
®ol@nd17-Mar-07 9:26
®ol@nd17-Mar-07 9:26 
GeneralRe: How to browse Active Directory from VB.Net Pin
Mudsoad17-Mar-07 21:36
Mudsoad17-Mar-07 21:36 
GeneralRe: How to browse Active Directory from VB.Net Pin
®ol@nd18-Mar-07 2:07
®ol@nd18-Mar-07 2:07 
GeneralRe: How to browse Active Directory from VB.Net Pin
Mudsoad18-Mar-07 5:15
Mudsoad18-Mar-07 5:15 
GeneralRe: How to browse Active Directory from VB.Net Pin
Dave Kreskowiak18-Mar-07 5:47
mveDave Kreskowiak18-Mar-07 5:47 
Ummm... To be frank, you're copying and pasting code that you don't understand at all, and I'm not talking about the directory searching code. It's this
Form1.Text = blah, blah, blah

in int your Main. The search code may actually be working, but since you put all this in the Main method, before the form even shows on the screen, you'll never see the results. And, the Text property of the Form just changes the TitleBar text. It doesn't show up in the form itself.

Get rid of Main method and move it into the Form_Load event. Add a ListBox to the Form and expand it to cover the form. Then change the code in the Form_Load event:
Dim enTry As DirectoryEntry = New DirectoryEntry("LDAP://your AD server/AD path to search")
Dim mySearcher As DirectorySearcher = New DirectorySearcher(enTry)
mySearcher.Filter = "(objectClass=Computer)"
 
Dim resEnt As SearchResult
For Each resEnt In mySearcher.FindAll()
    ListBox1.Items.Add(resEnt.GetDirectoryEntry().Name)
Next



Dave Kreskowiak
Microsoft MVP - Visual Basic


GeneralRe: How to browse Active Directory from VB.Net Pin
®ol@nd18-Mar-07 8:47
®ol@nd18-Mar-07 8:47 
GeneralRe: How to browse Active Directory from VB.Net Pin
®ol@nd18-Mar-07 9:52
®ol@nd18-Mar-07 9:52 
GeneralRe: How to browse Active Directory from VB.Net [modified] Pin
Dave Kreskowiak18-Mar-07 11:54
mveDave Kreskowiak18-Mar-07 11:54 
GeneralRe: How to browse Active Directory from VB.Net Pin
®ol@nd25-Mar-07 7:23
®ol@nd25-Mar-07 7:23 
GeneralRe: How to browse Active Directory from VB.Net Pin
®ol@nd25-Mar-07 8:28
®ol@nd25-Mar-07 8:28 
GeneralRe: How to browse Active Directory from VB.Net Pin
Dave Kreskowiak26-Mar-07 15:50
mveDave Kreskowiak26-Mar-07 15:50 
QuestionProblem - openning PDF file in visual basic Pin
mgbalaji17-Mar-07 2:47
mgbalaji17-Mar-07 2:47 
AnswerRe: Problem - openning PDF file in visual basic Pin
Christian Graus17-Mar-07 3:51
protectorChristian Graus17-Mar-07 3:51 
AnswerRe: Sunday dates only.......... Pin
kubben17-Mar-07 2:23
kubben17-Mar-07 2:23 
GeneralRe: Sunday dates only.......... Pin
Member 387988118-Mar-07 20:42
Member 387988118-Mar-07 20:42 
QuestionResize the form at runtime on click event of button Pin
Pushpa Setty17-Mar-07 1:34
Pushpa Setty17-Mar-07 1:34 
AnswerRe: Resize the form at runtime on click event of button Pin
Christian Graus17-Mar-07 3:55
protectorChristian Graus17-Mar-07 3:55 
QuestionEnter/Tab keys on DataGridView !! Pin
kindman_nb17-Mar-07 0:12
kindman_nb17-Mar-07 0:12 
AnswerRe: Enter/Tab keys on DataGridView !! Pin
Mudsoad17-Mar-07 8:20
Mudsoad17-Mar-07 8:20 
Questionhow to creat the object at runtime? Pin
Niraj Parikh16-Mar-07 22:35
Niraj Parikh16-Mar-07 22:35 
AnswerRe: how to creat the object at runtime? Pin
Christian Graus17-Mar-07 3:54
protectorChristian Graus17-Mar-07 3:54 
QuestionRe: how to creat the object at runtime? Pin
Niraj Parikh19-Mar-07 20:02
Niraj Parikh19-Mar-07 20:02 

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.