Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

MousePosition - Window Location

Featured Replies

I'm using Visual C++ 2008 and am trying to create a context menu when clicking on a button, i have managed to get the context menu to show when the button is clicked however it appears offset to the window the same amount that the window is form the top left of the screen.

I'm going to be reusing the code for various other buttons so do not want to use any button specific names in the code. i know i can get it appearing where i want it if i could subtract the values of this->Location from this->MousePosition but have been unable to get the specific X and Y values from them , and cannot find any decent info on Point's so i can convert them to integers.

private: System::Void button_Click(System::Object^  sender, System::EventArgs^  e) {
contextMenuPCOptions->Show(this, this->MousePosition);
}

Any Help would be appreciated, thanks.

Edited by Cyber Axe


  • Author

I managed to figure out how to get the X and Y values though i now have the problem of that it seems to be offset to the curser the same amount as the width of the window border and the height of the window top border

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.