|
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.
|
|
|
|
|
So, how do I distinguish between fill and allfill with different sql statements but, the same adapter?
This is how I am defining my adapters.
Dim adapter As OleDbDataAdapter = New OleDbDataAdapter(sql, connectionstr)
So my question is how does my program know the difference between adapter.fill(datatable ) gets everything in the database table with a zero in a certain column and adapter.allfill(datatable ) that gets all data?
|
|
|
|
|
Cory Kimble wrote: So, how do I distinguish between fill and allfill with different sql statements but, the same adapter?
I don't get where the problem is. You write two methods. One that returns the columns you want based on a condition, and one that returns the columns you want without a condition. There shouldn't be a flag anywhere that tells a single method which statement to execute.
Or, are you asking how to you write the SQL statement to return all the columns based on a condition??
Or are you asking how you're going to know which method to call??
|
|
|
|
|
I am trying to code a query method that will do what the fill method does but I don't understand how to do that. I understand that the fill method is being overridden, right? Using the designer I can change that name (fill) to what ever I want and using code adapter.somename(sometable) I can do a sql statment that I earlier would of set to the adapter like this. dim adapter as oledbadapter = new oledbadapter(select, connection)
So I have one adapter with a sql statement saved to the select variable using the connection saved in the connection variable. If I code adapter.fill(datatable) it will run the sql statement saved in the select variable. I don't understand how I get another method and what I would need. How would it look? I am lost. What I need is help on what the method would look like. I hope you can help.
|
|
|
|
|
All you need to do is fill a table and return it. It sounds like you're making this much harder than it needs to be. You can right-click the dataset in the designer and pick View Code (I think that's what it is!) and you'll get a partial class code window opened up. That's where you can put your code.
I've got an idea. Watch the "Forms over Data Video Series" here[^]. It covers a bunch of what you're asking about, though the titles of each video don't appear to have anything to do with what you're asking. In these videos, you'll actually see how to add queries to datasets.
|
|
|
|
|
Thank you for the link but, I don't want to use the designer. Let me elaborate what my program is doing.
My program has the ability to communicate with a database and transfer data back and forth. I don't want to hard code the connection and database name in my program. I want some using MS Access or SQL server to use my program. The way I have solved this is I created a form that can grab the database, display the tables to choose from, and listed all fields to choose from in order to work properly with my program. Since adapters and connections work differently with MS Access databases and SQLServer databases, I came up with the Idea to code these aspects(adapters and connection) in my code so I can during runtime decide what database to choose, what connection to choose, what sql statements to use depending on the database chosen (Access or SQL). The Knowledge that I am lacking is How to create and make work an adapter with multiple queries using only code and not the designer, since I want the program to create at runtime.
I need examples on how to do the above. I thought creating a command would work, but again I can't find any examples that take me through all step to the end to see if commands is what I need. So...
If I have an adapter named myadapter
Dim myadapterOle as oledbDataAdapter()<br />
dim myadaptersql as sqlDataAdapter()
'Now I want to create Connections 'I am using two different sql statements to show you the different databases I will use.
dim sql = "Some select statement WHERE NAME = "Joe")<br />
dim ole = "Some select statement WHERE NAME = "Joe")<br />
dim sqlALL = "Some select statement)<br />
dim ole = "Some select, update, Insert statement)<br />
dim connection = cmbobxConnection.text 'Got connection from a dropdown box<br />
myadatpersql = new sqlDataAdapter(sql, connection)<br />
myadapterOle = new oledbdataAdapter(sql, connection)
Now I have an adapter that when I do myadptersql.fill(table) It will perform the sql select statement. How do I call the sqlALL statement. Do I have to create a new Adapter each time the sql statements change?
I hope you can help me. The designer might work If I create an adapter without a connection. Then I can fill in that value during runtime. Is that possible?
|
|
|
|