|
How about combo1.listindex = lSomeVal . Would that fit the bill
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
No its not working pal
Be Humble in Victory and Strong in Defeat. -Het
|
|
|
|
|
I use the code below to do what (I think) you need to do...
<br />
'Now set the combo to show the propDB stored in the .ini file<br />
For i = 0 To cmbPropDB.ListCount<br />
If cmbPropDB.List(i) = gstrPropDB Then<br />
cmbPropDB.ListIndex = i<br />
Exit For<br />
End If<br />
Next i<br />
The thing that might be causing it to work on my machine and not on yours is because I've set my combo box type to DropDownList - this means that the user can't type directly into the edit area, but must select from the list.
Let me know a bit more info, and will see if can sort it out for you if you like...
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Hello everybody,
How can I implement navigation methods such as MovePrevious on collection objects in Visual Basic 6.0?
Also, is there a fast way to search a collection object on some attributes of classes it stores, other than keys or ids?
Regards,
Roozbeh.
|
|
|
|
|
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
|
|
|
|