VB.NET Awesomium open in new window target_blank Example - awesomium

Okay i tried everything searched google, tried the example in docs Awesomium and it didn't work. I have a tabbed browser. How can i make for every webcontrol to handle showcreatedwebview event.

this for window you created
Private Sub Mainwindow_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
PictureBox2.Enabled = False
TextBox1.Text = Clipboard.GetText
WebControl1.Source = New Uri(TextBox1.Text)
End Sub
this for you browser
Private Sub WebControl1_ShowCreatedWebView(ByVal sender As Object, ByVal e As Awesomium.Core.ShowCreatedWebViewEventArgs) Handles WebControl1.ShowCreatedWebView
Clipboard.SetText(e.TargetURL.ToString)
Dim webControl As Awesomium.Windows.Forms.WebControl = TryCast(sender, Awesomium.Windows.Forms.WebControl)
Form1.Tabcontrol1.TabContainer.AddTab(New Mainwindow, True, Form1.Tabcontrol1.TabContainer.TabCount)
Dim webControl11 As WebControl = TryCast(sender, WebControl)
If webControl Is Nothing Then Return
If Not webControl.IsLive Then Return
Mainwindow.Close()
If e.IsPopup AndAlso (Not e.IsUserSpecsOnly) Then
' JSWindowOpenSpecs.InitialPosition indicates screen coordinates
ElseIf (e.IsWindowOpen OrElse e.IsPost) Then
Else
e.Cancel = True
Mainwindow.TextBox1.Text = e.TargetURL.ToString
' Show the window.
Form1.Tabcontrol1.TabContainer.AddTab(New Mainwindow, True, Form1.Tabcontrol1.TabContainer.TabCount)
End If
End Sub
End Class

Related

Why is this happening? VBA questions

I'm having a problem (I have no idea if it is a problem or not, but it's kind of annoing becaause never happened before) with openning the VBA. The thing is, whenever I press Alt + f11 I enter in a module called RibbonX_code and it has the followed code:
Option Explicit
Const sResourcePrefix As String = "RES_"
'Get Culture
Private Function GetATPUICultureTag() As String
Dim shTemp As Worksheet
Dim sCulture As String
Dim sSheetName As String
sCulture = Application.International(xlUICultureTag)
sSheetName = sResourcePrefix + sCulture
On Error Resume Next
Set shTemp = ThisWorkbook.Worksheets(sSheetName)
On Error GoTo 0
If shTemp Is Nothing Then sCulture = GetFallbackTag(sCulture)
GetATPUICultureTag = sCulture
End Function
'Entry point for RibbonX button click
Sub ShowATPDialog(control As IRibbonControl)
Application.Run ("fDialog")
End Sub
'Callback for RibbonX button label
Sub GetATPLabel(control As IRibbonControl, ByRef label)
label = ThisWorkbook.Sheets(sResourcePrefix + GetATPUICultureTag()).Range("RibbonCommand").Value
End Sub
'Callback for screentip
Public Sub GetATPScreenTip(control As IRibbonControl, ByRef label)
label = ThisWorkbook.Sheets(sResourcePrefix + GetATPUICultureTag()).Range("ScreenTip").Value
End Sub
'Callback for Super Tip
Public Sub GetATPSuperTip(control As IRibbonControl, ByRef label)
label = ThisWorkbook.Sheets(sResourcePrefix + GetATPUICultureTag()).Range("SuperTip").Value
End Sub
Public Sub GetGroupName(control As IRibbonControl, ByRef label)
label = ThisWorkbook.Sheets(sResourcePrefix + GetATPUICultureTag()).Range("GroupName").Value
End Sub
'Check for Fallback Languages
Private Function GetFallbackTag(szCulture As String) As String
'Sorted alphabetically by returned culture tag, then input culture tag
Select Case (szCulture)
Case "rm-CH"
GetFallbackTag = "de-DE"
Case "ca-ES", "ca-ES-valencia", "eu-ES", "gl-ES"
GetFallbackTag = "es-ES"
Case "lb-LU"
GetFallbackTag = "fr-FR"
Case "nn-NO"
GetFallbackTag = "nb-NO"
Case "be-BY", "ky-KG", "tg-Cyrl-TJ", "tt-RU", "uz-Latn-UZ"
GetFallbackTag = "ru-RU"
Case Else
GetFallbackTag = "en-US"
End Select
End Function
I have no idea what it is, it started happen today and it never happened before. I'm new in vba and I just want to know what it is, so if it is normal, just close the topic.
I could have sworn this has been asked and answered here already, but in any case...
This is due to the Analysis ToolPak add-in being loaded. To hide it, navigate to File > Options > Add-Ins > Manage Excel Add-Ins > Go and uncheck Analysis ToolPak.

