Giter Club home page Giter Club logo

Comments (4)

DrewNaylor avatar DrewNaylor commented on July 1, 2024

I could either do it like this, or I could have that window be its own EXE file. I wanted it to say "Launch minimal GUI..." and have the other window be called "HideSettingsPages Minimal GUI," but it may be better to have "Directly apply key value..." and have the other window be called "HideSettingsPages Minimal" and tell the user they can type in a specific key value to apply without having to click the checkboxes they want to use. I'm not sure though.

from hidesettingspages.

DrewNaylor avatar DrewNaylor commented on July 1, 2024

For the foreseeable future, it'll just be a dialog box in the main HideSettingsPages EXE file. Menubar title: "Directly Apply Key Value". File menu entry: "Directly apply key value...". Shortcut: "Ctrl+D".

from hidesettingspages.

DrewNaylor avatar DrewNaylor commented on July 1, 2024

Window mockup:

window mockup

Current code for mockup:

'MinimalGUI - Minimal GUI for HideSettingsPages
'(MinimalGUI also known as HideSettingsPages Minimal GUI)
'Copyright (C) 2017  Drew Naylor
'Microsoft Windows and all related words are copyright
'and trademark Microsoft Corporation.
'Any other companies mentioned own their respective copyrights/trademarks.
'(Note that the copyright years include the years left out by the hyphen.)
'
'This file is part of HideSettingsPages
'(Program is also known as "Hide Windows 10 Settings App Pages.")
'
'HideSettingsPages Minimal GUI is free software: you can redistribute it and/or modify
'it under the terms of the GNU General Public License as published by
'the Free Software Foundation, either version 3 of the License, or
'(at your option) any later version.
'
'HideSettingsPages Minimal GUI is distributed in the hope that it will be useful,
'but WITHOUT ANY WARRANTY; without even the implied warranty of
'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
'GNU General Public License for more details.
'
'You should have received a copy of the GNU General Public License
'along with HideSettingsPages Minimal GUI.  If not, see <http://www.gnu.org/licenses/>.



Imports System.Windows.Forms
Public Class aaformMinimalGUI
    Private Sub buttonApply_Click(sender As Object, e As EventArgs) Handles buttonApply.Click
        If textboxFullValue.TextLength > 0 Then
            ' Tell the registry helper app to apply the key value in the Registry.
            Dim proc As New ProcessStartInfo
            proc.FileName = My.Application.Info.DirectoryPath & "\hsp_registry-helper.exe"
            proc.Arguments = "/apply " & textboxFullValue.Text
            proc.Verb = "runas"
            Try
                Process.Start(proc)
                ' We have to catch this exception
                ' in case the user clicks "No" in the UAC
                ' dialog. Otherwise, we get an error
                ' that says that the operation was
                ' canceled by the user.
            Catch ex As System.ComponentModel.Win32Exception
            End Try
        Else

            ' If there's nothing in the textbox, complain.
            MessageBox.Show("Textbox is empty.")

        End If

    End Sub

    Private Sub buttonUndo_Click(sender As Object, e As EventArgs) Handles buttonUndo.Click
        ' Tell the registry helper app to delete the key value in the Registry.
        Dim proc As New ProcessStartInfo
        proc.FileName = My.Application.Info.DirectoryPath & "\hsp_registry-helper.exe"
        proc.Arguments = "/undo "
        proc.Verb = "runas"
        Try
            Process.Start(proc)
            ' We have to catch this exception
            ' in case the user clicks "No" in the UAC
            ' dialog. Otherwise, we get an error
            ' that says that the operation was
            ' canceled by the user.
        Catch ex As System.ComponentModel.Win32Exception
        End Try
    End Sub

    Private Sub buttonCancel_Click(sender As Object, e As EventArgs) Handles buttonCancel.Click
        Me.Close()
    End Sub

    Private Sub linklabelAbout_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles linklabelAbout.LinkClicked
        ' Show an About window and give a link to th license.
        MessageBox.Show("HideSettingsPages Minimal GUI version 0.1" & vbCrLf &
                        "Copyright 2017 Drew Naylor. Licensed under Gnu GPL v3+." & vbCrLf &
                        "See <http://www.gnu.org/licenses/> for the full license." & vbCrLf &
                        "Any copyrights or trademarks owned by Microsoft or other" & vbCrLf &
                        "companies or people are owned by them.")
    End Sub
End Class

from hidesettingspages.

DrewNaylor avatar DrewNaylor commented on July 1, 2024

This is now implemented as of 47d4970. Prior commits have the feature fully implemented, but this one is better for control sizing.

from hidesettingspages.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.