|
imak wrote: Is it doable via refelction?
Yes it is. But it will be quite bad considering application performance.
imak wrote: If so can you please post some example code?
Well, you should try yourself first and then ask with specific details. That is what the guidelines say.
|
|
|
|
|
Hello Friends,
I have developed a desktop software with VB.NET. I want to create some security measurements through which, after purchasing one copy, customer cannot copy to several computers or distribute freely. Their may be customers who may need the product to be run on N number of machines independently (not on Network). In that case also, the customerId may be same but each machine must have independent copy of the product.
How can I achieve such security measurements for newly developed desktop software?
Any helpline, guidance is highly appreciated.
Thanks & Regards,
modified on Friday, September 3, 2010 9:16 AM
|
|
|
|
|
I can think of two ways of doing it.
1. Have a product key and validate it on your server. You can keep the IP and the key to be sure your software has been installed. This will require the users to have internet connection at least while installation.
2. I am not sure how this can be done, but here's the thought. If you can get the details of the computer where your application is installed in the setup some how while installation, next time when the same setup is used, it can prompt that the S/W has already been installed on another computer.
|
|
|
|
|
d@nish wrote: 1. Have a product key and validate it on your server. You can keep the IP and the key to be sure your software has been installed. This will require the users to have internet connection at least while installation.
Can you tell how does this product key option works. I feel the logic & flow should be such as :
1 User is installing
2 While installation it talks to a other app lying on the Server.
3 The server app, keeps the IP address, checks in another DB lying at server.
4 If the IP address is new, provides a Product key and stores the same against the IP on the DB located at Server.
5 If IP address is not new, displays appropriate message and doesn't allow to install the app.
Can you confirm with the above logic. And also if possible provide any code for me as help to proceed.
REG 2nd Point - what kind of computer details can be retrieved and checked out. Any clue.
Thanks & Regards,
|
|
|
|
|
For the first approach, you can use following logic:
1. Provide a key along with the setup. When the user enters that, pick up the IP address* and send them both to server.
2. Server should then check in the DB that the sent product key is already registered with some other IP*.
3. If yes, and IP* is same, let the user install and if IP* is different, deny installation.
*Many people have dynamic IPs and hence this logic looks flawed. You can get the Mac address since it is a unique number for each computer. Although, if the end user has tried Mac spoofing ie changing Mac address, there might be some problems. Still this IMHO will be a bit more secure way.
For approach two, Mac address can be a number you can track.
Since I have never implemented anything like this I cannot provide code sample right away. Although googling something like "product registration" might give useful results.
|
|
|
|
|
All Time Programming wrote: I want to create some security measurements through which, after purchasing one copy, customer cannot copy to several computers or distribute freely.
Some things to consider;
- Can I still reinstall Windows, or would I have to purchase a new version?
- What happens if I buy a new PC? Can I keep the software, or do I have to purchase a new version?
- Reading what you wrote, it implies I am allowed to install it on a single server and use some remote-desktop software to share it with some friends?
- For IP: will the software continue to work if I switch my internet-provider?
- Are you loosing money on those illegal copies, and how much of your precious time is it worth?
I are Troll
|
|
|
|
|
I have never done this as I tend to write web applications, but, I have heard of people doing the following with a good success rate.
When the user installs the application the must activate it, much like Windows now does. On activation, the software gathers certain information about the computer, some examples are processor id, memory id, motherboard manufacturer, ect. You grab this info and smash it together into say a string and that is not the computers unique ID. You also send the user a key that you generate. When the program trys to activate you check first that the generated key hasn't been used, if it has, check that the unique ID matches.
There is one flaw to this type of validation. If the user upgrades that computer, they will get a new processor id, or memory id, ect (depending on what they upgrade of course). There are solutions to this issue as well but I'll leave that all up to you.
Hope that helps, if you need some more help on this I have thought about this fairly heavily and maybe be able to provide more suggestions.
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
Thanks to All of you for these good suggestions and hints. At present, I have managed to work out with unique Serial Key with the product managing algorithm of my own. Customer downloads from net or anywhere without this he want be able to install only & without installation, it wont run only. Lets see ahead what is required and how.
Once again Thanks to all. If I need any further assistance in this matter, will definetely ask you guys again. Your ideas heled me bring up something differnet but safe.
Thanks
Thanks & Regards,
|
|
|
|
|
hi,
can someone tell me how to change the color of a part of a string in a cell from a datagridview.
for example
if the text of a cell is "125/art"
how can i show the "art" in red color ?
i know, i can use the Richtextbox but i dont want to change the color of the complete text.
thanks for your help
jogi
|
|
|
|
|
You can't unless you write your own code to custom draw the cells. There is no built-in support for what you want to do. The cells in the DGV work nothing like a RichTextBox.
|
|
|
|
|
The simple way is by creating two columns, and setting the ForeColor to red in the second column.
An alternative would be painting the cell yourself, using the CellPainting [^] event.
I are Troll
|
|
|
|
|
Yes, I also agree with Eddy.
If you want you can make the 2 cols width (in Properties of that particular col) very small - just till what your text fixes, alos make Resizable = False & Padding (Cell style) = 0, 0, 0, 0. With this atleast you can amke min space/gap between both the cols and paint the other col or set its background/foreground color as per your choice.
To set properties of a particular cool, select grid, Column Collection, and then select your col & proceed.
Thanks & Regards,
|
|
|
|
|
Hi all,
I want to copy image stroed in the imagelist controle.
which location these images are stored?
Is any way by which we can find/copy these image Design or runtime?
|
|
|
|
|
Do you mean sort of this ImageList1.Images(i).Save(ByVal filename As String)
|
|
|
|
|
Dear Goutam , I have tried this
ImageList1.Images(i).Save("C:\Test.jpg")
Each time file is storing in a given path but when I am trying to open the image then image is not showing.
image size is 1 KB.
Thanks.
|
|
|
|
|
Hi
i have a form1 with one textbox1 and button1 when i click the button another form2 loads which has one textbox1 and button one when i type alfanumeric values in the textbox of form2 and press the button1 of form2 it is not displaying the value in form1 textbox1.
I am using property approach.
My code is as:
Form One:
<pre>
Public Class Form1
Public _form2 As Form2 = New Form2
Private Sub btnList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnList.Click
_form2.Show()
End Sub
Public WriteOnly Property _textBox() As String
Set(ByVal Value As String)
tbxVal.Text = Value
End Set
End Property
End Class
</pre>
Form Two
<pre>
Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
Dim frm As Form1 = New Form1
Value = _textBox1
Me.Close()
End Sub
Public ReadOnly Property _textBox1() As String
Get
Return tbxValue1.Text
End Get
End Property
Private Sub Form2_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
Dim fm As Form1 = New Form1
fm.tbxVal.Text = Value
End Sub
</pre>
|
|
|
|
|
.NetDeveloper09 wrote: Dim frm As Form1 = New Form1
You are actually creating a new instance of form1 here. This instance is not aware of the value you set in the first instance.
Create a property in form2 and then set it in the form1 btnList_Click. You should then be able to get your textbox value in form2.
|
|
|
|
|
hi
i under stand, some one has replied to me which i believe is the answer but i have forgot how to do it.
"You need to retrieve the contents of the form2 TextBox control before form2 is disposed. To do that, you have to handle the Closing event for form2 inside form1. In that event handler, you simply use your property to retrieve the contents of the Form2.TextBox, and do whatever you need to with it."
|
|
|
|
|
I tried your way its not working, any other suggestion.
|
|
|
|
|
... you are allocating ("New") another instance in your Ok and Closed-Handler - this is a simple mistake. Your code smells like "beginner-style" maybe you want to learn about "variable scope"?
Solution:
1. Make a public property for Form2 which will give you the textbox.Text (you did that)
2. Read the property after showing the Form
-> Simple, isn't it?
3. Sit down and read a book about programming before you do further coding... (variable scope is always a thing you need to know, in any language)
Public Class Form1
Public _form2 As Form2 = New Form2
Private Sub btnList_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnList.Click
_form2.Show()
tbxVal.Text = _form2.textBox1
End Sub
Public WriteOnly Property _textBox() As String
Set(ByVal Value As String)
tbxVal.Text = Value
End Set
End Property
End Class
|
|
|
|
|
Knowledge has no boundaries any one who struggles for it he gains the knowledge, one should not underestimate the person on the other side and should not pass remarks that hurt other poeple or discourage people.
You should show respect to people who are in your type of field. If you donot like to answer any question you are free to do that.
For your information i have already done it without your support.
Kind Regards
Mirza
|
|
|
|
|
I suggest you take the advice given to you, even when at first sight you don't like it much.
As for your problem, there is at least a dozen ways to "solve" it, unfortunately only one or two of these ways are decent, all others are bad, i.e. they work in a simple situation and will bite you when things become more complex.
It takes time and experience to learn it all, and most of all an open mind.
|
|
|
|
|
<Thank you for the advice, i always appriciate good advice, you are right there are and its true
also time is the only teacher, and most of all with an open mind is true and will to strugle in life and always give your thoughts a possitive direction, if one do that ones mind will always be open. >
|
|
|
|
|
This is a really common problem, and it's almost always answered incorrectly. Never, ever, attempt to use the instance scope to control the passing backwards and forwards of data between two modeless forms. Look to use delegate/events instead, and have the first form subscribe to an event on the second form which will be fired when it needs to return the data.
|
|
|
|
|
I have a method that queues a number of processes in a separate thread, long running stored procs. I want to disable controls and warn the user that the thread is still active so they cannot close the application while the thread is running.
I have a static class (clsMain) that has the property and the change event that is set from within the processing thread.
public static event EventHandler ProcessFlagChanged;
private static bool _IsProcessing;
public static bool IsProcessing
{
get { return _IsProcessing; }
set
{
_IsProcessing = value;
if (ProcessFlagChanged != null)
ProcessFlagChanged(null, EventArgs.Empty);
}
}
I now want to bind a buttons enabled value to clsMain.IsProcessing. This naturally does not work because clsMain is a type.
btnLoadPool.DataBindings.Add(new Binding("Enabled", clsMain, "IsProcessing"));
Is the design flawed or do I need to have another variable/event on the form to bind to?
Never underestimate the power of human stupidity
RAH
|
|
|
|