ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ½Ð±Ðªí³æ¤º Label ¤W¤U¥ª¥k¸m¤¤°ÝÃD

[µo°Ý] ½Ð±Ðªí³æ¤º Label ¤W¤U¥ª¥k¸m¤¤°ÝÃD

ºô¸ô¤W§ä¨ì¦³¤H¤À¨É Label¦r¦ê¸m¤¤(¤W¤U¥ª¥k)¡A¦ý¬O¸Ó­ì©l½X¦ü¥G¥u¯à¥Î©ó³æ¤@ª«¥ó¡C
¦³¸ÕµÛ§ï¼g¡A¦ýÅã¥Ü¥X¨Ó ¶È¤ô¥­¸m¤¤
½Ð°Ý­Y¥H °j°é¨Óªí¥Üªº¸Ü
¸Ó­n¦p¦ó­×¥¿¤ñ¸û«ê·í

  1. Private Sub UserForm_Initialize()
  2.     Dim lab As MSForms.Label
  3.     Dim xx As Integer
  4.     Dim yy As Integer
  5.    
  6.     With UserForm1
  7.         .Height = 500
  8.         .Width = 500
  9.             For yy = 1 To 500 Step 100
  10.                 For xx = 1 To 500 Step 100
  11.                     Set lab = .Controls.Add("forms.label.1")
  12.                     With lab
  13.                         '.Caption = .Name
  14.                         
  15.                         .Top = 10 + yy
  16.                         .Left = 10 + xx
  17.                         .AutoSize = False
  18.                         .BackColor = &HC0FFC0
  19.                         
  20.                         Dim str As String
  21.                         Dim strout As String
  22.                         str = .Name
  23.                         'strout = ""
  24.                         .BorderStyle = fmBorderStyleSingle
  25.                         .TextAlign = fmTextAlignCenter
  26.                         .WordWrap = True
  27.                         strout = .Name
  28.                         .Caption = strout
  29.                     End With
  30.                 Next
  31.             Next
  32.    
  33.     End With
  34. End Sub


  35. '¥H¤U¬O¬Yºô¯¸ªº LABEL ¦r¦ê¸m¤¤½d¨Ò
  36. '    Dim str As String = "³o¸Ì©ñ¤W±z­nªº¦r"
  37. '    Dim strOut As String = ""
  38. '    Label1.BorderStyle = BorderStyle.FixedSingle
  39. '    Label1.TextAlign = ContentAlignment.TopCenter
  40. '    For Each ch As Char In str.ToCharArray
  41. '        strOut &= ch & ControlChars.CrLf
  42. '    Next
  43. '    Label1.Text = strOut
½Æ»s¥N½X

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

¦^´_ 1# mark15jill
¸Õ¸Õ¬Ý
  1. With lab
  2.               .Top = 10 + yy
  3.               .Left = 10 + xx
  4.               .Font.Size = 12         '¦r«¬¤j¤p
  5.               .Height = .Font.Size + .Font.Size * 0.1  '½Õ¾ã°ª«×
  6.              '  .AutoSize = False
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ mark15jill ©ó 2012-11-26 16:17 ½s¿è

¦^´_ 2# GBKEE


    GBKEE¤j¤j¡AÁÂÁ¡C

    ³o¤èªk¥i¥H¡A¦ý¬O¡A´ú¸Õµ²ªG ¶È­­©ó ¦rÅé¤j¤p¤ñ¸û¤pªº®É­Ô¾A¥Î¡C
    ¥Î¤j¤p 36 ´ú¸Õ«á¡A¤Ï¦Ó·|¦³ÂI©¹¤W°¾¡C
   

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

¦^´_ 3# mark15jill
¦r«¬¤j©ó36  ®É¥i½Õ¾ã 0.1  ¸Õ¸Õ¬Ý
   
  1. .Height = .Font.Size + .Font.Size * 0.1  '½Õ¾ã°ª«×
½Æ»s¥N½X

TOP

¦^´_ 4# GBKEE


    ­è¸ÕµÛ­×§ïµøµ¡¤j¤p¡A¨S§ï¨S¨Æ±¡¡A§ï¤FÅܦ¨...





<µo²{­þÃä©Ç©Çªº¤F¶Ü¡H>
  1. Private Sub UserForm_Initialize()

  2.     Dim lab As MSForms.Label

  3.     Dim xx As Integer

  4.     Dim yy As Integer

  5.    
  6.     With UserForm1

  7.         .Height = 700

  8.         .Width = 1400

  9.             For yy = 1 To 700 Step 100

  10.                 For xx = 1 To 1400 Step 200

  11.                     Set lab = .Controls.Add("forms.label.1")

  12.                     With lab

  13.                         '.Caption = .Name

  14.                         

  15.                         .Top = 10 + yy

  16.                         .Left = 10 + xx

  17.                         .AutoSize = False
  18.                         
  19.                         .Font.Size = 36        '¦r«¬¤j¤p
  20.                         
  21.                         .Height = .Font.Size + .Font.Size * 0.1  '½Õ¾ã°ª«×
  22.                         
  23.                         .Width = 100

  24.                         .BackColor = &HC0FFC0



  25.                         

  26.                         Dim str As String

  27.                         Dim strout As String

  28.                         str = .Name

  29.                         'strout = ""

  30.                         .BorderStyle = fmBorderStyleSingle

  31.                         .TextAlign = fmTextAlignCenter

  32.                         .WordWrap = True

  33.                         strout = .Name

  34.                         .Caption = strout

  35.                     End With

  36.                 Next

  37.             Next

  38.    
  39.     End With

  40. End Sub
½Æ»s¥N½X

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

        ÀR«ä¦Û¦b : ¯à·F¤£·F¡A¤£¦p­W·F¹ê·F¡C
ªð¦^¦Cªí ¤W¤@¥DÃD