Hello,
I have been fighting with it for some time now, but something aint right here. When I press Win+Shift+Escape nothing happens, and something should happen. As far as I know, XOR operator is used to concatenate multiple modifiers. Code below:
using radio42;
using YoutubeExplode;
using YoutubeExplode.Models;
using YoutubeExplode.Models.MediaStreams;
using DavyKager;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using Un4seen.Bass;
namespace InviTube
{
public partial class WND_Prefs : Form
{
[DllImport("user32.dll")]
public static extern bool RegisterHotKey(IntPtr hWnd, int id, int fsModifiers, int vlc);
#region Constants
private const string EMail = "";
private const string RegistrationKey = "";
private const int InviModifier = (int)Keys.LWin |(int)Keys.LShiftKey;
#endregion
public WND_Prefs()
{
InitializeComponent();
BassNet.Registration(EMail, RegistrationKey);
RegisterHotKey(this.Handle, (int)KeyboardShortcuts.ExitApplication, InviModifier, (int)Keys.Escape);
this.Hide();
}
protected override void WndProc(ref Message m)
{
if (m.Msg == 0x0312)
{
int id = m.WParam.ToInt32();
switch (id)
{
case (int)KeyboardShortcuts.ExitApplication:
MessageBox.Show("Koty!");
break;
default:
break;
}
}
base.WndProc(ref m);
}
}
}
Telegram: Nuno69a
E-Mail: nuno69a (at) gmail (dot) com