void _hook_KeyPressed(object sender, KeyPressedEventArgs e) { if (e.Modifier == miranda.ModifierKeys.Win) { timer1.Enabled = !timer1.Enabled; if (timer1.Enabled) { StartTrade(); } else { StopTrade(); } } }
private void _hook_KeyPressed(object sender, KeyPressedEventArgs e) { if (e.Modifier == miranda.ModifierKeys.Shift) { var handle = WinApi.WindowFromPoint(Cursor.Position); WinApi.RECT rect; WinApi.GetWindowRect(handle, out rect); lblTableWindow.Text = "Handle " + handle.ToString() + "; WindowPoint = " + rect.Left + ", " + rect.Top; _settings.WindowPoint = new Point((int)rect.Left, (int)rect.Top); AppSettingsManager.Save(_settings); DrawRect(rect); } }