.BackStyle缺失 [英] .BackStyle Missing

查看:65
本文介绍了.BackStyle缺失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个项目我正在努力在某些情况下禁止在表单上进行编辑。为了避免操作员混淆,我想改变表单的外观,以便在两种模式之间视觉上不同。如果你愿意,还有一种视觉线索。


我开发了以下代码,但我发现这不会编译(令我惊讶):

I have a project I''m working on where I want to disable editing on a form in certain circumstances. To avoid confusing the operator, I would like to change the appearance of the form so that is visually different between the two modes. A sort of visual clue if you like.

I developed the following code, but I find that this won''t compile (to my surprise) :

展开 | 选择 | Wrap | 行号

推荐答案

您好,NeoPa。


您的代码调用当前表单的BackStyle属性。

编译器知道,因为它知道Me对象的类型。
Hi, NeoPa.

Your code invoke BackStyle property of current form.
Compiler knows that since it knows type of Me object.


为什么不改变形式'.BackColor?我使用3种颜色1)视图,2)编辑,3)新增/添加以提供这种视觉线索。如果表单被过滤,我会使用另一组3种颜色,以避免因找不到已知存在的记录而感到沮丧。
Why not change the form''s .BackColor ? I use 3 colors 1)View, 2)Edit, 3)New/Adding to provide this visual clue. I use another set of 3 colors if form is filtered, to avoid frustration of not finding a record that is known to exist.


@FishVal


它似乎踢自己今天是一个反复出现的主题:(


至少它让我看看为什么Form对象没有这样的属性(我预期它应该)。事实证明,表单的各个部分(Header; Detail; Footer;等)具有属性(如果 - 在我的情况下,它们总是设置相同的,它显示表单的颜色)。


谢谢你是一双可靠的眼睛鱼:))
@FishVal
It seems kicking myself is a recurring theme today :(

At least it got me to look at why the Form object doesn''t have such a property (I expected it should). It turns out that the various sections of the form (Header; Detail; Footer; etc) have the property (which shows the colour of the form if - as in my case - they are always set the same).

Thanks for being a reliable pair of eyes Fish :)


这篇关于.BackStyle缺失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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