Process Modules Project

Process Modules Project source code and complete project in "Process Modules and ProcessName Collecter" e-learning section.
Coded by: Wesam Naffaa

Puzzle Game project

Full Puzzle Game source code and complete project in "Puzzle Game project" e-learning section.
NOTE: You must read "Puzzle Game - Resources" to understand how to apply the sources & codes to your side.
Coded by: Wesam Naffaa

Accounting Manager project

Full Accounting manager source code and complete project in "Universal Accounting Manager project" e-learning section.
NOTE: You must read "Universal Accounting Manager - Resources" to understand how to apply the sources & codes to your side.
Coded by: Wesam Naffaa

File encryption project

Full File encryption center source code and complete project in "File encryption center project" e-learning section.
NOTE: You must read "File encryption center - Resources" to understand how to apply the sources & codes to your side.
Coded by: Wesam Naffaa

File encryption center - DragList.vb

File encryption center - DragList.vb
File encryption center - DragList.vb
File encryption center - DragList.vb
DragList.vb
  1. Public Class DragList
  2.     Dim MyName As String = My.Application.Info.AssemblyName
  3.     Dim MyDir As String = System.Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) & "\" & MyName
  4.     Dim GetLinkPath As String = MyDir & "\Free GetLink.exe"
  5.     Dim SmallImageLV As New ImageList()
  6.     Dim LargImageLV As New ImageList()
  7.     Dim Clossing As Boolean = False
  8.     Public Sub CopyNJWMGetLink()
  9.         If My.Computer.FileSystem.FileExists(GetLinkPath) = True Then
  10.             System.IO.File.SetAttributes(GetLinkPath, IO.FileAttributes.Normal)
  11.             System.IO.File.Delete(GetLinkPath)
  12.         End If
  13.         My.Computer.FileSystem.WriteAllBytes(GetLinkPath, My.Resources.NJWM_GetLink, False)
  14.     End Sub
  15.     Public Sub LoadItems()
  16. LoadingItems:
  17.         'On Error Resume Next
  18.         LV.Items.Clear()
  19.         ' Set Images to Items :
  20.         SmallImageLV.Images.Add(My.Resources.KeyPIC)
  21.         SmallImageLV.Images.Add(My.Resources.KeyPIC)
  22.         LargImageLV.Images.Add(My.Resources.KeyPIC)
  23.         LargImageLV.Images.Add(My.Resources.KeyPIC)
  24.         ' Set Images size :
  25.         LargImageLV.ImageSize = New Size(32, 32)
  26.         SmallImageLV.ImageSize = New Size(32, 32)
  27.         ' Set Images to Items :
  28.         LV.LargeImageList = LargImageLV
  29.         LV.SmallImageList = SmallImageLV
  30.         ' Set Images size :
  31.         LV.LargeImageList.ImageSize = New Size(32, 32)
  32.         LV.SmallImageList.ImageSize = New Size(32, 32)
  33.         Dim Addad As Integer = 0
  34.         For Addad = 0 To ListDragTarget.Items.Count - 1
  35.             Dim FileFullName As String = ""
  36.             Dim MyFileName As String = ""
  37.             FileFullName = ListDragTarget.Items.Item(Addad).ToString
  38.             If My.Computer.FileSystem.DirectoryExists(FileFullName) = True Then
  39.                 MyFileName = My.Computer.FileSystem.GetDirectoryInfo(FileFullName).Name
  40.             ElseIf My.Computer.FileSystem.FileExists(FileFullName) = True Then
  41.                 '.................................................................................................................................
  42.                 '.................................................................................................................................
  43.                 '.................................................................................................................................
  44.                 '.................................................................................................................................
  45.                 'Test If File is Link (.lnk)
  46.                 'Dim MyExt As String = My.Computer.FileSystem.GetFileInfo(FileFullName).Extension
  47.                 'If MyExt = ".lnk" Then
  48.                 'Call Shell(GetLinkPath & " " & FileFullName, AppWinStyle.NormalFocus, True)
  49.                 'FileFullName = My.Computer.FileSystem.ReadAllText(System.Environment.SystemDirectory & "\njwmlinkrespons.inf")
  50.                 'If My.Computer.FileSystem.DirectoryExists(FileFullName) = True Then
  51.                 'MyFileName = My.Computer.FileSystem.GetFileInfo(FileFullName).Name
  52.                 'Else
  53.                 'MyFileName = My.Computer.FileSystem.GetFileInfo(FileFullName).Name
  54.                 'End If
  55.                 '.................................................................................................................................
  56.                 '.................................................................................................................................
  57.                 '.................................................................................................................................
  58.                 '.................................................................................................................................
  59.                 'Else
  60.                 MyFileName = My.Computer.FileSystem.GetFileInfo(FileFullName).Name
  61.                 'End If
  62.             Else
  63.                 MsgBox("لم يتم التعرف على : " & FileFullName)
  64.             End If
  65.             'Me.picture = Image.FromFile(files(0))
  66.             'Check If Item Exist :
  67.             Dim Checker As Integer = 0
  68.             For Checker = 0 To LV.Items.Count - 1
  69.                 If LV.Items.Item(Checker).SubItems(1).Text = FileFullName Then
  70.                     GoTo DeleteItemBecauseExist
  71.                 End If
  72.             Next
  73. AddNewItem:
  74.             LV.Items.Add(MyFileName, 0)
  75.             LV.Items.Item(LV.Items.Count - 1).SubItems.Add(FileFullName)
  76.             GoTo Finish
  77. DeleteItemBecauseExist:
  78.             LV.Items.Item(Checker).Focused = True
  79.             DeleteItem(LV.FocusedItem.Index, LV.FocusedItem)
  80.             GoTo LoadingItems
  81. Finish:
  82.             If Addad = ListDragTarget.Items.Count - 1 Then GoTo FinishLoadingItems
  83.         Next
  84. FinishLoadingItems:
  85.         'Managing LV Interface :
  86.         LV.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent)
  87.         LV.Cursor = Cursors.Hand
  88.     End Sub
  89.     Public Sub DeleteItem(ByVal Num As Integer, ByVal ItemName As ListViewItem)
  90.         ListDragTarget.Items.RemoveAt(Num)
  91.         LV.Items.Remove(ItemName)
  92.     End Sub
  93.     Private Sub DragList_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
  94.         If Clossing = False Then
  95.             e.Cancel = True
  96.             If MsgBox("تحذير" & System.Environment.NewLine & "ستفقد كل القائمة في حال أغلقت هذه النافذة !", MsgBoxStyle.YesNo, MyName) = MsgBoxResult.Yes Then
  97.                 Clossing = True
  98.                 Me.Close()
  99.             End If
  100.         End If
  101.     End Sub
  102.     Private Sub DragList_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
  103.         Me.Text = MyName & " - قائمة العناصر"
  104.         InfoLBL.Text = MyName & System.Environment.NewLine & My.Application.Info.Version.ToString
  105.         SaveDLG.DefaultExt = ".list"
  106.         SaveDLG.FileName = "قائمة"
  107.         SaveDLG.Filter = "List Files (*.list)|*.list"
  108.         SaveDLG.InitialDirectory = System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop).ToString
  109.         SaveDLG.Title = MyName & " - حفظ قائمة"
  110.         OpenDLG.DefaultExt = ".list"
  111.         OpenDLG.FileName = "قائمة"
  112.         OpenDLG.Filter = "List Files (*.list)|*.list"
  113.         OpenDLG.InitialDirectory = System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop).ToString
  114.         OpenDLG.Title = MyName & " - فتح قائمة"
  115.         'AddHandler CryptBTN.Click, AddressOf Main.CryptBTN
  116.     End Sub
  117.     Private Sub LV_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles LV.DragDrop
  118.         Dim MyArr As String() = CType(e.Data.GetData(DataFormats.FileDrop), String())
  119.         ListDragTarget.Items.AddRange(MyArr)
  120.         LoadItems()
  121.     End Sub
  122.     Private Sub LV_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles LV.DragEnter
  123.         e.Effect = DragDropEffects.Copy
  124.     End Sub
  125.     Private Sub LV_ItemSelectionChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.ListViewItemSelectionChangedEventArgs) Handles LV.ItemSelectionChanged
  126.         On Error Resume Next
  127.         Main.PathTXT.ForeColor = Color.Black
  128.         Main.PathTXT.TextAlign = HorizontalAlignment.Left
  129.         Main.PathTXT.Text = LV.FocusedItem.SubItems(1).Text
  130.     End Sub
  131.     Private Sub CloseBTN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CloseBTN.Click
  132.         Me.Close()
  133.     End Sub
  134.     Private Sub RemoveItemBTN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RemoveItemBTN.Click
  135.         DeleteItem(LV.FocusedItem.Index, LV.FocusedItem)
  136.     End Sub
  137.     Private Sub SaveListBTN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SaveListBTN.Click
  138.         SaveDLG.ShowDialog()
  139.     End Sub
  140.     Private Sub SaveDLG_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles SaveDLG.FileOk
  141.         Dim MyArr As String() = {""}
  142.         Array.Resize(MyArr, ListDragTarget.Items.Count)
  143.         Dim Addad As Integer = 0
  144.         For Addad = 0 To ListDragTarget.Items.Count - 1
  145.             MyArr(Addad) = ListDragTarget.Items.Item(Addad)
  146.         Next
  147.         If My.Computer.FileSystem.FileExists(SaveDLG.FileName) = True Then System.IO.File.SetAttributes(SaveDLG.FileName, IO.FileAttributes.Normal)
  148.         System.IO.File.WriteAllLines(SaveDLG.FileName, MyArr)
  149.     End Sub
  150.     Private Sub OpenDLG_FileOk(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles OpenDLG.FileOk
  151.         LoadLISTExtention(OpenDLG.FileName)
  152.     End Sub
  153.     Private Sub SaveDLG_HelpRequest(ByVal sender As Object, ByVal e As System.EventArgs) Handles SaveDLG.HelpRequest
  154.         AboutHelp.Close()
  155.         AboutHelp.SetParameters("h")
  156.         AboutHelp.Show()
  157.     End Sub
  158.     Private Sub OpenDLG_HelpRequest(ByVal sender As Object, ByVal e As System.EventArgs) Handles OpenDLG.HelpRequest
  159.         AboutHelp.Close()
  160.         AboutHelp.SetParameters("h")
  161.         AboutHelp.Show()
  162.     End Sub
  163.     Private Sub OpenLstBTN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OpenLstBTN.Click
  164.         OpenDLG.ShowDialog()
  165.     End Sub
  166.     Private Sub CryptBTN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CryptBTN.Click
  167.         Main.CallCryptBTN(sender, e)
  168.     End Sub
  169.     Private Sub DesCryptBTN_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DesCryptBTN.Click
  170.         Main.CallDesCryptBTN(sender, e)
  171.     End Sub
  172.     Public Sub LoadLISTExtention(ByVal LISTPath As String)
  173.         ListDragTarget.Items.AddRange(System.IO.File.ReadAllLines(LISTPath))
  174.         LoadItems()
  175.     End Sub
  176. End Class

Valuable E-Book

Hello,
Baby first step is a friendly flashcards offering a growing collection of creative and educational ideas to help the toddler to learn the alphabet, so I put images that would be attractive to babies.

Support independent publishing: Buy this e-book on Lulu.