Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 929029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T20:06:15+00:00 2026-05-15T20:06:15+00:00

Public Class Form1 Dim i = 0 Dim re = True Private Sub Timer_Tick(ByVal

  • 0
Public Class Form1  
Dim i = 0  
Dim re = True  
Private Sub Timer_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)   Handles Timer.Tick  
    If i = 225 Then  
        re = False  
    ElseIf i = 0 Then  
        re = True  
    End If  
    If re = True Then  
        i += i  
    ElseIf re = False Then  
        i -= i
    End If  
    color1.BackColor = Color.FromArgb(i, i, i)  
End Sub  
End Class  

In this code, i want the label from black to white and then from white to black.
I set the re var to indicate whether it is white, then i will reduce until the color to black. => Not works

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T20:06:16+00:00Added an answer on May 15, 2026 at 8:06 pm
    i += i 
    

    Should be:

    i += 1
    

    i starts at 0, so you keep adding 0+0 and never get anywhere.
    Also, RGB colors go all the way to 255, not 225, but you would have seen that one.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using this in VB 2010: Imports System.Text.RegularExpressions Public Class Form1 Private Sub Button1_Click(ByVal sender
public class Form1 : System.Windows.Forms.Form { private void eachCornerPix (object sender, PaintEventArgs e, out
Imports SpeechLib Public Class Form1 Public vox = CreateObject(sapi.spvoice) Private Sub cmdSpeak_Click(ByVal sender As
Imports System.Windows.Forms.WebBrowser Public Class Form1 Dim browser As WebBrowser browser.navigate(http://www.google.com) End Class This code
With this code: public partial class Form1 : Form { private static readonly int
Imports System.Data.SqlClient Public Class Form3 Private cs As New SqlConnection(Data Source=HUSAIN-PC;Initial Catalog=final1;Integrated Security=True) Private
I have problem with my code Public Class Form1 Dim lm(4, 4) As Char
Currently, I have something like: public partial class Form1 : Form { delegate void
Consider this source: public partial class FormTest : Form { private Test test {
I have this class: Public Class common Public Function NumbersOnlyEvent(ByVal CtrlName As String, ByVal

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.