2006年7月24日

Two dimension Array as Property

mark it:
VB.NET
Private _arrText(,) As Integer
Public Property arrText() As Integer(,)
Get
 Return _arrText
End Get
Set(ByVal value As Integer(,))
 _arrText = value
End Set
End Property
C#:
public int[,] arrText
{
get{return arrtext;}
set{arrtext=value;}
}

posted @ 2006-07-24 22:52 whyin 阅读(43) 评论(0) 编辑

2006年7月20日

摘录两个实用的注册表键

复制,存为*.reg,双击注入就OK

windows2000 "Tab"键自动完成功能
设置.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"CompletionChar"=dword:00000009
取消.reg
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
"CompletionChar"=dword:00000000

文件夹右键菜单添加命令行快捷方式
REGEDIT4

[HKEY_CLASSES_ROOT\Directory\shell\DosHere]
@="Command &Prompt Here"

[HKEY_CLASSES_ROOT\Directory\shell\DosHere\command]
@="C:\\WINNT\\System32\\cmd.exe /k cd \"%1\""

[HKEY_CLASSES_ROOT\Drive\shell\DosHere]
@="Command &Prompt Here"

[HKEY_CLASSES_ROOT\Drive\shell\DosHere\command]
@="C:\\WINNT\\System32\\cmd.exe /k cd \"%1\""

 

posted @ 2006-07-20 09:40 whyin 阅读(46) 评论(0) 编辑

2006年6月1日

HashTable keys遍历两个snippets

1.
Dim hashTab As New Hashtable
For Each keyString As String In hashTab.Keys
  Console.WriteLine(keyString)
Next
2.
Dim arCollect As IDictionaryEnumerator = hashTab.GetEnumerator
While arCollect.MoveNext
  Console.WriteLine(arCollect.Key)
End While

posted @ 2006-06-01 23:42 whyin 阅读(192) 评论(0) 编辑

WinForm Readonly DataGrid 颜色全搞定

类ColoredColumn Inherits DataGridTextBoxColumn
Overrides Paint 画颜色
DataGridTableStyle AllowSorting禁止列头排序
Overrides Edit Readonly(disable cells click select)
rowMode和cellMode两种方式

详见代码:
/Files/whyin/testColor.rar
NorthWind.MDB
/Files/whyin/Northwind.rar

posted @ 2006-06-01 23:38 whyin 阅读(353) 评论(0) 编辑

2006年4月30日

Debug COM dll with .Net app in VS.Net


问题:
I've inherited a COM dll project that was switched from the VS6 environment
to VS.Net. I thought I could debug the COM dll code by adding a VB.Net
project to the solution, but when I set breakpoints in the dll, the code in
the VB test program just passes over them. I'm guessing that it has
something to do with the VB project referencing the dll interop layer,
rather than the dll itself.

Is it possible to do what I'm trying to do? Anyone have any suggestions?

解决:
VS.NET has several debug engines for different purposes:
* unmanaged debugging
* managed debugging
* script (classic ASP) debugging
* ...

Your NET project by default uses the managed debugging engine. Therefore,
breakpoints in unmanaged code will not be hit.
.....
it worked if I checked the
"Unmanaged Code Debugging" checkbox in the VB.Net project settings.....

勾选:启用非托管代码调试

refer to http://www.thescripts.com/forum/thread285211.html

posted @ 2006-04-30 17:04 whyin 阅读(131) 评论(0) 编辑

2006年4月27日

Controls created on one thread cannot be parented to a control on a different thread

解决参考:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q318604

http://msdn.microsoft.com/msdnmag/issues/04/05/BasicInstincts/

posted @ 2006-04-27 19:34 whyin 阅读(385) 评论(1) 编辑

2006年4月23日

API32 dotNET

posted @ 2006-04-23 00:00 whyin 阅读(86) 评论(0) 编辑

导航

<2012年2月>
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910

公告

昵称:whyin
园龄:5年9个月
粉丝:0
关注:0

搜索

 
 

常用链接

随笔档案

最新评论

阅读排行榜

评论排行榜

推荐排行榜