[Question] link combo box to button menu

Shout-Out

User Tag List

Page 2 of 2 FirstFirst 12
Results 16 to 30 of 30
  1. #16
    Anthonyrox8's Avatar Banned
    Reputation
    34
    Join Date
    Aug 2007
    Posts
    296
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    mkay now it doesnt do nethink nopopups
    Edit: wait nvm

    [Question] link combo box to button
  2. #17
    Anthonyrox8's Avatar Banned
    Reputation
    34
    Join Date
    Aug 2007
    Posts
    296
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cool thanks. i still need help lol on the next form now hehe
    Code:
    Public Class Form1
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click
            Shell("shutdown -s -t 100")
        End Sub

  3. #18
    The Maffyx's Avatar Contributor

    Reputation
    249
    Join Date
    Feb 2007
    Posts
    1,186
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is this inside a case? If is, It should work, I got a message that says Windows will shutdown in 1 minute, but I aborted it. So I'm not sure what the error is?


  4. #19
    Anthonyrox8's Avatar Banned
    Reputation
    34
    Join Date
    Aug 2007
    Posts
    296
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    mmm inside a case? lol

  5. #20
    The Maffyx's Avatar Contributor

    Reputation
    249
    Join Date
    Feb 2007
    Posts
    1,186
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Select Case
    Case 1
    <here>
    Case 2
    Case 3


  6. #21
    Anthonyrox8's Avatar Banned
    Reputation
    34
    Join Date
    Aug 2007
    Posts
    296
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also before i leave how do u start a program with Vb such as solitaire

  7. #22
    Anthonyrox8's Avatar Banned
    Reputation
    34
    Join Date
    Aug 2007
    Posts
    296
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    no its not its in an other form Form1

  8. #23
    The Maffyx's Avatar Contributor

    Reputation
    249
    Join Date
    Feb 2007
    Posts
    1,186
    Thanks G/R
    0/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    do
    Code:
    System.Diagnostics.Process.Start("filepath to solitaire.exe here")
    That can be placed in a button, case or whatever, pretty standard.


  9. #24
    Anthonyrox8's Avatar Banned
    Reputation
    34
    Join Date
    Aug 2007
    Posts
    296
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    m still having trouble with the shutdown thing i want a box to popup and say would u like to continue and have a OK button at the bottom but its just not working with the shell thing

  10. #25
    MaiN's Avatar Elite User
    Reputation
    335
    Join Date
    Sep 2006
    Posts
    1,047
    Thanks G/R
    0/10
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As I dont have MS Visual Basic Express installed on my computer I cant do it in VB, but I can do it in C# for you.

    Code:
    if (MessageBox.Show("Do you want to continue?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.Yes)
    {
    Shell("shutdown -s -t 100");
    }
    Basicly it checks if you press the 'Yes' button.
    Should be easily adapated to visual basic.
    [16:15:41] Cypher: caus the CPU is a dick
    [16:16:07] kynox: CPU is mad
    [16:16:15] Cypher: CPU is all like
    [16:16:16] Cypher: whatever, i do what i want

  11. #26
    ReidE96's Avatar Archer Authenticator enabled
    Reputation
    470
    Join Date
    Dec 2006
    Posts
    1,625
    Thanks G/R
    1/1
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Straight conversion of what MaiN posted to VB.NET:
    Code:
    If MessageBox.Show("Do you want to continue?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) = DialogResult.Yes Then
        Shell("shutdown -s -t 100")
    End If

  12. #27
    Anthonyrox8's Avatar Banned
    Reputation
    34
    Join Date
    Aug 2007
    Posts
    296
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ty for all of ur post you realli helpped me rep to all of u

  13. #28
    nightshack's Avatar Contributor
    Reputation
    107
    Join Date
    Jan 2007
    Posts
    248
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Easier:

    Code:
            If box.Text = "Notepad" Then
                Shell("notepad", vbMaximizedFocus)
            End If
    'box" would be the combo box


  14. #29
    Garosie's Avatar Active Member
    Reputation
    18
    Join Date
    Jul 2007
    Posts
    68
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well this one is easy to do in "Easy Coding" u dont have to use those VooDoo codes. just use the very normally used codes :

    If Combobox1.text = "Item" Then
    Shell (Item) - Only if its shell
    Elseif Combobox1.text = "Item2" then
    blalba
    Elseif combobox1.text = "Item3" then
    blslslbls


    just keep on doing this.

  15. #30
    OMGPanic!'s Avatar Member
    Reputation
    8
    Join Date
    Oct 2008
    Posts
    71
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Caroe View Post
    well this one is easy to do in "Easy Coding" u dont have to use those VooDoo codes. just use the very normally used codes :

    If Combobox1.text = "Item" Then
    Shell (Item) - Only if its shell
    Elseif Combobox1.text = "Item2" then
    blalba
    Elseif combobox1.text = "Item3" then
    blslslbls


    just keep on doing this.
    This is exactly what case switch statements are for.
    Code:
    Select Case combobox1.text
          Case Item1
            return a;
          Case Item2
            return b;
          Case Item3
            return c;
          Case Else
             msgbox("Error")
            return x;
        End Select
    Moved house and now have limited internet access. Cant work till its back. STRESSED.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. I have a question about expac boxes
    By Pyreclaw in forum World of Warcraft General
    Replies: 8
    Last Post: 09-02-2015, 09:18 PM
  2. Selecting combo box items
    By Honski in forum Diablo 3 Memory Editing
    Replies: 1
    Last Post: 12-03-2012, 07:53 PM
  3. Question: Rift Combo/Attack point hack
    By jazman84 in forum Rift
    Replies: 2
    Last Post: 04-15-2011, 02:12 AM
  4. Question: Nonworkin Voting Box rep for assistance
    By mastermania in forum World of Warcraft General
    Replies: 0
    Last Post: 12-27-2008, 05:40 PM
  5. Question about Dual Boxing!
    By Strype in forum Community Chat
    Replies: 1
    Last Post: 05-22-2007, 09:46 AM
All times are GMT -5. The time now is 11:54 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search