VB.net

Dear Company,i'm really sorry but i'm a beginner.I've an application in vb.net 2008 the app contain 2 project: one is the project and oter the installer.

I dont know where put the files :TurboActivate.dat and TurboActivate.dll

and for lauch TurboActivate.exe?

Please help me

Maurizio

Hey Maurizio,

Did you check out the help article for VB.NET (Using TurboActivate with Visual Basic .NET)?

You need to include the TurboActivate.dll, TurboActivate.dat, and TurboActivate.exe files in the "bin\Debug" and "bin\Release" folders so your app can use them. Then, in your installer, make sure they're being installed to the directory where your app is installed.

Thanksbut for me is too difficult. I've inserted the file in bin/debug and bin/release

But where i put the Version GUID? In my main window.vb ? because now have in directory teh file Turboactivate.exe and also my file Smart5.exe but is unprotected.

Can i send the project to you?

Thanks a lotMaurizio

We have a VB.NET example in the TurboActivate.zip file. It shows you everything you need to do (where to put the Version GUID, etc.). Have you looked at it?

Yes i've see but i want to start in first Turboactivate.exe and after my app only if the key is correct and activated.

More. when i compile my app is in the directory file unprotected! Sorry i dont want to disturb. But in the example show the form for textapp how to integrate in my main form?

Thanks and dont worry i'm too newby

Maurizio

More. when i compile my app is in the directory file unprotected!

What are you talking about? The binary file is visible? You want that. Please explain what you mean.

But in the example show the form for textapp how to integrate in my main form?

The example VB.NET app show how to integrate TurboActivate in an app. You can build and run the app to understand how TurboActivate works. Start by replacing the Version GUID in the form's contructor. Then add the TurboActivate.dat, TurboActivate.dll, and TurboActivate.exe files to the bin/Debug directory.

Run the app, activate the app, and see how everything works. It's a very simple example.

Well, in first i beg your pardon for all the questions posted, sorry

I've tried your example and is ok. But How integrate in my app?

1) My VB.net app have a main form named: frmMain.vb well: i've to copy the code of the example here?2) Or i've to create a new form to start the activate process.3) Is not possible to start Turboactivate when my app start?

Thanks a lotBest regardsMaurizio

The first thing you do is add TurboActivate.vb to your app. The next thing you do is copy the code from the constructor of the form of the example app to the constructor of the form of your app.

    Public Sub New()        InitializeComponent()


        'TODO: goto the version page at LimeLM and paste this GUID here        TurboActivate.VersionGUID = "18324776654b3946fc44a5f3.49025204"


        isActivated = TurboActivate.IsActivated        ShowTrial(Not isActivated)


        ' if this app is activated then you can get a feature value        ' See: http://wyday.com/limelm/help/license-features/        'If isActivated Then        '    Dim featureValue As String = TurboActivate.GetFeatureValue("your feature name")


        '    'TODO: do something with the featureValue        'End If    End Sub

You can copy most of the other code too. Also, add an activate/deactivate menu if you want (see the example app).

For force TurboActivate.exe to run if the user is not activated, just make some changes to the code in the constructor. Launch TurboActivate.exe, wait for it to exit, then check if the user successfully activated (by calling TurboActivate.IsActivated ).

Tell me if that helps.

Hi and Thank for reply

After i try to apply your hel to my app.For me is important only the option to force TurboActivate.exe to run if the user is not activated, but i dont know how changes to the code in the constructor for launch TurboActivate.exe when the program start without put a Menu like your exampe. I dont need a trial or trial extend options. Just:

1) Program Start with TurboActivate.exe if not activated2) Check the activation3) If ok start my main program

There is a code for these options?I can pay for these help for code if necessary.

Thanks a lot you very helpfullBest RegardsMaurizio Paci

Hi1) i've put the TurboActivate.vb in project2) i've tried to insert the code you sendme3) Put: Turboactivate.dll and TurboActivate.dat in Bin /Debug and /Release4) Inserted the correct GUIDbut Dont work for me probably i'm stupid, sorry

Here you can see the code of My frmMain windows form, where i've to put your code, please?

---------------------------------------------------------------------------------------------------------------------------------------------------Public Class frmMain

