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

[µo°Ý] WebBrowser ¦Û°Ê·s¼W°ÝÃD

[µo°Ý] WebBrowser ¦Û°Ê·s¼W°ÝÃD

°ÝÃD»¡©ú¡G
­Y»Ý·s¼W ¤¸¥óªº¸Ü ¦³¤U¦C¨âºØ«¬ºA
    Dim mycombobox As MSForms.ComboBox
    Dim myweb As New WebBrowser
¥i¬O mycombobox ¥i¥H·s¼W¡Amyweb«o·|¥X²{Ãþ§O¿ù»~
¤£¾å±o°ÝÃD¥X¦b­þ£¾£¾"

·Q­n¦b¤T­Ó frame ¤º ·s¼W...webbrowser...
¤j¤p©M¦ì¸m³£©MFrame¬Û¦P


¥¼©R¦W.jpg

ºô­¶.rar (32.94 KB)

µ{¦¡¤º Webbrowser³¡¥÷¤w§R°£... ¦]·|¥X²{¿ù»~£¾£¾
  1. Private Sub UserForm_Initialize()
  2.   
  3.    
  4.     Dim myFrame1 As MSForms.frame
  5.     Dim mylabel As MSForms.Label
  6.     Dim mycombobox As MSForms.ComboBox
  7.     Dim myweb As New WebBrowser
  8.    
  9.     With UserForm1
  10.         .Width = 1340.25
  11.         .Height = 750
  12.         .StartUpPosition = 2
  13.             '°ÊºA·s¼WFrame±±¥ó

  14.             '³]¸m¸ÓFrameªº¦WºÙ¡B°ª«×¡B¼e«×¡B¦ì¸mµ¥
  15.             For sJ = 1 To (.Width - 40) Step ((.Width - 40) / 3) + 5
  16.                     Set myFrame1 = .Controls.Add("forms.Frame.1")
  17.                 With myFrame1
  18.                      .Left = 10 + sJ
  19.                      .Top = 90
  20.                      .Width = (UserForm1.Width - 40) / 3
  21.                      .Height = (UserForm1.Height - .Top - 30)
  22.                     ' .Caption = .Name
  23.                 End With
  24.    
  25.                  
  26.                 Set mylabel = .Controls.Add("forms.label.1")
  27.                 With mylabel
  28.                     .Left = 10 + sJ
  29.                     .Top = 10
  30.                     .Width = (UserForm1.Width - 40) / 3
  31.                     .BackColor = &HFCFCC0
  32.                     .Font.Size = 14
  33.                     .Height = .Font.Size + 1
  34.                 End With
  35.             
  36.                 Set mycombobox = .Controls.Add("forms.combobox.1")
  37.                 With mycombobox
  38.                     .Left = 10 + sJ
  39.                     .Top = 30
  40.                     .Width = (UserForm1.Width - 40) / 3
  41.                     .Height = 20
  42.                     .BackColor = &HFCFCC0
  43.                     .Font.Size = 12
  44.                 End With
  45.             
  46.             Next
  47.             
  48.                     
  49.                     
  50.     '°Ï¬q3
  51.        Dim ct As Control
  52.         
  53.         For uw = 1 To 3
  54.             Select Case uw
  55.             
  56.                 Case 1
  57.                     With .Controls("frame" & uw)
  58.                         .Caption = .Name
  59.                     End With
  60.                     
  61.                     With .Controls("label" & uw)
  62.                         .Caption = .Name
  63.                          .TextAlign = 2
  64.                     End With
  65.                     With .Controls("combobox" & uw)
  66.                         .Text = .Name
  67.                          .TextAlign = 2
  68.                     End With

  69.                 Case 2
  70.                     With .Controls("frame" & uw)
  71.                         .Caption = .Name

  72.                     End With
  73.                     With .Controls("label" & uw)
  74.                         .Caption = .Name
  75.                          .TextAlign = 2
  76.                     End With
  77.                     With .Controls("combobox" & uw)
  78.                         .Text = .Name
  79.                          .TextAlign = 2
  80.                     End With
  81.                     
  82.                
  83.                 Case 3
  84.                     With .Controls("frame" & uw)
  85.                         .Caption = .Name

  86.                     End With
  87.                     With .Controls("label" & uw)
  88.                         .Caption = .Name
  89.                          .TextAlign = 2
  90.                     End With
  91.                     With .Controls("combobox" & uw)
  92.                         .Text = .Name
  93.                          .TextAlign = 2
  94.                     End With
  95.                     
  96.             End Select
  97.             
  98.             

  99.         Next


  100.     End With
  101. 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

¦^´_ 1# mark15jill
ªí³æ¤¤·s¼W WebBrowser [Microsoft ºô­¶ÂsÄý¾¹±±¨î¶µ]
  1. Set myweb = .Controls.Add("Shell.Explorer.2")
½Æ»s¥N½X

TOP

¦^´_  mark15jill
ªí³æ¤¤·s¼W WebBrowser [Microsoft ºô­¶ÂsÄý¾¹±±¨î¶µ]
GBKEE µoªí©ó 2012-11-13 15:59



    ½Ð°Ýª©¤j
³o­Ó«ç©M §Ú¦Cªº¨º¨âºØ¤£¦P..
¬O©I¥s À³¥Îµ{¦¡ªºÃö«Y¶Ü?

  ¦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
±±¨î¶µ©ÒÄݪºÀ³¥Îµ{¦¡¤£¤@¼Ë
Set myFrame1 = Controls.Add("forms.Frame.1") ³o¬Oªí³æªº±±¨î¶µ

TOP

¦^´_  mark15jill
±±¨î¶µ©ÒÄݪºÀ³¥Îµ{¦¡¤£¤@¼Ë
Set myFrame1 = Controls.Add("forms.Frame.1") ³o¬Oªí³æ ...
GBKEE µoªí©ó 2012-11-13 16:26



   
    ª©¤j ÁÂÁ ³o¼Ë§Ú¤F¸Ñ¤F~~ ¦A¦¸·PÁÂ

¸ß°Ý¥t¤@­Ó°ÝÃD

¥H³o¬qµ{¦¡½X¨Ó»¡
                With myFrame1
                     .Left = 10 + sJ
                     .Top = 90
                     .Width = (UserForm1.Width - 40) / 3
                     .Height = (UserForm1.Height - .Top - 30)
                    ' .Caption = .Name
                End With

¥i¬O ­YÅܦ¨
                 Set myweb = .Controls.Add("Shell.Explorer.2")
                With myweb
'                     .Left = 10 + sJ
'                     .Top = 90
                     .Width = (UserForm1.Width - 40) / 3
                     .Height = (UserForm1.Height - .Top - 30)
                    ' .Caption = .Name
                End With

¦oÅã¥Ü¥X¨Óªº ¼e ©M °ª ³£¤£·|µ¥©ó myFrameªº¼e©M°ª.. ³o¬O¬°¤°»ò?

¦Ó¥B µ{¦¡½X§ï¦¨

                    Set myweb = .Controls.Add("Shell.Explorer.2")
                    With myweb
'                        .Top = 5
'                        .Left = 5
                        .Height = UserForm1.Controls("frame1").Height
                        .Width = UserForm1.Controls("frame1").Width
                    End With
                End With
§e²{¥X¨Óªº®ÄªG¤´µM¬O ¤£µ¥©ó Frame1 ªº¼e©M°ª

½Ð°Ý­n«ç³]©w¤~¯à¡H



  ¦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

¦^´_ 5# mark15jill
§ï¦¨³o¼Ë, ¬°¦ó·|¦p¦¹©|¥¼¬ã¨s.
  1. Dim myweb As Object
½Æ»s¥N½X

TOP

¦^´_ 6# GBKEE


    ¦]¤p§Ì·Qªk«Ü³æ¯Â

¬JµM Frame  ªº
                      .Width = (UserForm1.Width - 40) / 3
                     .Height = (UserForm1.Height - .Top - 30)

¨º ¦pªG³]©w myweb ªº
                        .Height = UserForm1.Controls("frame1").Height
                        .Width = UserForm1.Controls("frame1").Width

¥¿±`¨Ó»¡ À³¸Ó  myweb.height ·|µ¥©ó Frame.height  (¦pªG¨Ì ³]©wªº¸Ü)

¦ý¬O «o·|¥X²{¦p¦¹¤jªº®t²§¡AÅý§Ú¦³ÂI¦n©_­ì¦]¡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

        ÀR«ä¦Û¦b : °ß¨ä´L­«¦Û¤vªº¤H¡A¤~§ó«i©óÁY¤p¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD