[VB6 ] 製作Browser的問題

看板Visual_Basic作者 (~ 塵埃 ~)時間19年前 (2006/03/26 20:59), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/6 (看更多)
請問各路好手 朋友用VB寫了一個Browser(因為我VB還算是初學者,所以大概知道問題所在而已) 可是在執行時有出現一個問題 --------------------------------------------------------- 假設 輸入網址的地方是在text1 上一頁按扭是在command1 下一頁按扭是在command2 我朋友的問題是在: (前題是,一開始就有先預設先開啟的網頁了) 在text1還未輸入網址前 command1和command2是鎖著的 而我朋友的他的卻是輸入網址後 command1和command2同時是打開的 他在text1_KeyPress裡面是這麼寫的 Dim KeyAscii As Short = Asc(eventArgs.KeyChar) If KeyAscii = 13 Then aa = WebBrowser1.LocationURL WebBrowser1.Navigate(Text1.Text) WebBrowser2.Navigate(aa) Command1.Enabled = True Command2.Enabled = True ^^^^^^^^^^^^^^^^^^^^^^^ 很明顯的我朋友在這裡就寫自動打開了 End If If KeyAscii = 0 Then eventArgs.Handled = True End If 所以我建議了他在 (前題是要先把text1_keypress裡面的 command2.enabled = true先刪除) Command1_Click裡面寫上下面這些東西 If command1.Enabled = True then command2.Enabled = True else command2.Enabled = false end if 可是這樣測試之後問題是 還是沒辦法辨別是否瀏覽到最前面一頁或是最後一頁 所以希望是 能否瀏覽到最前面一頁command1就自動鎖起來 到最後一頁時command2也會自動鎖起來 請問該怎麼寫呢? Orz -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.163.164.66 ※ 編輯: fenglih 來自: 218.163.164.66 (03/26 21:30)
文章代碼(AID): #149f0NkH (Visual_Basic)
文章代碼(AID): #149f0NkH (Visual_Basic)