Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

VLC .net

 1public void ShortcutEvent(object sender, KeyEventArgs e)
 2{
 3    if (e.KeyCode == Keys.Escape && isFullscreen) // from fullscreen to window
 4    {
 5        this.FormBorderStyle = FormBorderStyle.Sizable; // change form style
 6        this.WindowState = FormWindowState.Normal; // back to normal size
 7        this.Size = oldFormSize;
 8        menuStrip1.Visible = true; // the return of the menu strip 
 9        videoView1.Size = oldVideoSize; // make video the same size as the form
10        videoView1.Location = oldVideoLocation; // remove the offset
11        isFullscreen = false;
12    }
13
14    if (isPlaying) // while the video is playing
15    {
16        if (e.KeyCode == Keys.Space) // Pause and Play
17        {
18            if (_mp.State == VLCState.Playing) // if is playing
19            {
20                _mp.Pause(); // pause
21            }
22            else // it's not playing?
23            {
24                _mp.Play(); // play
25            }
26        }
27
28        if (e.KeyCode == Keys.J) // skip 1% backwards
29        {
30            _mp.Position -= 0.01f;
31        }
32        if (e.KeyCode == Keys.L) // skip 1% forwards
33        {
34            _mp.Position += 0.01f;
35        }
36    }
37}
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to change the color of a sprite in unity 
Csharp :: unity3d remove parent 
Csharp :: c# read binary file 
Csharp :: get 2d rotation from 2 position math 
Csharp :: convert ienumerable to list 
Csharp :: c# sqlite query 
Csharp :: c# write byte[] to stream 
Csharp :: c# datagridview filter textbox 
Csharp :: c# get enum value from string 
Csharp :: asking for user input integer c# 
Csharp :: c# remove special characters from string 
Csharp :: void ontriggerenter not working 
Csharp :: c# declare an int list 
Csharp :: c# integer to bit string 
Csharp :: 2d list in c# 
Csharp :: c# stop process 
Csharp :: two variable in one loop in one line c# 
Csharp :: how to add a variable in unity c# 
Csharp :: c# string replace comma with newline 
Csharp :: c# restclient timeout 
Csharp :: get enum value from display name c# 
Csharp :: if number negative c sharp 
Csharp :: c# list slice 
Csharp :: ienumerable foreach 
Csharp :: unity round float to nearest 10 
Csharp :: flip a character in unity 
Csharp :: string list to object array in c# 
Csharp :: divide string in chunks c# 
Csharp :: unity pause game c# 
Csharp :: c# break from foreach method 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =