[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

GetVolumeSerial

Posted on 2006-05-10
4
Medium Priority
?
408 Views
Last Modified: 2007-12-19
hello,
I would like to create a button so that when you click it you see
this MessageBox.Show(GetVolumeSerialNumber("C:\"))
how can I do that ?
0
Comment
Question by:aplelois
  • 2
4 Comments
 
LVL 20

Assisted Solution

by:ElrondCT
ElrondCT earned 1000 total points
ID: 16653108
Do you mean you want a MessageBox to display when you click a button, or you want the text on the button itself to have the results of your function?  In either case, you'd put the code in the button's Click event, such as:

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        MessageBox.Show(GetVolumeSerialNumber("C:\"))
    End Sub

or

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Button1.Text = GetVolumeSerialNumber("C:\")
    End Sub

The click event subroutine is the one created when you double-click a button that's on the design surface of a form.
0
 

Author Comment

by:aplelois
ID: 16653135
Error      1      Name 'GetVolumeSerialNumber' is not declared.
0
 
LVL 9

Accepted Solution

by:
sk33v3 earned 1000 total points
ID: 16654670
I believe this is what you are looking for.

http://addressof.com/blog/archive/2004/02/14/392.aspx
0
 
LVL 20

Expert Comment

by:ElrondCT
ID: 16657501
Perhaps I misunderstood. I thought from this and your other message that you already had the function created to get a volume serial number. If you don't have that function, then sk33v3's link is what you need; download the code from there. If you have the function in your program, and you're getting the error above, then I think you need to explain a bit more what's going on (show us the code where you're getting the error).
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question