Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6709777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:55:20+00:00 2026-05-26T07:55:20+00:00

I’m creating a GUI that has 1 to many OpenGL view forms. Now the

  • 0

I’m creating a GUI that has 1 to many OpenGL view forms. Now the basics are working, I have a list of Viewer Forms and each encapsulates an OpenTK.GLControl member in its designer class.

I need to get the actual cursor position in the window that I drag an icon onto so that when I release left click, it drops it into the GL window at that location. This is simplified from what it actually needs to do but just as a first step, once this can happen, the rest will come easily.

Now when I use GLControl.MousePosition.X, GLControl.MousePosition.Y to get the cursor position, it actual gives me the screen position, rather than the position in the window. Unfortunately this isn’t particularly useful for what I need to do.

I have looked at OpenTK.GameWindow.Mouse and this seems to work really well in my little test projects. It get’s the exact position of the cursor in the window. However, I can’t use the gamewindow in this project because gamewindow doesn’t have some of the more GUI form friendly things that GLcontrol has such as Dock, TabIndex, Paint and other GUI related members. (or at least I can’t seem to find any way for GameWindow to support them anyway, do let me know if I’m wrong)

So what I’m really asking is, does anybody have a really nice/simple way for me to get the window position of the cursor in a form using OpenTK.GLControl

In fact, even if it’s tricky please let me know 🙂 I just need to be able to do it!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T07:55:21+00:00Added an answer on May 26, 2026 at 7:55 am

    Your problem lies outside the scope of OpenGL which only deals with drawing stuff amd OpenTK which glues OpenGL to .net. It’s a problem of Windows Forms. Windows Forms has a class Control with a method →PointToClient which you can use to transform from screen to client coordinates. If using OpenTK with GTK there is similar for GLWidget/Widget classes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I have an MVC Razor view @{ ViewBag.Title = Index; var c = (char)146;
I'm working with an upstream system that sometimes sends me text destined for HTML/XML

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.