dcsimg

Search:

Type: Posts; User: 4x2y

Page 1 of 13 1 2 3 4

Search: Search took 0.10 seconds.

  1. Replies
    12
    Views
    408

    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
    ...
  2. Replies
    11
    Views
    324

    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
    ...
  3. 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)
  4. Replies
    1
    Views
    153

    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...
  5. 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...
  6. Replies
    3
    Views
    579

    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.
  7. Replies
    3
    Views
    240

    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...
  8. Replies
    6
    Views
    1,028

    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.
  9. 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...
  10. Replies
    4
    Views
    338

    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...
  11. Replies
    4
    Views
    338

    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...
  12. Thread: Program on TOP

    by 4x2y
    Replies
    3
    Views
    251

    Re: Program on TOP

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

    You are welcome, please mark this thread as resolve
  14. Re: converted to utf-8 during the import

    You have to read with the correct encoding then save it as UTF-8 to convert it

    To read

    Private Sub BtnPlayer_Click(sender As Object, e As EventArgs) Handles BtnPlayer.Click
    If...
  15. Re: converted to utf-8 during the import

    Is the file actually UTF-8? Post the code lines that you are using to read it.
  16. Re: UpperCase specific words(if found) in textbox on spacebar keypress

    Or this one

    Option Strict On
    Option Explicit On

    Public Class Form1
    Dim mylookup As New List(Of String)

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As...
  17. Re: Increment integer in string after appending file

    Try this new version

    Set objFile = CreateObject("Scripting.FileSystemObject").OpenTextFile("C:\ProgramData\Lockheed Martin\Prepar3D v4\add-ons.cfg",1,-2)
    cfgText = objFile.ReadAll()...
  18. Re: Increment integer in string after appending file

    Yes, read the file and pass its contents to the function.


    Yes, that's why i read the file using system default encoding (-2)...
  19. Re: Increment integer in string after appending file

    Pass your .cfg text file contents to the following function which will return next N you should use

    Private Function GetNextNumber(strFileText)
    a = InStrRev(strFileText, "[Package.") + 9
    ...
  20. VS 2015 Re: [HELP CODING] make a list with 16 label.txt and create a txt file![easy]

    Put all Labels in a Panel container then use the following code

    Option Strict On
    Option Explicit On

    Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles...
  21. Replies
    4
    Views
    353

    Re: [RESOLVED] ZOrder problem with ToolTip

    Another solution is calling the following method after calling CreateToolTip

    Public Sub SetTopMost()
    SetWindowPos hwndTT, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW Or...
  22. Re: How to copy textbox 1 to another textbox with same time without button

    Use Text2_Change event

    Private Sub Text2_Change()
    Text1.Text = Text2.Text
    If Text2.SelStart >= 16 Then
    MsgBox ("Over Than Twenty") 'if character more than 16 then pop up the...
  23. VS 2013 Re: Saving image from a picturebox, including the 'processed' background image.

    Try this


    Dim bmp As New Bitmap(PictureBox1.BackgroundImage, PictureBox1.Width, PictureBox1.Height)
    bmp.Save("C:\test.png", Imaging.ImageFormat.Png)
  24. Re: VB6 SimpleTabStrip (incl. Close-Button - MultiSelect and Split)

    Nice work :thumb:
  25. Re: VB6 IDE run as admin no longer remembers its maximized state in Windows 10 ver. 1

    Yes, i said "the reason is ... isn't enabled"
  26. Re: VB6 IDE run as admin no longer remembers its maximized state in Windows 10 ver. 1

    After some investigation I found that the reason is that the option to prompt for project on VB starts isn't enabled, showing that dialog prevent IDE to restore normal state, this option is here to...
  27. Replies
    20
    Views
    12,607

    Re: Contest 13 - Morse Code Translator

    The previous competitions were hidden, or at least they were concealed as soon as possible, that doesn't encourage to subscribe.
    More over how come posting a solution in Code Bank forum before the...
  28. VS 2017 Re: [Need Fast Help] Making a textbox/listbox's items go in order on requests.

    Move itemIndex += 1 below Label1.Text = ListBox1.GetItemText(ListBox1.Items(itemIndex))
  29. VS 2017 Re: [Need Fast Help] Making a textbox/listbox's items go in order on requests.

    So why you are using Random class?

    For TextBox use Lines property
  30. VS 2010 Re: Capturing the active window without the title bar

    Someday i made the following code to create a time lapse or slow motion from a video,

    Option Strict On
    Option Explicit On

    Public Class Form1

    Private Structure RECT
    Public Left...
  31. Re: Add item to a combobox items collection at run time

    I guess these numbers are come from my sample code, i think you need to add another button to remove any entry that may added by mistake or no needed anymore, try this

    Private Sub...
  32. Re: Add item to a combobox items collection at run time

    Show us your exact code, it supposed to be something like this

    My.Settings.ComboBox1Items.Add(ComboBox1.Text)
  33. Re: Add item to a combobox items collection at run time

    So, your main problem has been resolved


    This is another issue, what's type of USD, EUR?
  34. Re: Add item to a combobox items collection at run time

    I have named the setting as ComboBox1Items, if you named it different then replace ComboBox1Items with your setting name.
  35. Re: Add item to a combobox items collection at run time

    You have to create it, read again above steps (2 & 3)
  36. Re: Add item to a combobox items collection at run time

    The easiest way is using My.Settings, here is an example to load/save ComboBox items

    * Start new project, add Button1 and ComboBox1
    * Go to Project> Properties> Settings tab
    * Create a new...
  37. Replies
    1
    Views
    422

    Re: Refresh Listview problem VB6

    It seems that the problem is the Width of the ListView, as it is contain a Scroll Bar in the first image only.
  38. Replies
    4
    Views
    471

    Re: Having trouble defining my own data type UDT

    By default Function or Sub is Public if they declared as you did, so you have to replace

    Function LINEST_UNITS(ID) As Forecast

    with

    Private Function LINEST_UNITS(ID) As Forecast
  39. Re: Refresh form1 to reflect new records which modified from form2?

    Try something like this


    If Form2.ShowDialog = DialogResult.OK Then
    ' call a method to refresh GridView1
    End If
  40. Replies
    19
    Views
    1,124

    Re: [RESOLVED] Need the combobox name not the text

    Can you please explain with an example code how to differentiate them without accessing a property? It could be Tag, Text, Name, Location or whatever, the proper property is depend on the method...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width