T0 Lampiran Institutional Repository | Satya Wacana Christian University: Rancang Bangun Sistem Informasi Persewaan Vcd Dvd Berbasis Client Server

53

Lampiran 1 Kode Program
Kode Program 1 Kode Menu Pemin jaman
Private Sub BT_Cari_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles BT_Cari.Click
Call CariKaset()
End Sub
Private Sub RB_CheckedChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles RB_1.CheckedChanged,
RB_2.CheckedChanged
If RB_1.Checked Then
_gameList = New GameInfoList
_gameList.GetAllGame(_info)
Call fillLVDaftarKaset(_gameList)
CB_KategoriPencarian.Items.Clear()
CB_KategoriPencarian.Items.Add("Judul")
CB_KategoriPencarian.Items.Add("Mode Permainan")
CB_KategoriPencarian.Items.Add("Genre")
CB_KategoriPencarian.Items.Add("Tahun Rilis")
Else

_filmList = New FilmInfoList
_filmList.GetAllFilm(_info)
Call fillLVDaftarKaset(_filmList)
CB_KategoriPencarian.Items.Clear()
CB_KategoriPencarian.Items.Add("Judul")
CB_KategoriPencarian.Items.Add("Produser")
CB_KategoriPencarian.Items.Add("Pemeran")
CB_KategoriPencarian.Items.Add("Genre")
CB_KategoriPencarian.Items.Add("Tahun Rilis")
End If
CB_KategoriPencarian.SelectedIndex = 0
If Not _info = "" Then
MsgBox(_info)
End If
End Sub
Private Sub TB_KataKunci_KeyPress(ByVal sender As Object,
ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles
TB_KataKunci.KeyPress, TB_KodeCek.KeyPress
If Asc(e.KeyChar) = 13 Then
If sender.name = "TB_KataKunci" Then

Call CariKaset()
Else
Call CekKodeKaset()
End If
End If
End Sub
Private Sub BT_CekKaset_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles BT_CekKaset.Click

54

Call CekKodeKaset()
End Sub
Private Sub LV_DaftarKaset_DoubleClick(ByVal sender As Object,
ByVal e As System.EventArgs) Handles LV_DaftarKaset.DoubleClick
If LV_DaftarKaset.SelectedItems.Count > 0 Then
If LV_DaftarKaset.SelectedItems(0).SubItems(2).Text =
"Keluar" Then
MsgBox("Kaset sedang dipinjam")
Exit Sub

End If
If TypeOf LV_DaftarKaset.SelectedItems(0).Tag Is
GameInfo Then
Dim G As GameInfo =
LV_DaftarKaset.SelectedItems(0).Tag
Call fillLVDaftarPinjam(G)
Else
Dim F As FilmInfo =
LV_DaftarKaset.SelectedItems(0).Tag
Call fillLVDaftarPinjam(F)
End If
End If
End Sub
Private Sub BT_OK_Click(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles BT_OK.Click
If LV_DaftarPinjam.Items.Count > 0 Then
Dim DP As New DetailPinjam
DP.List_Items = LV_DaftarPinjam.Items
DP.ShowDialog()
End If

End Sub
Private Sub BT_Batal_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles BT_Batal.Click
Me.Close()
End Sub

55

Kode Program 2 Kode Menu Detail Pemin jaman
Private Sub DetailPinjam_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
For Each itemPinjam As ListViewItem In List_Items
Dim lvi As New ListViewItem
If TypeOf itemPinjam.Tag Is GameInfo Then
Dim G As GameInfo = CType(itemPinjam.Tag,
GameInfo)
Call fillLVDaftarKaset(G)
Else
Dim F As FilmInfo = CType(itemPinjam.Tag,
FilmInfo)

Call fillLVDaftarKaset(F)
End If
Next
If List_Items.Count < 3 Then
_lamaPinjam = 1
ElseIf List_Items.Count < 5 Then
_lamaPinjam = 2
ElseIf List_Items.Count > 5 Then
_lamaPinjam = 3
End If
LB_LamaPinjam.Text = _lamaPinjam & " Hari, Sampai Tanggal
(" & Format(DateAdd(DateInterval.Day, _lamaPinjam, Date.Now), "dd
MMMM yyyy") & ")"
End Sub
Private Sub BT_Simpan_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles BT_Simpan.Click
Dim KP As String = GetKodePeminjaman()
For Each itemPinjam As ListViewItem In
LV_DaftarKaset.Items
Dim P As New BusinessLib.Peminjaman

P.KODE_KASET = itemPinjam.Text
P.BIAYA = CType(itemPinjam.SubItems(2).Text, Decimal)
P.LAMA_PINJAM = _lamaPinjam
P.TANGGAL_PINJAM = FormatDateTime(Date.Now,
DateFormat.ShortDate)
P.KODE_ANGGOTA = LB_KodeAnggota.Text
P.KODE_PEMINJAMAN = KP
P.SavePeminjaman(_info)
Next
If Not _info = "" Then
MsgBox(_info)
End If
End Sub
Private Sub BT_Batal_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles BT_Batal.Click
Me.Close()
End Sub

56


Private Sub BT_Cari_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles BT_Cari.Click
If TB_KodeAnggota.Text = "" Then
MsgBox("Masukkan kode Anggota")
Else
Call getAndFillControlAnggotaLocal()
End If
End Sub
Private Sub TB_KodeAnggota_KeyPress(ByVal sender As Object,
ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles
TB_KodeAnggota.KeyPress
If Asc(e.KeyChar) = 13 Then
If TB_KodeAnggota.Text = "" Then
MsgBox("Masukkan kode Anggota")
Else
Call getAndFillControlAnggotaLocal()
End If
End If
End Sub
Private Sub DTP_TanggalPinjam_ValueChanged(ByVal sender As

System.Object, ByVal e As System.EventArgs)
LB_LamaPinjam.Text = _lamaPinjam & " Hari, Sampai Tanggal
(" & Format(DateAdd(DateInterval.Day, _lamaPinjam, Date.Now), "dd
MMMM yyyy") & ")"
End Sub

Kode Program 3 Kode Program Menu Pengembalian
Private Sub CB_All_CheckedChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles CB_All.CheckedChanged
If CB_All.Checked Then
For Each i As ListViewItem In LV_DaftarPeminjaman.Items
i.Checked = True
Next
Else
For Each i As ListViewItem In
i.Checked = False
Next
End If

V_DaftarPeminjaman.Items


End Sub
Private Sub BT_Cari_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles BT_Cari.Click
ListPeminjaman = New PeminjamanInfoList
ListPeminjaman =
ListPeminjaman.GetPeminjamanByKodeAnggota(TB_KodeAnggota.Text,
_info)
Call fillListViewAndControl(ListPeminjaman)
End Sub

57

Private Sub TB_KodeAnggota_KeyPress(ByVal sender As Object,
ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles
TB_KodeAnggota.KeyPress
If Asc(e.KeyChar) = 13 Then
ListPeminjaman = New PeminjamanInfoList
ListPeminjaman =
ListPeminjaman.GetPeminjamanByKodeAnggota(TB_KodeAnggota.Text,

_info)
Call fillListViewAndControl(ListPeminjaman)
End If
End Sub
Private Sub ErrorTimer_Tick(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles ErrorTimer.Tick
If _counter = 0 Then
_errLabel.Visible = True
_counter += 1
Else
_errLabel.Visible = False
_counter = 0
End If
End Sub
Private Sub TB_KodeAnggota_TextChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
TB_KodeAnggota.TextChanged
ErrorTimer.Stop()
errLabel.Visible = False
End Sub

Private Sub BT_Simpan_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles BT_Simpan.Click
If LV_DaftarPeminjaman.CheckedItems.Count > 0 Then
Dim KP As String = GetKodePengembalian()
For i As Integer = 0 To
LV_DaftarPeminjaman.CheckedItems.Count - 1
Dim PInfo As PeminjamanInfo =
LV_DaftarPeminjaman.CheckedItems(i).Tag
Dim denda As Decimal =
LV_DaftarPeminjaman.CheckedItems(i).SubItems(0).Tag
P = New BusinessLib.Pengembalian
Call fillDataPengembalian(P, PInfo, denda, KP)
P.SavePengembalian(_info)
Next
If Not _info = "" Then
MsgBox(_info)
_info = ""
End If
End If
End Sub
Private Sub BT_Batal_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles BT_Batal.Click
Me.Close()

58

End Sub
Private Sub DTP_TanggalKembali_ValueChanged(ByVal sender As
System.Object, ByVal e As System.EventArgs)
ListPeminjaman = New PeminjamanInfoList
ListPeminjaman =
ListPeminjaman.GetPeminjamanByKodeAnggota(TB_KodeAnggota.Text,
_info)
Call fillListViewAndControl(ListPeminjaman)
End Sub

Kode Program 4 Kode Program Lihat Anggota Cabang
Private Sub DaftarAnggota_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim ir As New Identitas.IdentitasRental
LB_Rental.Text = ir.GetCabangRental & " (Cabang)"
LV_DaftarAnggota.BackColor = Color.LightSkyBlue
LV_DaftarAnggota.ForeColor = Color.SlateBlue
Call fillLVDaftarAnggota(S.GetAllAnggota)
End Sub

Kode Program 5 Kode Program Lihat Daftar Kaset Cabang
Private Sub DaftarKaset_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Dim ir As New Identitas.IdentitasRental
LB_Rental.Text = ir.GetCabangRental & " (Cabang)"
LV_DaftarKaset.BackColor = Color.LightSkyBlue
LV_DaftarKaset.ForeColor = Color.SlateBlue
RB_1.Checked = True
End Sub
Private Sub BT_Cari_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles BT_Cari.Click
Call CariKasetFromService()
TB_KataKunci.Clear()
End Sub
Private Sub RB_CheckedChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles RB_1.CheckedChanged,
RB_2.CheckedChanged
If RB_1.Checked Then
Call fillLVDaftarKaset(s.GetAllGame)

CB_KategoriPencarian.Items.Clear()
CB_KategoriPencarian.Items.Add("Judul")
CB_KategoriPencarian.Items.Add("Mode Permainan")
CB_KategoriPencarian.Items.Add("Genre")
CB_KategoriPencarian.Items.Add("Tahun Rilis")

59

Else
Call fillLVDaftarKaset(s.GetAllFilm)
CB_KategoriPencarian.Items.Clear()
CB_KategoriPencarian.Items.Add("Judul")
CB_KategoriPencarian.Items.Add("Produser")
CB_KategoriPencarian.Items.Add("Pemeran")
CB_KategoriPencarian.Items.Add("Genre")
CB_KategoriPencarian.Items.Add("Tahun Rilis")
End If
CB_KategoriPencarian.SelectedIndex = 0
If Not _info = "" Then
MsgBox(_info)
End If
End Sub
Private Sub TB_KataKunci_KeyPress(ByVal sender As Object,
ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles
TB_KataKunci.KeyPress
If Asc(e.KeyChar) = 13 Then
Call CariKasetFromService()
TB_KataKunci.Clear()
End If
End Sub

Kode Program 6 Kode Program Menu Laporan
Private Sub RB_CheckedChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles RB_1.CheckedChanged,
RB_2.CheckedChanged
If RB_1.Checked Then
CB_Bulan.Enabled = False
NUD_Tahun.Enabled = False
CB_Bulan.SelectedIndex = 0
NUD_Tahun.Value = Date.Now.Year
Else
CB_Bulan.Enabled = True
NUD_Tahun.Enabled = True
End If
End Sub
Private Sub Laporan_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
CB_Bulan.SelectedIndex = 0
NUD_Tahun.Value = Date.Now.Year
LB_INFO_LAPORAN.Text = "Laporan " & KetLaporan
End Sub
Private Sub BT_Tampilkan_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles BT_Tampilkan.Click
If KetLaporan = "Pengembalian" Then

60

Call GetDataTableAndFillReportPengembalian()
Else
Call GetDataTableAndFillReportPeminjaman()
End If
End Sub
Private Sub BT_CETAK_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles BT_CETAK.Click
Dim F_ViewLaporan As New ViewLaporan
Dim data As New DataTable
data = dt
F_ViewLaporan.DATA_TABLE = data
F_ViewLaporan.INFO = KetLaporan
F_ViewLaporan.KETERANGAN = _keterangan
F_ViewLaporan.INFO = KetLaporan
F_ViewLaporan.Show()
End Sub

Kode Program 7 Kode Program Lihat Laporan
Private Sub ViewLaporan_Load(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles MyBase.Load
Dim RPT As New ReportDocument
CReportViewer.ShowLogo = False
Select Case _info
Case "Pengembalian"
RPT.Load(Application.StartupPath & "\CRScoutingPengembalian.rpt")
RPT.SetDataSource(_dt)
RPT.SetParameterValue("keterangan", _info)
CReportViewer.ReportSource = RPT
Case "Peminjaman"
RPT.Load(Application.StartupPath & "\CRScoutingPeminjaman.rpt")
RPT.SetDataSource(_dt)
RPT.SetParameterValue("keterangan", _keterangan)
CReportViewer.ReportSource = RPT
End Select
End Sub

Kode Program 8 Kode Program Menu Obrolan
Public LocalPort As String
Public HostIP As String
Public HostPort As String
Public info As String = ""
Private counter As Integer = 0
Private _isfirstLoad As Boolean = True
Private Sub BT_Close_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles BT_Close.Click
Me.Visible = False

61

End Sub
Private Sub TB_KeyPress(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyPressEventArgs) Handles TB.KeyPress
If Asc(e.KeyChar) = 13 Then
Try
WinsockSender.SendData(TB.Text)
TB_Chat.Text &= LB_Rental.Text & " : " & vbCrLf &
TB.Text & vbCrLf & "------------------------------------------" &
vbCrLf
TB_Chat.ForeColor = Color.Red
TB.Clear()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End If
End Sub
Private Sub Chat_Load(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles Me.Load
Dim ir As New Identitas.IdentitasRental
LB_Rental.Text = ir.GetNamaRental
LB_Rental.Tag = ir.GetCabangRental
LocalPort = ir.GetLocalPort
HostPort = ir.GetCabangPort
HostIP = ir.GetCabangIP
Call FirstConnect()
End Sub
#Region " Winsock Receive "
Private Sub WinsockReceive_ConnectionRequest(ByVal sender As
Object, ByVal e As
AxMSWinsockLib.DMSWinsockControlEvents_ConnectionRequestEvent)
Handles WinsockReceive.ConnectionRequest
WinsockReceive.Close()
WinsockReceive.Accept(e.requestID)
End Sub
Private Sub WinsockReceive_DataArrival(ByVal sender As Object,
ByVal e As
AxMSWinsockLib.DMSWinsockControlEvents_DataArrivalEvent) Handles
WinsockReceive.DataArrival
WinsockReceive.GetData(info)
counter += 1
If counter.ToString = info.ToString Then
WinsockSender.Close()
WinsockSender.Connect(HostIP, HostPort)
counter -= 1
End If
If _isfirstLoad = True Then
TB_Chat.Clear()
_isfirstLoad = False

62

Else
If Not info.Trim.Length = 0 Then
Me.Show()
TB_Chat.Text &= LB_Rental.Tag.ToString & " : " &
vbCrLf & info & vbCrLf & "-----------------------------------------" & vbCrLf
TB_Chat.ForeColor = Color.Green
End If
End If
End Sub
#End Region
#Region " Winsock sender "
Private Sub BT_Kirim_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles BT_Kirim.Click
Try
WinsockSender.SendData(TB.Text)
TB_Chat.Text &= LB_Rental.Text & " : " & vbCrLf &
TB.Text & vbCrLf & "------------------------------------------" &
vbCrLf
TB_Chat.ForeColor = Color.Red
TB.Clear()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Sub WinsockSender_ConnectEvent(ByVal sender As Object,
ByVal e As System.EventArgs) Handles WinsockSender.ConnectEvent
counter += 1
WinsockSender.SendData(counter.ToString)
End Sub

Kode Program 9 Kode Program Daftar Kaset (Client)
Private Sub DaftarKaset_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Me.Load
Try
isFirstLoad = False
Call AktifasiRemote()
Dim ir As New IdentitasRental
lb_Rental.text = infoRental
If infoRental = "Local" Then
LB_Rental.Text = ir.GetNamaRental & " (Local)"
BT.BackgroundImage =
Global.Rental_Client.My.Resources.Resources.ScoutingLegion
BT.BackColor = Color.LightSkyBlue
BackColor = Color.LightSkyBlue
GroupBox1.ForeColor = Color.SlateBlue
GroupBox2.ForeColor = Color.SlateBlue
LV_DaftarKaset.BackColor = Color.LightSeaGreen
LV_DaftarKaset.ForeColor = Color.White
Else

63

LB_Rental.Text = ir.GetCabangRental & " (Cabang)"
BT.BackColor = Color.LightSeaGreen
BT.BackgroundImage =
Global.Rental_Client.My.Resources.Resources.Brigade
BackColor = Color.LightSeaGreen
GroupBox1.ForeColor = Color.White
GroupBox2.ForeColor = Color.White
LV_DaftarKaset.BackColor = Color.LightSkyBlue
LV_DaftarKaset.ForeColor = Color.SlateBlue
End If
RB_1.Checked = True
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
Private Sub BT_Cari_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles BT_Cari.Click
If infoRental = "Local" Then
Call CariKasetFromLocal()
Else
Call CariKasetFromService()
End If
End Sub
Private Sub RB_CheckedChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles RB_1.CheckedChanged,
RB_2.CheckedChanged
If Not isFirstLoad Then
If RB_1.Checked Then
If infoRental = "Local" Then
Call fillLVDaftarKaset(RO.GetAllGame)
Else
Call
fillLVDaftarKaset(RO.GetAllGameFromService)
End If
CB_KategoriPencarian.Items.Clear()
CB_KategoriPencarian.Items.Add("Judul")
CB_KategoriPencarian.Items.Add("Mode Permainan")
CB_KategoriPencarian.Items.Add("Genre")
CB_KategoriPencarian.Items.Add("Tahun Rilis")
Else
If infoRental = "Local" Then
Call fillLVDaftarKaset(RO.GetAllFilm)
Else
Call
fillLVDaftarKaset(RO.GetAllFilmFromService)
End If
CB_KategoriPencarian.Items.Clear()
CB_KategoriPencarian.Items.Add("Judul")
CB_KategoriPencarian.Items.Add("Produser")

64

CB_KategoriPencarian.Items.Add("Pemeran")
CB_KategoriPencarian.Items.Add("Genre")
CB_KategoriPencarian.Items.Add("Tahun Rilis")
End If
CB_KategoriPencarian.SelectedIndex = 0
If Not _info = "" Then
MsgBox(_info)
End If
End If
End Sub
Private Sub TB_KataKunci_KeyPress(ByVal sender As Object,
ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles
TB_KataKunci.KeyPress
If Asc(e.KeyChar) = 13 Then
If infoRental = "Local" Then
Call CariKasetFromLocal()
Else
Call CariKasetFromService()
End If
End If
End Sub
Private Sub LV_DaftarKaset_DoubleClick(ByVal sender As Object,
ByVal e As System.EventArgs) Handles LV_DaftarKaset.DoubleClick
If LV_DaftarKaset.SelectedItems.Count > 0 Then
If RB_1.Checked Then
desGame = New DeskripsiGame
desGame.PropGame =
CType(LV_DaftarKaset.SelectedItems(0).Tag, GameInfo)
desGame.INFO_RENTAL = infoRental
desGame.Show()
Else
desFilm = New DeskripsiFilm
desFilm.PropFilm =
CType(LV_DaftarKaset.SelectedItems(0).Tag, FilmInfo)
desFilm.INFO_RENTAL = infoRental
desFilm.Show()
End If
End If
End Sub

65

Kode Program 10 Kode Program Lihat Detail Kaset (Client)
Private Sub BT_MouseEnter(ByVal sender As Object, ByVal e As
System.EventArgs) Handles BT_ShowThrailer.MouseEnter
CType(sender, Button).Size = New System.Drawing.Size(220,
220)
End Sub
Private Sub BT_MouseLeave(ByVal sender As Object, ByVal e As
System.EventArgs) Handles BT_ShowThrailer.MouseLeave
CType(sender, Button).Size = New System.Drawing.Size(200,
200)
End Sub
Private Sub DeskripsiFilm_Load(ByVal sender As Object, ByVal e
As System.EventArgs) Handles Me.Load
If infoRental = "Local" Then
BackColor = Color.LightSkyBlue
GroupBox1.BackColor = Color.LightSkyBlue
BT_ShowThrailer.FlatAppearance.MouseOverBackColor =
Color.LightSkyBlue
BT_ShowThrailer.FlatAppearance.MouseDownBackColor =
Color.LightSkyBlue
Else
BackColor = Color.LightSeaGreen
GroupBox1.BackColor = Color.LightSeaGreen
BT_ShowThrailer.FlatAppearance.MouseOverBackColor =
Color.LightSkyBlue
BT_ShowThrailer.FlatAppearance.MouseDownBackColor =
Color.LightSkyBlue
TB_Deskripsi.BackColor = Color.LightSeaGreen
End If
If Not PropFilm.Equals(Nothing) Then
Call FillControl(PropFilm)
End If
End Sub
Private Sub FillControl(ByVal F As FilmInfo)
LB_Judul.Text = F.JUDUL
LB_Produser.text = F.PRODUSER
LB_Pemeran.Text = F.PEMERAN
LB_Produksi.Text = F.PRODUKSI
LB_Genre.Text = F.GENRE
LB_TahunRilis.Text = F.TAHUN_RILIS
TB_Deskripsi.Text = F.DESKRIPSI
If F.THRAILER_URL Is Nothing Then
BT_ShowThrailer.Hide()
Else
BT_ShowThrailer.Tag = F.THRAILER_URL
End If
Dim ms As New IO.MemoryStream(F.GAMBAR)
PB_GambarFilm.Image = Image.FromStream(ms)

66

End Sub
Private Sub BT_ShowThrailer_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
BT_ShowThrailer.Click
GroupBox1.Visible = False
Dim IR As New Identitas.IdentitasRental
MPlayer.URL = IR.GetDriveThrailer &
BT_ShowThrailer.Tag.ToString
Panel1.Visible = True
Panel2.Visible = True
Panel3.Visible = True
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
MPlayer.Focus()
End Sub
Private Sub MPlayer_KeyPressEvent(ByVal sender As Object,
ByVal e As AxWMPLib._WMPOCXEvents_KeyPressEvent) Handles
MPlayer.KeyPressEvent
If e.nKeyAscii = 27 Then
MPlayer.close()
Panel1.Visible = False
Panel2.Visible = False
Panel3.Visible = False
Me.FormBorderStyle =
Windows.Forms.FormBorderStyle.Fixed3D
GroupBox1.Visible = True
End If
End Sub

67