Click here to Skip to main content
15,891,976 members
Articles / Programming Languages / Visual Basic

Building Client/Server applications with VB.NET for secure private file sharing

Rate me:
Please Sign up or sign in to vote.
3.70/5 (13 votes)
24 Nov 20057 min read 192K   15.6K   65  
How to build secure private file sharing client/server using a freeware SDK
Option Strict Off
Option Explicit On
Friend Class CfSettings
  Inherits System.Windows.Forms.Form
#Region "Windows Form Designer generated code "
  Public Sub New()
    MyBase.New()
    'This call is required by the Windows Form Designer.
    InitializeComponent()
  End Sub
  'Form overrides dispose to clean up the component list.
  Protected Overloads Overrides Sub Dispose(ByVal Disposing As Boolean)
    If Disposing Then
      If Not components Is Nothing Then
        components.Dispose()
      End If
    End If
    MyBase.Dispose(Disposing)
  End Sub
  'Required by the Windows Form Designer
  Private components As System.ComponentModel.IContainer
  Public ToolTip1 As System.Windows.Forms.ToolTip
  Public WithEvents txtKey As System.Windows.Forms.TextBox
  Public WithEvents chkCompress As System.Windows.Forms.CheckBox
  Public WithEvents Label6 As System.Windows.Forms.Label
  Public WithEvents Label7 As System.Windows.Forms.Label
  Public WithEvents btnCancel As System.Windows.Forms.Button
  Public WithEvents btnOk As System.Windows.Forms.Button
  'NOTE: The following procedure is required by the Windows Form Designer
  'It can be modified using the Windows Form Designer.
  'Do not modify it using the code editor.
  Public WithEvents txtPort As System.Windows.Forms.TextBox
  <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
Me.txtKey = New System.Windows.Forms.TextBox
Me.chkCompress = New System.Windows.Forms.CheckBox
Me.Label6 = New System.Windows.Forms.Label
Me.txtPort = New System.Windows.Forms.TextBox
Me.Label7 = New System.Windows.Forms.Label
Me.btnCancel = New System.Windows.Forms.Button
Me.btnOk = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'txtKey
'
Me.txtKey.AcceptsReturn = True
Me.txtKey.AutoSize = False
Me.txtKey.BackColor = System.Drawing.SystemColors.Window
Me.txtKey.Cursor = System.Windows.Forms.Cursors.IBeam
Me.txtKey.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtKey.ForeColor = System.Drawing.SystemColors.WindowText
Me.txtKey.Location = New System.Drawing.Point(6, 91)
Me.txtKey.MaxLength = 0
Me.txtKey.Name = "txtKey"
Me.txtKey.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.txtKey.Size = New System.Drawing.Size(126, 23)
Me.txtKey.TabIndex = 7
Me.txtKey.Text = ""
'
'chkCompress
'
Me.chkCompress.BackColor = System.Drawing.SystemColors.Control
Me.chkCompress.Cursor = System.Windows.Forms.Cursors.Default
Me.chkCompress.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.chkCompress.ForeColor = System.Drawing.SystemColors.ControlText
Me.chkCompress.Location = New System.Drawing.Point(6, 132)
Me.chkCompress.Name = "chkCompress"
Me.chkCompress.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.chkCompress.Size = New System.Drawing.Size(138, 21)
Me.chkCompress.TabIndex = 6
Me.chkCompress.Text = "Use compression"
'
'Label6
'
Me.Label6.BackColor = System.Drawing.SystemColors.Control
Me.Label6.Cursor = System.Windows.Forms.Cursors.Default
Me.Label6.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label6.ForeColor = System.Drawing.SystemColors.ControlText
Me.Label6.Location = New System.Drawing.Point(4, 72)
Me.Label6.Name = "Label6"
Me.Label6.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Label6.Size = New System.Drawing.Size(126, 21)
Me.Label6.TabIndex = 8
Me.Label6.Text = "Secret key:"
'
'txtPort
'
Me.txtPort.AcceptsReturn = True
Me.txtPort.AutoSize = False
Me.txtPort.BackColor = System.Drawing.SystemColors.Window
Me.txtPort.Cursor = System.Windows.Forms.Cursors.IBeam
Me.txtPort.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.txtPort.ForeColor = System.Drawing.SystemColors.WindowText
Me.txtPort.Location = New System.Drawing.Point(7, 32)
Me.txtPort.MaxLength = 0
Me.txtPort.Name = "txtPort"
Me.txtPort.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.txtPort.Size = New System.Drawing.Size(126, 23)
Me.txtPort.TabIndex = 3
Me.txtPort.Text = "2222"
'
'Label7
'
Me.Label7.BackColor = System.Drawing.SystemColors.Control
Me.Label7.Cursor = System.Windows.Forms.Cursors.Default
Me.Label7.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label7.ForeColor = System.Drawing.SystemColors.ControlText
Me.Label7.Location = New System.Drawing.Point(6, 14)
Me.Label7.Name = "Label7"
Me.Label7.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Label7.Size = New System.Drawing.Size(174, 18)
Me.Label7.TabIndex = 4
Me.Label7.Text = "Listening port:"
'
'btnCancel
'
Me.btnCancel.BackColor = System.Drawing.SystemColors.Control
Me.btnCancel.Cursor = System.Windows.Forms.Cursors.Default
Me.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
Me.btnCancel.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnCancel.ForeColor = System.Drawing.SystemColors.ControlText
Me.btnCancel.Location = New System.Drawing.Point(208, 50)
Me.btnCancel.Name = "btnCancel"
Me.btnCancel.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.btnCancel.Size = New System.Drawing.Size(88, 30)
Me.btnCancel.TabIndex = 1
Me.btnCancel.Text = "Cancel"
'
'btnOk
'
Me.btnOk.BackColor = System.Drawing.SystemColors.Control
Me.btnOk.Cursor = System.Windows.Forms.Cursors.Default
Me.btnOk.DialogResult = System.Windows.Forms.DialogResult.OK
Me.btnOk.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnOk.ForeColor = System.Drawing.SystemColors.ControlText
Me.btnOk.Location = New System.Drawing.Point(208, 16)
Me.btnOk.Name = "btnOk"
Me.btnOk.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.btnOk.Size = New System.Drawing.Size(88, 30)
Me.btnOk.TabIndex = 0
Me.btnOk.Text = "Ok"
'
'CfSettings
'
Me.AcceptButton = Me.btnOk
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 15)
Me.BackColor = System.Drawing.SystemColors.Control
Me.CancelButton = Me.btnCancel
Me.ClientSize = New System.Drawing.Size(306, 159)
Me.ControlBox = False
Me.Controls.Add(Me.btnCancel)
Me.Controls.Add(Me.btnOk)
Me.Controls.Add(Me.txtKey)
Me.Controls.Add(Me.chkCompress)
Me.Controls.Add(Me.Label6)
Me.Controls.Add(Me.Label7)
Me.Controls.Add(Me.txtPort)
Me.Cursor = System.Windows.Forms.Cursors.Default
Me.Font = New System.Drawing.Font("Arial", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
Me.Location = New System.Drawing.Point(4, 27)
Me.MaximizeBox = False
Me.MinimizeBox = False
Me.Name = "CfSettings"
Me.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.ShowInTaskbar = False
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
Me.Text = "Settings"
Me.ResumeLayout(False)

  End Sub
#End Region

End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Software Developer (Senior)
Canada Canada
A software thinker

Comments and Discussions