问题标签 [createparams]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
c# - C# 面板闪烁。当我尝试 CreateParams 时,情况更糟
标题几乎说明了这一点。我的表单中有一个面板。我在面板中有很多相互反弹的形状。我拥有的形状越多,闪烁就越严重。在此站点上搜索了一段时间后,我将其添加到构造函数中
然后我发现我也应该添加这个
在我添加这个之后,屏幕闪烁得更糟了。甚至说它闪烁也不公平。大多数时候它只是空白,每隔一段时间,形状就会短暂闪烁。我绘制形状的代码如下所示。
编辑:
我不知道为什么我不能让最后一点代码看起来正确。对于那个很抱歉。我只是刷新面板然后循环遍历矩形数组并将它们绘制到面板
c# - bitwise meaning in createparams class
I'm trying to understand the meaning of each bit in the createparams class. i tried to find any information about it, even in msdn web site, but nowhere explains the meaning for the bits. Does someone has any idea?
c# - 在自定义 ListView 中覆盖 CreateParams 没有效果?
我知道Properties
ListView 可以更改常用样式,但我只想测试一下。例如,View = View.LargeIcon
将样式LVS_ICON = 0
应用于ListView
或GridLines = true
将样式LVS_EX_GRIDLINES = 1
应用于ListView
。我想用CreateParams
. 我认为使用GetWindowLong
和SetWindowLong
Win32 函数就可以了,但据我所知,为了方便起见,CreateParams
可以更改控件的样式。但是这次用 a ListView
,我不能让它工作,它根本没有效果,不知道ListView
是不是一个特例?这是我的代码:
只会产生一些效果,但LVS_EX_GRIDLINES = 1
效果不是。这很奇怪,大多数其他应用都没有效果。Grid lines are drawn on the ListView
Border becomes thicker and looks like 3D-border
你能解释一下,或者至少给我一些有效的例子吗?再次请不要给我任何使用GetWindowLong
and的解决方案或代码SetWindowLong
,只需使用CreateParams
.
谢谢!
.net - CreateParams() property shows default icon on inherited form
The Task
I manage a big application that is based on a main MDI form. All other forms are children of this MDI form or dialogs of the children. As it is a big application, opening and closing the child windows causes some flickering in the whole application. I was tasked to remove this flickering effect as it looks untidy. My main thought was to make all child windows inherit a "Master" form that would deal with all the commonplace functionality that all forms had to include. From here, I could fix any problems in this one central point which would make managing the application much easier.
The Problem
To resolve the flickering, I found a solution on the web that solves my problem. However, not long ago I found that this also introduced a new problem on the "Master" form where if any form had its "ShowIcon" property to false, the "Master" form would force it to be the default visual studio form icon. I narrowed this down to the anti-flicker solution I found on the web (below).
If I comment this out, it works fine but the flickering is unbearable.
The Question
I would like to know if there is an alternative to the current solution or if there is something I can set within the "cp" variable that would remove the icon?
The Example
I have created a quick application that emulates part of my problem. I could not replicate the flickering as this is down to the application being big. However, in this test project, I have replicated a form that inherits a "Master" form with the above code on. This then disallows the icon to be removed (even in the designer). dropbox.com/s/mg9fyfoshakc69z/TestProject.zip
For this replication, I did not need to include the MDI parent, I have however got an inherited form (MasterForm) and a form that inherits it (Form1). MasterForm has code that overrides the CreateParams property. This effects Form1 in such a way that when the toggle for ShowIcon for the window is set to false, it shows the default VB window icon instead of removing it.
c# - 同时在 ListView 上使用 CreateParams 和 SetWindowTheme
我正在使用 SetWindowTheme 函数 (uxtheme.dll) 使我的 ListView 看起来像 Windows 7 本机。当我对它进行排序时,我不得不使用 CreateParams 的东西来防止 ListView 闪烁。它起作用了,但是当我使用该 CreateParams 代码时,SetTheme 不再起作用。有没有办法同时使用 Windows 7 原生主题和 CreateParams?
谢谢
编辑: 我通过在我的自定义 ListView 的 OnHandleCreated void 中添加一个 SetWindowTheme 调用解决了这个问题。感谢汉斯帕桑特。
c# - CreateParams 混淆
我正在创建一个类来简化设计控件。它被称为ControlDrawer
并具有三个私有字段:
- 一个
Point
名为_location
- 一个
Bitmap
名为_innerImage
- 一个
NativeWindow
名为_window
我已经完成了大部分课程,但这是我的问题(注意,ControlDrawer
工具IWin32Window
):
问题是,我不知道如何填写评论部分。有人可以帮忙吗?
delphi - 如何将被另一个窗口隐藏的 OpenDialog 带到前面
我有一个包含多个表单的应用程序,每个表单都有一个单独的任务栏按钮。
假设 form2 显示一个 OpenDialog,我点击另一个最大化的应用程序覆盖全屏区域,然后我通过选择它的任务栏按钮返回到 form2。瞧!OpenDialog 隐藏在我选择的另一个应用程序后面,我必须单击现在不可访问的 form2 才能将对话框重新置于前面。这真的很烦人,可能会使用户感到困惑。
下面是一些代码来说明这个问题:
是否有可能获得可见 opendialog 的句柄?它曾经是可能的,但是如果我捕获 OnDialogShow,那么使用新的 Vista 风格的 OpenDialog,OpenDialog 会恢复到旧的风格,这对我来说现在是不行的。
有任何想法吗?
c# - 如何使用系统菜单创建无边框表单?
我创建了一个无边框表单,我设法使用以下方法将系统菜单分配给它:
但是现在,当我运行它时,它不再显示我通过 WMNCHITTEST 设置的自定义大小调整区域,如下所示:
那么,如何克服呢?是否可以使用系统菜单的无边界表单也尊重 WMNCHITTEST?
c# - CreateParams 和 XP
我也在互联网和 stackoverflow 上搜索过它,但我没有任何正确/可靠的解决方案。
我想从我的一个 c# Windows 窗体中删除闪烁。
所以我以以下方式覆盖了 CreateParams 方法
当在 Vista、Windows 7 和 8 中使用时,这可以消除我的应用程序中的闪烁。但在 XP 中,我的控件是随机更改的。我的复选框变得不可见。
我已经提到了堆栈溢出问题。但我不能使用它,因为我没有任何 MaximizeBox。这发生在使用的定义控件中!请给我一个可行的解决方案
c# - 有没有办法使用 CreateParams 的覆盖将 Window 样式更改为无?
我正在尝试创建窗口样式设置为“无”的应用程序。据我所知,我可以使用 CreateParams 的覆盖来更改样式和扩展样式:
我使用 ExStyle 作为 0x80,以便应用程序不在任务栏或任务管理器中显示。为了将窗口样式更改为无,我还应该使用什么?我只是无法理解根据List of Styles使用什么样式。