473,804 Members | 3,138 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

GRAPHICS Questions Please help

I have a pnlControl in which I am using as a workspace on which to drag
several pictures and drop them.
These are bitmaps that are no more than 150x150 at the largest. I keep up
with them and their related info in a class. At present no controls are
used for this.

What I need to be able to do and am not sure how:

1.) allow the user to smoothly drag the bitmap around inside this
pnlControl using the mouse.
So far I am using a hittest routine to see if inside it and then in
mouse down if it is left button
'store mouse coord
MousePT = New Point(e.X, e.Y)

then in mouse move I am doing this
myobj.left=(e.X - MousePT.X)

This sort of works but the picture doesn't keep up with the mouse.

HOw can I do this better? Remember I am painting this to the screen
with DrawImage and this is not a control.

2.) How can I offer grid support so that the image will snap in place on
grid points like a commerical app? I am not sure how to implement that.
Anyone have any code?

3.) Any links to graphics sites that would better explain how to do away
with flickering and get quick professional responding graphics would be
nice.

I am not talking large images on screen and probably a maximum of 15 and
most of the time around 1-5 images

Any help appreciated.

THanks,

Shane
Nov 20 '05 #1
0 879

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3230
by: Deepak Gupta | last post by:
Dear sir , I have a problem with my cpp compiler. I have terbo(borland) 3.0 & 4.5 both compiler compiler but compling a graphics.h header file it shows an error that BGI graphics not supported in windows. so what can I do to run these header file programs include graphics.h. Please send me solution. thank you Deepak
4
3363
by: Martin | last post by:
I am using graphics as backgrounds for forms,buttons,labels etc. The question is: is it faster to load all graphics from files on app start or to use it embeded (places in editor during design). Reason for my question is that application has 5mb, while without graphics it has cca 400kb. Graphic files (bmps) take about 200kb (in program, they are repeated many times, ie almost all labels (around 200) have same background image)). Also,...
1
3631
by: DBC User | last post by:
Hi Sharpies, This is a very basic question. I am using .Net IDE 2003 and System.Drawing.dll (1.1.4322). I wrote a simple program like this (ommitting the commons) using System.Drawing; .. ..
7
2583
by: Peter Row | last post by:
Hi, I've started work on my own control some parts of which use standard controls, others I need to draw on my controls surface to get the display output I require, however.... I seem to be stupid or missing the point. I used DrawString( ) as a simple test but I cannot get it to work at all unless I handle my custom controls Paint event.
8
12785
by: pigeonrandle | last post by:
Hi, Please pity me, i am on a dial-up connection for the first time in 5 years :( ! Does anyone know how the resulting Graphics objects differ ...? What i really mean is can someone explain it to me please? A) protected static extern IntPtr GetWindowDC (IntPtr hWnd );
3
1875
by: KiranJyothi | last post by:
Hello everybody, While I am doing the program( pasted below ), I am able to see the frame but not the rectangles. Can anyone please help me to get it done. Thanks in advance. KiranJyothi import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Rectangle; import javax.swing.JPanel;
9
4273
by: she_prog | last post by:
Dear All, I need to save the content of a panel to a bitmap. The panel can have many child controls which also need to be saved. The problem would be solved if I could have the panel saved to a Graphics object, which is the same as if I'd need to print it. It'd be easy using Control.DrawToBitmap, but I also need the invisible part of the panel (which is hidden because of scrolling) and DrawToBitmap just takes a screenshot.
7
10105
by: Brian Ward | last post by:
I am trying to get to grips with some basic graphics, being new to C#. I have this code (see below) in a simple project .. when I run it 6 text strings are drawn, as I expected .. but this happens twice .. once with a grey background and once with the white one. Clearly I am missing something fundamental here. Can anyone please explain. TIA === Brian =====
4
2448
by: AWW | last post by:
XP VB 2005 drawing line graphics in a PictureBox - from a simple minded former FORTRAN programmer. The help examples have the graphics drawing code (lines & rectangles) in the PictureBox paint event handler - making it a static display. But I don't want a static display - I want to draw dynamic data so how do I get the data to the event handler - if I need to do that. I have also done line drawings on the Form but those drawings have an...
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10319
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9144
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7616
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6851
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5520
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4297
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.