Search Results - VBForums

Search:

Type: Posts; User: Atenk

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Thread: ByRef & ByVal

    by Atenk
    Replies
    3
    Views
    337

    VS 2012 Re: ByRef & ByVal

    I was having a lot of trouble with byVal and byRef.
    But thanks to .paul, now I fully understand how to use them without any doubt, because .paul got involved in some threads and fixed the OP's issue...
  2. Replies
    16
    Views
    487

    VS 2010 Re: Program high memory usage

    Make a case by analogy and witout delving into the specifics of your original project or code.
    If you suspect a bit of code that causes the problem, then indicate that. That will help a lot....
  3. Replies
    16
    Views
    487

    VS 2010 Re: Program high memory usage

    No, you don't send your code to anyone, but submit it in this forum so as members could read it, and help you. That is the usage.
  4. VS 2010 Re: Creating a push button randomized game with settings.

    You could randomly send focus to buttons like this:


    Option Strict On
    Option Explicit On
    Public Class Form1
    Private Sub btnSendFocus_Click(ByVal sender As System.Object, ByVal e As...
  5. Re: Finding weekly pay, overtime hours worked? What's wrong with the code?

    You still have an error. Pay receives 450 instead of 430
    CalculateValues should be like this:


    Sub CalculateValues(ByVal hours As Double, ByVal payPerHour As Double, ByRef overtimeHours As...
  6. Replies
    10
    Views
    437

    Re: Annoying Radiobutton problem

    If Not MWSUser.Text = "" And Not MWSPass.Text = "" Then
    strMWSUsername = MWSUser.Text
    strMWSPassword = MWSPass.Text
    End If

    tg: The OP doesn't want to fill the...
  7. Replies
    10
    Views
    437

    Re: Annoying Radiobutton problem

    What happens if radiobutton1 is checked?
    It will fill the two textboxes, right?

    When radiobutton3 is checked, what will happen?
    1. A messagebox will pop.
    2. radiobutton1 will be checked, and...
  8. Re: how to round up values to nearest 50s in vb.net

    If the starting number is negative, the result will be always zero. But if that starting number is zero, then 50 will be added.
  9. Re: how to round up values to nearest 50s in vb.net

    Just one little remark: the number, or math.abs(number) must be greater than zero; otherwise 50 will be added to zero.
  10. Re: how to round up values to nearest 50s in vb.net

    I've just taken "MOD" from boops boops without paying attention to the rest, sorry.
    Thanks for the remark; the second bit of code won't work without that condition: "if remainder was greater than...
  11. Re: how to round up values to nearest 50s in vb.net

    I used Mod, as boops boops suggested and It works fine.


    Dim number As Decimal
    Decimal.TryParse(TextBox1.Text, number)
    Dim difference As Decimal
    difference = number...
  12. Re: how to round up values to nearest 50s in vb.net

    This is how I did it, and it works:


    Dim number As Decimal
    Decimal.TryParse(TextBox1.Text, number)
    Dim difference As Decimal
    Dim myDifference As Decimal...
  13. Replies
    2
    Views
    7,182

    Re: Composite numbers

    Here's also a very good article on prime numbers and different algorithms. I'm sure that that will help you. Good luck.

    http://www.codeproject.com/Articles/429694/Finding-prime-numbers
  14. Replies
    2
    Views
    7,182

    Composite numbers

    This is a good document about "Highly Composite Numbers", a paper that was written by Ramanujan in 1915:

    http://www.math.jussieu.fr/~miw/articles/pdf/LegacyRamanujan2012.pdf

    After Jemidiah's...
  15. Re: Visual Basic Help Multiplying Textbox integer with selected listbox decimal?

    Remove currency symbol from listbox:


    Option Explicit On
    Option Strict On

    Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles...
  16. Replies
    17
    Views
    975

    Re: VB 2012 - Hotel Occupancy Assignment

    I don't ignore members that help. In the same time I don't make the program full and complete. It is up to the OP to finish or tune-fine such things.
    By the way, Ident, It will be the last time I...
  17. Replies
    8
    Views
    440

    Re: Trig Math Operators

    JMC has provided a better answer to your post in "code it better".
  18. Replies
    8
    Views
    440

    Re: Trig Math Operators

    First error:

    Function RadiansToDegrees(ByVal degree As Double)
    Dim number As Double

    Get rid of dim number As double of the function

    Change it to

    Function RadiansToDegrees(ByVal degree...
  19. Replies
    17
    Views
    975

    Re: VB 2012 - Hotel Occupancy Assignment

    I took the first code and corrected it


    Public Class Form1

    Private Sub btnReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReport.Click
    Const...
  20. Re: How to search listbox for certain words

    I used the code .paul pointed to, and it worked:


    Public Class Form1
    Private wordString As String
    Private searchWord As String
    Private Sub FindMyString(ByVal searchString As...
  21. Thread: Listbox Control

    by Atenk
    Replies
    12
    Views
    709

    VS 2010 Re: Listbox Control

    This is how you could do it:


    Select Case ListBox1.SelectedIndex
    Case Is = 0
    MessageBox.Show("This is an apple", "My application", MessageBoxButtons.OK,...
  22. Replies
    11
    Views
    580

    Re: Time to learn classes...

    If I understand well, you can add the lot just below "Public class", or after any other "End sub", NOT after the
    "End sub" of the class.
  23. Replies
    3
    Views
    1,126

    Re: Program For Geometric Progression

    This is an enhancement of the program:
    1- I declared all variables as decimal to let the user deal with decimal sequence and decimal ratio.
    2 - I added a running total column: that will help the...
  24. Replies
    3
    Views
    1,126

    Re: Program For Geometric Progression

    This is a simple way to do it:


    Option Explicit On
    Option Strict On
    Class Form1

    Private Sub btnCalculate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles...
  25. Re: HELP HELP HELP HELP Amortize results not displaying correctly in ListView

    Apparently your formula is wrong, to begin with. This is how it should be.

    Let:

    A : Amount borrowed
    N : Number of months (in this example)
    I : Interest rate = I / 1200 (convert annual...
  26. Replies
    24
    Views
    842

    Re: Something is going wrong, but what?

    In this case you have to explain better what is this project.
    Explain step by step, without forgetting any detail.

    There's a lot of members willing to help you.
  27. Re: Struggling with the many definitions of the basics in Visual Basic

    This link would help you:
    http://www.homeandlearn.co.uk/NET/vbNet.html
  28. Replies
    9
    Views
    353

    VS 2010 Re: Calculate SUM error

    declare result as decimal too:



    Dim result As decimal
    result = (firstNum + secondNum + thirdNum).ToString("N2")
    MessageBox.Show(result)
  29. Replies
    9
    Views
    353

    VS 2010 Re: Calculate SUM error

    To have numbers with decimals, you should declare variables as double, or decimal.
    As KGComputers pointed, it is better to use tryparse.



    dim firstNum as decimal
    dim secNum as decimal...
  30. Replies
    3
    Views
    368

    Re: The maximum number of divisors

    Duplicate removed.
  31. Replies
    3
    Views
    368

    Re: The maximum number of divisors

    This is not just an answer, but a course in itself.
    Thanks a lot, jemidiah.
  32. Replies
    3
    Views
    368

    The maximum number of divisors

    In this problem all numbers are integers.

    In the range [1 - 100], find the number, or numbers, that have the maximum number of divisors.

    Example:

    -Divisors of 5 are: 1-5. The number of...
  33. Replies
    10
    Views
    525

    Re: Only one button active at a time

    Yes, kaliman, my code was repetitive. And I was aware that it would be more execessive in presence of a lot of buttons.
    But at least, when a solution at hand for the moment works fine, one could...
  34. Replies
    10
    Views
    525

    Re: Only one button active at a time

    This is how you can do it with buttons:



    Option Strict On
    Public Class Form1

    Private counter As Integer

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As...
  35. Replies
    12
    Views
    644

    VS 2010 Re: [RESOLVED] Wrong syntax?

    That's what I keep telling myself when I roam everyday around here...
  36. Replies
    8
    Views
    572

    VS 2010 Re: [RESOLVED] Help with BMI program

    I wanted to get by calculation, and not by code, the first wrong result = 2.7856185536973369850241827399336, so I changed the formula
    like this: (68 * 703) / (131 * 131); and I got it.
    Then I was...
  37. Replies
    8
    Views
    572

    VS 2010 Re: Help with BMI program

    This is the line that causes the problem:



    getNumbers(intHeight, intWeight)

    change it like this:
  38. Re: -=Question=- Using arrays to interchange variables

    The word "convention" was missing in my language dictionary... so I used "rule".

    Thanks.

    Edit:

    your explanation is objective and more informative.
  39. Re: -=Question=- Using arrays to interchange variables

    This the code. I checked it.



    Private Sub laserSpd()


    Dim myArray() As Integer = {5, 7, 10, 13, 15, 20, 50}
    For index As Integer = 0 To myArray.GetUpperBound(0)
    ...
  40. Re: -=Question=- Using arrays to interchange variables

    It is a rule that instead of using a lot of if elseif end if, to use select case, end select.

    I read a second time your post, and I'm trying to put the content of the first procedure in array.
    ...
Results 1 to 40 of 216
Page 1 of 6 1 2 3 4



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.