|
First of all, thanks for all the help. Now, I showed the completed app to the rest of the guys in IT and we came up with the idea of showing the subnet mask and the default gateway (Maybe the MAC, but we really haven't decided). I've found some code calling a WMI, but I can't seem to get it to work right.
Any suggestions?
|
|
|
|
|
Aptiva Dave wrote: but I would like to have it be able to release and renew the ip address since that is sometimes the most difficult thing to walk people through over the phone.
Is there any simple way to do this?
Very easy. You don't even need to write any code. Just create a batch file and use this:
%systemroot%\system32\ipconfig /release
%systemroot%\system32\ipconfig /renew
Call the file iprenew.cmd and drop the file in the C:\Windows folder. When the user needs to renew their IP address, just tell them to click on Start, then Run, and type iprenew and hit Enter.
|
|
|
|
|
The main issue with creating this app is because we have noticed throughout the years that our users just are not that comfortable with using the command prompt. They are very visual people. I also put into this app their computer name and their user name, along with a function to ping an outside address (right now yahoo.com) to test whether they are connected to the internet. Hopefully it should save us some time.
|
|
|
|
|
i know this is waaaay old but here's a cleaner ".Net version" anyway
Public Sub ReleaseIP()
Process.Start(System.Environment.SystemDirectory & "\IPConfig.exe", "/release")
Sleep(3) ' 3 Seconds to give ipconfig time to finish
End Sub
Public Sub RenewIP()
Process.Start(System.Environment.SystemDirectory & "\IPConfig.exe", "/renew")
Sleep(3) ' 3 seconds to give ipconfig time to finish
End Sub
|
|
|
|
|
I am already finish my VB.net project, but I want to protect my project with like CD key, so people can not use my project if they do not know the key.
The problem is I dont know how to make the key.
May someone help me please?
|
|
|
|
|
There's no one set way of doing it.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Winarto wrote: The problem is I dont know how to make the key.
"THE" key? Think about that now. What's to stop anyone from just writing down "THE" key and sending it with every copy of the CD they make??
|
|
|
|
|
I am already finish my VB.net project, but I want to protect my project with like CD key, so people can not use my project if they do not know the key.
The problem is I dont know how to make the key.
May someone help me please?
|
|
|
|
|
Hi,
In reference to your query I would like to mention that there are some common techniques used to design CD or software Keys.
Some common techniques are just to use random math stuff. So lets say you have a serial like this: XXXX-XXXX-XXXX-XXXX
You could randomly generate numbers (either decimal or hex format), for the first 3 groups. Set Group # 4 to the answer of (Groups 1 and 2) / Group 3. You could add random constants or do other funny things.
Another technique is to randomly generate what cryptologist call a "salt". So using the same format as above, you would randomly generate group #1, concatenate the "salt" with some other string that you hard-code, and then put that whole string through an md5 (or other) one-way hashing function. Then the remaining 3 groups can be some defined portion of the md5 hash. Sometimes companies require the buyer to "telephone activate", where they have to give their name, and then the company name to generates them a serial using their name as a salt to some serial generator. In this way the user's information is slightly more tied into the whole scenario. If you want to take it one step further, use their credit card number as the salt, this will make them more unlikely to just share their activation information with others.
I hope this would help to initiate the things. For code snippets you may search on Google.
Have a nice day .
Regards,
John Adams
ComponentOne LLC
|
|
|
|
|
Try not to post the same question twice. Looks like you might have double clicked on submitting.
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
A class was created, and objects added to a listbox to form an arraylist.
Ojects were added to arraylist as in
Dim item As items
For Each item In form1.Arraylistlist
Me.Listbox1.Items.Add(item)
Next
How can I delete an object from the arraylist when displayed in Listbox1?
|
|
|
|
|
Hi,
you can add and remove items to/from any collection using the appropriate methods,
see documentation.
However, when you try to modify a collection while you are enumerating it (as in
a for each), you will get an exception.
There are many remedies:
- don't use for each in this case, use a for or a while loop
- create a Clone of the list for the enumeration
- use a temporary collection to remember which items will have to be deleted afterwards
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
How can I attach or access a word document (or any other file) from a VB application (or attach a file).
|
|
|
|
|
You cannot "attach" a file to a VB application. What are you looking to do with this file?
|
|
|
|
|
From the menustrip on the help tab, I would like to link a work document to explain or give a user guide to the application
|
|
|
|
|
Process.Start("MyDocument.Doc") would load the document using the associated program although I would suggest using one of the many free HTML Compilers (creating CHM file) or a help file creator.
Failing that I would save the final document as a PDF file.
Steve Jowett
-------------------------
Sometimes a man who deserves to be looked down upon because he is a fool, is only despised only because he is an 'I.T. Consultant'
|
|
|
|
|
I need to create a headerTemplate, itemTemplate and footerTemplate in vb.net. I went to the MSDN site from the Help/search menu in Visual Basic.Net 2005 and it shows a good example of how to create a header template in VB.net, but when it shows how to do the itemTemplate it shows it in ASP. This is a business systems program no a web application. Is there a good example in VB.NET of how to do the item template?
If you know how to do this can you show me?
|
|
|
|
|
Header, Footer, and Item templates all belong to ASP.NET web forms, not windows forms. What you're looking at is useless to you in a windows forms app.
There are no template classes for the DataGridView control. What are looking to do??
|
|
|
|
|
I am going to do it using dataColumns and DataRows.
|
|
|
|
|
This is my first project that i'm working on to get myself reaquainted with .net programming, VB.Net specifically.
What I want to know is, is how can I edit and query the outlook 2007 address book with VB.Net?
I'll be using the 2.0 .Net Framework ...
Thanks
|
|
|
|
|
I wouldn't recommend this as a first project, but to each his own...
I don't do Office Interop work, so I can't tell you exactly how to do it. But, you will need the Visual Studio Tools for Office[^] to make life easier. There in no support for Outlook built into the .NET Framework.
|
|
|
|
|
i wont code export data from DataGridView to excel
Ahmed hassan
|
|
|
|
|
This has been covered about 40,000 times. All you have to do is Google for "VB.NET export datagridview to excel". Noone is just going to give you the code to do it.
|
|
|
|
|
I have searched hi and low for my answer with no success. The dataadapter design gives you a way to create multiple queries. (Fill, Fillby, Update, etc.) But, I don't want to use the designer. I want to code it all. I have the fill. That was easy. How do I create a query method using code.
Reason:
In one part on my program I am getting data from a database and binding it to a datagrid. At one point I want only certain records to show. At other times I want all records to show.
I want to be able to code like this:
if certainFlag = "true" then
adapter.fill(datatable)
else
adapter.allfill(datatable)
endif
How would I code the allfill query?
|
|
|
|
|
You would normally write this as two seperate methods, each returning their own specific set of columns from the table.
You already know how to do this because you have all the code written in your other post, other than the appropriate SQL SELECT statement.
|
|
|
|