在我的表格上画一幅图像 [英] Draw an Image on my Form

查看:60
本文介绍了在我的表格上画一幅图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我有一个继承的DataGrid,它可以做很多额外的事情。例如

在每个单元格中绘制backgroundimage。问题是它花了太多时间(使用gdi +),所以我想用DirectX来做。我已经下载了

已经是DSK等了,但我找不到如何在给定的

位置上绘制图像。我不需要写东西来编写高级3D游戏,只需要绘制

图像。任何人都可以帮我吗?我已经在寻找整个

下午: - /


我已经知道我不应该使用DirectDraw(不再支持)

但Direct3D?但那真的是我所知道的全部。


基本上我需要能够在一个表格中绘制一个imahe(jpg,bitmap)

VB.NET:尽可能简单快速.. :-)


提前多多谢谢,


Pieter

Hi,

I have an inherited DataGrid, that does lots of extra stuff. For exemple
drawing a backgroundimage in every cell. The problem is that it''s taking too
much time (using gdi+), so I want to do it using DirectX. I downloaded
already the DSK etc, but I can''t find how I need to draw an image on a given
position. I don''t need stuff to write advanced 3D-games, just painting that
image. Can anybody help me with this? I''m already looking for this the whole
afternoon :-/

I learned already that I shouldn''t use DirectDraw (not supported anymore)
but Direct3D? But that''s really all I know yet.

Basicly I jsut need to be able to draw an imahe (jpg, bitmap) on a Form in
VB.NET: as simple and as fast as possible.. :-)

Thanks a lot in advance,

Pieter

推荐答案

你有没有时间找出问题所在?如果你重复绘制整个(更新的)东西,DirectX更有可能获得帮助。这里你只需要

就可以在有其他类型的互动之前画一次。


在切换到一个全新的方法之前我会调查(在特别是我

会及时)当前代码找出花费时间预算的地方......


(下次再次感谢你试图缩小范围你支付给b
的团体。

-

Patrice


" DraguVaso" ; < PI ********** @ hotmail.com> aécritdansle message de

news:ek ************** @ TK2MSFTNGP09.phx.gbl ...
Have you timed to find out what the problem is ? DirectX would more likely
help if you repeateadly draw the whole (updated) thing. Here you just have
to draw this one time before there is some other kind of interaction.

Before switching to a whole new method I would investigate (in particular I
would time) the current code to find out where is spent the time budget...

(and next time thanks for trying to narrow down the groups to which you
posts).
--
Patrice

"DraguVaso" <pi**********@hotmail.com> a écrit dans le message de
news:ek**************@TK2MSFTNGP09.phx.gbl...


我有一个继承的DataGrid,它可以做很多额外的事情。例如,在每个单元格中绘制背景图像。问题是它需要花费
太多时间(使用gdi +),所以我想用DirectX来做。我已经下载了已经DSK等,但我找不到如何在
给定位置上绘制图像。我不需要东西来编写高级3D游戏,只需要绘制
那个图像。任何人都可以帮我吗?我已经整整一个下午都在寻找
了: - /

我已经知道我不应该使用DirectDraw(不再支持)
但Direct3D?但那真的是我所知道的。

基本上我需要能够在VB.NET的窗体上绘制一个imahe(jpg,bitmap):简单而且尽可能快.. :-)

非常感谢,

Pieter
Hi,

I have an inherited DataGrid, that does lots of extra stuff. For exemple
drawing a backgroundimage in every cell. The problem is that it''s taking too much time (using gdi+), so I want to do it using DirectX. I downloaded
already the DSK etc, but I can''t find how I need to draw an image on a given position. I don''t need stuff to write advanced 3D-games, just painting that image. Can anybody help me with this? I''m already looking for this the whole afternoon :-/

I learned already that I shouldn''t use DirectDraw (not supported anymore)
but Direct3D? But that''s really all I know yet.

Basicly I jsut need to be able to draw an imahe (jpg, bitmap) on a Form in
VB.NET: as simple and as fast as possible.. :-)

Thanks a lot in advance,

