由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
DotNet版 - Help , a entry level question about C#
相关主题
那位VB.NET 的大侠帮个忙。(zuan)Bill Gates' New Year's Resolutions (转载)
web chart的选择?Excel 加 button 的途径及其优缺点
PicutureBox and GIFUpdate code when screen resolution is changed
新手举手提问NUNIT and NUNIT add-in
Windows, freeBSD, Mac OS X support CLI.Net IDE - 总结网址
如何让Razor view engine可以渲染htm/html文件Re: 今天买下了Visual Studio .net professional
如何从memory里提出image?安装问题:framework1.0 & 1.1共存?
问个问题Visual Studio.net is buggy.
相关话题的讨论汇总
话题: c#话题: gdi话题: form话题: line话题: resolution
进入DotNet版参与讨论
1 (共1页)
o*l
发帖数: 3022
1
in Visual C#, in a windows form application
how to draw a line or a box on the form a
except usd GDI+
thanks
a*****i
发帖数: 215
2
use a label control and set its properties to achieve desired effects.
for example, if you need line, set its Height to 1.

【在 o*l 的大作中提到】
: in Visual C#, in a windows form application
: how to draw a line or a box on the form a
: except usd GDI+
: thanks

r****y
发帖数: 26819
3
That's an ugly way even if it works.

【在 a*****i 的大作中提到】
: use a label control and set its properties to achieve desired effects.
: for example, if you need line, set its Height to 1.

a*****i
发帖数: 215
4
but he doesn't want to use GDI+?
and i think it's not ugly. it's actually recommended
in a book on user interface design with vb.net if my
memory serves me well. previous versions of vb used
to have a line control, but it's no longer supported in vb.net.

【在 r****y 的大作中提到】
: That's an ugly way even if it works.
r****y
发帖数: 26819
5
I think an easy way is to use PictureBox, and you can easily generate a
picture of a line or a box or 4 lines to form a box of any size using pic
editing software.
An advantage is: you can use png/emf file type. Resolution can be quite good.

【在 a*****i 的大作中提到】
: but he doesn't want to use GDI+?
: and i think it's not ugly. it's actually recommended
: in a book on user interface design with vb.net if my
: memory serves me well. previous versions of vb used
: to have a line control, but it's no longer supported in vb.net.

a*****i
发帖数: 215
6
oh, i was talking about the single line only.
yeah, u can use other controls also. but i
would prefer setting border style property
instead of using custom pix to achieve the
same effects. it sounds like an easier and
more consistent solution to me.
if u use custom pix, u'd have to store them
as embedded resources if u don't wanna see
them scattered around, and their resolution
might be degraded when the form is resized.
i don't think resolution is a big concern
for simple cases by the way. stoc

【在 r****y 的大作中提到】
: I think an easy way is to use PictureBox, and you can easily generate a
: picture of a line or a box or 4 lines to form a box of any size using pic
: editing software.
: An advantage is: you can use png/emf file type. Resolution can be quite good.

r****y
发帖数: 26819
7
如果想画虚线,点划线,双线,弧线拐角的开口框等等,怎么用这个方法并且consistent?

【在 a*****i 的大作中提到】
: oh, i was talking about the single line only.
: yeah, u can use other controls also. but i
: would prefer setting border style property
: instead of using custom pix to achieve the
: same effects. it sounds like an easier and
: more consistent solution to me.
: if u use custom pix, u'd have to store them
: as embedded resources if u don't wanna see
: them scattered around, and their resolution
: might be degraded when the form is resized.

a*****i
发帖数: 215
8
better resort to GDI+ for those.
not much harder than hand-drawing and a lot more flexible..:D

【在 r****y 的大作中提到】
: 如果想画虚线,点划线,双线,弧线拐角的开口框等等,怎么用这个方法并且consistent?
r****y
发帖数: 26819
9
GDI+当然可以了。
我只是想知道你的height=1的方法为什么叫做consistent。--如果只能用于single
line的话。

【在 a*****i 的大作中提到】
: better resort to GDI+ for those.
: not much harder than hand-drawing and a lot more flexible..:D

a*****i
发帖数: 215
10
ft, that's for solid single lines only. and it's an example solution
for that particular case. for boxes with solid sides, i would suggest
setting border style to fixed single. that's easy and good enough. of
coz the approach doesn't help in cases when you need other types of
lines or other shapes. but i don't know how you would resolve the
resolution issue with custom pix when the form needs to be resized.
maybe there's some workaround, but i haven't worked a lot on that before.
by consistent i

【在 r****y 的大作中提到】
: GDI+当然可以了。
: 我只是想知道你的height=1的方法为什么叫做consistent。--如果只能用于single
: line的话。

1 (共1页)
进入DotNet版参与讨论
相关主题
Visual Studio.net is buggy.Windows, freeBSD, Mac OS X support CLI
混合语言编程如何让Razor view engine可以渲染htm/html文件
.Text 简易安装如何从memory里提出image?
how to generate table in visual C#问个问题
那位VB.NET 的大侠帮个忙。(zuan)Bill Gates' New Year's Resolutions (转载)
web chart的选择?Excel 加 button 的途径及其优缺点
PicutureBox and GIFUpdate code when screen resolution is changed
新手举手提问NUNIT and NUNIT add-in
相关话题的讨论汇总
话题: c#话题: gdi话题: form话题: line话题: resolution