Visual Basic 2010 - Simple but weird problem! menu

User Tag List

Results 1 to 4 of 4
  1. #1
    Dr0x's Avatar Member
    Reputation
    1
    Join Date
    Aug 2009
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Visual Basic 2010 - Simple but weird problem!

    So I made a program to clear my dns cache and renew my ip. When I run the program in debugging mode, it works fine, but when I use the .exe on my desktop, it starts opening a ton of command prompts and opens random windows. Any help would be awesome!

    Source Code:

    Code:
    Public Class Form1
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    
            If CheckBox1.Checked = True Then
                Shell("cmd.exe", AppWinStyle.MinimizedFocus)
                SendKeys.SendWait("ipconfig /release {ENTER}")
                SendKeys.SendWait("ipconfig /flushdns {ENTER}")
                SendKeys.SendWait("ipconfig /renew {ENTER}")
                SendKeys.SendWait("exit {ENTER}")
                Label1.Text = ("STATUS: NEW IP AND DNS CACHE")
                Label1.ForeColor = Color.Green
    
                If Label1.Text = "STATUS: NEW IP AND DNS CACHE" Then
                    Button1.Text = "Done! Exit."
                    Button4.Show()
                    Button1.Hide()
    
                End If
            End If
    
        End Sub
    
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
            AboutBox1.Show()
        End Sub
    
        Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
            Me.Close()
        End Sub
    End Class

    I tried using SendKeys.Send also, and it did the same thing. I also tried sending all the text in one SendKey function, that also did not work. Same thing all the time!

    Visual Basic 2010 - Simple but weird problem!
  2. #2
    1337pyro's Avatar Contributor CoreCoins Purchaser
    Reputation
    267
    Join Date
    Apr 2009
    Posts
    495
    Thanks G/R
    9/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    installed latest .net framework?

    02/02/2011 01:52 <Jackie Moon> I might just go whack off all this talk about man boobs is making me frisky

  3. #3
    Dr0x's Avatar Member
    Reputation
    1
    Join Date
    Aug 2009
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I have.

  4. #4
    Cynikal3's Avatar Private
    Reputation
    1
    Join Date
    Mar 2011
    Posts
    2
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you should be able to just run the shell (cmd.exe ipconfig /renew) etc... sendkeys is really sketchy...

    if you insist on sendkeys, make sure the cmd has focus... then send the keys.

Similar Threads

  1. [HELP] Visual Basic 2010 Random gernerated from name?
    By HighlineTV in forum Programming
    Replies: 1
    Last Post: 12-12-2016, 10:55 PM
  2. [Bot] FishingBot using BlackMagic.dll and Visual Basic 2010 ?
    By Reflexes in forum WoW Memory Editing
    Replies: 2
    Last Post: 03-20-2012, 01:42 AM
  3. [Help]Weird Problem
    By Knife in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 02-25-2008, 11:13 AM
  4. simple, but funny game
    By ayadew in forum Community Chat
    Replies: 3
    Last Post: 06-07-2007, 07:10 PM
  5. Visual Basic, I have an idea.
    By WoWLegend in forum World of Warcraft Bots and Programs
    Replies: 14
    Last Post: 11-11-2006, 02:36 PM
All times are GMT -5. The time now is 01:58 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