Private Sub Show_Login() If bSecurity Then frmLogin.ShowDialog() If Not frmLogin.LoginSucceeded Then Me.Close() Exit Sub End If frmLogin.Dispose() If Get_Authority(2, False) Then mnuUser.Visible = True mnuEdit_User.Visible = False Else mnuUser.Visible = False mnuEdit_User.Visible = True End If Else mnuUser.Visible = True mnuEdit_User.Visible = False End If mnuLog_Off.Text = "&Disconnetti " + sUser_Code mnuLog_Off.Visible = bSecurity End Sub

Public Sub Main() Dim bNew_Database As Boolean sUser_Code = "" sDB = "smart pro.sdf" sDBPath = Application.StartupPath sBackupPath = Application.StartupPath sData_Source = sDBPath + "\" + sDB strConnect = "Data Source='" + sData_Source + "'; LCID=1033; Password='" + sDB_Password + "'; Persist Security Info=True;Encryption Mode=Engine Default" If Dir(sData_Source) = "" Then If MsgBox("Database " + sData_Source + " non trovato!." + vbCrLf + "Creare nuovo database?", MsgBoxStyle.Question Or MsgBoxStyle.YesNo, "Conferma") = vbYes Then Create_Database(strConnect) bNew_Database = True Else End End If Else bNew_Database = False End If cn = New SqlServerCe.SqlCeConnection cmd = New SqlServerCe.SqlCeCommand da = New SqlServerCe.SqlCeDataAdapter cb = New SqlServerCe.SqlCeCommandBuilder cn.ConnectionString = strConnect cn.Open() cmd.Connection = cn da.AcceptChangesDuringUpdate = True da.FillLoadOption = LoadOption.OverwriteChanges cb.DataAdapter = da

If bNew_Database Then Create_Tables() Initialize_Tables() MsgBox("Creazione nuovo Database eseguita con successo", vbInformation, "Informazioni") End If strKoma = Format(1000, "#,##0") If InStr(1, strKoma, ",") <> 0 Then strKoma = "." Else strKoma = "," End If Check_Update() Load_Setting() End Sub

Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Main() Show_Login() End Sub

Private Sub mnuRecipes_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuRecipes.Click If Not Get_Authority(8, True, bAdd, bEdit, bDelete) Then Exit Sub End If frmRecipe.bAdd = bAdd frmRecipe.bEdit = bEdit frmRecipe.bDelete = bDelete frmRecipe.strID = "" frmRecipe.bPopup = False frmRecipe.ShowDialog() frmRecipe.Dispose() End Sub

Private Sub mnuPercentage_Soft_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuPercentage_Soft.Click If Not Get_Authority(11, True) Then Exit Sub End If frmPercentage_Soft_New.ShowDialog() frmPercentage_Soft_New.Dispose() End Sub

Private Sub mnuRecipe_Soft_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuRecipe_Soft.Click If Not Get_Authority(10, True, bAdd, bEdit, bDelete) Then Exit Sub End If frmRecipe_soft.bAdd = bAdd frmRecipe_soft.bEdit = bEdit frmRecipe_soft.bDelete = bDelete frmRecipe_soft.strID = "" frmRecipe_soft.bPopup = False frmRecipe_soft.ShowDialog() frmRecipe_soft.Dispose() End Sub

Private Sub mnuIngredients_List_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuIngredients_List.Click If Not Get_Authority(6, True, bAdd, bEdit, bDelete) Then Exit Sub End If frmIngredient.bAdd = bAdd frmIngredient.bEdit = bEdit frmIngredient.bDelete = bDelete frmIngredient.strID = "" frmIngredient.bPopup = False frmIngredient.ShowDialog() frmIngredient.Dispose() End Sub

Private Sub mnuPercentage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuPercentage.Click If Not Get_Authority(7, True) Then Exit Sub End If frmPercentage_New.ShowDialog() frmPercentage_New.Dispose() End Sub

Private Sub mnuSetting_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuSetting.Click If Not Get_Authority(1, True) Then Exit Sub End If frmSetting.ShowDialog() If frmSetting.bSuccess Then Load_Setting() Show_Login() End If frmSetting.Dispose() End Sub

