matty 
Scripting Guru 
     
  
 
Posts: 8327 Reputation: 109 
40 /   /   
Joined: Dec 2002
 
Status: Away
 
 | 
O.P.  RE: Custom Name Back Up (Made a progy)
also , i dont care about the source for this , so hear it is..... 
code: '/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\ Declaration Of Variables /\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\ 
Private ontop As New clsOnTop 
Dim leng 
Dim size As String 
Dim x, y, z 
Dim NewBackUp As String 
Dim didbkup As Boolean 
Option Explicit 
 
Private Sub chkOpen_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) 
If Button = 2 Then 
    PopupMenu mnu1 
End If 
End Sub 
 
'/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\ MouseMove Events /\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\ 
Private Sub cmdAbout_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single) 
cmdAbout.BackColor = &HCA9162 
cmdAbout.ForeColor = vbWhite 
End Sub 
Private Sub cmdExit_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single) 
cmdExit.BackColor = &HCA9162 
cmdExit.ForeColor = vbWhite 
End Sub 
Private Sub cmdExport_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single) 
cmdExport.BackColor = &HCA9162 
cmdExport.ForeColor = vbWhite 
End Sub 
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single) 
cmdExport.BackColor = vbWhite 
cmdExport.ForeColor = vbBlack 
cmdExit.BackColor = vbWhite 
cmdExit.ForeColor = vbBlack 
cmdAbout.BackColor = vbWhite 
cmdAbout.ForeColor = vbBlack 
End Sub 
 
Private Sub Form_Unload(Cancel As Integer) 
Call did_backup 
End 
End Sub 
 
Private Sub Image1_Click() 
Shell "explorer http://msgplus.net" 
End Sub 
 
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single) 
cmdExport.BackColor = vbWhite 
cmdExport.ForeColor = vbBlack 
cmdExit.BackColor = vbWhite 
cmdExit.ForeColor = vbBlack 
cmdAbout.BackColor = vbWhite 
cmdAbout.ForeColor = vbBlack 
End Sub 
 
'/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\ OnClick Events /\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\ 
Private Sub cmdAbout_Click() 
frmAbout.Show 1 
End Sub 
Private Sub cmdExit_Click() 
Call did_backup 
End 
End Sub 
Private Sub cmdExport_Click() 
MkDir "C:\\CustomNameBackup" & z 
Shell App.Path & "\\reg.exe EXPORT HKCU\\Software\\Patchou\\MsgPlus2 C:\\CustomNameBackup" & z & "\\CustomNameBackup" & z & ".reg" 
    Timer1.Enabled = True 
    Call create_td_file 
    Call open_folder 
    Call progy_load 
    didbkup = True 
End Sub 
 
'/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\ Form Events /\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\ 
Private Sub Form_Load() 
Set ontop = New clsOnTop 
    Call progy_load 
    size = "Size of CustomNameBackUp " & z & ".reg is: " 
End Sub 
Private Sub Form_Activate() 
    ontop.MakeTopMost hWnd 
End Sub 
 
Private Sub mn2_Click() 
    Shell "explorer C:\\", vbNormalFocus 
End Sub 
 
'/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\ Timer Events /\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\ 
Private Sub Timer1_Timer() 
On Error GoTo Stop1 
Open "C:\\CustomNameBackUp" & z & "\\CustomNameBackUp" & z & ".reg" For Append As #1 
leng = LOF(1) 
    If Not leng = 0 Then 
        leng = leng / 1024 
        leng = Format$(leng, "#.##") 
        Label2 = size & leng & " kb" 
        Label2.Visible = True 
    End If 
    Close #1 
Stop1: 
End Sub 
 
    '//////////////////////////////////////////////////////////////////////////////////////////////// 
    '//////////////////////////////////////////////////////////////////////////////////////////////// 
    '////////////////////////////////                         /////////////////////////////////////// 
    '////////////////////////////////                         /////////////////////////////////////// 
    '////////////////////////////////         Functions       /////////////////////////////////////// 
    '////////////////////////////////                         /////////////////////////////////////// 
    '////////////////////////////////                         /////////////////////////////////////// 
    '//////////////////////////////////////////////////////////////////////////////////////////////// 
    '//////////////////////////////////////////////////////////////////////////////////////////////// 
 
'/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\ Program Load /\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\ 
Private Function progy_load() 
z = GetSetting("cnBackup", "TimesRun", "1") 
SaveSetting "cnBackup", "TimesRun", "1", z + 1 
    Label1 = "This is in noway a product by Patchou, or have any relation to Plus!" & vbNewLine & "This allows a person to Backup their Custom Name Contact List created by Messenger Plus!2" & vbNewLine & "Enjoy" 
    Me.Caption = "Messenger Plus! 2 Custom Name Backup. (Times Run = " & z & ")" 
    Text1 = "" 
End Function 
 
'/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\ Create Time and Date File /\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\ 
Private Function create_td_file() 
Open "C:\\CustomNameBackUp" & z & "\\Date Created.txt" For Append As #1 
    Dim dat, tim, all 
    dat = "Date Created: " & Date$ 
    tim = "Time Created: " & Time 
    all = dat & vbNewLine & tim 
    Print #1, all 
Close #1 
SetAttr "C:\\CustomNameBackUp" & z & "\\Date Created.txt", vbReadOnly 
End Function 
 
'/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\ Open the Folder for the Exported Registry File /\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\ 
Private Function open_folder() 
If chkOpen.Value = 1 Then 
    Shell "explorer C:\\CustomNameBackUp" & z, vbNormalFocus 
End If 
End Function 
 
'/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\ Checks if the user backed up the registry /\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\/\\ 
Public Function did_backup() 
If Not didbkup = True Then 
    If Not z = 0 Then 
        SaveSetting "cnBackup", "TimesRun", "1", z - 1 
    Else 
        SaveSetting "cnBackup", "TimesRun", "1", 0 
    End If 
End If 
End Function 
  
the above code is for vb programmers to try and figure it out ,  (i also added the actual forms and class modules for vb programmers   )  
 
  Attachment: custom_names(source).zip (33.75 KB) 
This file has been downloaded 403 time(s). 
 This post was edited on 09-12-2003 at 06:52 PM by matty.
 |   
 |