473,785 Members | 2,209 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DirectDraw & PictureBox

Hello.

I want to render in a picturebox (pbD3DSurface) using DirectDraw. This is
working more or less but the coordinates are always screen oriented and not
pictureBox oriented.

x = 10; //+this.Location. X+this.pbD3DSur face.Location.X ;
y = 10; //+this.pbD3DSurf ace.Location.Y+ this.Location.Y ;
back.DrawCircle (x, y, 5); //back = surface

So the little circle is always rendered at the top left of the screen and
not at the top left of the pictureBox.
Trying to add the pictureBox offset is somehow not working!

Is there a way to tell DirectX that the coordinate origin is the upper left
corner from the pictureBox?
And can someone explain me why the offset calculation is wrong/ not working?

Thanks a lot in advance,
Tim.
Nov 16 '05 #1
0 1954

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

Similar topics

0
279
by: Mark Stokes | last post by:
Hi there, I wanted a bit of advice on a program (a prototype) that I am trying to write that uses threads. I will outline what I am attempting to do, and if anyone has any advice on the way I am trying to work I would be most grateful. I am writing a windows forms application. This application defines a class, lets call this myObject. I instanciate objects of this class and store the myObjects in an ArrayList.
4
28197
by: Ed Landau | last post by:
In VB6.0, I can put an image on a form and assign it's .picture property at run-time. In VBA (within MS Access), when I put down an image control on a form, it asks me for the source to the image (at design-time). Why? Why can't I find PictureBox in VBA within MS Access? And most importantly...why can't I put either in a Report within MS Access? What I really want is to be able to display pictures in an MS Access report (pictures...
6
9076
by: Tim Bücker | last post by:
Hello. What is the best to use? DirectDraw from DirectX 7.0 or Direct3D from DirectX 8.0 when the only thing one wants to do is to draw bitmaps fast on the screen in fullscreen mode. I think DirectX 9.0 is not a topic in C# right now when one wants to have fast access to DirectX as the type libraries for visual basic that can be used in c# only exist in DirectX7 and DirectX8, correct? Searching the net I didn´t find really useful...
0
1293
by: Tim Bücker | last post by:
Hello. I am using the namespace Microsoft.DirectX.DirectDraw. How is it possible to create a surface from - a System.Drawing.Image object (or System.Drawing.Bitmap object) - an image that belongs to a PictureBox (PictureBox.Image) Has anybody a hint for me? Thanks a lot for help.
6
8121
by: Tyson Ackland | last post by:
Is there a good site folks know of that leads a beginner through DirectDraw using VB.NET? TyBreaker
8
2401
by: Lou | last post by:
I have a picture box with an image loaded into it from an Image list (Its a solid Black Image). Next I draw some lines into the picture box. The resulting image with the lines is NOT the return value of PictureBox1.Image???? In the exapmle below control "D" shows only the picture(Black Image) without the lines I added using the brush? The Picturebox shows the lines nicely but the lines don't seem to be part of the controls "Inage"...
1
1426
by: The Confessor | last post by:
(ellipses in place of code sections which do not deviate from defaults) Private Sub Form_Main_Load(...) Handles MyBase.Load For A = 0 To 16 For B = 0 To 14 PictureBox_MapEditor_Map.CreateGraphics.DrawImage (System.Drawing.Image.FromFile("C:\The RPG Project\Test 2.bmp"), A * 40, B * 40) Next Next
3
4108
by: cbbibleboy | last post by:
Howdy! I'm having a bit of trouble with my DirectDraw clipper. The code compiles fine and runs without a hitch; however, it doesn't work. That is, there is no clipping! I get the exact same behavior as when I have no clipper used. It's all very mysterious as I've compared my code with dozens of others' that work, yet I can't find any differences in mine. I've tried to reduce my relevant code to as little as possible. Here is the function...
1
3923
by: id86 | last post by:
Hello everybody! I've a problem with MouseMove event in a C# project using Visual Studio 2005. This is my situation: there is a PictureBox (bigger than the panel in which it is) and I want that, when the user moves his mouse over some sensible areas (that are other invisible small PictureBox), the cursor has to become a hand. In order to realize it, I wrote this code: private void stradario_MouseMove(object sender, MouseEventArgs...
0
9483
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,...
0
10346
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10157
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7504
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
6742
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
5386
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
5514
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4055
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
2
3658
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.