|
from the msdn CurrencyManager Remove At Method documentation...
Note: This method was designed to allow complex controls, such as the DataGrid control, to remove items from the list. It is not recommended that you use this method to actually remove items. Instead, use the Delete method of the DataView class to delete items.
-jim
|
|
|
|
|
Thankz for ur reply,ok but in my case that is also not work i have tried with
dataview.delete(index)
but it does't work,lastly i satisfied with SQL satement,
|
|
|
|
|
I am trying to write xml from a dataset. I am sucessfully able to write xml but i want to change the format from
<f>
<in>80004
<out>F
to
<d>
<f in="80004" out="F">
Also i want to tell the parser to parse the xml using different(ISo-8859-1) charset. can any one tell me how i can do it. Thanx in adv
|
|
|
|
|
|
I am trying to write xml from a dataset. I am sucessfully able to write xml but i want to change the format from
<D>
<F>
<IN>80004</IN>
<OUT>F</OUT>
</F>
</D>
to
<D>
<F IN="80004" OUT="F"/>
</D>
and also to transform the utf-8 to iso-8859-1. can anyone tell me how to do it.
|
|
|
|
|
Hello.
Please, help. How to get CPU ID and Mac address?
Thanks.
|
|
|
|
|
==================================
Something like this:
==================================
Imports System
Imports System.Globalization
Imports System.Threading
Imports System.Resources
Imports System.Drawing
Imports System.Collections
Imports System.ComponentModel
Imports System.Windows.Forms
Imports System.Data
Imports System.Reflection
Imports System.Text
Public Class Fingerprint
Public Function Value() As String
Return pack(cpuId() + biosId() + diskId() + baseId() + videoId() + macId())
End Function
Private Function identifier(ByVal wmiClass As String, ByVal wmiProperty As String, ByVal wmiMustBeTrue As String) As String
Dim result As String = ""
Dim mc As System.Management.ManagementClass = New System.Management.ManagementClass(wmiClass)
Dim moc As System.Management.ManagementObjectCollection = mc.GetInstances()
Dim mo As System.Management.ManagementObject
For Each mo In moc
If mo(wmiMustBeTrue).ToString() = "True" Then
If result = "" Then
Try
result = mo(wmiProperty).ToString()
Exit For
Catch
End Try
End If
End If
Next
Return result
End Function
Private Function identifier(ByVal wmiClass As String, ByVal wmiProperty As String) As String
Dim result As String = ""
Dim mc As System.Management.ManagementClass = New System.Management.ManagementClass(wmiClass)
Dim moc As System.Management.ManagementObjectCollection = mc.GetInstances()
For Each mo As System.Management.ManagementObject In moc
If (result = "") Then
Try
result = mo(wmiProperty).ToString()
Catch
End Try
End If
Next
Return result
End Function
Private Function cpuId() As String
'Uses first CPU identifier available in order of preference
'Don't get all identifiers, as very time consuming
Dim retVal As String = identifier("Win32_Processor", "UniqueId")
If retVal = "" Then
retVal = identifier("Win32_Processor", "ProcessorId")
If retVal = "" Then
retVal = identifier("Win32_Processor", "Name")
If retVal = "" Then
retVal = identifier("Win32_Processor", "Manufacturer")
End If
'Add clock speed for extra security
retVal += identifier("Win32_Processor", "MaxClockSpeed")
End If
End If
Return retVal
End Function
Private Function biosId() As String
Return identifier("Win32_BIOS", "Manufacturer") + identifier("Win32_BIOS", "SMBIOSBIOSVersion") + identifier("Win32_BIOS", "IdentificationCode") + identifier("Win32_BIOS", "SerialNumber") + identifier("Win32_BIOS", "ReleaseDate") + identifier("Win32_BIOS", "Version")
End Function
Private Function diskId() As String
Return identifier("Win32_DiskDrive", "Model") + identifier("Win32_DiskDrive", "Manufacturer") + identifier("Win32_DiskDrive", "Signature") + identifier("Win32_DiskDrive", "TotalHeads")
End Function
Private Function baseId() As String
Return identifier("Win32_BaseBoard", "Model") + identifier("Win32_BaseBoard", "Manufacturer") + identifier("Win32_BaseBoard", "Name") + identifier("Win32_BaseBoard", "SerialNumber")
End Function
Private Function videoId() As String
Return identifier("Win32_VideoController", "DriverVersion") + identifier("Win32_VideoController", "Name")
End Function
Private Function macId() As String
Return identifier("Win32_NetworkAdapterConfiguration", "MACAddress", "IPEnabled")
End Function
Private Function pack(ByVal text As String) As String
Dim retVal As String
Dim x As Integer = 0
Dim y As Integer = 0
Dim n As Char
For Each n In text
y += 1
x += (AscW(n) * y)
Next
retVal = x.ToString() + "00000000"
Return retVal.Substring(0, 8)
End Function
End Class
|
|
|
|
|
How can i create a 'round' costum button in vb.net
|
|
|
|
|
Hello,
You will have to look into making Owner-Drawn controls. There are many examples on the internet on how to do it. Searches such as "VB .Net Owner Drawn Control" in Google, ect, will help you in accomplishing your task.
I hope this helps,
Programmer2k4
My sig:
"And it is a professional faux pas to pay someone else to destroy your computer when you are perfectly capable of destroying it yourself." - Roger Wright
I now use my CodeProject Blog!
Most recent blog post: April 3
|
|
|
|
|
Hello!
My application is a text editor which uses plugins for each type of document.
I have written a COM server in C++ and I can write coclasses in C++ for each document type. I use COM component categorisation so my application can "find" at run-time, what document types are supported. Now I want to let a VB programmer write a COM object to represent a new document class but I cannot find if it is possible to write a VB COM object which can use COM categorisation.
Can I write a COM component in VB which can have a COM category or can I only do this in C++?
Is there a definitive list of limitations in VB vs C++ for COM development?
Can anyone help with this?
Thank you
|
|
|
|
|
I've got a slight problem regarding outlook 2003 coding, basically i've designed a form in outlook 2003 form designer for use in an exchange public folder. Within this form i have placed two tick boxes within a frame, for arguments sake lets call the tick box's - Chk1 & Chk2 / Frame -Frame1.
All i want to do is set the code so if one box is ticked the other is automatically unticked, i've got no problem doing this in VB6 but i cant seem to achive the same results in outlook 2003, can anyone help?
Thanks
Mark
|
|
|
|
|
For my final year project in xcool i was asked to write a programme in VB.net for an access control system using biometrics(fingerprints) as an authentication mode.The sware will capture the fingerprints and put them in dbase(enrollment process).The sware will allow access to a network resource e.g a file after matching user fingerprints with the one in dbase(SQL)and deny if no match is found.It also record time and attendance of user on a computer system.There will b a server which will have the dbase while the clients(standalone computers) will be used by the users.There will b a biometric unit 2 each computer(clients).help me pls.Thx 4 listening ears and reading eyes.
|
|
|
|
|
Is there an easy way to set a datagrid for Windows forms to select by row ?
|
|
|
|
|
Hi,
Try this code.
Private Sub myDataGrid_CurrentCellChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles myDataGrid.CurrentCellChanged
myDataGrid.Select(myDataGrid.CurrentRowIndex)
End Sub
Lata Agrawal
|
|
|
|
|
Thanks ! That works great.
I still have one question though. I can now select by row but
the datagrid still sets a cursor on the current cell in that row.
I've put the setting "allowedit" to false but this doesn't prevent
that you can select the text in a cell (for copying, etc.)
Also when I want to scroll through my data, it just scrolls a couple
of lines and then stops.
Can anyone help me out with this ?
|
|
|
|
|
Hi, i'm new to visual basic and just started my first program.
It's a messanger program for a Local Area Network, I need assistance or code instances of how to run it over a Local Area network.
Posted by JC Aussie
|
|
|
|
|
Anonymous wrote:
i'm new to visual basic and just started my first program
Why does everyone what to do a "Messenger" program first? You should learn to walk before you can run. Seriously - there is a heck of a lot to consider in a messenger type application. You have a client application and a server application (unless you are going p2p in which case you need some sort of "discovery" mechanism). You have to register users within the system and manages and so on and so forth.
Sorry that this doesn't seem to be a helpful reply to you, but there is a lot going on in an application like that and it would take far too long to explain in a forum post to someone who has "just started [their] first program"
My: Blog | Photos | Next SQL Presentation
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and More
|
|
|
|
|
Is this your first program in any language? If so, your taking on a HUGE project for such a beginner.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Does anyone know how I might be able to have a VB.Net program automatically recognize that a USB drive has been plugged into a computer. File watcher is the only way I can think of but I was wondering if anyone might know of another way.
|
|
|
|
|
Ignore the Demo folder in the zip
the one you want is the DeviceChangeNotify folder.
http://www.onteorasoftware.com/downloads/devicechangenotify.zip
|
|
|
|
|
Thank you. I will give it a try and get back to you.
|
|
|
|
|
That was very helpful and it worked perfectly. Thank you very much.
|
|
|
|
|
Your welcome, and good luck with your project.
|
|
|
|
|
i have a form in which there is a combo box .
i want to give user functionality to add and remove items from combo box at run time .
add method is fairly easy but is the any method to remove or delete selected item from combobox.
i want that user select an item from the combo box and when he press the remove button that item should be removed from my list.
plz help me in this context
sumit
|
|
|
|
|
Hello,
The code to remove an item from a combobox at runtime is:
ComboBox1.Items.RemoveAt(ComboBox1.SelectedIndex)
I hope this helps,
Programmer2k4
My sig:
"And it is a professional faux pas to pay someone else to destroy your computer when you are perfectly capable of destroying it yourself." - Roger Wright
I now use my CodeProject Blog!
Most recent blog post: March 24
|
|
|
|