这段代码是我用来测试能不能达到我想要的功能,可是不知道为什么刻度下面的标签不能正确的显示.
pic是picturebox的名字
pic.Line (20, 180)-(500, 180), QBColor(15)pic.Line (20, 180)-(20, 170), QBColor(15)
TextOut pic.hdc, 5, 190, "0:00", Len("0:00")pic.Line (80, 180)-(80, 170), QBColor(15)
TextOut pic.hdc, 65, 190, "1:00", Len("1:00")pic.Line (140, 180)-(140, 170), QBColor(15)
TextOut pic.hdc, 125, 190, "2:00", Len("2:00")pic.Line (200, 180)-(200, 170), QBColor(15)
TextOut pic.hdc, 185, 190, "3:00", Len("3:00")pic.Line (260, 180)-(260, 170), QBColor(15)
TextOut pic.hdc, 245, 190, "4:00", Len("4:00")pic.Line (320, 180)-(320, 170), QBColor(15)
TextOut pic.hdc, 305, 190, "5:00", Len("5:00")pic.Line (380, 180)-(380, 170), QBColor(15)
TextOut pic.hdc, 365, 190, "6:00", Len("6:00")pic.Line (440, 180)-(440, 170), QBColor(15)
TextOut pic.hdc, 425, 190, "7:00", Len("7:00")pic.Line (500, 180)-(500, 170), QBColor(15)
TextOut pic.hdc, 485, 190, "8:00", Len("8:00")

解决方案 »

  1.   

    给你个例子:
    private sub form_click()
    form1.scale(-110,110)-(110-,-110)
    line(-105,0)-(105,0)
    line(0,105)-(0,-105)
    currentx=105:currenty=20:print "x"
    currentx=10:currenty=105:print "y"
    for i=-100 to 100 step 20
        currentx=i:currenty=7:line -(i,0)
        currentx=i-5:currenty=-5:print i/10
    next i
    'Y轴类似
    end sub
        
      

  2.   

    CurrentX = 105: CurrentY = 20: Print "x"
    CurrentX = 10: CurrentY = 105: Print "y"
    For i = -100 To 100 Step 20
        CurrentX = i: CurrentY = 7: Line -(i, 0)
        CurrentX = i - 5: CurrentY = -5: Print i / 10
    Next i
    请问其中“:”是什么意思?