Avoid “program stopped working” in C#/.NET

The JIT debugger popup occurs when there’s an unhandled exception. That is, an exception tunnels all the way up the stack to the root of any thread in the runtime. To avoid this, you can handle the AppDomain.CurrentDomain.UnhandledException event and just call Environment.Exit(1) to exit gracefully. This will handle all exceptions on all threads within … Read more

Google Colab – Google Drive can´t be mounted anymore – Browser Popup (Google Drive for Desktop) instead of Link in the code output for authorization

Update: Unfortunately, From Jan 20, 2022, The small solution based on Blue’s solution and the similar solutions isn’t working anymore (Reference). You can use my old solution again… Update2: From Mars 30, 2022, my old solution isn’t working too! I find another solution (Phillip’s solution) that is working now. Phillip’s Solution: This solution is based … Read more

Popup window in winform c#

Just create another form (let’s call it formPopup) using Visual Studio. In a button handler write the following code: var formPopup = new Form(); formPopup.Show(this); // if you need non-modal window If you need a non-modal window use: formPopup.Show();. If you need a dialog (so your code will hang on this invocation until you close … Read more

How to make PopUp window in java

The same answer : JOptionpane with an example 🙂 package experiments; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JOptionPane; public class CreateDialogFromOptionPane { public static void main(final String[] args) { final JFrame parent = new JFrame(); JButton button = new JButton(); button.setText(“Click me to show dialog!”); parent.add(button); parent.pack(); parent.setVisible(true); button.addActionListener(new java.awt.event.ActionListener() { @Override public void actionPerformed(java.awt.event.ActionEvent evt) … Read more

How to create a completely custom Dialogue/Popup in Android (change overlay colour and dialogue window layout)

I’ve solved this problem and created my own custom popup overlay with a custom coloured semi-transparent overlay background using the following steps: 1 – Create a new xml file in your res/values/ folder and name it styles.xml 2 – Here is where you will define your dialog properties. Here is what mine looks like. If … Read more

tech