GetCaretBlinkTime()是什么功能来的?

ejkaejk 2010-09-20 02:03:41
在网上找到个代码, 里面有这么一个东东

win32.GetCaretBlinkTime()

除此之外还有

win32.WM_LBUTTONDOWN

全部显示:
当前上下文中不存在名称“win32”

有什么办法可以解决么?
...全文
241 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
dabusidexiaoqiang 2012-11-23
  • 打赏
  • 举报
回复
using System; using System.Drawing; using System.Windows.Forms; namespace ZBobb { public class win32 { public const int EM_GETSEL = 176; public const int EM_LINEFROMCHAR = 201; public const int EM_LINEINDEX = 187; public const int EM_POSFROMCHAR = 214; public const int WM_ERASEBKGND = 20; public const int WM_HSCROLL = 276; public const int WM_LBUTTONDBLCLK = 515; public const int WM_LBUTTONDOWN = 513; public const int WM_LBUTTONUP = 514; public const int WM_MOUSELEAVE = 675; public const int WM_MOUSEMOVE = 512; public const int WM_PAINT = 15; public const int WM_PRINT = 791; public const int WM_RBUTTONDOWN = 516; public const int WM_VSCROLL = 277; public win32(); public static bool CaptureWindow(Control control, ref Bitmap bitmap); public extern static uint GetCaretBlinkTime(); public extern static bool PostMessage(IntPtr hwnd, uint msg, IntPtr wParam, IntPtr lParam); public extern static int SendMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam); } }
Lemon2050 2010-09-21
  • 打赏
  • 举报
回复
我错了,其实是个常数,尝试: #define WM_LBUTTONDOWN 0x0201
Lemon2050 2010-09-21
  • 打赏
  • 举报
回复
应该是个结构体,同样需要你自己定义在代码中,WM_LBUTTONDOWN这个结构体网上应该可以搜索得到的
ejkaejk 2010-09-20
  • 打赏
  • 举报
回复
那这个WM_LBUTTONDOWN是在在哪个命名空间的, 好像不能直接使用啊...

[Quote=引用 2 楼 zhouzhangkui 的回复:]
你定义一个类win32
然后把GetCaretBlinkTime()作为成员函数

C# code

[DllImport("user32.dll")]
static extern uint GetCaretBlinkTime();
[/Quote]
Lemon2050 2010-09-20
  • 打赏
  • 举报
回复
这些都是c++中调用的Windows API,需要通过一定的方式转为C#代码。同意楼上的转换方式。
方法GetCaretBlinkTime()可以得到 插入符光标的闪烁频率
而WM_LBUTTONDOWN表示鼠标左键按下这个动作。
周药师 2010-09-20
  • 打赏
  • 举报
回复
你定义一个类win32
然后把GetCaretBlinkTime()作为成员函数

[DllImport("user32.dll")]
static extern uint GetCaretBlinkTime();

周药师 2010-09-20
  • 打赏
  • 举报
回复
函数原型:UINT GetCaretBlinkTime(VOLD)
函数功能:该函数返回一个公用的时间,单位为毫秒。该时间是转化插入标记的像素而需要的时间。用户可以使用控制面板来设置这个值。

应该是别人自己定义的win32
自己在里面封装了API之类的东西系统参数

111,129

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Creator Browser
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