Inheriting the commondialog class in Vb.net 
Author Message
 Inheriting the commondialog class in Vb.net

Hi
I would like to use the "My Network Places" portion of the opendialog
class within vbnet. You cannot inherit this class but can its base
class, the commondialog class. Unfortunately there is no help on the
Mustinherit subs and there after how you filter the behaviour of the
class.
Doesn't anyone know how to do this or can they suggest anotherway or
enumerating ONLY the network places of a given PC. I do not want folder
browsers or file browsers just a list of the currently connected network
PC's(domain, workgroup(ie mimicking the "Entire Network" ))

Many thanks in advance

Paul

*** Sent via Developersdex http://www.*-*-*.com/ ***
Don't just participate in USENET...get rewarded for it!



Fri, 28 Jan 2005 20:25:15 GMT  
 Inheriting the commondialog class in Vb.net
Hi, Paul

You can get a list of the currently connected network PCs by calling the
NetServerEnum API.  There is currently no managed way to call the NetAPI
functions, so you will need to fall back on unmanaged code examples.  Take
a look at the following Knowledge Base article to get you started:

How to List Servers in 32 bit Visual Basic using NetServerEnum
http://support.microsoft.com/default.aspx?scid=kb;[LN];Q198896

A better place to post questions concerning NetAPI functionality would be
in the microsoft.public.win32.programmer.networks folder.  Posting there
will give you the best visibility to the people who know the technology
best.

HTH,

John Eikanger
Microsoft Visual Basic Developer Support

This posting is provided AS IS with no warranties, and confers no rights.
(c) 2002 Microsoft Corporation.  All rights reserved.
--------------------

| X-Newsreader: AspNNTP 1.50 (ActionJackson.com)
| Subject: Inheriting the commondialog class in Vb.net
| Mime-Version: 1.0
| Content-Type: text/plain; charset="us-ascii"
| Content-Transfer-Encoding: 7bit

| Newsgroups: microsoft.public.dotnet.languages.vb
| Date: Mon, 12 Aug 2002 05:25:15 -0700
| NNTP-Posting-Host: 216.17.146.37
| Lines: 1        
| Path: cpmsftngxa07!cpmsftngxa10!tkmsftngp01!tkmsftngp13
| Xref: cpmsftngxa07 microsoft.public.dotnet.languages.vb:59455
| X-Tomcat-NG: microsoft.public.dotnet.languages.vb
|
|
| Hi
| I would like to use the "My Network Places" portion of the opendialog
| class within vbnet. You cannot inherit this class but can its base
| class, the commondialog class. Unfortunately there is no help on the
| Mustinherit subs and there after how you filter the behaviour of the
| class.
| Doesn't anyone know how to do this or can they suggest anotherway or
| enumerating ONLY the network places of a given PC. I do not want folder
| browsers or file browsers just a list of the currently connected network
| PC's(domain, workgroup(ie mimicking the "Entire Network" ))
|
| Many thanks in advance
|
| Paul
|
|
| *** Sent via Developersdex http://www.developersdex.com ***
| Don't just participate in USENET...get rewarded for it!
|



Sun, 30 Jan 2005 00:25:54 GMT  
 Inheriting the commondialog class in Vb.net
Paul,

Have you considered using WMI (i.e., the System.Management namespace)?

Danny



Sun, 30 Jan 2005 00:43:41 GMT  
 Inheriting the commondialog class in Vb.net

Hi
I try anything as long as I can find some decent examples on how to do
it. Do you have any for WMI?

Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Sun, 30 Jan 2005 01:06:32 GMT  
 Inheriting the commondialog class in Vb.net
Paul,

The best thing is to download and install Microsoft's WMI SDK. After that,
launch the following documentation file:

 "C:\Program Files\WMI\wmisdk.chm"

Once you have access to the docs, .NET's System.Management namespace makes
working with WMI a snap. Here's a quick example:

Dim Query As New SelectQuery("Win32_ComputerSystem")
Dim Searcher As New ManagementObjectSearcher(Query)
Dim mbo As ManagementBaseObject
Dim ComputerDomain As String
Dim ComputerName As String
For Each mbo In Searcher.Get()
  ComputerDomain = Convert.ToString(mbo.Item("Domain"))
  ComputerName = Convert.ToString(mbo.Item("Name"))
Next

HTH.

Danny


Quote:

> Hi
> I try anything as long as I can find some decent examples on how to do
> it. Do you have any for WMI?

> Thanks

> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



Sun, 30 Jan 2005 01:30:17 GMT  
 Inheriting the commondialog class in Vb.net
Many Thanks  Danny

I'll give it a try



Quote:
> Paul,

> The best thing is to download and install Microsoft's WMI SDK. After that,
> launch the following documentation file:

>  "C:\Program Files\WMI\wmisdk.chm"

> Once you have access to the docs, .NET's System.Management namespace makes
> working with WMI a snap. Here's a quick example:

> Dim Query As New SelectQuery("Win32_ComputerSystem")
> Dim Searcher As New ManagementObjectSearcher(Query)
> Dim mbo As ManagementBaseObject
> Dim ComputerDomain As String
> Dim ComputerName As String
> For Each mbo In Searcher.Get()
>   ComputerDomain = Convert.ToString(mbo.Item("Domain"))
>   ComputerName = Convert.ToString(mbo.Item("Name"))
> Next

> HTH.

> Danny



> > Hi
> > I try anything as long as I can find some decent examples on how to do
> > it. Do you have any for WMI?

> > Thanks

> > *** Sent via Developersdex http://www.developersdex.com ***
> > Don't just participate in USENET...get rewarded for it!



Sun, 30 Jan 2005 03:19:48 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Problem with a vb.Net class inheriting from a c# class

2. nested class inherits containing class accessing private instance members

3. Accessing vb.net class from non.vb.net apps

4. Inherit WSDL generated vb into COM class

5. Can't inherit from TypeConverter.SimplePropertyDescriptor in VB.NET

6. Inherit in VB.NEt

7. Inherits in VB.NET

8. Inherited form in VB.net

9. INHERITS and NAMESPACES - VB, ASP.NET

10. Debug VB.NET DLL(Class Library) from ASP.NET page

11. VB.Net, Classes and ADO.Net guidelines???

12. Use a VB.NET Class Library in C++.NET

 

 
Powered by phpBB® Forum Software