My RegUnloadKey Not Unloading
Feb 1, 2010
I am currently writing a program that is saving user setting for the program into the registry. The problem is with the 'Administrator Control Panel' that I am writing for that program. To load/edit those settings for users that are not logged in their NTUser.dat must be loaded into the registry. I have based that part off of [url]... using the API functions RegLoadKey and RegUnloadKey. When all that is done is loading and unloading the key it works fine. However, any time that I read from the loaded registry user hive it will not unload that users registry hive. I have tryed using the RegistryKey class[url]...
My assumption is that the RegistryKey is not being closed or released properly, or completely enough for the user hive to unload. I have tried the .Close member in the RegistryKey class as well as tried 'CType(regKey, IDisposable).Dispose()' (regKey is defind as registrykey) to close the registykey. After I close the program (running from Visual Studio) I can manually unload the hive via regedit.
Is there another/better/more complete way to close the registrykey to allow for the RegUnloadKey function to work?
View 1 Replies
Feb 2, 2012
Im learning VB.NET and as a first task im creating a login form. ive been trying to link it to another form once a correct username and password are entered. however, despite that i still cant be able to hide it or unload it once the next form is loaded
Here is the Code
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
If UsernameTextBox.Text = "chris" And PasswordTextBox.Text = "chrispass" Then
Me.Hide()
[code]....
The Form2 appears as coded above but the 'Me.Hide()' manages to hide the login form but then it appears again?
View 9 Replies
Jun 8, 2011
I am learning VB.NET and as a first task I am creating a login form. I've been trying to link it to another form once a correct username and password are entered. However, despite that I still cant be able to hide it or unload it once the next form is loaded.
Here is the Code
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
If UsernameTextBox.Text = "chris" And PasswordTextBox.Text = "chrispass" Then
Me.Hide()
Form2.Show()
End If
Me.Close()
End Sub
The Form2 appears as coded above but the 'Me.Hide()' manages to hide the login form but then it appears again.
View 2 Replies
Mar 29, 2009
Problem
Forms:
1) Splash1
2) frmMain
Purpose:
unloading splash1 and loading frmMain
Code used so far:
CODE:
Problem:
The Whole project is ended!
Problem2: How to Create and .exe?
Basic Problem: I Have started programming in VB.net today only, I have experience of 2 years in VB6.
View 4 Replies
Jun 2, 2010
I feel like a complete noob for asking this because I know how to do this in VB6... But in VB.NET 2008, how would you load a new form and unload the current one? I know that in VB6 the code would be:
[code]...
The problem with that code is that it just ends my program completely without showing frmMain.
View 5 Replies
May 14, 2010
I'm rewriting a vb6 program in vb.net, and I was wondering what the best alternative is to vb6's "load"/"unload" commands for loading and unloading controls on a form.
e.g. (VB6)
Unload frmContainer.DetailGrid1
Load frmContainer.DetailGrid1
Currently I am adding/removing controls using
[Code].....
View 4 Replies
Feb 9, 2012
So if anyone has fallowed any of my post, then you will know I'm still in the process of transferring to pure vb.Net, while simultaneously trying to rid any bad habits that stemmed from the good 'ol vb6 days.So having said I have a few question that are in regards to the GarbageCollector. Now I'm not looking to modify or mess with it at all, but rather it's exact functionality and where I should be disposing of and handling my own unloading.For the sake of my coding style I like to run my application differently than most(unless this is the way it should be done) but this only applies to my more large project.[code]
So as you can already guess my startup object is the AppMain sub, and I have the application framework disabled.I'm not sure how the Garbage Collecter functions, so truly I'm not sure if my code there is necessary or unnecessary. What it does is unloads all open forms that may have been left behind, plus it closes the database connection if one is open. Also I'm wondering if its a good idea to clear all my collection as well. My concern with the collections is just I have sooo much information being stored(it's a business management system that handles transactions, appointments, inventory clients employees etc etc) and this keeps growing. So I'm not really sure if all this gets handled automatically by the GarbageCollector or if it's good practice to begin clearing out this data and disposing it before hand.
View 2 Replies
Feb 8, 2006
I am using VB.NET 2003. I am trying to move an application from VB5 to VB.NET and having some difficulty. Thre is a Main Form, which only consists of a menu bar with one of its commands being "Help" Under "Help" are several choices, including "About". There is also an About form. My question is: How do I get the About form to load when the Help/About command is clicked?
[Code]....
View 7 Replies