看板 Python 關於我們 聯絡資訊
以下是我寫的程式 # -*- coding: utf-8 -*- from Tkinter import * import win32api import win32con win = Tk() win.title(string = "視窗")#視窗 path = "./" frame=Frame(win, relief=RAISED, borderwidth=2, width=800, height=600)#設定視窗 長寬 frame.pack(side=TOP, fill=BOTH, ipadx=5, ipady=5, expand=1) Label(win, foreground="#ff0000", font=("", 20, "bold"), text="hello").pack() def internet():#外部呼叫 win32api.WinExec('C:\Program Files\Internet Explorer\IEXPLORE.EXE', win32con.SW_SHOWMAXIMIZED) button1 = Button(frame,font=("", 20, "bold"), text="上網", command = internet)#按鈕 button1.place(x=300, y=300, anchor=W, width=200, height=150) win.mainloop() 問題是我看按鈕設定是在frame(為視窗所設定的名稱), 那麼我呼叫的程式是否可以跟按鈕一樣可以開出後就設定在frame裡? 我在都卡在這個問題裡, 去找win32api.WinExec指令都沒有可以設定在視窗中的, 希望有人可以幫幫忙, 謝謝! -- -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 163.26.229.167
doghib:如果是要包IE在視窗裡面,wxpython有個例子,名字叫 08/12 23:58
doghib:ActiveX_IEHtmlWindow 08/12 23:59