deayalas / google-code-prettify

Automatically exported from code.google.com/p/google-code-prettify
Apache License 2.0
0 stars 0 forks source link

Add better VB Support #129

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Issue taken from:
http://getsatisfaction.com/balupton/topics/vb_support

Original issue reported on code.google.com by balup...@gmail.com on 14 Sep 2010 at 8:07

GoogleCodeExporter commented 9 years ago
'新建一个VB程序,将form1的BorderStyle(边框风格)属性设为0,即无
边框。
'因为对于Form和Textbox等控件,其边框风格在运行时是只读的��
�所以不能用代码修改,用API可以。
'再向窗体上添加一个时钟控件。其他无需任何改动,复制下�
��的代码到代码编辑窗口即可
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Private Sub Form_Resize()
    Me.BorderStyle = 0                '此处应在窗体属性中设置,运行时为只读
   Me.BackColor = vbBlack
    Me.Top = 0
    Me.Left = 0
    Me.Height = Screen.Height         '将窗体充满屏幕
   Me.Width = Screen.Width
    Timer1.Interval = 1000           '时钟间隔为1秒
End Sub

Private Sub Timer1_Timer()
    Call star
End Sub

Private Sub star()
    Dim i As Integer
    Dim ccode As Integer
    Dim pointx As Single              '定义中心点x,y
   Dim pointy As Single
    Dim col As Single                 '定义随机点x,y
   Dim row As Single

    Randomize                         '置随机数种子
   Cls
    Scale (0, 0)-(100, 100)           '重定义屏幕坐标系统
   pointx = 100 * Rnd
    pointy = 100 * Rnd
    For i = 1 To 100
        col = 100 * Rnd
        row = 100 * Rnd
        ccode = 15 * Rnd              '取随机颜色
       If ccode = 0 Then ccode = 15
        Line (pointx, pointy)-(col, row), QBColor(ccode)   '用随机色画线
   Next
    Me.FillColor = vbWhite            '以下在中心点画一个白色实心小圆
   Me.FillStyle = 0
    Me.Circle (pointx, pointy), 0.2, QBColor(15)
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 27 Or KeyCode = 13 Then  '当按下Esc键、或回车键时退出屏保
       Call Form_DblClick
    End If
End Sub

Private Sub Form_DblClick()
    Me.BorderStyle = 0                    '当双击屏幕时退出屏保
   Timer1.Interval = 0
    End
End Sub

Original comment by nxhuj...@gmail.com on 23 Oct 2010 at 2:52

GoogleCodeExporter commented 9 years ago
What is lacking with the current VB support in 
http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-vb.js
 as shown at 
http://google-code-prettify.googlecode.com/svn/trunk/tests/prettify_test.html#is
sue27 ?

Original comment by mikesamuel@gmail.com on 25 Oct 2010 at 8:22

GoogleCodeExporter commented 9 years ago
Closing for lack of response.

Original comment by mikesamuel@gmail.com on 4 Mar 2011 at 8:33