Wait for function to end VB

I'm starting a ne project, in VB. And I have a problem. So maybe I don't understand the logic - can you explain it to me?
In my function Feuil1_BeforeDoubleClick i would like to wait for Button1_Clickto end.
But i don't know how to achieve this.
Here's the relevant code:
My Sheet1 :
Imports System.Threading.Tasks
Imports Microsoft.Office.Interop.Excel
Public Class Feuil1
Friend actionsPane1 As New ActionsPaneControl1
Public list As String
Public Sub Feuil1_BeforeDoubleClick(Target As Range, ByRef Cancel As Boolean) Handles Me.BeforeDoubleClick
If Target.Column <> 1 Then
If Target.Row = 16 Then
Globals.ThisWorkbook.ActionsPane.Controls.Add(actionsPane1)
Globals.ThisWorkbook.Application.DisplayDocumentActionTaskPane = True
'marche pas SendKeys.Send("{ESC}")
'
'wait here for the end of Button1_click
Target.Value = list
list = ""
End If
End If
MsgBox("doubleclick end")
End Sub
End Class
And there is my actionpane1 :
Public Class ActionsPaneControl1
Friend Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim i As Integer
Dim itemChecked As Object
Const barre As String = " / "
For Each itemChecked In CheckedListBox1.CheckedItems
Globals.Feuil1.list = Globals.Feuil1.list + itemChecked.ToString() + barre
Next
' Boucle pour reset la list
For i = 0 To (CheckedListBox1.Items.Count - 1)
CheckedListBox1.SetItemChecked(i, False)
Next
Globals.ThisWorkbook.Application.DisplayDocumentActionTaskPane = False
End Sub
End Class
Example taken from https://www.daniweb.com/programming/software-development/threads/139395/how-to-check-if-a-button-was-clicked . Credit is given.
Basicly declare a variable at form level and then set it to true whenever the button is clicked. Reset it when appropriate
Dim bBtnClicked As Boolean = False
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If bBtnClicked = True Then
MessageBox.Show("This button is clicked already ....")
Else
MessageBox.Show("This button is clicked First time ....")
End If
bBtnClicked = True
End Sub
Alternatively whatever it is that you want to happen after the button is clicked, just put that code in the handler for the button-click event.
So i think about the problem, and it seems I didn't understand my function doubleclick, was not working after the double click but before ! that was my mistake.
So i change my function to detect, the change of selection in my sheet.
Then i call my action pane.
And work with the event of the button of the action pane.
There is the entire code ( maybe because i don't explain me correctly)
my Sheet1.vb :
Imports Microsoft.Office.Interop.Excel
Public Class Feuil1
Friend actionsPane1 As New ActionsPaneControl1
Public list As String
Public cell As Range
Private Sub Worksheet_SelectionChange(ByVal Target As Range) Handles Me.SelectionChange
If Target.Column <> 1 Then
If Target.Row = 16 Then
Globals.ThisWorkbook.ActionsPane.Controls.Add(actionsPane1)
Globals.ThisWorkbook.Application.DisplayDocumentActionTaskPane = True
cell = Target
End If
End If
End Sub
End Class
and my actionpanecontrol1.vb :
Public Class ActionsPaneControl1
Friend Button1Click = False
Friend Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim i As Integer
Dim itemChecked As Object
Const barre As String = " / "
For Each itemChecked In CheckedListBox1.CheckedItems
Globals.Feuil1.list = Globals.Feuil1.list + itemChecked.ToString() + barre
Next
' Boucle pour reset la list
For i = 0 To (CheckedListBox1.Items.Count - 1)
CheckedListBox1.SetItemChecked(i, False)
Next
Globals.ThisWorkbook.Application.DisplayDocumentActionTaskPane = False
Button1Click = True
Globals.Feuil1.cell.Value = Globals.Feuil1.list
Globals.Feuil1.list = ""
End Sub
End Class
Thanks a lot for all your reply

Export only visible columns in datagridview to Excel

I'm currently developing a software as required in my OJT. Im trying to export my datagrid to an excel file. the problem is even if i put checkbox to set the visibility of specific column to false and it hides on my datagrid but when the excel file is generated, the columns are still visible. heres my code, and thank you.
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
TabPage1.Enabled = False
TabPage2.Enabled = False
'Form3.Show()'
DATAGRIDVIEW_TO_EXCEL((DataGridView1))
End Sub
'-------------------------------------------------Excel------------------------------------------------'
Private Sub DATAGRIDVIEW_TO_EXCEL(ByVal DGV As DataGridView)
Try
Dim DTB = New DataTable, RWS As Integer, CLS As Integer
For CLS = 0 To DGV.ColumnCount - 1
DTB.Columns.Add(DGV.Columns(CLS).Name.ToString)
Next
Dim DRW As DataRow
For RWS = 0 To DGV.Rows.Count - 1
DRW = DTB.NewRow
For CLS = 0 To DGV.ColumnCount - 1
Try
DRW(DTB.Columns(CLS).ColumnName.ToString) = DGV.Rows(RWS).Cells(CLS).Value.ToString
Catch ex As Exception
End Try
Next
DTB.Rows.Add(DRW)
Next
DTB.AcceptChanges()
Dim DST As New DataSet
DST.Tables.Add(DTB)
Dim FLE As String = "E:\Export\Export.xml"
DTB.WriteXml(FLE)
Dim EXL As String = "C:\Program Files\Microsoft Office\Office15\EXCEL.exe"
Shell(Chr(34) & EXL & Chr(34) & " " & Chr(34) & FLE & Chr(34), vbNormalFocus)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
'------------------------------------------------------Excel--------------------------------------------------------'
End Sub
Here is how i hide my columns
Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged
If CheckBox1.Checked = True Then
Me.GSIS.Visible = False
Else
Me.GSIS.Visible = True
End If
End Sub
Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.CheckedChanged
If CheckBox2.Checked = True Then
Me.PAGIBIG.Visible = False
Else
Me.PAGIBIG.Visible = True
End If
End Sub
Private Sub CheckBox3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox3.CheckedChanged
If CheckBox3.Checked = True Then
Me.PHILHEALTH.Visible = False
Else
Me.PHILHEALTH.Visible = True
End If
End Sub
Private Sub CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox4.CheckedChanged
If CheckBox4.Checked = True Then
Me.SSS.Visible = False
Else
Me.SSS.Visible = True
End If
End Sub
Private Sub CheckBox5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox5.CheckedChanged
If CheckBox5.Checked = True Then
Me.TIN.Visible = False
Else
Me.TIN.Visible = True
End If
End Sub
Private Sub CheckBox6_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox5.CheckedChanged
If CheckBox6.Checked = True Then
Me.AgencyEmployeeNo.Visible = False
Else
Me.AgencyEmployeeNo.Visible = True
End If
End Sub
I would change this:
For CLS = 0 To DGV.ColumnCount - 1
DTB.Columns.Add(DGV.Columns(CLS).Name.ToString)
Next
To something like this:
'For Every Column in the DataGridView
For Each Col as DataGridViewColumn in DGV.Columns
If Checkbox1.checked = True AND Col.Name = GSIS.Name Then
DTB.Columns.Add(Col.Name.ToString)
End If
'If checkbox2 etc etc
Next
The Ideal so you wouldn't have to copy paste so much would be to create a class where you would associate a visibility property for each col and would just check that property in a loop.
/!\ Be Careful /!\
I added Col.Nale = GSIS.Name assuming GSIS was a Column but in your code it may not be the case. So try to understand the code instead of copy pasting.

Motorola Handheld MC55A Development [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 3 years ago.
Improve this question
i have Motorola Handheld MC55A with windows embedded handheld 6.5 and i want to start develop an app to read barcode .I didn't find any reference to do my command
i have installed VS2008 and start to create Smart Device Application with a simple form
Merit who deserve merit: Initially I didn't write the following code, I'm not sure who initially did it, may be was written by symbol developers...I'm not sure, I only have used it.
1- First at all download and install the Motorola EMDK, after that, you will copy the C:\Program Files (x86)\Motorola EMDK for .NET\v2.5\SDK\Smart Devices\Symbol.Barcode.dll file to \My Device\Windows folder in your pocket.
Public Class frmTest
Dim MyReader As Symbol.Barcode.Reader = Nothing
Dim MyReaderData As Symbol.Barcode.ReaderData = Nothing
Dim MyEventHandler As System.EventHandler = Nothing
Dim MyHandlerCB As System.EventHandler = Nothing
Private Sub frmTest_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
InitReader()
End Sub
Protected Overloads Overrides Sub OnClosing(ByVal e As System.ComponentModel.CancelEventArgs)
StopRead()
Me.TermReader()
MyBase.OnClosing(e)
End Sub
Private Function InitReader() As Boolean
' If reader is already present then fail initialize
If Not (Me.MyReader Is Nothing) Then
Return False
End If
'Create new reader, first available reader will be used.
Me.MyReader = New Symbol.Barcode.Reader
'Create reader data
Me.MyReaderData = New Symbol.Barcode.ReaderData( _
Symbol.Barcode.ReaderDataTypes.Text, _
Symbol.Barcode.ReaderDataLengths.DefaultText)
' create event handler delegate
Me.MyEventHandler = New System.EventHandler(AddressOf MyReader_ReadNotify)
'Enable reader, with wait cursor
Me.MyReader.Actions.Enable()
Return True
End Function
Private Sub TermReader()
'If we have a reader
If Not (Me.MyReader Is Nothing) Then
'Disable reader, with wait cursor
Me.MyReader.Actions.Disable()
'free it up
Me.MyReader.Dispose()
' Indicate we no longer have one
Me.MyReader = Nothing
End If
' If we have a reader data
If Not (Me.MyReaderData Is Nothing) Then
'Free it up
Me.MyReaderData.Dispose()
'Indicate we no longer have one
Me.MyReaderData = Nothing
End If
End Sub
Private Sub StartRead()
'If we have both a reader and a reader data
If Not ((Me.MyReader Is Nothing) And (Me.MyReaderData Is Nothing)) Then
'Submit a read
AddHandler MyReader.ReadNotify, Me.MyEventHandler
Me.MyReader.Actions.Read(Me.MyReaderData)
End If
End Sub
Private Sub StopRead()
'If we have a reader
If Not (Me.MyReader Is Nothing) Then
'Flush (Cancel all pending reads)
RemoveHandler MyReader.ReadNotify, Me.MyEventHandler
Me.MyReader.Actions.Flush()
End If
End Sub
Private Sub MyReader_ReadNotify(ByVal o As Object, ByVal e As EventArgs)
Dim TheReaderData As Symbol.Barcode.ReaderData = Me.MyReader.GetNextReaderData()
'If it is a successful read (as opposed to a failed one)
If (TheReaderData.Result = Symbol.Results.SUCCESS) Then
'Handle the data from this read
Me.HandleData(TheReaderData)
'Start the next read
Me.StartRead()
End If
End Sub
Private Sub HandleData(ByVal TheReaderData As Symbol.Barcode.ReaderData)
txtBarCode.Text = TheReaderData.Text
End Sub
Private Sub txtBarCode_GotFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtBarCode.GotFocus
StartRead()
End Sub
Private Sub txtBarCode_LostFocus(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtBarCode.LostFocus
StopRead()
End Sub
End Class
You want to scan barcodes and insert them into textboxes from your app?
Try to enable Data Wedge from Control Panel.

How to write Remote-Control program for mplayer?

I need to create a NPAPI-Browser plugin to control mplayer, I found one way to control mplayer is its slave mode [link], Is there any other better way?
not your question, I know. but VLC has similar levels of codec support, an integrated web interface extensible with lua scripting, and all the fluff you might not want (like the OSD) can be turned off. VLC is also controllable through telnet, and the lua libraries are easily extensible to allow network interfacing or whatever else you might want. I wrote a plugin to allow serial line control.
Found that mplayer slave mode is the only way, ftp://ftp2.mplayerhq.hu/MPlayer/DOCS/tech/slave.txt
I am developing android phone remote control + VB.NET TCP server - mplayer. I am using mplayer in slave mode. I send command from android app to VB.NET TCP server. Then the command will send to mplayer.
I will show some code that control and send the mplayer desired commands, but the server part is not finished yet. The coding is no finished yet but I hope it is useful for you.
Imports System.ComponentModel
Imports System.IO
Imports System.Data.OleDb
Public Class Form1
Private bw As BackgroundWorker = New BackgroundWorker
Dim i As Integer = 0
Dim dbFile As String = Application.StartupPath & "\Data\Songs.accdb"
Public connstring As String = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" & dbFile & "; persist security info=false"
Public conn As New OleDbConnection(connstring)
Dim sw As Stopwatch
Dim ps As Process = Nothing
Dim jpgPs As Process = Nothing
Dim args As String = Nothing
Private Sub bw_DoWork(ByVal sender As Object, ByVal e As DoWorkEventArgs)
Dim worker As BackgroundWorker = CType(sender, BackgroundWorker)
If bw.CancellationPending = True Then
e.Cancel = True
Exit Sub
Else
' Perform a time consuming operation and report progress.
'System.Threading.Thread.Sleep(500)
bw.ReportProgress(i * 10)
Dim dir_info As New DirectoryInfo(TextBox1.Text)
ListFiels("SongList", TextBox2.Text, dir_info)
End If
End Sub
Private Sub bw_RunWorkerCompleted(ByVal sender As Object, ByVal e As RunWorkerCompletedEventArgs)
If e.Cancelled = True Then
Me.tbProgress.Text = "Canceled!"
ElseIf e.Error IsNot Nothing Then
Me.tbProgress.Text = "Error: " & e.Error.Message
Else
Me.tbProgress.Text = "Done!"
End If
End Sub
Private Sub bw_ProgressChanged(ByVal sender As Object, ByVal e As ProgressChangedEventArgs)
Me.tbProgress.Text = e.ProgressPercentage.ToString() & "%"
End Sub
Private Sub Form1_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
Try
ps.Kill()
Catch
Debug.Write("already closed")
End Try
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Windows.Forms.Control.CheckForIllegalCrossThreadCalls = False 'To avoid error from backgroundworker
bw.WorkerReportsProgress = True
bw.WorkerSupportsCancellation = True
AddHandler bw.DoWork, AddressOf bw_DoWork
AddHandler bw.ProgressChanged, AddressOf bw_ProgressChanged
AddHandler bw.RunWorkerCompleted, AddressOf bw_RunWorkerCompleted
funPlayMusic()
End Sub
Private Sub buttonStart_Click(sender As Object, e As EventArgs) Handles buttonStart.Click
If Not bw.IsBusy = True Then
bw.RunWorkerAsync()
End If
End Sub
Private Sub buttonCancel_Click(sender As Object, e As EventArgs) Handles buttonCancel.Click
If bw.WorkerSupportsCancellation = True Then
bw.CancelAsync()
End If
End Sub
Private Sub btnSearch_Click(sender As Object, e As EventArgs) Handles btnSearch.Click
If Not bw.IsBusy = True Then
sw = Stopwatch.StartNew()
bw.RunWorkerAsync()
sw.Stop()
Label1.Text = ": " + sw.Elapsed.TotalMilliseconds.ToString() + " ms"
End If
End Sub
Private Sub ListFiels(ByVal tblName As String, ByVal pattern As String, ByVal dir_info As DirectoryInfo)
i = 0
Dim fs_infos() As FileInfo = Nothing
Try
fs_infos = dir_info.GetFiles(pattern)
Catch ex As Exception
MessageBox.Show(ex.ToString())
End Try
For Each fs_info As FileInfo In fs_infos
i += 1
Label1.Text = i
insertData(tblName, fs_info.FullName)
lstResults.Items.Add(i.ToString() + ":" + fs_info.FullName.ToString())
If i = 1 Then
Playsong(fs_info.FullName.ToString())
Else
i = 0
lstResults.Items.Clear()
End If
Next fs_info
sw.Stop()
Label1.Text = ": " + sw.Elapsed.TotalMilliseconds.ToString() + " ms"
fs_infos = Nothing
Dim subdirs() As DirectoryInfo = dir_info.GetDirectories()
For Each subdir As DirectoryInfo In subdirs
ListFiels(tblName, pattern, subdir)
Next
End Sub
Private Sub insertData(ByVal tableName As String, ByVal foundfile As String)
Try
If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
Dim SqlQuery As String = "INSERT INTO " & tableName & " (SngPath) VALUES (#sng)"
Dim SqlCommand As New OleDbCommand
With SqlCommand
.CommandType = CommandType.Text
.CommandText = SqlQuery
.Connection = conn
.Parameters.AddWithValue("#sng", foundfile)
.ExecuteNonQuery()
End With
conn.Close()
Catch ex As Exception
conn.Close()
MsgBox(ex.Message)
End Try
End Sub
Private Sub btnClearList_Click(sender As Object, e As EventArgs) Handles btnClearList.Click
lstResults.Items.Clear()
End Sub
Private Sub funPlayMusic()
ps = New Process()
ps.StartInfo.FileName = "D:\Music\mplayer.exe "
ps.StartInfo.UseShellExecute = False
ps.StartInfo.RedirectStandardInput = True
jpgPs = New Process()
jpgPs.StartInfo.FileName = "D:\Music\playjpg.bat"
jpgPs.StartInfo.UseShellExecute = False
jpgPs.StartInfo.RedirectStandardInput = True
'ps.StartInfo.CreateNoWindow = True
args = "-fs -noquiet -identify -slave " '
args += "-nomouseinput -sub-fuzziness 1 "
args += " -vo direct3d, -ao dsound "
' -wid will tell MPlayer to show output inisde our panel
' args += " -vo direct3d, -ao dsound -wid ";
' int id = (int)panel1.Handle;
' args += id;
End Sub
Public Function SendCommand(ByVal cmd As String) As Boolean
Try
If ps IsNot Nothing AndAlso ps.HasExited = False Then
ps.StandardInput.Write(cmd + vbLf)
'MessageBox.Show(ps.StandardOutput.ReadToEndAsync.ToString())
Return True
Else
Return False
End If
Catch ex As Exception
Return False
End Try
End Function
Public Sub Playsong(ByVal Songfilelocation As String)
Try
ps.Kill()
Catch
End Try
Try
ps.StartInfo.Arguments = args + " """ + Songfilelocation + """"
ps.Start()
SendCommand("set_property volume " + "80")
Catch e As Exception
MessageBox.Show(e.Message)
End Try
End Sub
Private Sub lstResults_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstResults.SelectedIndexChanged
Playsong(lstResults.SelectedItem.ToString())
End Sub
Private Sub btnPlayJPG_Click(sender As Object, e As EventArgs) Handles btnPlayJPG.Click
Try
' jpgPs.Kill()
Catch
End Try
Try
'ps.StartInfo.Arguments = "–fs –mf fps=5 mf://d:/music/g1/Image00020.jpg –loop 200" '-vo gl_nosw
'jpgPs.Start()
Shell("d:\Music\playjpg.bat")
' SendCommand("set_property volume " + "80")
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
Private Sub btnPlayPause_Click(sender As Object, e As EventArgs) Handles btnPlayPause.Click
SendCommand("pause")
End Sub
Private Sub btnMute_Click(sender As Object, e As EventArgs) Handles btnMute.Click
SendCommand("mute")
End Sub
Private Sub btnKaraoke_Click(sender As Object, e As EventArgs) Handles btnKaraoke.Click
'SendCommand("panscan 0-0 | 1-1")
SendCommand("af_add pan=2:1:1:0:0")
End Sub
Private Sub btnStereo_Click(sender As Object, e As EventArgs) Handles btnStereo.Click
SendCommand("af_add pan=2:0:0:1:1")
End Sub
Private Sub btnStop_Click(sender As Object, e As EventArgs) Handles btnStop.Click
Playsong("d:\music\iot.mp4")
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
'SendCommand("loadfile d:\music\iot.mp4")
'SendCommand("pt_step 1")
End Sub
End Class

Resources