小编use*_*947的帖子

Python/Tkinter根窗口后台配置

我正在尝试创建一个黑色背景的根窗口,以与我的按钮背景混合.

我有以下内容:

class Application(Frame):
    def __init__(self, parent):
        Frame.__init__(self, parent)
        self.parent = parent
        self.initUI()
...

    def initUI(self):
        self.outputBox = Text(bg='black', fg='green', relief=SUNKEN, yscrollcommand='TRUE')
        self.outputBox.pack(fill='both', expand=True)
        self.button1 = Button(self, text='button1', width=40, bg ='black', fg='green', activebackground='black', activeforeground='green')
        self.button1.pack(side=RIGHT, padx=5, pady=5)
        self.button2 = Button(self, text='button2', width=20, bg='black', fg='green', activebackground='black', activeforeground='green')
        self.button2.pack(side=LEFT, padx=5, pady=5)
...

def main():
    root = Tk()   
    root.geometry('1100x350+500+300')
    root.configure(background = 'black')
    app = Application(root)
    root.mainloop()  
Run Code Online (Sandbox Code Playgroud)

但是root.configure(background = 'black')没有改变根窗口的背景颜色......有什么建议吗?

python window tkinter configure root

3
推荐指数
1
解决办法
2万
查看次数

C++ - CreateRemoteThread DLL注入[Windows 7]

无论我在哪里看通过CreateRemoteThread注入的方法都是一样的,但是抓取进程ID的方法不是......我的函数将返回正确的进程ID,我对此没有任何帮助,所以我将无效该部分只包括实际注射.

我只是学习DLL注入,我试图在notepad.exe上.如果注射工作,记事本的标题将从"无标题 - 记事本"变为"挂钩".

#define DLL_NAME "injectme.dll"

.....

BOOL InjectRemoteThread(DWORD ProcessID)
{
    HANDLE RemoteProc;
    char buf[50]        =   {0};
    LPVOID MemAlloc;
    LPVOID LoadLibAddress;

    // Process ID does show correctly!
    WCHAR id[100];
    StringCbPrintf(id, 100, L"%d", ProcessID); // id contains the process ID... is confirmed in comparing ID shown in tasklist and the messagebox.
    MessageBox(NULL, id, L"Process ID", MB_ICONINFORMATION);
    // Process ID does show correctly!

    if ( !ProcessID )
    {
        MessageBox(NULL, (LPCWSTR)GetLastError(), L"An error occured", NULL);
        return 0;
    }
    RemoteProc          =   OpenProcess(PROCESS_VM_OPERATION | …
Run Code Online (Sandbox Code Playgroud)

c++ windows dll process code-injection

2
推荐指数
1
解决办法
8916
查看次数

标签 统计

c++ ×1

code-injection ×1

configure ×1

dll ×1

process ×1

python ×1

root ×1

tkinter ×1

window ×1

windows ×1