Search Results - VBForums

Search:

Type: Posts; User: Edgemeal

Page 1 of 13 1 2 3 4

Search: Search took 0.09 seconds.

  1. Re: Format duplicate text lines in Richtextbox control

    Using what ident showed, then maybe something like,...



    Public Class Form1

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
    '...
  2. Replies
    9
    Views
    208

    VS 2013 Re: Using arrays to display any value

    If you mean to ignore case, then try,
    Dim nameIndex = Array.FindIndex(lines, Function(n) n.ToString.ToLower = txtUser.Text.ToLower & ",")?
  3. Replies
    9
    Views
    208

    VS 2013 Re: Using arrays to display any value

    Sticking to simple string array, load file into string array separated by lines. Use Array.FindIndex to find user and loop thru array until next user in array is detected?...



    Private lines As...
  4. VS 2010 Re: Help me take icon from shortcut or file and enlarge it to picturebox

    try,


    With PictureBox1
    .SizeMode = PictureBoxSizeMode.StretchImage
    .Size = New Size(200, 200)
    .Image = Drawing.Icon.ExtractAssociatedIcon("somefile.exe").ToBitmap
    End With
  5. Re: Why a ListView in .NET is not the same as in Windows?

    Try using SetWindowTheme API,
    http://www.vbforums.com/showthread.php?645589
    http://www.vbforums.com/showthread.php?647404
  6. Replies
    6
    Views
    202

    VS 2013 Re: [RESOLVED] Class Question (Strings)

    Ya, for what you doing TnTinMN's solution looks easier to use then Pradeep1210's code I linked to!
  7. Replies
    6
    Views
    202

    VS 2013 Re: Class Question (Strings)

    Maybe use an Enum?, but to use strings you'd need to do some extra work, I found this thread, Enum to represent String constants

    Quick test, seems to work OK , and easier then trying to remember...
  8. Replies
    4
    Views
    323

    Re: String Between Function / Parser

    As far as ".Net" syntax goes your code looks more like VB6.

    The first thing I'd do is set Option Strict to On if Off in vb options/project settings

    Some unnecessary things,...
    ...
  9. Replies
    6
    Views
    215

    Re: Text Catch

    One basic way, uses Split,...


    Public Class Form1

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
    TextBox1.Text = " How are you -I am...
  10. VS 2008 Re: Listview columnheader No wndproc on mouse move :(

    What if you set up a NativeWindow to watch the LV header messages?

    Rough idea, tested from a LV on a form,
    Dim hc As New HeaderControl(Me.ListViewOwnerDraw1)



    Imports...
  11. Re: Need help with a sendkey function.

    Just a wild guess going by some info on MSDN here,...


    ' Add reference "Microsoft Internet Controls" (from COM tab).
    Imports SHDocVw
    Public Class Form1

    Private Sub Button1_Click(sender...
  12. Re: Need help with a sendkey function.

    Try it like this,..



    Dim objShell = CreateObject("WScript.Shell")
    Dim Success = objShell.AppActivate("Message from webpage")

    Do Until Success = True
    Threading.Thread.Sleep(1000)
    ...
  13. Replies
    1
    Views
    128

    Re: Selected item Index in Ascending order

    It seems you have resolved this on MSDN here, If true then please mark this thread as Resolved, it may help others in the future and also lets the rest of us know you no longer need help on this.
    ...
  14. Replies
    3
    Views
    217

    VS 2010 Re: Navigating Panelled Forms

    I suppose to be OOP correct you'd want to create a class so you can set the main parent form, etc,etc, but just as a concept where form1 is the startup form this should work, though I just used one...
  15. Re: Remove empty RichTextBox lines using LINQ

    something like?...


    RTB.Lines = (From line In RTB.Lines Select line Where line <> "").ToArray
  16. VS 2008 Re: Change Mouse Hoover Background and Foreground

    If you just want to change the default colors the author used it should be fairly easy, look at Sub OnRenderMenuItemBackground, he used variables defined in clsColors (clrSelectedBG_Header_Blue,...
  17. Replies
    4
    Views
    258

    VS 2012 Re: Post form to default browser

    If you mean join the strings?..

    System.Diagnostics.Process.Start("https://" & textbox1.Text & "." & combobox1.Text)

    Concatenation Operators in Visual Basic...
  18. Replies
    11
    Views
    14,118

    Re: [VB10] VBForums Reputations Saver 3

    I typically use free images I find online, and icons included with VS 2010.
  19. Replies
    4
    Views
    196

    Re: Get Thumb Size of Scrollbar

    Oh, I'm not aware of any straight forward way to get the size of the actual thumb.
    I thought those two sys-info properties were actually referring to the repeatable buttons on the ends of the bar. :o
  20. Replies
    4
    Views
    196

    Re: Get Thumb Size of Scrollbar

    Well VerticalScrollBarThumbHeight and HorizontalScrollBarThumbWidth seem to be reporting exactly what Windows scrollbars are currently sized to, quick test... I switch Win7 to basic theme, change...
  21. Replies
    7
    Views
    248

    VS 2010 Re: Array of PictureBoxes (Error)

    If its a grid then you shouldn't even need to store anything in the Tag property, and can just do the math to get its location in the grid, something like,..



    Public Class Form1

    Private...
  22. VS 2010 Re: Convert/Compare text to date time

    Thanks! :thumb:
  23. VS 2010 [RESOLVED] Convert/Compare text to date time

    Is there an easy way to parse a date time from a string like, "12 Jan 11:15 am" ? I'm having a hard time figuring out how I could just convert that into a date so I can compare it to Now, I need to...
  24. Replies
    11
    Views
    14,118

    Re: [VB10] VBForums Reputations Saver 3

    I wasn't going to upload updates for this app anymore but I just noticed the forum version updated (from 4.2.0 to 4.2.2) and found a bug in the old code, so posted up a new version for anyone still...
  25. Replies
    2
    Views
    228

    Re: VB 2010 Express Changing Code at Runtime

    You don't! What you do is have fields for each type of data you want for each person,.. Name, Account, Login, DOB, etc, etc,. Based on the data in those fields for a person you decide what should be...
  26. VS 2010 Re: Setting many values in a For...Next loop and Graphics help

    That doesn't do anything to the elements in the list. To change and access the elements try looping thru them by their index...



    For i = 0 To PtList.Count - 1
    PtList(i) = New...
  27. Re: Set textbox height according to amount of text

    Try adding the TextBoxControl flag?, other then that not sure, good luck!



    Private Sub SetTextHeight(textBox As TextBox)
    With textBox
    Dim newHeight =...
  28. Re: Set textbox height according to amount of text

    This any better?...


    Public Class Form1

    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
    With TextBox1
    .Multiline = True
    ...
  29. Re: HELP with strings and fornext loop please!!

    Another way to go would be to find the space in the name, like this....


    For Cnt = 0 To (Name.Length) - 1
    ' find space in name
    If Name.Chars(Cnt) = " " Then
    ' get char after...
  30. Replies
    4
    Views
    160

    Re: ProgressBar forecolor

    If you want to keep styles enabled, try this,


    Imports System.Runtime.InteropServices

    Public Class Form1

    Private Const WM_USER As Int32 = &H400
    Private Const PBM_SETSTATE As Int32...
  31. VS 2010 Re: How can I change many textboxes's property with a loop?

    See FAQ...
    How do I mark a thread Resolved?
    http://www.vbforums.com/faq.php?faq=vb_faq
  32. Thread: Linq Query

    by Edgemeal
    Replies
    3
    Views
    143

    Re: Linq Query

    First way will work fine, I do it all the time,

    see MSDN, Using Statement (Visual Basic)
    A Using block behaves like a Try...Finally construction in which the Try block uses the resources and the...
  33. Thread: Linq Query

    by Edgemeal
    Replies
    3
    Views
    143

    Re: Linq Query

    try something like,


    ListBox1.Items.AddRange(msgs.Where(Function(item) item <> "").ToArray)

    ListBox1.Items.AddRange(msgs.Where(Function(item) item.Trim <> "").ToArray)
    ...
  34. Re: [VB2010] Get data from external ComboBox

    For clearing all items I just noticed there is the CB_RESETCONTENT message,
    Const CB_RESETCONTENT = &H14B
    http://msdn.microsoft.com/en-us/library/windows/desktop/bb775878%28v=vs.85%29.aspx
    Removes...
  35. Re: [VB2010] Get data from external ComboBox

    See if this helps,



    Imports System.Runtime.InteropServices

    Public Class Form1
    Private Const CB_GETCOUNT As Int32 = &H146
    Private Const CB_GETCURSEL As Int32 = &H147
    Private...
  36. Replies
    10
    Views
    296

    VS 2010 Re: Two Questions about Lines in an Array

    What is != ? (Typo ?, New for 2015 ? )
    Shown as error in VS2010.
    Thanks.
  37. Replies
    3
    Views
    209

    Re: Using a Textbox to search a Listbox

    #1 , maybe loop thru the items and find the one that contains the same word.
    #2, use EM_SETCUEBANNER.



    Imports System.Runtime.InteropServices

    Public Class Form1

    Private Const...
  38. VS 2010 Re: How to check if the current day is the first weekday of month?

    Is this your entry for...,
    Hardest one liner code to read on VBF in 2014?

    :)

    Happy New Year! :wave:
  39. VS 2012 Re: Result from Combobox as different Variable

    Shouldn't that be .SelectedIndex + 1? (top item index = 0.)
  40. Replies
    4
    Views
    255

    VS 02/03 Re: textfile as database

    There are probably 100 different ways to do it, for just two string variables I probably wouldn't bother getting too fancy and just use some basic stuff , something like this,,



    Public Class...
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.