我对应用实现了自定义大小调整(以在调整大小时修复无渲染),有时在调整大小后,游标开始闪烁。
以这种方式设置光标:
select
sr_name as liaison
,cast(date_created as date) workdate
,count(distinct date_created) * 4 as minutes_inactive
,cast(punchintime as date) as workdate
,round(sum(cast(datediff(minute,punchintime,isnull(pc2_query.punchouttime,getdate())) as real) / 60), 2) as hoursworked
,count(*) as punches
from
punchclock pc
inner join servicereps sr on pc.servrepid = sr.servrepid
cross apply
(
select top 1 pc2.punchdatetime as punchouttime
from punchclock pc2
where pc2.punchdatetime > pc.punchdatetime
and pc.servrepid = pc2.servrepid
and pc2.inout = 0
order by pc2.punchdatetime
)q1
inner join tbl_liga_popup_log l on sr.servrepID = l.repid
where punchyear >= 2017 and pc.inout = 1
不要求将其设置为我想要的其他值。
它被称为每一帧(到public enum CursorCode {
...
}
public static CursorCode current = CursorCode.Default;
public static void SetCursor ( CursorCode code ) {
current = code;
switch ( code ) {
case CursorCode.ResizeNWSE:
System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.SizeNWSE;
break;
...
}
}
)并更新。
仅当我移动鼠标时它才会闪烁。当我休息时,它保持为current
的设置。
以这种方式调整窗口大小:
current
调整大小后,问题仍然存在。并非总是如此。