dcsimg

Search:

Type: Posts; User: 4x2y

Page 1 of 13 1 2 3 4

Search: Search took 1.32 seconds.

  1. Re: Changing letters in sentence from upper to lower and vice versa

    I was aware about this point (see above replay #5) but i didn't implement that case to let him fix or ask for a solution if he fail :)

    Another way using Select Case instead of If

    ...
  2. Re: Changing letters in sentence from upper to lower and vice versa

    It is not difficult if you organized your ideas, also well named variables helps readability and understanding, try to follow this


    '1. define a variable named strIn to receive user's input
    ...
  3. Re: Changing letters in sentence from upper to lower and vice versa

    After receiving user's input in SENTENCE variable, use code like the following to detect each character case


    For j = 0 To SENTENCE.Length - 1
    c = SENTENCE.Substring(j, 1)
    ...
  4. Replies
    17
    Views
    405

    Re: export listview to textbox

    Try this

    Private Sub lvw_ItemCheck(ByVal Item As MSComctlLib.ListItem)
    Dim i As Long
    Dim n As Long
    Dim t As String

    For i = 1 To lvw.ListItems.Count
    If...
  5. Re: VB.NET 2010 QUESTION: Is it possible to 'theme' a scrollbar?

    You can use classic theme for your .NET app by unchecking the option Enable XP visual styles, find it in project Properties> Application page
  6. Replies
    7
    Views
    317

    Re: Center Picture2 in Picture1

    I think you have to think of setting Picture1 as parent of Picture2, this may save you a lot of extra calculation if you move both relatively, to do at run time

    Private Sub Form_Load()
    Set...
  7. Replies
    7
    Views
    317

    Re: Center Picture2 in Picture1

    See my above reply #4
  8. Replies
    7
    Views
    317

    Re: Center Picture2 in Picture1

    That code is OK if Picture1 is parent of Picture2, if it isn't then you should use the following code

    Picture2.Left = Picture1.Left + (Picture1.Width / 2) - (Picture2.Width / 2)
    Picture2.Top =...
  9. Re: Learning : How to Grab string from left or maybe right

    Try this new version

    Private Function Find(ByVal strSearchIn As String) As String()
    Dim sI() As String
    Dim sF() As String
    Dim sRet() As String
    Dim j As Long
    Dim c As Long...
  10. Re: Learning : How to Grab string from left or maybe right

    Can you be more clear? First you said that you want to extract 1941u, 1941j, 1941, and now say you want to extract all list!
  11. Re: Learning : How to Grab string from left or maybe right

    Try this function

    Private Function Find(ByVal strSearchIn As String, ByVal strSearchFor As String) As String()
    Dim sI() As String
    Dim sF() As String
    Dim sRet() As String
    Dim j...
  12. Re: Adding pictureBox to panel with codes

    You have to iterate controls in pnlAuditorium1 not Me

    Public Class frmMain
    Dim availableIcon As New System.Drawing.Bitmap(My.Resources.Available)
    Dim provisionalIcon As New...
  13. Re: Adding pictureBox to panel with codes

    To add a PictureBox to Panel, specify Panel's Controls property instead of Form's Controls property e.g.


    Panel1.Controls.Add(PictureBox1)
  14. Re: Focusing a running program discriminated by its caption

    Try the attached project

    171367
  15. Replies
    4
    Views
    273

    Re: pause alternative ways

    Your mistake is declaring Seconds param as Long instead of Single, so if you call it with 0.1, it will be round to 0 and call it with 0.6, it will be round to 1

    Try this optimized code

    Public...
  16. Replies
    13
    Views
    531

    Re: how do i add these strings. filter

    My code (post #5) will do what you ask for.
  17. Replies
    13
    Views
    531

    Re: how do i add these strings. filter

    Start new project, add Command1, File1, List1 and List2 then paste the following code and run

    It is quick and dirty code but you can adapt it to meet your needs.

    I'm using File control which is...
  18. Replies
    2
    Views
    321

    Re: Stopwatch with Nanoseconds vb6

    Do need a high precision timer? If so, see this http://www.devx.com/vb2themax/Tip/18482
  19. Re: VS 2017 listview Control Acting Strange

    Yes,
  20. Re: VS 2017 listview Control Acting Strange

    That's because LsvwCusts_ItemChecked is called each time adding an item, to resolve this issue use RemoveHandler before populating the ListView and AddHandler after finishing e.g.


    Private...
  21. Thread: 13 years

    by 4x2y
    Replies
    59
    Views
    2,279

    Re: 13 years

    For me today is exactly 13 years :) Sep 15th, 2006
  22. Re: VS 2017 listview Control Acting Strange

    Try this

    Private Sub LsvwCusts_ItemChecked(sender As Object, e As ItemCheckedEventArgs) Handles LsvwCusts.ItemChecked
    LblCustomerCount.Text = CStr(LsvwCusts.CheckedItems.Count)
    ...
  23. Thread: Get between help

    by 4x2y
    Replies
    4
    Views
    396

    Re: split this data and get string in list1

    I have created a function called GetNotFoundList that you pass a file contents and it will returns all lines contains "NOT FOUND" string, to test

    1- Start new project, add Command1, List1 and...
  24. Re: Get Firefox Master List of About:Config

    I made a little macro that do the following
    1- Send <Ctrl+C> to Firefox
    2- Get clipboard text and save the setting name only in a string variable named f
    3- Send <Down> arrow
    4- Goto step #1...
  25. Replies
    1
    Views
    313

    VS 2015 Re: Custom Datetime Picker

    It is possible to show an empty DateTimePicker like this


    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

    If IsDate(dt) Then ' dt is a date string...
  26. Replies
    10
    Views
    1,634

    Re: ReadFileDirectlyToString

    If you are interested only to know whether the two files are identical without needing to know what and/or where is the difference then you can simply create the hash code of the two file and compare...
  27. Replies
    8
    Views
    534

    Re: Initializing an array

    If it is String array, you can use Split function

    Option Explicit

    Private MyArray() As String

    Private Sub Form_Load()
    MyArray = Split("310,191,272,etc,etc", ",")
    End Sub
  28. Replies
    12
    Views
    670

    Re: Multi condition in VB?

    @cosmicmurder

    Enclose the code between [code] tag not [quote] and also indent it to easily follow nested statements


    Sub CopyRimColor()
    Dim screenText As String

    With Session
    ...
  29. Replies
    11
    Views
    568

    Re: LINE()-() on UserControl

    You can use Shape control to draw the border, e.g.

    Private Sub Redraw()

    If VarPicture Is Nothing Then
    UserControl.BackColor = VarBackColor
    Else
    ...
  30. VS 2017 Re: Vistview - retrieve the index of a selected sub item.

    Actually it has because you cannot retrieve a subitem's Text without knowing its index, e.g. 2 is the index of the subitem in the following line


    MsgIndex = CInt(Item.SubItems(2).Text)
  31. Replies
    1
    Views
    248

    Re: How can I use a slash in a path name?

    It is nice that you have figured it out yourself, it is good to post your solution to help others may have the same problem, and also to get advice from power members in case there are better...
  32. Re: How to compare encrypted password in database with newly entered password when lo

    As far as the code enters the Catch block, that's mean there is an error occurred in Try block, you have to check the exception ex to know that error.

    Read Try...Catch documentation...
  33. Replies
    3
    Views
    665

    Re: Convert code from VB.net to VB6

    The real problem is not converting syntax from VB.NET to VB6 but it is that the code use the .NET class libraries which aren't available in VB6. There is no way to convert the code.
  34. Replies
    3
    Views
    369

    Re: Open another application with usage syntax.

    It isn't clear what exactly you want to do, but you can pass an order to your app using command line argument...
  35. Replies
    6
    Views
    1,698

    Re: "Mark as the solution" option

    Usually a solution in thread that marked as resolved is the last one (if there are more one), because OP continue asking until he get the answer he want.
  36. Re: How to resize controls within a UserControl proportionately?

    The simple solution is setting Anchor property of the controls in UC at design time, e.g. if all controls above each other, set their Anchor property to Top, Left, Right then rebuild the project and...
  37. Replies
    4
    Views
    398

    Re: Program End/Restart

    Oops, I have posted VB.NET code while it is VB6 forum, sorry. Here is equivalent VB6 code

    Option Explicit

    Private Sub Form_Load()
    If Command = "-r" Then
    MsgBox "This instance has...
  38. Replies
    4
    Views
    398

    Re: Program End/Restart

    Another way is actually re-run from the Form's Closed event, create new project, paste the following code and run


    Option Strict On
    Option Explicit On

    Public Class Form1
    Private Sub...
  39. Thread: Program on TOP

    by 4x2y
    Replies
    3
    Views
    291

    Re: Program on TOP

    This can happen if you switch to another TopMost form or App.
  40. Re: converted to utf-8 during the import

    You are welcome, please mark this thread as resolve
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width