Private Sub mnuEdit_User_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuEdit_User.Click frmUser_New.strUser_ID = sUser_ID frmUser_New.bEdit_Data = True frmUser_New.ShowDialog() frmUser_New.Dispose() End Sub

Private Sub mnuAdditive_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) If Not Get_Authority(9, True) Then Exit Sub End If frmAdditive.ShowDialog() frmAdditive.Dispose() End Sub

Private Sub mnuUser_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuUser.Click If Not Get_Authority(2, True, bAdd, bEdit, bDelete) Then Exit Sub End If frmUser.bAdd = bAdd frmUser.bEdit = bEdit frmUser.bDelete = bDelete frmUser.bPopup = False frmUser.ShowDialog() frmUser.Dispose() End Sub

Private Sub mnuLog_Off_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuLog_Off.Click Show_Login() End Sub

Private Sub mnuExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuExit.Click, btnExit.Click Me.Close() End Sub

Private Sub AnnullaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) End Sub

Private Sub mnuBackup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuBackup.Click Dim strDestination As String If Not Get_Authority(4, True) Then Exit Sub End If SFD.Title = "Database Backup" SFD.FileName = "" SFD.InitialDirectory = sBackupPath SFD.OverwritePrompt = True SFD.Filter = "(*.sdf)|*.sdf" SFD.DefaultExt = ".sdf" SFD.ShowDialog() If SFD.FileName = "" Then Exit Sub End If If SFD.FileName = sData_Source Then MsgBox("Utilizzare un nome diverso " + sDB + ".", MsgBoxStyle.Information, "Informazioni") End If If My.Computer.FileSystem.FileExists(SFD.FileName) Then My.Computer.FileSystem.DeleteFile(SFD.FileName) End If cn.Close() strDestination = "Origine Dati='" + Replace(SFD.FileName, "'", "''") + "'; LCID=1033; Password='" + sDB_Password + "'; Persist Security Info=True;Encryption Mode=Engine Default" Dim Engine As New SqlServerCe.SqlCeEngine(strConnect) Engine.Compact(strDestination) cn.Open() cmd = cn.CreateCommand 'MsgBox("The data backup process has finished.", MsgBoxStyle.In MsgBox("Backup Terminato con successo!.", MsgBoxStyle.Information, "Informazioni") End Sub