Pieter



嗯,这正是让我决定使用DirectX的原因:每个单元格

它必须绘制一个图像,这必须发生在我的每一个画面上/>
datagrid。所以每个人都会滚动,点击它等等我定时了,并且

它需要我整个申请的大部分时间(在使用我的应用程序之后

几秒钟它已经画了相同的兴趣已经更多了很多4000

次......)!我试图让它在过去的几天里变得更快,而且已经很多了,但是我看到我现在唯一可以改进的是使用

DirectX。 ..

" Patrice" <无**** @ nowhere.com>在消息中写道

新闻:eR ************** @ tk2msftngp13.phx.gbl ...
Well that''s exactly what made me decide which to use DirectX: for every cell
it has to paint an image, and this has to happen on every paint of my
datagrid. So everytilme somebody scrolls, clicks in it, etc. I timed it, and
it takes the most time of my whole application (after using my application
for some seconds it has painted the same hing already more tahn 4000
times...) ! I''m trying to make it faster tha past days, and imrpoved it
already a lot, but I saw the only improvement i can make now is using
DirectX...
"Patrice" <no****@nowhere.com> wrote in message
news:eR**************@tk2msftngp13.phx.gbl...
你有没有时间找到出了什么问题?如果你重复绘制整个(更新的)东西,DirectX更有可能提供帮助。在这里,你只需花一两倍的时间就可以得到一些其他类型的互动。

在切换到一个全新的方法之前我会调查(特别是
我会时间)目前的代码,以找出花费时间预算的地方......

(下次再次感谢你试图缩小你发布的群组)。
-
Patrice

DraguVaso < PI ********** @ hotmail.com> écritdansle message de
新闻:ek ************** @ TK2MSFTNGP09.phx.gbl ...
Have you timed to find out what the problem is ? DirectX would more likely
help if you repeateadly draw the whole (updated) thing. Here you just have to draw this one time before there is some other kind of interaction.

Before switching to a whole new method I would investigate (in particular I would time) the current code to find out where is spent the time budget...

(and next time thanks for trying to narrow down the groups to which you
posts).
--
Patrice

"DraguVaso" <pi**********@hotmail.com> a écrit dans le message de
news:ek**************@TK2MSFTNGP09.phx.gbl...


我有一个继承的DataGrid,它可以做很多额外的事情。例如,在每个单元格中绘制背景图像。问题是它正在
Hi,

I have an inherited DataGrid, that does lots of extra stuff. For exemple
drawing a backgroundimage in every cell. The problem is that it''s taking


很多时间(使用gdi +),所以我想用DirectX来做。我已经下载了已经DSK等,但是我找不到如何在
much time (using gdi+), so I want to do it using DirectX. I downloaded
already the DSK etc, but I can''t find how I need to draw an image on a
位置的


上绘制图像。我不需要写东西来编写高级3D游戏,只需要绘制

position. I don''t need stuff to write advanced 3D-games, just painting


image。任何人都可以帮我吗?我已经在寻找
image. Can anybody help me with this? I''m already looking for this the


整个

下午: - /

我已经知道我不应该使用DirectDraw(不支持
了)但Direct3D?但那真的是我所知道的。

基本上我需要能够在VB.NET中的Form
上绘制一个imahe(jpg,bitmap):简单而且尽可能快.. :-)

非常感谢,

Pieter
afternoon :-/

I learned already that I shouldn''t use DirectDraw (not supported anymore) but Direct3D? But that''s really all I know yet.

Basicly I jsut need to be able to draw an imahe (jpg, bitmap) on a Form in VB.NET: as simple and as fast as possible.. :-)

Thanks a lot in advance,

Pieter




如果你切换到DX,你将需要在DX中重新实现你的数据网格和

绘制所有数据,等等.DX和GDI是非常非常不同。

" DraguVaso" < PI ********** @ hotmail.com>在消息中写道

