Search:

Type: Posts; User: patplays852

Page 1 of 3 1 2 3

Search: Search took 0.03 seconds.

  1. Replies
    10
    Views
    1,738

    VS 2008 Re: KeyCode for Multiple Buttons

    thank you for clarifying why passing those parameters was wrong, and thank you for the wrist slap =)
  2. Replies
    10
    Views
    1,738

    VS 2008 Re: KeyCode for Multiple Buttons

    Ah, I forgot about the .PerformClick, may I ask why passing sender and e to the function are bad?
  3. Replies
    1
    Views
    849

    VS 2008 Re: form "steals" focus

    if its NOT necessary for form 1 to still be active (shown) when you click a button, try doing this:



    form1.hide (hides form 1)
    form2.show
    form2.txtbox1.focus


    just a guess as I'm at work...
  4. Replies
    10
    Views
    1,738

    VS 2008 Re: KeyCode for Multiple Buttons

    try changing the sub that has the Handles Button2.KeyDown to Handles Form1.Keydown (or whatever the name of the form is)

    This way it should capture the button presses when the button doesn't have...
  5. Re: List of Integers Indexed by Key or Index

    if you call Array(5) = 1 then the INDEX of 5 is where that item will be located, not the "5th" item in the array.

    the 5th item in an array is at the index of 4.

    other than that I'm not totally...
  6. Replies
    14
    Views
    1,313

    Re: Reverse inputs ?

    FireX, That would be directly across from a number (so 20 would give 200, he needs 20 to be 160, which is a flip over the y axis/ if its not a flip, then its a reflection)
  7. Replies
    14
    Views
    1,313

    Re: Reverse inputs ?

    Please mark solved when your question has been answered =)
  8. Replies
    14
    Views
    1,313

    Re: Reverse inputs ?

    no problem, glad to help!
  9. Replies
    14
    Views
    1,313

    Re: Reverse inputs ?

    please give an example of the expected output for a number in each quadrant.

    heres what i got if you want to reflect over the y axis (only tested qudrants 1 and 2)


    dim output as integer =...
  10. Replies
    14
    Views
    1,313

    Re: Reverse inputs ?

    here ya go =) (btw, the oposite number of 10 is 190 =P) -- unless you are trying to flip over the y axis, in which case tell me and ill try to get a different formula for you.

    sorry if its not in...
  11. Replies
    5
    Views
    1,922

    VS 2008 Re: sum of items from listbox

    ah, yes I see now =)


    Dim sum as double = 0

    Do While sr.Peek <> -1
    employee = sr.ReadLine
    rate = CDbl(sr.ReadLine)
    hworked = CDbl(sr.ReadLine)
    grosspay = overtime_Calculation(regularPay,...
  12. Replies
    5
    Views
    1,922

    VS 2008 Re: sum of items from listbox

    you could just add the grosspay for everyone into a list, then loop through the list for the sum.



    dim payList as new list(of double)

    '...
    Do While sr.Peek <> -1
    employee = sr.ReadLine...
  13. VS 2010 Re: How can i make a serial code for my program

    good news, YOU can do REGEX!, the only problem is that the parentheses are "special" in regex, they are used for groups or something (no idea, this is my first day i've tried regex with any success,...
  14. VS 2010 Re: How can i make a serial code for my program

    using regex, here is a sample project I put together. (this is comparing to the example you gave (for your serial number)


    Imports System.Text.RegularExpressions

    Public Class Form1

    ...
  15. Re: Generate Random String (Letters & Numbers)

    Here is an update, I was trying to add some optional parameters to adjust how many repeating values are allowed, but I got aggravated so I'm just posting this atm.

    Added a function to add symbols...
  16. Replies
    9
    Views
    1,782

    VS 2008 Re: get any windows size ?

    Not sure what you have to do to get its position, but instead of what your doing there is there a property for .height / .width, try and see if there is.
  17. Re: Generate Random 8 Char String (Letters & Numbers)

    here's what i got (Like formlesstree4, I was going to add an item to make it so you can choose how long the string was), but since he did that, I get to contribute shorter code (somewhat), and the...
  18. Replies
    7
    Views
    1,150

    VS 2008 Re: decimal string formatting

    there wasn't I did the code to fast then posted it, I went back to debug and found that it formatted the string for me, but i did edit my above post to reflect changes that *should* work
    I did test...
  19. Replies
    7
    Views
    1,150

    VS 2008 Re: decimal string formatting

    put it inside an if statement:



    Dim a As Decimal = 100
    Dim b As Decimal = 3
    Dim result As Decimal = a + b
    If result Mod 1 = 0 Then
    ...
  20. Replies
    3
    Views
    723

    VS 2005 Re: how long a program runs

    That is true (I did incorrectly word my statement when i said a section of code), I only really have experience in using this on a button click, I dim it at the start of the sub, then i do my code,...
  21. Replies
    3
    Views
    723

    VS 2005 Re: how long a program runs

    im assuming you mean how long it takes a section of code to run correct?

    imports:


    imports system.diagnostics


    put this before the code that is taking forever:
  22. Replies
    1
    Views
    584

    VS 2008 Re: String + Richtextbox?

    try renaming String + Richtextbox to ComboBox Value -> Richtextbox

    My guess off the top of my head would be this:


    Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As...
  23. Replies
    3
    Views
    2,906

    Re: create visual basic quiz

    1) This is the wrong forum for this post (Should go into http://www.vbforums.com/forumdisplay.php?f=25)

    I would use a label to display the question, and the two buttons for true false, I will...
  24. Replies
    3
    Views
    5,483

    Re: Base Converter

    here is code so copy/paste is easier


    Imports System.Numerics
    Public Class BaseConverter
    Dim numLetter As List(Of String) = New List(Of String) _
    (New String() {"0",...
  25. Replies
    25
    Views
    2,885

    Re: Converting Listbox.selected index to hex

    which index is it writing 00 for?
  26. Replies
    25
    Views
    2,885

    Re: Converting Listbox.selected index to hex

    This should work for ya (untested cuz i just opened up in a text editor)

    I'm sorry that this took so long for it to work (hopefully im not saying that prematurely)
  27. Replies
    25
    Views
    2,885

    Re: Converting Listbox.selected index to hex

    Thats because I had to use those functions with the BigInteger class, If you give me a couple mins I'll post one w/o the class that should work.
  28. Replies
    25
    Views
    2,885

    Re: Converting Listbox.selected index to hex

    Shoot, if need be you can do a ctrl+f then go to find and replace BigInteger with Integer,

    On the other hand, if you have vs2010 with the .NET 4.0 framework, add a reference to System.Numerics...
  29. Replies
    25
    Views
    2,885

    Re: Converting Listbox.selected index to hex

    I changed it in the code example on the page, but i'd change the

    Function BaseConvert(Byval base as Integer....)
    to
    Function BaseConvert(Byval base as Byte.....)

    I accidentally forgot to...
  30. Replies
    25
    Views
    2,885

    Re: Converting Listbox.selected index to hex

    if you wish you could use the function in my sig, you would call it like this:

    Writer.WriteUint16(BaseConvert(2,16,Ctype(ListBox1.SelectedIndex,String))) 'my function returns a string with the hex...
  31. Replies
    7
    Views
    1,599

    VS 2005 Re: Speech

    not sure if its the same in 2005 as it is in 2010, but just incase:

    Project --> Add Reference
  32. Re: Make controls fully fit on form when expand

    you would have to add some code into the me.resize event, for example, to keep a control centered (horizontally, you would add this)



    control.y = me.width / 2 - control.width / 2


    and thats...
  33. Replies
    9
    Views
    1,011

    VS 2008 Re: Putting Variables to Txt file

    ^what jumax said, but if they are not in an array, take out the For...Next loop and do this instead:



    outputfile.writeline(Ctype(variable1,String)) 'using the Ctype string just incase the...
  34. Re: Incrementing a value in the registry by 1

    perhaps instead of just the +1 you could do:



    regKey2.SetValue("Test", regKey2.GetValue("Test") + 1)


    I'm not sure If .GetValue is correct, but there should be something simular to it (I...
  35. Replies
    3
    Views
    5,483

    Re: Base Converter

    Imports System.Numerics

    Public Class BaseConverter
    Dim numLetter As List(Of String) = New List(Of String) _
    (New String() {"0", "1", "2", "3", "4",...
  36. Replies
    3
    Views
    5,483

    Base Converter

    This Function is a Base converter that will take in any value from any base for [2,36] (I believe [] means inclusive, if I am mistaken, please correct me.)

    The main difference between mine and...
  37. Replies
    11
    Views
    1,729

    VS 2010 Re: LOTS of timers

    here is an idea, make a class for each test using this (or a simular structure)

    class test
    property LastRun
    function RunTest()
    end class

    'when you check in your timer thread, you...
  38. Thread: Help!

    by patplays852
    Replies
    3
    Views
    706

    VS 2010 Re: Help!

    take a look at this site:

    http://www.homeandlearn.co.uk/net/nets11p2.html

    It will show you how to set up a class, at the bottom of the page there are links to go to the next page in the tutorial
  39. Replies
    10
    Views
    1,344

    Re: Getting multiple index value from array

    from that first line of code you forgot to put a - 1 at the end.

    Everything looks ok in the logic of this code, but running it gives me REALLY screwy results...

    So If anyone else can help,...
  40. Replies
    10
    Views
    1,344

    Re: Getting multiple index value from array

    this should work:


    Dim results As New ArrayList
    Dim abc(25) As String
    abc(0) = "a"
    abc(1) = "b"
    abc(2) = "c"
    abc(3) = "d"
    abc(4)...
Results 1 to 40 of 86
Page 1 of 3 1 2 3



Click Here to Expand Forum to Full Width