Private Sub mnuRestore_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuRestore.Click Dim strRestore_Source As String, strRename_File As String If Not Get_Authority(5, True) Then Exit Sub End If On Error GoTo get_error OFD.Title = "Ripristino Database" OFD.FileName = "" OFD.InitialDirectory = sBackupPath OFD.Filter = "(*.sdf)|*.sdf" OFD.DefaultExt = ".sdf" OFD.ShowDialog() If OFD.FileName <> "" Then cn.Close() strRename_File = sDB + "x" If My.Computer.FileSystem.FileExists(sDBPath + "\" + strRename_File) Then My.Computer.FileSystem.DeleteFile(sDBPath + "\" + strRename_File) End If My.Computer.FileSystem.RenameFile(sData_Source, strRename_File) strRestore_Source = "Origine dei Dati='" + Replace(OFD.FileName, "'", "''") + "'; LCID=1033; Password='" + sDB_Password + "'; Persist Security Info=True;Encryption Mode=Engine Default" Dim Engine As New SqlServerCe.SqlCeEngine(strRestore_Source) Engine.Compact(strConnect) cn.Open() cmd.Connection = cn My.Computer.FileSystem.DeleteFile(sDBPath + "\" + strRename_File) End If MsgBox("Ripristino Database Terminato.", MsgBoxStyle.Information, "Informazioni") Exit Subget_error: If Err.Description <> "" Then MsgBox(Err.Description, vbInformation, "Informazioni") Err.Description = "" End If My.Computer.FileSystem.RenameFile(sDBPath + strRename_File, sDB) End Sub

Private Sub mnuShrink_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuShrink.Click If Not Get_Authority(3, True) Then Exit Sub End If cn.Close() Dim Engine As New SqlServerCe.SqlCeEngine(strConnect) If Not (Engine.Verify) Then Engine.Repair(Nothing, SqlServerCe.RepairOption.RecoverAllPossibleRows) End If Engine.Shrink() cn.Open() cmd = cn.CreateCommand MsgBox("Database compattato con successo.", MsgBoxStyle.Information, "Informazioni") End Sub

Private Sub mnuInverse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuInverse.Click If Not Get_Authority(10, True) Then Exit Sub End If frmInverse.ShowDialog() frmInverse.Dispose() End Sub

Private Sub mnuOverrun_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuOverrun.Click If Not Get_Authority(11, True) Then Exit Sub End If frmOverrun.ShowDialog() frmOverrun.Dispose() End Sub

Private Sub InformazionisuToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles InformazionisuToolStripMenuItem.Click Dim form4 As frmSplashScreen form4 = New frmSplashScreen form4.Show()

End Sub

Private Sub ToolStripButton4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton4.Click If Not Get_Authority(9, True) Then Exit Sub End If frmAdditive.ShowDialog() frmAdditive.Dispose() End Sub

Private Sub ToolStripButton6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton6.Click If Not Get_Authority(8, True, bAdd, bEdit, bDelete) Then Exit Sub End If frmRecipe.bAdd = bAdd frmRecipe.bEdit = bEdit frmRecipe.bDelete = bDelete frmRecipe.strID = "" frmRecipe.bPopup = False frmRecipe.ShowDialog() frmRecipe.Dispose() End Sub

Private Sub ToolStripButton10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton10.Click Dim form2 As Form2 form2 = New Form2 form2.Show() End Sub

Private Sub ToolStripButton11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton11.Click If Not Get_Authority(10, True) Then Exit Sub End If frmInverse.ShowDialog() frmInverse.Dispose() End Sub

Private Sub ToolStripButton12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton12.Click If Not Get_Authority(10, True, bAdd, bEdit, bDelete) Then Exit Sub End If frmRecipe_Soft.bAdd = bAdd frmRecipe_Soft.bEdit = bEdit frmRecipe_Soft.bDelete = bDelete frmRecipe_Soft.strID = "" frmRecipe_Soft.bPopup = False frmRecipe_Soft.ShowDialog() frmRecipe_Soft.Dispose()

End Sub

Private Sub AdditiviUEToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AdditiviUEToolStripMenuItem.Click If Not Get_Authority(9, True) Then Exit Sub End If frmAdditive.ShowDialog() frmAdditive.Dispose() End Sub

Private Sub ToolStripButton7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton7.Click If Not Get_Authority(2, True, bAdd, bEdit, bDelete) Then Exit Sub End If frmUser.bAdd = bAdd frmUser.bEdit = bEdit frmUser.bDelete = bDelete frmUser.bPopup = False frmUser.ShowDialog() frmUser.Dispose() End Sub

Private Sub ToolStripButton5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton5.Click If Not Get_Authority(8, True, bAdd, bEdit, bDelete) Then Exit Sub End If frmRecipe.bAdd = bAdd frmRecipe.bEdit = bEdit frmRecipe.bDelete = bDelete frmRecipe.strID = "" frmRecipe.bPopup = False frmRecipe.ShowDialog() frmRecipe.Dispose() End Sub

Private Sub ToolStripButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton2.Click If Not Get_Authority(6, True, bAdd, bEdit, bDelete) Then Exit Sub End If frmIngredient.bAdd = bAdd frmIngredient.bEdit = bEdit frmIngredient.bDelete = bDelete frmIngredient.strID = "" frmIngredient.bPopup = False frmIngredient.ShowDialog() frmIngredient.Dispose() End Sub

Private Sub ToolStripButton3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton3.Click If Not Get_Authority(11, True) Then Exit Sub End If frmOverrun.ShowDialog() frmOverrun.Dispose() End Sub

Private Sub ToolStripButton9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton9.Click Show_Login() End Sub

Private Sub TagliaToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TagliaToolStripButton.Click Dim strDestination As String If Not Get_Authority(4, True) Then Exit Sub End If SFD.Title = "Data Backup" SFD.FileName = "" SFD.InitialDirectory = sBackupPath SFD.OverwritePrompt = True

SFD.Filter = "(*.sdf)|*.sdf" SFD.DefaultExt = ".sdf" SFD.ShowDialog() If SFD.FileName = "" Then Exit Sub End If If SFD.FileName = sData_Source Then MsgBox("Utilizzare un nome diverso " + sDB + ".", MsgBoxStyle.Information, "Informazioni") Exit Sub End If If My.Computer.FileSystem.FileExists(SFD.FileName) Then My.Computer.FileSystem.DeleteFile(SFD.FileName) End If cn.Close() strDestination = "Data Source='" + SFD.FileName + "'; LCID=1033; Password='" + sDB_Password + "'; Persist Security Info=True;Encryption Mode=Engine Default" Dim Engine As New SqlServerCe.SqlCeEngine(strConnect) Engine.Compact(strDestination) cn.Open() cmd = cn.CreateCommand MsgBox("Backup Terminato con successo!.", MsgBoxStyle.Information, "Informazioni") End Sub

Private Sub ToolStripButton8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton8.Click Dim strRestore_Source As String, strRename_File As String If Not Get_Authority(5, True) Then Exit Sub End If On Error GoTo get_error OFD.Title = "Data Restore" OFD.FileName = "" OFD.InitialDirectory = sBackupPath OFD.Filter = "(*.sdf)|*.sdf" OFD.DefaultExt = ".sdf" OFD.ShowDialog() If OFD.FileName <> "" Then cn.Close() strRename_File = sDB + "x" If My.Computer.FileSystem.FileExists(sDBPath + "\" + strRename_File) Then My.Computer.FileSystem.DeleteFile(sDBPath + "\" + strRename_File) End If My.Computer.FileSystem.RenameFile(sData_Source, strRename_File) strRestore_Source = "Data Source='" + OFD.FileName + "'; LCID=1033; Password='" + sDB_Password + "'; Persist Security Info=True;Encryption Mode=Engine Default" Dim Engine As New SqlServerCe.SqlCeEngine(strRestore_Source) Engine.Compact(strConnect) cn.Open() cmd.Connection = cn My.Computer.FileSystem.DeleteFile(sDBPath + "\" + strRename_File) End If MsgBox("Ripristino dei Dati terminato.", MsgBoxStyle.Information, "Informazioni") Exit Subget_error: If Err.Description <> "" Then MsgBox(Err.Description, vbInformation, "Informazioni") Err.Description = "" End If My.Computer.FileSystem.RenameFile(sDBPath + strRename_File, sDB) End Sub

Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click If Not Get_Authority(7, True) Then Exit Sub End If frmPercentage_New.ShowDialog() frmPercentage_New.Dispose() End Sub

Private Sub ToolStripButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton.Click System.Windows.Forms.Help.ShowHelp(Me, "Smart.chm", HelpNavigator.AssociateIndex) End Sub

Private Sub SommarioToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SommarioToolStripMenuItem.Click System.Windows.Forms.Help.ShowHelp(Me, "Smart.chm", HelpNavigator.AssociateIndex) End Sub

Private Sub ToolStripButton13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton13.Click If Not Get_Authority(7, True) Then Exit Sub End If Stampe1.ShowDialog() Stampe1.Dispose() End Sub

Private Sub ToolStrip1_ItemClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ToolStripItemClickedEventArgs) Handles ToolStrip1.ItemClicked

End SubEnd Class----------------------------------------------------------------------------------------------------------------------------------------------------

ThanksBest regardsMAurizio

but Dont work for me probably i'm stupid, sorry

What error do you get? What is happening? What do you expect to happen?

I dont have error but dont appear the activate windows.probably i've to make a dedicated form?

But dont worry i've ask help from a programmer.

Thanks for help

Maurizio

Well now have added a part of code and the Turboactivate window appear.

I've tryed to deactivate and also revoked the license code but the app in my computer remain activated. Not appear the voice Activate or Reactivate

What have to add in my vb.net app?

ThanksMaurizio

LimeLM is not actively connected to every computer and every piece of software that uses TurboActivate.

So how does TurboActivate know your revoked a key?

Simple: everytime you call IsGenuine() -- and we recommend you call IsGenuine() every 90 days (see the documentation) -- whether the key is still allowed to be used on that computer is checked.

Does that make sense?

Thanks for reply

My application is very copyed from hacker, sorry.

Can i call IsGenuine() every time my application start or runs?

Thanks

Maurizio

Can i call IsGenuine() every time my application start or runs?

You shouldn't, no. Call it every 90 days.