window

Can I prevent the user of my program to resize the console window? (in C) [duplicate]

不想你离开。 提交于 2021-02-19 04:45:52
问题 This question already has an answer here : How to change console window style at runtime? (1 answer) Closed 3 years ago . So I was searching (a lot) and haven't find anything on how to prevent user from resizing my program's console window. I had found information for language C++ and C# but not for C . I already managed to set the size of the console but if the user changes it afterwards it is not good for my program's looking. Is there anything I can do to perfectly resize the console and

How to freeze browser window intentionally (like alert, confirm and prompt does)?

雨燕双飞 提交于 2021-02-19 04:07:13
问题 Is there any way of freezing the browser window intentionally like alert , confirm and prompt (in short: "acp") does? I want to show a modal dialog with custom css instead of the native popups for "acp" but also want to have the ability to freeze the browser until I have users feedback just like "acp". But man, why? This is bad practice (uh I have to downvote)! So when it is bad practice - then why does "acp" actually offer this synchronous behavior? Because in some particular scenarios its

AddFontResource + SetCurrentConsoleFontEx are not changing a console font

白昼怎懂夜的黑 提交于 2021-02-18 17:53:28
问题 I'm trying to change a console font to a custom one, but this specific code piece doesn't seem to acomplish anything, even though this is what I came up while trying to find a solution around the Internet. I tested just the SetCurrentConsoleFontEx with this custom font by installing and adding it to the console with regestry by hand, and it's been functioning properly. #include <iostream> #include <Windows.h> int main() { std::cout << "Default font" << std::endl; system("pause"); HANDLE m

Jest error when set or assign window.location

扶醉桌前 提交于 2021-02-18 12:38:08
问题 Upgraded Jest library on v25 and all unit tests that were checking location change are failing. I checked a couple of issues opened on jest repo but I didn't actually understood how can this be fixed. The code that calls location.assign breaks with following error: Error: Not implemented: navigation (except hash changes) 69 | // window.location.href = url; > 70 | window.location.assign(url); I suppose that Jest jsdom window object shouldn't be treated anymore like a real browser window in

Close turtle window by X button(close)

对着背影说爱祢 提交于 2021-02-17 05:18:29
问题 I'm coding Python and I'm learning Turtle. When I close turtle window by X button I'm getting an error. What can I do? 回答1: Use a try - except block in each iteration of your while loop to detect when the user clicks the X button. When the click is detected, use break to break out of the loop. From: import turtle while True: # Your game loop code turtle.update() to import turtle while True: try: # Your game loop code turtle.update() except turtle.Terminator: break 回答2: Usually, errors

How to make an ExtJs window draggable by body?

徘徊边缘 提交于 2021-02-11 15:19:38
问题 We have a requirement in which we need to hide the header of the window and for this we are using header:false But if we use header:false, then window can not be dragged at all. Thus, is there anyway by which a window can be made draggable by body? That is, if header is set to false and is not getting displayed then also somehow user can drag the window. Any suggestions anyone. Thanks for the help. PS: ExtJS Version 4.1 回答1: You could create your own window class that changes how the dragging

What is keyboard hook?

三世轮回 提交于 2021-02-11 14:04:26
问题 I was reading the Doc of Autohotkey and then I was not able to understand the meaning of the phrase 'keyboard hook' or 'mouse hook'. this is the text: " The $ prefix has no effect for mouse hotkeys, since they always use the mouse hook. It also has no effect for hotkeys which already require the keyboard hook " URL: https://www.autohotkey.com/docs/Hotkeys.htm 回答1: 1 - A Keyboard Hook or Mouse Hook that Means: that you can monitor/receive all the keyboard keypress values or that you monitor

How should multiple HTML files be rendered in a single window within Electron?

≡放荡痞女 提交于 2021-02-11 13:41:31
问题 I've been playing with Electron and after experimenting with several of the templates, apps and navigating through apps on Electron's site I'm somewhat confused on how to render several HTML files within a single frame and BrowserWindow. Researching through the topic I understand I would use BrowserWindow to create a new window from app.on ready but I would like to figure out to build a side nav that would load content into a div , for example: .navbar-global { background-color: grey; }

How to update a COM+ applications and create its msi file using PowerShell?

坚强是说给别人听的谎言 提交于 2021-02-10 17:55:43
问题 I have a COM+ application installed on my machine which has two components. This COM+ application was created using an SetupCom.exe file which was made using C# code some years bac. It used to install and create a COM+ msi file , but now I don't have access to that code, and I need to remove one component from this COM+ application - which is no longer in use. So, I searched using google and I found some PowerShell scripts that remove the components from the COM+ application, but they don't

What's the difference between SetWindowLongPtr(GWL_HWNDPARENT) and SetParent?

青春壹個敷衍的年華 提交于 2021-02-10 17:37:02
问题 I need to create a watermark window(markHwnd) for some application windows on desktop, the watermark window style is: uint dwStyle = Win32API.WS_CLIPSIBLINGS | Win32API.WS_CLIPCHILDREN | Win32API.WS_POPUP; uint dwExStyle = Win32API.WS_EX_LAYERED | Win32API.WS_EX_TRANSPARENT | Win32API.WS_EX_NOACTIVATE | Win32API.WS_EX_NOPARENTNOTIFY | Win32API.WS_EX_TOOLWINDOW; markHwnd = Win32API.CreateWindowEx(dwExStyle, wndclassRegResult, ti.ToString(), dwStyle, 0, 0, 0, 0,IntPtr.Zero, IntPtr.Zero,