The code you posted wouldn't even compile, let alone run.
Please be specific in the problem you are having.
I think the following is close to what you wanted, but it uses global variables which have their own problems:
import Tkinter as tk
root = tk.Tk()
root.title('background image')
def qwerty():
button2.destroy()
#def qwerty():
image1 = tk.PhotoImage(file="Black.gif")
w = image1.width()
h = image1.height()
#panel1.image = image1
root.geometry("%dx%d+0+0" % (w, h))
panel1 = tk.Label(root, image=image1)
panel1.pack(side='top', fill='both', expand='yes')
button2 = tk.Button(panel1, text='Click here to continue', command = qwerty)
button2.pack(side='bottom')
root.mainloop()
Reputation Points: 344
Solved Threads: 116
Practically a Master Poster
Offline 670 posts
since May 2008