新闻:ey ************** @ TK2MSFTNGP10.phx.gbl ...
If you switch to DX, you will need to re-implement your datagrid in DX and
paint all the data, etc. DX and GDI are very, very different.
"DraguVaso" <pi**********@hotmail.com> wrote in message
news:ey**************@TK2MSFTNGP10.phx.gbl...
那就是'究竟是什么让我决定使用DirectX:对于每个
单元格它必须绘制一个图像,这必须发生在我的
数据网格的每一个颜色上。因此,每个人都会滚动,点击它等等。我计时,

它需要我整个应用程序的大部分时间(在使用我的应用程序之后
几秒钟它已经绘制了相同的已经更多了4000次
次...)!我试图让它在过去的几天里变得更快,而且已经很多了,但我看到我现在可以做的唯一改进就是使用
DirectX ......

Patrice <无**** @ nowhere.com>在消息中写道
新闻:eR ************** @ tk2msftngp13.phx.gbl ...
Well that''s exactly what made me decide which to use DirectX: for every
cell
it has to paint an image, and this has to happen on every paint of my
datagrid. So everytilme somebody scrolls, clicks in it, etc. I timed it,
and
it takes the most time of my whole application (after using my application
for some seconds it has painted the same hing already more tahn 4000
times...) ! I''m trying to make it faster tha past days, and imrpoved it
already a lot, but I saw the only improvement i can make now is using
DirectX...
"Patrice" <no****@nowhere.com> wrote in message
news:eR**************@tk2msftngp13.phx.gbl...
你有没有时间找出问题所在是吗?如果你重复绘制整个(更新的)东西,DirectX可能会更有帮助。在这里你只需
Have you timed to find out what the problem is ? DirectX would more
likely
help if you repeateadly draw the whole (updated) thing. Here you just


在有其他类型的互动之前画一次。

在切换到一个全新的方法之前我会调查(特别是
to draw this one time before there is some other kind of interaction.

Before switching to a whole new method I would investigate (in particular


会及时)当前代码找出花费时间的地方
预算......

(下次再次感谢你试图缩小你发布的群组的范围)。
-
Patrice

DraguVaso < PI ********** @ hotmail.com> écritdansle message de
新闻:ek ************** @ TK2MSFTNGP09.phx.gbl ...
would time) the current code to find out where is spent the time
budget...

(and next time thanks for trying to narrow down the groups to which you
posts).
--
Patrice

"DraguVaso" <pi**********@hotmail.com> a écrit dans le message de
news:ek**************@TK2MSFTNGP09.phx.gbl...
>
>
>我有一个继承的DataGrid,它做了很多额外的东西。对于
>例如
>在每个单元格中绘制backgroundimage。问题是它是
>同时
> Hi,
>
> I have an inherited DataGrid, that does lots of extra stuff. For
> exemple
> drawing a backgroundimage in every cell. The problem is that it''s
> taking


>很多时间(使用gdi +),所以我想用DirectX来做。我下载了
>已经是DSK等了,但我找不到如何在
> much time (using gdi+), so I want to do it using DirectX. I downloaded
> already the DSK etc, but I can''t find how I need to draw an image on a

上绘制图像
给出


given

>位置。我不需要写东西来编写高级3D游戏,只需要绘制
> position. I don''t need stuff to write advanced 3D-games, just painting


>图片。任何人都可以帮我吗?我已经在寻找
> image. Can anybody help me with this? I''m already looking for this the


整个

>下午: - /
>
>我已经知道我不应该使用DirectDraw(不再支持)>但Direct3D?但那就是我所知道的全部。
>
>基本上我需要能够在>中的表格上绘制一个imahe(jpg,bitmap)。 VB.NET:尽可能简单快速.. :-)
>
>非常感谢,
>
> Pieter
>
>
> afternoon :-/
>
> I learned already that I shouldn''t use DirectDraw (not supported anymore) > but Direct3D? But that''s really all I know yet.
>
> Basicly I jsut need to be able to draw an imahe (jpg, bitmap) on a Form in > VB.NET: as simple and as fast as possible.. :-)
>
> Thanks a lot in advance,
>
> Pieter
>
>





这篇关于在我的表格上画一幅图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