Search Results - VBForums

Search:

Type: Posts; User: dday9

Page 1 of 13 1 2 3 4

Search: Search took 0.11 seconds.

  1. VS 2012 Re: VB.net Split string in text file based on criteria, then append to next line

    Try this:

    'Get the text from the file
    Dim contents As String = My.Computer.FileSystem.ReadAllText("c:/my_file.txt")
    Dim counter As Integer = 0

    'Loop through each letter
    For i As Integer = 0...
  2. Replies
    1
    Views
    71

    Convert DataGridViewCell to Bitmap

    I'm trying to get the bitmap of a DataGridViewCell. The best way to describe it is the DrawToBitmap method on most controls. Is there a built in method for this and if not has somebody already...
  3. VS 2012 Re: Trying to populate a list box with more than one item

    Along with what paul said, you should use
    tags in the future. They help preserve code. Just take a look at what I mean:

    With
    tags:


    Private Sub Foo()
    Dim fooStr As String = "Foo"
  4. Re: FOR..NEXT loop to calculate the sum of n user-inputed values

    Take a look at this example, it's not the most efficient but it abides by your requirements(I think):

    Option Strict On
    Option Explicit On
    Module Module1

    Sub Main()

    Do
  5. Re: TabControl Hide Tab Strip and Tab Strip Scroll?

    If that's the case, then store all the items in a collection(preferably in a List(Of TabPage)). Then whenever you're finished with a TabPage, remove the one from the TabControl, Add the TabPage from...
  6. VS 2013 Re: How to change the color of a word in a textbox

    I have a syntax highlighter code in the codebank, but like kleinma mentions, it uses a Richtextbox, not a TextBox.
  7. Re: TabControl Hide Tab Strip and Tab Strip Scroll?

    If you do not need to see the TabPage, then why have the TabControl visible at all?
  8. Re: VS CheckListBox msgbox on no entry selected

    Same principal would apply, only a different property would be used:

    If ListBox1.SelectedItems.Count = 0 Then
    MessageBox.Show("No value selected.", "Error", MessageBoxButtons.OK,...
  9. Re: VS CheckListBox msgbox on no entry selected

    Try this:

    If CheckedListBox1.CheckedItems.Count = 0 Then
    MessageBox.Show("No value selected.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Information)
    End If
  10. Re: How do i make a set of buttons appear when a button is presed???

    Moderator Actions: Moved thread from Games and Graphics to VB.Net
  11. Replies
    5
    Views
    140

    Re: Using wave-in device

    Moderator Action: Moved thread from VB6 and Earlier Codebank to VB6 and Earlier
  12. Re: What are some cydia resources for game emulator roms?

    I've closed the thread because emulators and roms are illegal and therefor against VBForums Acceptable Use Policy.
  13. Replies
    7
    Views
    137

    VS 2010 Re: How To Use a NumericUpDown tool

    You code is... wow. Before I address how to update just one instead of them all, I want to address a few more important issues.


    Do not set a string to Nothing, rather set it to String.Empty
    ...
  14. Replies
    7
    Views
    137

    VS 2010 Re: How To Use a NumericUpDown tool

    What code are you using that actually changes the value? That's likely where the problem is.
  15. Replies
    2
    Views
    114

    VS 2013 Re: help in editing xml in VB

    The way that I prefer to handle XML files, especially styled like how you have it, is to create a class and serialize it. Take a look at this class:

    Public Class Note

    Public Property [To]...
  16. Replies
    8
    Views
    11,400

    Re: [VB.Net] TicTacToe

    Continued...

    Private Sub CheckEndGame()

    If pnlUpperLeft.Tag.ToString = "x" AndAlso pnlUpperMiddle.Tag.ToString = "x" AndAlso pnlUpperRight.Tag.ToString = "x" Then
    ...
  17. Replies
    8
    Views
    11,400

    Re: [VB.Net] TicTacToe

    Here is an updated version. I've had to break it up into 2 pieces because of the character limit on Vbforums:

    Option Strict On
    Option Explicit On
    Public Class Form1
    'Controls
    Private...
  18. VS 2013 Re: Picturebox.Left and .top (VB6) vs. Picturebox.Location.X and .Y (Can't set)

    I personal move objects by their left and top positions. I find it to be easier because the X and Y properties are read-only so in order to set those you actually have to create a new point.
  19. Replies
    8
    Views
    154

    Re: Get text from website

    Well you're going to have to use GetAttribute and get the Class attribute. The difficulty, as I mentioned, is that it appears as if the class name changes based on the user options.
  20. Replies
    3
    Views
    85

    Re: Merge two text files into one

    You are talking about columns, why not have the file as a database rather than a text file?
  21. Replies
    1
    Views
    68

    VS 2013 Re: Tic Tac Toe AI Issues

    Typically we're very reluctant to download files from a 3rd party website. It's best that you either submit the file as a zip here on Vbforums or simply upload the relevant part of your code using
    ...
  22. VS 2010 Re: Loading list of files into a pre-defined directory into a listbox, then loading t

    I'm assuming that GetFiles is leaving the file open, but I'm not sure as to why. Perhaps somebody else could chime in.
  23. VS 2010 Re: Loading list of files into a pre-defined directory into a listbox, then loading t

    I'd change the path2 variable to implement the IO.Path.Combine:

    Dim path2 As String = IO.Path.Combine(GlobalVariables.FileLocation, "Objects")

    Edit: You could also add all files to the ListBox...
  24. Re: How do i make a set of buttons appear when a button is presed???

    Is the program installed Visual Studios or does it say Visual Basic 2005(or higher)?
  25. VS 2010 Re: Loading list of files into a pre-defined directory into a listbox, then loading t

    No, that's exactly what I expected. This line here:

    NewProject.FolderBrowser.SelectedPath & "\" & GlobalVariables.ProjectName & "\Objects\" & lstFileBrowser.SelectedItem

    Is being treated as an...
  26. VS 2010 Re: Loading list of files into a pre-defined directory into a listbox, then loading t

    Hmm, it could be that it's treating it as an Object rather than a String. Turn option strict and option explicit on and see if it gives you an error.
  27. Replies
    8
    Views
    154

    Re: Get text from website

    This is going to be a bit difficult because it appears as if the class attribute changes depending on the options the user chooses.
  28. VS 2013 Re: HowTo Make Mouse Right Click [CHANGE FROM LEFT TO RIGHT]

    Go to pinvoke's website: http://www.pinvoke.net/
    Search 'mouse_event'
    Click on the appropriate API(second result in my search)
    View the constants for the different mouse events for VB.Net
  29. Replies
    8
    Views
    154

    Re: Get text from website

    I would need to see the HTML of the element that you want to get. It all depends on if there is a class attribute, ID attribute, or none at all.
  30. VS 2010 Re: Loading list of files into a pre-defined directory into a listbox, then loading t

    The file is still open, so whenever you try to open an already opened file it will throw the exception. One thing you should do is wrap your StreamReader in a Using statement:

    Using read As...
  31. Replies
    8
    Views
    154

    Re: Get text from website

    I have moved your last post from this thread: http://www.vbforums.com/showthread.php?778879-Get-Elements-By-Tag-Name-(help) to it's own thread because it was not relevant to the question asked.

    As...
  32. VS 2010 Re: FolderBrowserDialog and Creating Directories?

    That was going to be my next suggestion. To avoid that I typically use IO.Path.Combine.
  33. VS 2010 Re: FolderBrowserDialog and Creating Directories?

    Did it give an exception and are you positive that the path was correct by setting up a breakpoint and watching what SelectedPath and txtProjectName.Text was?
  34. Re: How do i make a set of buttons appear when a button is presed???

    What programming language are you using? Visual Basic 3/4/5/6 or Visual Basic.Net?
  35. Replies
    4
    Views
    165

    VS 2010 Re: Get Elements By Tag Name (help)

    You open up your toolbox in the designer view.
    Expand the Common Controls
    Double-click on the WebBrowser control
  36. Replies
    4
    Views
    165

    VS 2010 Re: Get Elements By Tag Name (help)

    Rather than showing the video in which you're following, you should post the code that you're using. But what seems like what happened is that you tried copying and pasting code into the form's code...
  37. Re: Clipboard.settext(string) throwing exceptions out of no where

    I had mentioned this in your other thread, but it seems as though you may have missed it. You write out the exception in the Catch, but you do nothing with it at all. You aren't displaying it,...
  38. Re: Fixing program crashes that do not throw an exception

    You have a Try/Catch statement, but you do nothing with the exception. That should be the first red flag. While I haven't had the chance to fully read the code, I believe the exception is being...
  39. Re: Fixing program crashes that do not throw an exception

    A NullReferenceException occurs whenever you try to use an object in anyway, but the object is Nothing. Here is an example of where a NullReferenceException would occur:

    Dim foo As List(Of String)...
  40. Re: Fixing program crashes that do not throw an exception

    One thing you should do is wrap the process that crashes into a Try/Catch statement. Then use My.Application.Log.WriteException to document the exception. After an exception gets thrown, ask the user...
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.