Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Visual Basic Programming › Random Integer Error? I think?

Random Integer Error? I think?

Posts 1–10 of 10 · Page 1 of 1
gwentravolta
gwentravolta
Random Integer Error? I think?
First of all, my gf has a wierd obsession with cones. don't ask.
My "Epilepsy" button isn't working right, and I was hoping someone here could tell me what is wrong with it.

Screen Shot:


Virus Scan!

Code:
Code:
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim afd As Integer
        Form2.Show()
        EpiOff.Hide()
        afd = 1
    End Sub

    Private Sub CC_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CC.Click
        Dim rgb1, rgb2, rgb3 As Integer
        If TextBox1.Text = "" Then
            TextBox1.Text = "0"
        End If
        If TextBox2.Text = "" Then
            TextBox2.Text = "0"
        End If
        If TextBox3.Text = "" Then
            TextBox3.Text = "0"
        End If

        rgb1 = TextBox1.Text
        rgb2 = TextBox2.Text
        rgb3 = TextBox3.Text

        If rgb1 > 255 Or rgb1 < 0 Then
            rgb1 = 255
            TextBox1.Text = rgb1
        End If
        If rgb2 > 255 Or rgb2 < 0 Then
            rgb2 = 255
            TextBox2.Text = rgb2
        End If
        If rgb3 > 255 Or rgb3 < 0 Then
            rgb3 = 255
            TextBox3.Text = rgb3
        End If

        Form2.BackColor = Color.FromArgb(rgb1, rgb2, rgb3)
    End Sub

    Private Sub CL_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CL.Click
        Dim xloc, yloc As Integer
        If TextBox4.Text = "" Then
            TextBox4.Text = "0"
        End If
        If TextBox5.Text = "" Then
            TextBox5.Text = "0"
        End If

        xloc = TextBox4.Text
        yloc = TextBox5.Text

        If xloc < 0 Then
            xloc = 0
            TextBox4.Text = xloc
        End If
        If yloc < 0 Then
            yloc = 0
            TextBox5.Text = yloc
        End If

        Form2.Location = New Point(xloc, yloc)
    End Sub

    Private Sub CS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CS.Click
        Dim xsize, ysize As Integer
        If TextBox6.Text = "" Then
            TextBox6.Text = "0"
        End If
        If TextBox7.Text = "" Then
            TextBox7.Text = "0"
        End If

        xsize = TextBox6.Text
        ysize = TextBox7.Text

        If xsize < 0 Then
            xsize = 0
            TextBox6.Text = xsize
        End If
        If ysize < 0 Then
            ysize = 0
            TextBox7.Text = ysize
        End If

        Form2.Size = New Size(xsize, ysize)
    End Sub

    Private Sub rand_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rand.Click
        Dim rgb1, rgb2, rgb3 As Integer
        Randomize()
        rgb1 = Int(Rnd() * 1000)
        While rgb1 > 255
            rgb1 = Int(Rnd() * 1000)
        End While
        TextBox1.Text = rgb1

        rgb2 = Int(Rnd() * 1000)
        While rgb2 > 255
            rgb2 = Int(Rnd() * 1000)
        End While
        TextBox2.Text = rgb2

        rgb3 = Int(Rnd() * 1000)
        While rgb3 > 255
            rgb3 = Int(Rnd() * 1000)
        End While
        TextBox3.Text = rgb3

        Form2.BackColor = Color.FromArgb(rgb1, rgb2, rgb3)
    End Sub

    Public Sub Epi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Epi.Click
        Dim afd, rgb1, rgb2, rgb3 As Integer
        afd = 0
        Epi.Hide()
        EpiOff.Show()
        While afd = 0
            Randomize()
            rgb1 = Int(Rnd() * 1000)
            While rgb1 > 255
                rgb1 = Int(Rnd() * 1000)
            End While
            TextBox1.Text = rgb1

            rgb2 = Int(Rnd() * 1000)
            While rgb2 > 255
                rgb2 = Int(Rnd() * 1000)
            End While
            TextBox2.Text = rgb2

            rgb3 = Int(Rnd() * 1000)
            While rgb3 > 255
                rgb3 = Int(Rnd() * 1000)
            End While
            TextBox3.Text = rgb3

            Form2.BackColor = Color.FromArgb(rgb1, rgb2, rgb3)
        End While
    End Sub

    Public Sub EpiOff_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EpiOff.Click
        Dim afd As Integer
        afd = 1
        EpiOff.Hide()
        Epi.Show()
    End Sub
