Search Results - VBForums

Search:

Type: Posts; User: .paul.

Page 1 of 13 1 2 3 4

Search: Search took 0.27 seconds.

  1. Re: VB 2010 Express Case issue , Having To Type In Input Twice For Output

    Response9 = Console.ReadLine.ToLower 'asks user for input

    Select Case Console.ReadLine.ToLower 'asks user for input
    Case "bye", "ok", "adios", "peace out"
    Console.WriteLine("Bot: One More...
  2. Replies
    6
    Views
    116

    VS 2010 Re: Check for Internet Connection

    try this:



    Public Class Form1

    Private Declare Function InternetGetConnectedState Lib "wininet.dll" (ByRef lpdwFlags As Integer, ByVal dwReserved As Integer) As Integer

    'Internet...
  3. Re: VB 2010 Express Case issue , Having To Type In Input Twice For Output

    every time you call Console.ReadLine you have to provide input
  4. Replies
    1
    Views
    109

    VS 2010 Re: coin change program

    declaring quarters, dimes, nickels, pennies as doubles is wrong. they'll only ever be whole coins.
    you've declared TotalDollars with parameters but you don't use them. and TotalDollars is a function...
  5. Replies
    5
    Views
    160

    VS 2010 Re: Text Replace (If Not statement)

    hve a look at my vb.net hangman in my signature
  6. Replies
    5
    Views
    160

    VS 2010 Re: Text Replace (If Not statement)

    If Not GuessedLetters.Contains("A") Then Label2.Text = Label2.Text.Replace("A", "_")
  7. Re: Only display certain parts of an array question?

    Try this:


    For i = 0 To x - 1 'x-1 bc its already made a new one
    if speeding(i) = "Speeding" Then
    Console.WriteLine(i & ": " & reg(i) & " " & (speeding(i)))
    End if
    Next
  8. Replies
    3
    Views
    163

    VS 2010 Re: Help with recipe program

    Or a single text file for each recipe
  9. Replies
    3
    Views
    163

    VS 2010 Re: Help with recipe program

    You're going to have to make more effort to get much help here.
    How do you intend to store your recipes?

    A database would be the best choice. Alternatively you could use XML, or a text file.
  10. VS 2008 Re: Need help > How to remove data from listview1 and 2 in the same time

    what I changed...

    Your original code was removing items from a collection whilst looping through that collection. This causes the collection to change and subsequently it refers to items which are...
  11. VS 2008 Re: Need help > How to remove data from listview1 and 2 in the same time

    try this:


    For i = 0 To lvPO.SelectedItems.Count - 1
    Dim lvi As ListViewItem
    lvi = lvPO.SelectedItems(i)
    'MessageBox.Show(lvPO.Items(lvPO.SelectedItems(i).Index).SubItems(1).Text)...
  12. VS 2012 Re: can anyone help me with this code? thank you

    try this:



    Public Class Form1

    Private Sub btnExamScores_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExamScores.Click
    Dim achrCorrectAnswers() As...
  13. VS 2010 Re: For Loop using textboxes and checkboxes

    no problem... signing off now
  14. VS 2010 Re: For Loop using textboxes and checkboxes

    Imports System.Windows.Forms

    Public Class AddRemoveBill

    Dim pairs As New Dictionary(Of CheckBox, TextBox)

    Private Sub AddRemoveBill_Load(ByVal sender As System.Object, ByVal e As...
  15. VS 2010 Re: For Loop using textboxes and checkboxes

    to import:


    Imports System.Windows.Forms

    Public Class AddRemoveBill

    for the other question, wouldn't you want to put the enable/disable code in an event handler that handles all of your...
  16. VS 2010 Re: For Loop using textboxes and checkboxes

    If vb doesn't recognize standard windows forms controls in your code it's because you haven't imported system.windows.forms
    The other code i gave you will work if you put it in the right events in...
  17. Replies
    40
    Views
    659

    Re: making of ListView sorting much faster

    Why put in the extra work making a DataGridView look and behave like a ListView in situations where the DataGridView really has no advantages?
  18. Replies
    40
    Views
    659

    Re: making of ListView sorting much faster

    I was thinking of using VB extensions to create an overload of SubItems.Add, where i'd pass in the object, pass the ToString conversion to the standard SubItems.Add, then assign the original object...
  19. Replies
    40
    Views
    659

    Re: making of ListView sorting much faster

    Their ListView sorting is no improvement over my sorter. It requires the user to specify the datatypes for the column:D
  20. Replies
    40
    Views
    659

    Re: making of ListView sorting much faster

    I just meant that the ListView is generally visually more presentable, especially when using Groups.
    I agree it's not a grid control, but there are some programs where it's a better choice, and a...
  21. Replies
    40
    Views
    659

    Re: making of ListView sorting much faster

    It would be useful to have a dedicated Details View ListView with a fairly advanced sorting capability, that I can compile for future use...
  22. Replies
    40
    Views
    659

    Re: making of ListView sorting much faster

    I usually use a listview when i want a better quality un-editable details grid
  23. Replies
    40
    Views
    659

    Re: making of ListView sorting much faster

    That looks good, but what would the tags have to contain as adding to the listview, you generally convert anything to a string. It'd be really easy if icomparable can infer from a string...
    The...
  24. Replies
    40
    Views
    659

    Re: making of ListView sorting much faster

    Could you elaborate on that? I'd be impressed if that works, but I don't expect Goshx to go for the idea as 'it's not universal enough'
    Could be a good opportunity to create an extended ListView,...
  25. VS 2010 Re: For Loop using textboxes and checkboxes

    Notice the Handles clause?
    That's the important part, as you can handle several TextBox_KeyPress events in one sub
  26. Replies
    40
    Views
    659

    Re: making of ListView sorting much faster

    If you want it to be more general you could add sorting for ipv4, ipv6, timespans etc, but you'll still need to tell it which datatype it's sorting...
  27. Replies
    40
    Views
    659

    Re: making of ListView sorting much faster

    the array wouldn't be in the class. it'd be in the form that calls the class.
    that's as universal as it's going to ever be...
  28. Replies
    40
    Views
    659

    Re: making of ListView sorting much faster

    you know which column you want to sort by, so you know which datatype it is.
    if you have a listview with an integer column, a date column, and a string column, you could have an array:


    Dim...
  29. VS 2012 Re: can anyone help me with this code? thank you

    When you post code use
    'your code here

    It will format your code like this:


    'your code here
  30. VS 2012 Re: can anyone help me with this code? thank you

    Instead of this:



    For intCount = 0 To 19
    If achrUserAnswers(19) = achrCorrectAnswers(19) Then
    intCorrect += 1
    AnswersForm.lstAns.items.add("Correct")
    Else
    intIncorrect += 1
  31. VS 2010 Re: For Loop using textboxes and checkboxes

    Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress, TextBox2.KeyPress, TextBox3.KeyPress
    Dim tb as TextBox =...
  32. VS 2010 Re: For Loop using textboxes and checkboxes

    i'd use a dictionary(of CheckBox, TextBox)
    In Form_Load, add the pairs to the dictionary:


    Public Class Form1

    Dim pairs as New Dictionary(of CheckBox, TextBox)

    Public Sub...
  33. Replies
    40
    Views
    659

    Re: making of ListView sorting much faster

    Won't be any quicker though:D
  34. Replies
    40
    Views
    659

    Re: making of ListView sorting much faster

    try my sorter:



    Public Class clsListviewSorter
    Implements IComparer

    Private column As Integer
    Private sorder As SortOrder
    Private columnType As Type
  35. Replies
    7
    Views
    246

    VS 2010 Re: Control Designer Options

    Here's a similar application i wrote that uses custom panels:

    https://code.msdn.microsoft.com/quizControl-65965231
  36. Thread: Draw Rectangle

    by .paul.
    Replies
    4
    Views
    186

    VS 2010 Re: Draw Rectangle

    CreateGraphics does provide an alternative, but you need to be sure it isn't erased.
    In your Form_Load event, the form would have run the Graphics code before fully loading. During the course of...
  37. Thread: Draw Rectangle

    by .paul.
    Replies
    4
    Views
    186

    VS 2010 Re: Draw Rectangle

    CreateGraphics doesn't provide persistent graphics. As soon as the next redraw msg is received, your graphics are erased.
    Use the Form1_Paint event and its e.Graphics parameter member instead...
    ...
  38. Replies
    7
    Views
    203

    VS 2012 Re: Need your help with a temperaure converter

    Where I live, I'm never more than 20 feet away from a cup of coffee, which sounds great but it isn't as it just means I live in a cramped environment.
    If anyone wants to contribute to my 'Buy Paul a...
  39. Replies
    12
    Views
    190

    VS 2012 Re: Calculate Recision Date

    For help calculating holiday dates, have a look at my dropdown calendar control:

    http://www.vbforums.com/showthread.php?639775-dropDown-Calendar-control
  40. Replies
    12
    Views
    190

    VS 2012 Re: Calculate Recision Date

    some holiday dates aren't fixed and need to be calculated year by year
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.