|
Here are the options I know of:
1) You can write your own custom class that "inherits" the VB6 collection object. Of course VB6 doesn't really inherit, you simply wrap calls to the collection object with methods of your own class (is that a wrapper or a decorator...)
2) You can write a method of that class that searches through the collection for a particular value.
3) You can look around for a custom control or library written by someone else.
|
|
|
|
|
How can I access shared folders on a remote machine using vb.net??
|
|
|
|
|
How are you establishing the connection to the remote machine, using what connectivity? FTP? HTTP? NTLM?
|
|
|
|
|
Its not thru HTTP or FTP.I dnt know what the other 1 you mentioned is.Actually in a LAN which uses TCP i need 2 get the shared folders on remote machines when logged in as an administrator using vb.net.
|
|
|
|
|
If everything is in the same workgroup or domain (and the Administrator account presumably has permission to everything in the workgroup or domain) then you may simply refer to the location using the UNC path -- i.e., "\\machinename\sharename\foldername\", and you will not have to expend any additional effort with coding for file access & security permissions.
|
|
|
|
|
hello everyone,
I have a simple single-window program for mathematical graphing. I have seen an example somewhere of how DirectDraw is being used to accelerate drawing of MDI windows. Though I don't use a MDI app, but however, use very heavy graphing and filling I though DirectDraw could help me. I'm new to this so I was just wondering if anyone has any ideas on how to implement this?
any help would be greatly appreciated. thanx.
|
|
|
|
|
guyss/girlss this is bothering me..there are no .net gurus that i know....and i need some help...i made this prog and i want a sound to play when a label(timer) reached 10 sec...but i have multi timers..soo there for at some times there will be multi wav files being played...Soo heres the prob...When it reaches 10 sec it plays the file..but its takes like a Sec to load the file..which throws off the clocks..does anyone know how i can stop this from happening..and how to make everything run smooth??
Thankss Nickkk
|
|
|
|
|
Try using directsound, you will need the directx SDK.
|
|
|
|
|
Hi guys,
I have one user control implemented in .net (c#) and im trying to call it from a form in visual basic. the big problem is i cant add that control to vb designer, i just can add it as reference, so when the vb form comes up i cant see my control. i've done all the steps in this link (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/callnetfrcom.asp).
does anybody any hint, thanx in advance.
|
|
|
|
|
First thing that comes to mind is did you add the control via code?
controls.add(classname) ?
|
|
|
|
|
Hi Richard. Can you set the picklist source to a =VLOOKUP() formula?
|
|
|
|
|
Thanks, but as it happens, apparently Excel cannot create a list from a different sheet (at least according to the help / MSDN etc!)
Have got around it by using just one sheet, and hiding a column with the names in, so got it sorted....but if you look further up in the forum, have another prob now!(Don't you just LOVE the Excel object model lol!)
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Anyone know how....
Have a sheet (sA) with a list of names pulled from a database.
On second sheet (sB), need to set the cells in one of the columns to be a picklist based on the names on sA.
Am OK with selecting a range etc, but don't know how to programmatically tell Excel that the values in the cells on sB need to appear in a drop-down made from sA
Anyone got any ideas - 'tis driving me wappy!
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
hi,
Let me how to include the mdac_typ.exe in my project .msi file.How to include so that when i deliver my project setup it automatically installs the data components.
Be Humble in Victory and Strong in Defeat. -Het
|
|
|
|
|
you need to put mdac_typ.exe in C:\Program Files\Microsoft Visual Studio\VB98\Wizards\PDWizard\Redist>
|
|
|
|
|
I mean to disable the NIC(Network Interface Card) by running a VB program. And then enabling the card. This will make the changes of parameters in network take effect without reboot the system. I want to get it work through a program.
Thanks for reading and replying.
|
|
|
|
|
Hi,
That is best done thru WMI (Windows Management Instrumentation). But, not all changes made will be applied when you disable and then re-enable the card. You'll know this when you call a function to make a change and the return code is something like REBOOT_REQUIRED.
You can start with the System.Management and System.Management.Instrumentation namespace in VB.NET or the WMI SDK on MSDN[^].
RageInTheMachine9532
|
|
|
|
|
Hi
I have been trying to find a way to do this thru WMI but do not see any methods and all properties are read only. Can you point me in the right direction I am using Win32_NetworkAdapter I searched others and am unable to find a way to do it.
Any help is appreciated.
Thanks
Tom
|
|
|
|
|
Unfortunately, the WMI functionality that is exposed doesn't work. The idea is to get the ServiceName from the NetworkAdapter object. Then use the StopService method of the ServiceName object to stop the driver. But, alas, the driver won't stop or pause.
Apparently it can't be done through WMI. But it could be done thru calls to the PnP Device Manager. You would have to call IoGetDeviceInterfaces with the class GUID of the network adapter class to get a linked list of SymbolicLinks. Once you find the Symbolic Link name, you can pass that to IoSetDeviceInterfaceState with the Enabled param set to False.
I haven't tried to do this, and frankly, don't have to the time to write any code for it. But after about an hour of research, this is the only method I can come up with to disable/enable a NIC through code. I THINK it's the same method used by the Device Manager when you disable/enable a device through there.
RageInTheMachine9532
|
|
|
|
|
Thanks for the quick response. I will look into the solution you mentioned. Also I found this KB http://support.microsoft.com/?kbid=311272 it is a command line utility of the device manager which I may use as a last resort.
Once again thanks.
Tom
|
|
|
|
|
DevCon is a pretty neat little tool. The source code for it can be found in the Windows XP DDK. You can find how to disable and enable devices in there. Although it's written in C++, you can use the technique in a VB.NET app. But it will take a bit of effort to get the structures defined properly and P/Invoke the calls required.
RageInTheMachine9532
|
|
|
|
|
Thanks I order the XP DDK on CD to take a look and possibly generate a better solution than using the Devcon.exe program.
In the meantime I did get this to work, its not complete but it seems to work. Of course it relies on WMI and the Devcon executable.
Thanks for your help
Tom
Private Sub ChangeAdapterStatus(ByVal mAdapter As String, ByVal mStatus As String)
Dim oMngt As New ManagementScope("\\.") ' local machine
Dim oMs As New System.Management.ObjectQuery
Dim oSearch As New ManagementObjectSearcher
Dim oColl As ManagementObjectCollection
Dim oRcd As New ManagementObject
Dim oNic As PropertyData
Dim oState As String
Dim ret As Integer
'
Try
oMs.QueryString() = "SELECT NetConnectionID, NetConnectionStatus, PNPDeviceID" & _
" FROM Win32_NetworkAdapter" & _
" Where NetConnectionID = '" & mAdapter & "'"
' " Where NetConnectionID like '%'" This returns all configed adpt
oSearch.Scope = oMngt
oSearch.Query = oMs
oColl = oSearch.Get
For Each oRcd In oColl
oNic = oRcd.Properties.Item("PNPDeviceID")
Dim oDevHld As String = oNic.Value
Dim oDevID() As String = oDevHld.Split("&")
Dim oCmd As String = "\devcon.exe " & mStatus & " *" & oDevID(1) & "* updateni"
ret = Shell(Application.StartupPath & oCmd)
Next
Catch ex As ManagementException
MsgBox(ex.Message)
End Try
End Sub
Tom
|
|
|
|
|
That'll work. The only down side is DevCon is NOT redistributable. Microsoft is a bit picky about sending developer tools out with licensed products.
RageInTheMachine9532
|
|
|
|
|
I'm a newbie at programming. I need to build an Client/Server application in which my home computer is likely to be the server but possibly the school server. At most there will be no more than 200 clients of which only a few will be accessing the server at anyone time. I've heard lots about XML and ASP.Net but know nothing about them. Does VB.Net have a simple thing to use like C++'s Winsock?? What would be suitable approach use for the network communcation side of this. oh yea, the data will be being transferred over the internet to the users home systems.
Cheers
Thanks in advance
Jace
|
|
|
|
|
Without knowing much about this I suggest you look at the System.Net namespace. You can use FileWebRequest and FileWebResponse to send files back and forth. There are tons of docs on these features.
|
|
|
|