I have been using this code from the API-Guide. I am new to API's in general.
It creates a REG_DWORD in the directory I want.
How do I name the entry, for example I would like to store the position of the form when it is closed, with Left, Top, Height, Width?

vb Code:
  1. Dim Result As Long
  2. 'Check if the specified key exists
  3. RegOpenKeyEx HKEY_LOCAL_MACHINE, vSubKey, 0, KEY_ALL_ACCESS, Ret
  4. 'If the key doesn't exist, we create it
  5. If Result = 0 Then
  6.     'Create a new key
  7.     RegCreateKeyEx HKEY_LOCAL_MACHINE, vSubKey, 0, "REG_DWORD", REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, ByVal 0&, Result, Ret
  8.     If Result = 0 Then
  9.         MsgBox "Error while creating the Key!!"
  10.         Exit Sub
  11.     End If
  12. End If

This runs and creates the entry, but when I run the app a second time, it doesn't create another entry, so I guess I have to insert a name, or text somewhere.