Click here to Skip to main content
15,887,027 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Questionwhy aint my else working!! Pin
harveyhanson27-Feb-07 16:26
harveyhanson27-Feb-07 16:26 
AnswerRe: why aint my else working!! Pin
Christian Graus27-Feb-07 17:00
protectorChristian Graus27-Feb-07 17:00 
AnswerRe: why aint my else working!! Pin
Guffa27-Feb-07 22:56
Guffa27-Feb-07 22:56 
QuestionCreate Share Folder in VB.NET Pin
alexfromto27-Feb-07 14:26
alexfromto27-Feb-07 14:26 
AnswerRe: Create Share Folder in VB.NET Pin
Dave Kreskowiak28-Feb-07 1:55
mveDave Kreskowiak28-Feb-07 1:55 
GeneralRe: Create Share Folder in VB.NET Pin
alexfromto1-Mar-07 9:38
alexfromto1-Mar-07 9:38 
GeneralRe: Create Share Folder in VB.NET Pin
Dave Kreskowiak1-Mar-07 14:25
mveDave Kreskowiak1-Mar-07 14:25 
GeneralRe: Create Share Folder in VB.NET Pin
alexfromto2-Mar-07 3:16
alexfromto2-Mar-07 3:16 
Thanks Dave. You are right. I wrote some piece of code here, which does exactly what I need.
Since it's ASP.NET applicatioon I had some trouble in the beginning but then I found out that I need to import System.Management into my project and from there it was much better.

Try<br />
                            ' Create a ManagementClass object<br />
                            Dim managementClass As System.Management.ManagementClass = New System.Management.ManagementClass("Win32_Share")<br />
                            ' Create ManagementBaseObjects for in and out parameters<br />
                            Dim inParams As System.Management.ManagementBaseObject = managementClass.GetMethodParameters("Create")<br />
                            Dim outParams As System.Management.ManagementBaseObject<br />
                            ' Set the input parameters<br />
                            inParams("Description") = "My Shared Files"<br />
                            inParams("Name") = partner_name<br />
                            inParams("Path") = Session("Path").ToString() ' This is a path to existing directory<br />
                            inParams("Type") = 0<br />
                            ' Disk Drive<br />
                            ' Invoke the method on the ManagementClass object<br />
                            outParams = managementClass.InvokeMethod("Create", inParams, Nothing)<br />
                            ' Check to see if the method invocation was successful<br />
                            If (CType(outParams.Properties("ReturnValue").Value, Integer) <> 0) Then<br />
                                Throw New Exception("Unable to share directory.")<br />
                            End If<br />
                        Catch ex As Exception<br />
                            'Return e.Message<br />
                        End Try<br />

GeneralRe: Create Share Folder in VB.NET Pin
Wrongway432125-Sep-07 9:30
Wrongway432125-Sep-07 9:30 
Questionposition messagebox? Pin
cstrader23227-Feb-07 13:30
cstrader23227-Feb-07 13:30 
AnswerRe: position messagebox? Pin
Dave Kreskowiak27-Feb-07 13:42
mveDave Kreskowiak27-Feb-07 13:42 
QuestionWeb automation and scraping? Pin
chantymalo27-Feb-07 11:08
chantymalo27-Feb-07 11:08 
QuestionReadAllText vs .Peek = -1 [modified] Pin
Marcus J. Smith27-Feb-07 10:28
professionalMarcus J. Smith27-Feb-07 10:28 
AnswerRe: ReadAllText vs .Peek = -1 Pin
TwoFaced27-Feb-07 12:09
TwoFaced27-Feb-07 12:09 
Questionflashing text in lbl box in vb.net Pin
bapu288927-Feb-07 10:12
bapu288927-Feb-07 10:12 
AnswerRe: flashing text in lbl box in vb.net Pin
JUNEYT27-Feb-07 11:06
JUNEYT27-Feb-07 11:06 
AnswerRe: flashing text in lbl box in vb.net Pin
TwoFaced27-Feb-07 12:05
TwoFaced27-Feb-07 12:05 
GeneralRe: flashing text in lbl box in vb.net Pin
bapu288928-Feb-07 9:28
bapu288928-Feb-07 9:28 
QuestionListbox loop Pin
China-Gary27-Feb-07 6:03
China-Gary27-Feb-07 6:03 
AnswerRe: Listbox loop Pin
haggenx27-Feb-07 7:13
haggenx27-Feb-07 7:13 
GeneralRe: Listbox loop Pin
China-Gary27-Feb-07 7:55
China-Gary27-Feb-07 7:55 
QuestionSound in program made with VB.NET 2005 Pin
harveyhanson27-Feb-07 6:00
harveyhanson27-Feb-07 6:00 
AnswerRe: Sound in program made with VB.NET 2005 Pin
MatrixCoder27-Feb-07 9:18
MatrixCoder27-Feb-07 9:18 
Questionsample update query in vb.net Pin
JustmeNick27-Feb-07 5:42
JustmeNick27-Feb-07 5:42 
AnswerRe: sample update query in vb.net Pin
Marcus J. Smith27-Feb-07 5:45
professionalMarcus J. Smith27-Feb-07 5:45 

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.