惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
罗磊的独立博客
T
The Blog of Author Tim Ferriss
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
Last Week in AI
Last Week in AI
美团技术团队
Google Online Security Blog
Google Online Security Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
D
Docker
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
酷 壳 – CoolShell
酷 壳 – CoolShell
小众软件
小众软件
月光博客
月光博客
L
LINUX DO - 最新话题
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
W
WeLiveSecurity
H
Heimdal Security Blog
Vercel News
Vercel News
SecWiki News
SecWiki News
Forbes - Security
Forbes - Security
Blog — PlanetScale
Blog — PlanetScale
Google DeepMind News
Google DeepMind News
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
www.infosecurity-magazine.com
www.infosecurity-magazine.com
TaoSecurity Blog
TaoSecurity Blog
T
Troy Hunt's Blog
A
About on SuperTechFans
C
Check Point Blog
S
Security Affairs
Hacker News - Newest:
Hacker News - Newest: "LLM"
AI
AI
WordPress大学
WordPress大学
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Help Net Security
Help Net Security
博客园_首页
The Last Watchdog
The Last Watchdog
S
SegmentFault 最新的问题
Hugging Face - Blog
Hugging Face - Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
Engineering at Meta
Engineering at Meta
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
I
Intezer
K
Kaspersky official blog
M
MIT News - Artificial intelligence
J
Java Code Geeks
G
GRAHAM CLULEY
P
Palo Alto Networks Blog

博客园 - 紫雨轩 .Net

DNGuard Enterprise v3.56 released DNGuard Enterprise v3.30 released ComboBox 使用数据绑定时 Sorted 属性的bug DNGuard Enterprise v3.2 released DNGuard 企业版 v3.1 发布 DNGuard 专业版 v2.95 发布 DNGuard Enterprise v2.95 released .Net 中枚举AppDomains Windows 2003 上使用 Windows Live Writer .Net程序集的不同加载方式,以及其在内存中格式 DNGuard Enterprise v2.92 released - 紫雨轩 .Net DNGuard 标准版 v2.90发布 DNGuard Enterprise v2.90 released DNGuard Enterprise v2.82 released 采用Native 引导方式的.Net加密保护 C#中使用晚绑定实现压缩Access数据库 直接在.Net程序(C#)中执行 native code C#复杂表达式的问题 DNGuard HVM Trial V2.82 发布
在 FlexGrid 控件中指定最右侧显示的列
紫雨轩 .Net · 2008-06-26 · via 博客园 - 紫雨轩 .Net

FlexGrid 控件提供了指定左侧显示列的功能。因项目的需要,要求能够指定最右侧显示的列。
实现方法:
获取表格客户区宽度,然后通过每列的宽度计算出水平滚动条的位置。
但是有一个麻烦,就是垂直滚动条的问题。
首先要能判断是否有垂直滚动条,
然后有垂直滚动条时,需要减出垂直滚动条的宽度,
但是控件没有提供这方面的接口。

猜想控件的滚动条可能是两种情况:
1。FlexGrid是复合控件,其中包含了滚动条对象。
这样的话,用reflector查看一下对象命名,可以通过反射访问到内部的滚动条对象。

2。是传统Win32的滚动窗体。
这样的话,可以通过win32 api函数来判断。

用reflector看了一下控件代码,是第二种情况。
所以用win32 api来解决。
用api函数

lStyle = GetWindowLong(hWnd, GWL_STYLE);
获取Style然后判断
Style中是否有 WS_VSCROLL

如果有就代表有 垂直滚动条。
再获取 滚动条的最大值和最小值,如果相等则滚动条不可见。不相等则可见。