|
Simple question that has me stumped.
Help!
Chris
|
|
|
|
|
Have a look at the article "Registry handling with .NET" by S Nishant in this site (www.codeproject.com/dotnet/csregistry01.asp).
The VB.NET equivalent is virtually identical.
Imports Microsoft.Win32.Registry
Imports Microsoft.Win32.RegistryKey
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim rKey As Microsoft.Win32.RegistryKey
Dim rKey1 As Microsoft.Win32.RegistryKey
rKey = Microsoft.Win32.Registry.LocalMachine
rKey1 = rKey.OpenSubKey("SOFTWARE\Microsoft\Windows NT\CurrentVersion")
ListBox1.Items.Add("RegisteredOwner :- " + rKey1.GetValue("RegisteredOwner"))
ListBox1.Items.Add("RegisteredOrganization :- " + rKey1.GetValue("RegisteredOrganization"))
ListBox1.Items.Add("ProductName :- " + rKey1.GetValue("ProductName"))
ListBox1.Items.Add("CSDVersion :- " + rKey1.GetValue("CSDVersion"))
ListBox1.Items.Add("SystemRoot :- " + rKey1.GetValue("SystemRoot"))
rKey1.Close()
End Sub
HTH
Andy
|
|
|
|
|
Heya - I also had a bit of trouble with the registry. I can modify it easy enough but I can't get it to refresh without restarting the computer. Is there some way to force Windows to reload the registry without restarting?
Thanks
Nic R
------------------------------------------
I beat the internet - the end guy is hard.
|
|
|
|
|
|
plz help me with the Input Validation with textbox in VB.NET?
ex : I wanted input masking to be applied on a textbox for that I addedd MaskEdBox Control in Toolbox and tried with that. But still after running the project nothing happens.
plz help me with input validation in textbox with VB.NET
--waiting for a quick reply
|
|
|
|
|
drmzunlimited wrote:
plz help me with input validation in textbox with VB.NET
What part of this are you actually stuck on???
Nick Parker
May your glass be ever full.
May the roof over your head be always strong.
And may you be in heaven half an hour before the devil knows you’re dead. - Irish Blessing
|
|
|
|
|
How do I display an mpeg or avi file on a form? Thanks for any help.
|
|
|
|
|
If this is for VB6, just use the 'Windows Media Player' ActiveX. To insert it in VB, go to the menu Project->Components, then select the 'Windows Media Player', then OK.
This will add a component that you can put on your form. Then, go through the properties of this component to load your movie.
Hope this helps !
Jerome
|
|
|
|
|
is there a simple way to re-interpret the enter key as the tab key in dialogs?
in c++ there is a PreTranslateMsg() function which you can use to listen for an enter key-press, then resend the key-press as a tab key.. is there anything like this for vb?
thanks for any suggestions!
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
use the KeyDown Event for each tab-enabled control. of course,this way, you have a lot of coding to do but it's the only way that i know
|
|
|
|
|
my VB6 application which calls and uses Excel works fine in Windows NT,2K and XP , but experiences problems when running on Windows 98. The system hangs and the message "System is dangerously low on resources" appear. I am assuming that this happen because Win98 does not have very secure Resource Management compared to NT based OS. Does anyone have any idea how to make my app work in Win98 ?
|
|
|
|
|
I'm trying to use drag & drop with a multiselection. I would like to copy the listview selected items on an other listview. I tried that :
<br />
Private Sub lstAllRole_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles lstAllRole.MouseDown<br />
lstAllRole.DoDragDrop(lstAllRole.SelectedItems, DragDropEffects.Copy)<br />
End Sub<br />
<br />
Private Sub lstRole_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles lstRole.DragEnter<br />
' If e.Data().GetDataPresent("System.Windows.Forms.ListView.ListViewItemCollection", False) Then<br />
If e.Data().GetDataPresent(lstAllRole.SelectedItems.GetType().ToString(), False) Then<br />
e.Effect() = DragDropEffects.Copy<br />
Else<br />
e.Effect() = DragDropEffects.None<br />
End If<br />
End Sub<br />
<br />
Private Sub lstRole_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles lstRole.DragDrop<br />
Dim obj As ListViewItem<br />
Dim objCol As Object<br />
<br />
<br />
For Each obj In e.Data.GetData(lstAllRole.SelectedItems.GetType().ToString(), False)<br />
lstRole.Items.Add(obj)<br />
Next<br />
End Sub<br />
The drag & drop works but not the copy. Does someone already do it ?
Thanks
|
|
|
|
|
How do i declare & use "HttpSendRequest" in VB.NET
Thanks in advance
|
|
|
|
|
Vipul,
You have now sent me three email messages asking how to do this. As I have previously pointed out, I do not reply to questions sent by email unless they relate to an article or code sample I have published.
You have posted the question to several different forums. If someone knows the answer, they will no doubt post a response. If you continue to email this question to me, I will report you for sending Spam.
Richard
|
|
|
|
|
Hi,
I am trying to access password and aliases or for that matter every thing related to microsoft exchange users i am able to retrieve only usernames using mapi.session object,
Please help in retrieving other things if any body has code plesae post it here.
I have tried using ADSI also.
Thanks,
Amit Gupta
|
|
|
|
|
Hello guys/gals,
Any idea how can i check printer status in vb.net. I am trying return a boolean value if printer is out of paper. Thank you in advance for your help. Cheers and have a good weekend.
Zulfikar Ali
|
|
|
|
|
hi ppl!!1
i am faing problems.. regarding the registration of crystal reports in vb.net
|
|
|
|
|
how to use print previiew control or how to use that to print a form in VB.NET?
or to print a document in VB.net using Print Preview control?
bye
--Aakash
|
|
|
|
|
like we had data reports in VB6 so what do we do for making reports in Vb.net
what to do?
--aakash
|
|
|
|
|
drmzunlimited wrote:
what to do?
Unfortunately Crystal Reports [^] has integrated with VS.NET. There is a lot of nice things about Crystal Reports, however they tend to have a lot of design flaw in previous versions of their software (e.g. 8.5).
Nick Parker
The greatest lesson in life is to know that even fools are right sometimes. - Winston Churchill
|
|
|
|
|
does anybody knows how to import data from excel file and store it in a Microsoft Access Database Table.
plz help me with this.
thnx
Aakash
|
|
|
|
|
look up the Access command:
docmd.tansfertext
|
|
|
|
|
does anybody knows how to import data from excel file and store it in a Microsoft Access Database Table.
plz help me with this.
thnx
Aakash
|
|
|
|
|
Open a blank DB
Go to New
Import table
Navigate to the excel file you want imported
Click import
A wizard will now open asking things like "use top row as headings", etc. Follow the wizard and your table will be there
I've always heard that there was an idea behind Win ME... I still can't figure out what that was... anyboy know??? I;ve herad the idea was that it was supposed to be n operating system but I doubt this. - Brian Delahunty
|
|
|
|
|
Hmmm... you emailed me, but no message here.
Oh well - hopefully this helps. Sorry, I didn't realise you were asking for code, as your question only asks how to do it.
What I do (but perhaps I shouldn't spread this possibly bad practice) when I need code for VBA is open the program (in this case Access) and start recording a Macro. Then perform all the actions for importing the excel spreadsheet to an Access table. Stop recording the Macro, view the Macro code - it will give you everything
Hope that is of more use to you
I've always heard that there was an idea behind Win ME... I still can't figure out what that was... anyboy know??? I;ve herad the idea was that it was supposed to be n operating system but I doubt this. - Brian Delahunty
|
|
|
|