473,320 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Cursor and Picture Box

Hello,

I am trying to create a sniper game in visual basic. What i am trying to do is to make the cursor be in the middle of the cross hair at all times. and where ever the cursor moves that is where the scope goes. The picture box is transparent and the background of the scope is black. Its like sniping in call of duty. Someone please help me to make the cursor be in the middle of the cross hair please!
May 13 '10 #1
2 2060
vb5prgrmr
305 Expert 100+
The easiest way would be to...
Expand|Select|Wrap|Line Numbers
  1. Option Explicit
  2.  
  3. Private Sub Form_Load()
  4. Me.MousePointer = vbCrosshair
  5. End Sub
  6.  
If you want a larger crosshair, then you will need to set mousepointer equal to vbCustom and use loadpicture to load your own custom made graphic into the MouseIcon property...



Good Luck
May 14 '10 #2
Guido Geurs
767 Expert 512MB
@MarcosGalarza
dear,

There is also a call from you = "PictureBox And MousePosition" in which I explain how to create a cross-hair with a self-made control.

I have tried it with a picturebox.
Maybe its my computer (P4 2.6) (not a game computer ! ) but the screen refresh is to slow with a picturebox !?.

If You want to try it with a picturebox, use the same technique = make a picture in a picturebox ( 2x the size of your application ) and use mousemove like in may attachment.

br,
May 14 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: S.W. Rasmussen | last post by:
A trivial (?) question: does anyone know how to change the shape of the cursor in a RichTextBox control from the normal vertical line to an underscore?
3
by: Steen Gellett | last post by:
Hey...........is it possible to move a picture around the form with the mouse ? I have a form with one picture on it........when I hold down the mouse I would like the picture to follow the...
12
by: who be dat? | last post by:
I'm trying to make a webpage do the following: I want a user to be able to click on a given image (there will be more than one image). Upon clicking a given image, characters specific to that...
7
by: Egor Shipovalov | last post by:
I'm implementing paging through search results using cursors. Is there a better way to know total number of rows under a cursor than running a separate COUNT(*) query? I think PostgreSQL is bound...
1
by: objectref | last post by:
Hi to all, we have the MousePosition property that we can get the Point of the position of the mouse cursor on the screen, but is it there a way to get the respective Point of a cursor in a...
4
by: mphanke | last post by:
Hi, I have a snippet which makes me go mad! The clip region of the Cursor is set correctly, but I can't reset it anymore afterwards! This really drives me nuts, because I don't understand...
4
by: Marty Cruise | last post by:
Does anyone know of an wait-type cursor that can show text beside the hourglass? I'd like to display status messages beside the hourglass while not allowing the user to click anything...
5
by: Paul Cheetham | last post by:
Hi, I have some custom colour cursors which I have added to my c# project, and set them to be compiled as "Embedded Resource" It seems impossible to load a colour cursor using the standard...
6
by: nickybon | last post by:
Hi fellas, Im setting up a form in my Access project and I need to implement this rather special fucntion. This function is basically simple to understand but I really dont know how to create...
1
by: Phil Stanton | last post by:
Is there any way of stopping the cursor jumping to a point roughly in the middle of the screen when loading a new picture into an Image Control. The picture is linked and pulled from an external...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.