End Class
And the Program:
#1 · 17y ago
TR
trevor206
Quote Originally Posted by gwentravolta View Post
First of all, my gf has a wierd obsession with cones. don't ask.
My "Epilepsy" button isn't working right, and I was hoping someone here could tell me what is wrong with it.

Screen Shot:


Virus Scan!

Code:
Code:
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim afd As Integer
        Form2.Show()
        EpiOff.Hide()
        afd = 1
    End Sub

    Private Sub CC_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CC.Click
        Dim rgb1, rgb2, rgb3 As Integer
        If TextBox1.Text = "" Then
            TextBox1.Text = "0"
        End If
        If TextBox2.Text = "" Then
            TextBox2.Text = "0"
        End If
        If TextBox3.Text = "" Then
            TextBox3.Text = "0"
        End If

        rgb1 = TextBox1.Text
        rgb2 = TextBox2.Text
        rgb3 = TextBox3.Text

        If rgb1 > 255 Or rgb1 < 0 Then
            rgb1 = 255
            TextBox1.Text = rgb1
        End If
        If rgb2 > 255 Or rgb2 < 0 Then
            rgb2 = 255
            TextBox2.Text = rgb2
        End If
        If rgb3 > 255 Or rgb3 < 0 Then
            rgb3 = 255
            TextBox3.Text = rgb3
        End If

        Form2.BackColor = Color.FromArgb(rgb1, rgb2, rgb3)
    End Sub

    Private Sub CL_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CL.Click
        Dim xloc, yloc As Integer
        If TextBox4.Text = "" Then
            TextBox4.Text = "0"
        End If
        If TextBox5.Text = "" Then
            TextBox5.Text = "0"
        End If

        xloc = TextBox4.Text
        yloc = TextBox5.Text

        If xloc < 0 Then
            xloc = 0
            TextBox4.Text = xloc
        End If
        If yloc < 0 Then
            yloc = 0
            TextBox5.Text = yloc
        End If

        Form2.Location = New Point(xloc, yloc)
    End Sub

    Private Sub CS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CS.Click
        Dim xsize, ysize As Integer
        If TextBox6.Text = "" Then
            TextBox6.Text = "0"
        End If
        If TextBox7.Text = "" Then
            TextBox7.Text = "0"
        End If

        xsize = TextBox6.Text
        ysize = TextBox7.Text

        If xsize < 0 Then
            xsize = 0
            TextBox6.Text = xsize
        End If
        If ysize < 0 Then
            ysize = 0
            TextBox7.Text = ysize
        End If

        Form2.Size = New Size(xsize, ysize)
    End Sub

    Private Sub rand_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rand.Click
        Dim rgb1, rgb2, rgb3 As Integer
        Randomize()
        rgb1 = Int(Rnd() * 1000)
        While rgb1 > 255
            rgb1 = Int(Rnd() * 1000)
        End While
        TextBox1.Text = rgb1

        rgb2 = Int(Rnd() * 1000)
        While rgb2 > 255
            rgb2 = Int(Rnd() * 1000)
        End While
        TextBox2.Text = rgb2

        rgb3 = Int(Rnd() * 1000)
        While rgb3 > 255
            rgb3 = Int(Rnd() * 1000)
        End While
        TextBox3.Text = rgb3

        Form2.BackColor = Color.FromArgb(rgb1, rgb2, rgb3)
    End Sub

    Public Sub Epi_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Epi.Click
        Dim afd, rgb1, rgb2, rgb3 As Integer
        afd = 0
        Epi.Hide()
        EpiOff.Show()
        While afd = 0
            Randomize()
            rgb1 = Int(Rnd() * 1000)
            While rgb1 > 255
                rgb1 = Int(Rnd() * 1000)
            End While
            TextBox1.Text = rgb1

            rgb2 = Int(Rnd() * 1000)
            While rgb2 > 255
                rgb2 = Int(Rnd() * 1000)
            End While
            TextBox2.Text = rgb2

            rgb3 = Int(Rnd() * 1000)
            While rgb3 > 255
                rgb3 = Int(Rnd() * 1000)
            End While
            TextBox3.Text = rgb3

            Form2.BackColor = Color.FromArgb(rgb1, rgb2, rgb3)
        End While
    End Sub

    Public Sub EpiOff_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EpiOff.Click
        Dim afd As Integer
        afd = 1
        EpiOff.Hide()
        Epi.Show()
    End Sub
