|
You can't track the number of days if you use the system time, believe it or not. It's too easy to defeat. You can track the number of times the application is run though. Or, if your app requires Internet access, you can use one of the public time sources out on the net.
Tracking this will also require you to get very creative in storing the data in a manner that is not easiily detected and defeated, like encrypting and hiding the data in an inconspicuous file.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
thanks Dave too much,
i'll try to calculate total time the application run,
and i'll post you agian if you don't mind
regards
k
|
|
|
|
|
I have set up some of my programs with the following settings:
I have a file called Activation.dat that stores number of days left, trial start date, last recorded date, and trial type. If the file is missing the program will not execute. If the current date is less than the last recorded date the program will not execute. If the days left expires, the program will not execute. if the days between the trial start date and the last recorded date is greater than trial period, the program will not execute. When any condition voids the trial, the activation.dat file will only store the word expired which will prevent all further attempts. All of this is using high quality encryption and is checked for all versions of trials/shareware copies of the program.
You might even want to write a value to the registry which pretty much will be unedited by the average user that will prevent further installations of the program.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
thanks alot Thomas
i'll try this
and post here again
regards
k
|
|
|
|
|
Hi MrKode,
I have done something complete different. In the past I have programmed several ways for trial/demo/copy-protection.
The latest programm I have proteced with a tool from www.anubis.nl
This is the dutch distributor for this tool. The makers are lokates in the UK and the programm is called "CopyMinder".
Initial cost € 150. Just one and € 0,90 per activated programm.
Succes
Hans
|
|
|
|
|
I need to draw a metafile by using Memorystream.
But I don't know how to do this.
All sample I can find on the internet is C# or using Bitmap or using a real file. I hope I can draw it immediatelly on the form and don't have to use a file.
I have studied it several days but I still don't know how to do this.
Can any one give me a example? Just a simple one is ok. Like draw some words on the form, for example.
I would very appreciate it if some one can help me this.
|
|
|
|
|
Does anyone know how to keep active row stay where it was after refresh a datagrid?
|
|
|
|
|
One post is enough . Don't Repost.
Regards,
Satips.
|
|
|
|
|
Does anyone know how to keep active row stay where it was after refresh a datagrid?
|
|
|
|
|
INI files in VB.Net I read, is different from the way they where handled in VB 6. I will be needing an INI file for a project I am doing Is there any place that you could recommend that show sample code before I go down the old way of doing this
|
|
|
|
|
I would reccomend either Reading Ini Files for .NET 2.0, or Ini File Class for .NET 1.1.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
I would think seriously of switching to using an app.config file instead of an ini file. You can just put your ini file settings in the appSettings section. That is more .net standard.
Ben
|
|
|
|
|
I am using a DataGridView to display (and sometimes update) data stored in an Access Table. The Access Table includes a cell that uses a "Lookup" so that the cell values that are displayed are from another table, but what is stored in the cell is simply an integer. In the DataGridView, the integer is displayed. Is there some way that I can connect a ComboBox to the cell in the DataGridView so that the integer becomes an index to the ComboBox list?
Rich Feldman
|
|
|
|
|
You would normally create your own DataGridView columns, not relying on the auto-generated columns. Basically, you're getting two tables from the database into a DataSet. The first is the data your showing in the DGV. The second supplies the values you want to show in the ComboBox column. You can then create a ComboBox column using something like:
Private Sub SetupDataGridView()
DGV1.Columns.Clear()
' Table1 is going to have our data in it.
' Table2 is supplying what shows up in the ComboBox's.
Dim newCol As New DataGridViewComboBoxColumn
With newCol
.HeaderText = "headertext"
.DataSource = table2
.DataPropertyName = "columnNameInTable1HoldingForeignKey"
.ValueMember = "columnNameInTable2HoldingPrimaryKey"
.DisplayMember = "columnNameInTable2HoldingComboBoxDescriptions"
.Width = whatever...
End With
DGV1.Colums.Add(newCol)
Table 1 should have to foreign keys into Table 2, like:
IDKey FKeyIn2 data1 data2
1 1 "Hi!" "There!"
2 4 "More" "Data"
Table 2 should have the text descriptions you'll see in the CombBox like this:
IDKey Description
1 "Some text..."
2 "Some more text..."
3 "Another item"
4 "Who cares"
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Thank-you for your response. I have managed to create the column so that the display is proper, but am having trouble giving the initial values to the column. Using the notation from your example, my difficulty is in specifying that the initial values come from Table1. Again, following your code, I have done the following (assuming that the column names are equal to the column headings).
Private Sub SetupDataGridView()
DGV1.Columns.Clear()
' Table1 is going to have our data in it.
' Table2 is supplying what shows up in the ComboBox's.
Dim newCol As New DataGridViewComboBoxColumn
With newCol
.DataSource = table2
.DataPropertyName = "FKeyIn2" 'HOW IS THIS RELATED BACK TO TABLE1 ???
.ValueMember = "IDKey"
.DisplayMember = "Description"
End With
DGV1.Colums.Add(newCol)
What I don't understand is how does newCol know that Table1 contains the required index values for the ComboBox? The column of Table1 is specified but not the table iteself. In other words, the statement
.DataPropertyName = "FKeyIn2"
is unrelated to Table1 with respect to the data contained within newCol. Any further suggestions?
Rich Feldman
|
|
|
|
|
FNKey in Table1 must match the IDKey in Table2.
The values in the FNKey column in Table1 are used to look up the description matching that value in Table2.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
i have problem for clear the picture box in visual studio 2005 when click on 'new' button
|
|
|
|
|
If not isnothing(picture1.image) then
picture1.image.dispose()
picture1.image = nothing
end if
|
|
|
|
|
|
I have a table with a primary key and using the code below works fine
Dim dsChanges = ds.GetChanges
If IsNothing(dsChanges) Then
Return False
Else
Dim cmdCommandBuilder As System.Data.Common.DbCommandBuilder = Factory.CreateCommandBuilder
cmdCommandBuilder.DataAdapter = adAdapter
adAdapter.Update(ds, kvpQT.Key)
Return True
End If
but this code doesnot work when there is no primary key in the table.
If i need to update a table which only has a foreign key then i need to use the query and this method does not work.
How can i update the table through dataset without table having the primary key.
|
|
|
|
|
In order to use a DataAdapter, all of your tables in the DataSet MUST have primary keys. A DataAdapter cannot work with tables without PKeys.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
I have to read the .dwg files from our application & fetch the data like no & thickness of wall etc
but i have no idea about autocad ...
plzzzzzzzz healp me
|
|
|
|
|
Google is your friend. I'm sure the autocad file format has been documented somewhere.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
sorry gurus
But i cannot find any forum dedicated to VB.
I have a some maskEdbox on my form.
mask property of each maskEdBox is set to "##/##/####".
problem is that whenever i click on it date and month are ger exchanged.
on got_focus and on key_press some codes r ther like
Private Sub mskProjCompExpDt_GotFocus()
SendKeys "{home}+{end}"
End Sub
Private Sub mskProjCompExpDt_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then SendKeys "{tab}"
End Sub
actually i dont have any idea about this control
suggest me
its very urgent
|
|
|
|
|
MissionSuccess wrote: But i cannot find any forum dedicated to VB.
ROTFL. You're in it.
MissionSuccess wrote: problem is that whenever i click on it date and month are ger exchanged.
In what direction are they changing ? What is your locale set up for in this regard ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|