全屏图片框图形 [英] Fullscreen picturebox graphics

查看:59
本文介绍了全屏图片框图形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨.我正在处理我的应用程序(双线性图像变形器)必须全屏运行的情况.我正在使用c ++图形来渲染图片框内的位图(例如,使图形^ g = picturebox1-> CreateGraphics();只是为了清楚起见).我要实现的是使Picturebox完全没有Windows托盘或其他任何东西,而只是picturebox.希望有一种方法我知道这个渲染器不是一个好主意,但是由于截止日期的问题,没有时间研究一些适当的DirectDraw或OpenGL方法.

计划B将创建一个新的窗体,不添加边框样式,最大程度地包含一个与窗体相同的宽度和高度的图片框,但这样仍可以看到Windows托盘,这对我来说不是很好.但是,这是紧急解决方案的情况"

Hi. I am dealing with a situation where my application (bi-linear image warper) have to run fullscreen. I am using c++ graphics to render bitmaps inside a picturebox(e.g. Graphics ^g=picturebox1->CreateGraphics(); just to make it clear ). What i want to achieve is make that picturebox fullsreen no windows tray or any other stuff just picturebox. Hope there is a way i know that this renderer is bad idea but because of deadline issues a dont have time to study some proper directdraw or opengl method.

Plan B would be to create a new form ,border style none ,maximized containing one picturebox with same width and height as the form but that way windows tray is still visible and that is not very good for me. However it a "case of emergency solution"

推荐答案

Google找到了^ ].
Google found this nice article[^].


非常感谢.几秒钟前,我尝试了此操作:

Great thanks man. Just seconds ago i tried this:

Form^ form = gcnew Form();
form->WindowState=System::Windows::Forms::FormWindowState::Maximized;
form->FormBorderStyle=System::Windows::Forms::FormBorderStyle::None;
System::Windows::Forms::PictureBox ^picb=gcnew PictureBox();
picb->Width=form->Width;
picb->Height=form->Height;
picb->Location=Point(0,0);
picb->BorderStyle=BorderStyle::None;

picb->BackgroundImage=bitmap2;
form->Controls->Add(picb);
form->Show();



而且看起来可以解决问题.但是这样做仍然有些混乱……



and it looks that it will do the trick. But still its a bit messy way to do that ...


这篇关于全屏图片框图形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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