Thread: Help Meh!

Results 1 to 10 of 10
  1. #1
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81

    Help Meh!

    heres some code for a project
    Code:
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            If Label2.Tex*****ntains(TextBox1.Text) Then
                Label4.Visible = True
                Label4.Text = "You Are Banned!"
            Else
                Label4.Visible = True
                Label4.Text = "Not Banned. :/"
            End If
        End Sub
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Label2.Text = ShowIp()
            Dim Read As New System.IO.StreamReader(Application.StartupPath & "Adress.txt")
            TextBox1.Text = "89.565.676.676" & Environment.NewLine & Read.ReadToEnd
            Read.Close()
        End Sub
    the only thing is that, if i had xx.xxx.xxx.xxx in textbox1.text and 89.565.676.676 it would not detect: " If Label2.Tex*****ntains(xx.xxx.xxx.xxx)


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  2. #2
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Just Pm me the project, Ill fix it


     


     


     



    The Most complete application MPGH will ever offer - 68%




  3. #3
    XGelite's Avatar
    Join Date
    Mar 2009
    Gender
    male
    Location
    Enter text here
    Posts
    1,344
    Reputation
    12
    Thanks
    276
    Quote Originally Posted by NextGen1 View Post
    Just Pm me the project, Ill fix it
    lol ......

    i dont see how that helps him learn. you know? if someones always just *fixing* the problem for you, you never learn.


    @ mnpeep

    explain more?

  4. #4
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    @help
    Your right, however he would still have to paste the code to fix the error as is (or more of it) And either Myself, Yourself, Lolland, or Bombsaway would have resolved the issue anyway by discovering the problem and posting the solution, I was just trying to make my life easier and not have to create the controls

    @explain more,

    That's why I suggested the PM, the error could be derived from another part in the code, the snippet won't help, because to the best of my knowledge, there "is nothing wrong"

    He is using my "real" Ip tutorial to create a IPaddress block for his software

    Code:
     If Label2.Tex*****ntains(TextBox1.Text) Then
                Label4.Visible = True
                Label4.Text = "You Are Banned!"
            Else
                Label4.Visible = True
                Label4.Text = "Not Banned. :/"
            End If
        End Sub
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Label2.Text = ShowIp()
            Dim Read As New System.IO.StreamReader(Application.StartupPath & "Adress.txt")
            TextBox1.Text = "89.565.676.676" & Environment.NewLine & Read.ReadToEnd
            Read.Close()
    Why does everyone make things complicated , when it could be achieved so easily
    I created the module, use it

    Code:
    Form Load
      If ShowIp() = "45.286.279.68" Then
                MsgBox("Your banned")
            Else
                MsgBox("Welcome")
            End If

    Code:
    or use texbox1.text = showip()
    Code:
    If textbox1.text = "62.98.132.453" then 
    Yada yada yada 
    end if
    You get the idea, If your already using my module, then may as well take advantage if it's simplicity


    Now you can get more advanced and create a database and have the database on a server and have use it to ban in real time
    Last edited by NextGen1; 01-25-2010 at 08:44 AM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  5. #5
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    why so complicated? to make multiple IP bans, but it only detects 1 IP at a time for some reason...


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  6. #6
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    You will have to check the application users IP
    Last edited by NextGen1; 01-25-2010 at 09:58 AM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  7. #7
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    good idea!


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  8. #8
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    Yeah, it would make life easier,

    Edit: One sec, I see whats wrong, It's loading but not "nextline" (vbCRLF)

    let me see...

    I'm replacing your textbox with a List view control, this should work ;p

    Here you go

    Code:
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            If Label2.Tex*****ntains(ListView1.Text) Then
                Label4.Visible = True
                Label4.Text = "You Are Banned!"
            Else
                Label4.Visible = True
                Label4.Text = "Not Banned. :/"
            End If
        End Sub
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Label2.Text = ShowIp()
    
            Dim str As String = ""
            Dim ary() As String
            str = My.Computer.FileSystem.ReadAllText(Application.StartupPath & "Adress.txt")
            ary = Split(str, vbNewLine)
            Dim x As Integer
            For x = 0 To UBound(ary)
                If ary(x) <> "" Then
                    ListView1.Items.Add(ary(x))
                End If
            Next
        
        End Sub
    End Class
    Add a listview instead of textbox and replace your code with the one above.

    It should now download a list and check it against the file.
    (works for me)
    Last edited by NextGen1; 01-25-2010 at 09:57 AM.


     


     


     



    The Most complete application MPGH will ever offer - 68%




  9. The Following User Says Thank You to NextGen1 For This Useful Post:

    mnpeepno2 (01-25-2010)

  10. #9
    mnpeepno2's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    In a barren wasteland
    Posts
    905
    Reputation
    10
    Thanks
    81
    thanks button says all XD


    -----------------------------------------------

    My site: here
    My Blog: here
    My member's area: here
    Minecraft Sever Forum: here


    Minecraft Servers:

    Public:



    Private:



  11. #10
    NextGen1's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Not sure really.
    Posts
    6,312
    Reputation
    382
    Thanks
    3,019
    My Mood
    Amazed
    As always not a problem


     


     


     



    The Most complete application MPGH will ever offer - 68%




Similar Threads

  1. Replies: 21
    Last Post: 01-21-2015, 06:51 AM
  2. Help Meh!
    By R3V in forum General
    Replies: 4
    Last Post: 01-24-2010, 05:26 AM
  3. Help meh test
    By whtlight in forum Combat Arms Discussions
    Replies: 6
    Last Post: 01-03-2010, 08:03 PM
  4. helps meh
    By hahahayea in forum Combat Arms Help
    Replies: 5
    Last Post: 12-03-2009, 04:39 PM
  5. Help Meh :(
    By -SKULL3000- in forum General
    Replies: 34
    Last Post: 09-20-2009, 08:34 AM