Re: [.NET] 我是新手想問如何做自訂控制項..
※ 引述《easterday (....)》之銘言:
: 1. Select the template Windows Control Library Windows Form控制項程式庫
: 2. Start by renaming the UserControl1 object 把UserControl1.vb
: to FocusedTextBox rename成FocusedTextBox.vb
: 3. 把Public Class UserControl1改成 同左
: Public Class FocusedTextBox
: 4. 把Inherits System.Windows.Forms.Usercontrol 我找不到這些字,就自己打吧
: 改成Inherits TextBox
: 5. (none) 編譯器好像找不到TextBox
: ,所以自己手動加入
: Imports
: System.Windows.Forms
我試了一遍, 你除了自己Inherits System.Windows.Forms.TextBox之外, 你還要把
FocusedTextBox.desinger.vb一檔內的Inherits System.Windows.Forms.UserControl
改成Inherits System.Windows.Forms.TextBox, 這樣編譯就會過了,不過我RUN時會發生
Exception(dll內未含UserControl型別錯誤), 有解嗎?
--
http://charity0207.googlepages.com/index.htm
每天點一下,每天做公益。
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.33.123.86
推
02/08 23:49, , 1F
02/08 23:49, 1F
→
02/09 13:54, , 2F
02/09 13:54, 2F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 2 之 3 篇):
Visual_Basic 近期熱門文章
PTT數位生活區 即時熱門文章