2012-07-20 85 views

回答

3

爲什麼C#答案不能幫助您?我跑它通過a code converter和它的工作馬上:

Public Class VerticalProgressBar 
    Inherits ProgressBar 
    Protected Overrides ReadOnly Property CreateParams() As CreateParams 
     Get 
      Dim cp As CreateParams = MyBase.CreateParams 
      cp.Style = cp.Style Or &H4 
      Return cp 
     End Get 
    End Property 
End Class 

編輯
雖然你真的應該定義爲(PBS_VERTICAL)樣式值公共常數(& H4),而不是使用一個神奇的數字在這樣的代碼。

+0

我在想@Matt不知道轉換器,也不知道如何手動轉換它。 – 2012-07-20 10:26:20

+0

@druciferre不知道,不知道。多謝你們! – Matt 2012-07-20 10:34:14

+0

@Matt:如果你錯過了編輯,我已經鏈接到我使用的代碼轉換器。 – Antagony 2012-07-20 10:35:24