End Class
And the Program:
Um idk about ur code but that fucking cone looks weird
#2 · 17y ago
That0n3Guy
That0n3Guy
I'm not sure if this is it, but,

Epi.Hide()
EpiOff.Show()

If those are two different things, I believe you can't have something that builds off of something else's name

Like Epi and EpiOff.

So, I suggest changing it to EpiOn and EpiOff

I'm not sure if that will change anything, and I might be completely wrong, but it's worth a try.

If I see anything else, I'll post back.
#3 · 17y ago
gwentravolta
gwentravolta
Quote Originally Posted by That0n3Guy View Post
I'm not sure if this is it, but,

Epi.Hide()
EpiOff.Show()

If those are two different things, I believe you can't have something that builds off of something else's name

Like Epi and EpiOff.

So, I suggest changing it to EpiOn and EpiOff

I'm not sure if that will change anything, and I might be completely wrong, but it's worth a try.

If I see anything else, I'll post back.
Ill try that. Is it possible that it is freezing up the CPU because it cycles through the number generation over and over? Is there a way to "pause" an action for a quarter second?

Edit: Changing the names doesn't fix it. So 1)The Load and Epi_click are conflicting with each other or 2) The While cycle is freezing my computer. Again... a pause should do the trick
#4 · edited 17y ago · 17y ago
That0n3Guy
That0n3Guy
Quote Originally Posted by gwentravolta View Post
Ill try that. Is it possible that it is freezing up the CPU because it cycles through the number generation over and over? Is there a way to "pause" an action for a quarter second?

Edit: Changing the names doesn't fix it. So 1)The Load and Epi_click are conflicting with each other or 2) The While cycle is freezing my computer. Again... a pause should do the trick
I have just the thing,
one moment.

Put this in the form you need it in:

Code:
Sub Wait(seconds As Long)
    Dim start As Long
    start = GetTickCount() + (seconds * 1000)
    
    Do While start > GetTickCount()
        DoEvents
    Loop
End Sub
Make sure you put this at the top of the form:

Code:
Option Explicit

Private Declare Function GetTickCount Lib "kernel32" () As Long
And to use that just send this code in a button or whatever.

Code:
Wait (How Many Seconds)
This won't actually stop it, just pause it for a set number of seconds.
#5 · edited 17y ago · 17y ago
gwentravolta
gwentravolta
Thanks. But i think i figured something else out... I'm telling it to do it when there is a click, but a click lasts a second, while the stuff its told to do continues? so i should tell it to do a defined function for a click, not the actual function. get it?
#6 · 17y ago
That0n3Guy
That0n3Guy
I would personally contain them in separate modules, makes the code a lot cleaner.
#7 · 17y ago
gwentravolta
gwentravolta
Quote Originally Posted by That0n3Guy View Post
I would personally contain them in separate modules, makes the code a lot cleaner.
Uhm, im a choob. Ill stick to what i can do. which is the basics. The VERY BASICS. That and making phishers.
#8 · 17y ago
Jimmy
Jimmy
lol wow a cone
#9 · 17y ago
ac1d_buRn
ac1d_buRn
wdf. that cone is weird. And why the fk woud u want a cone program ? XD
#10 · 17y ago
Posts 1–10 of 10 · Page 1 of 1

Post a Reply

Similar Threads

  • Random Integer GeneratorBy SpiderByte in C++/C Programming
    12Last post 20y ago
  • Hack not working, code error I thinkBy myonemanga in C++/C Programming
    2Last post 16y ago
  • Random Combat Arms ErrorBy shnarg in Combat Arms Hacks & Cheats
    9Last post 17y ago
  • i think the error is alrightBy fiego3 in Combat Arms Hacks & Cheats
    15Last post 18y ago
  • Random Integer GeneratorBy SpiderByte in Art & Graphic Design
    6Last post 20y ago

Tags for this Thread

#error#integer#random