Search:

Type: Posts; User: Aaron Young

Page 1 of 13 1 2 3 4

Search: Search took 0.77 seconds.

  1. Replies
    4
    Views
    1,348

    Re: There Must be a Better Way

    You should be able to adjust your formatting under Tools > Options > Text Editor > C# > Code Style > Formatting.
  2. Re: Delay in data receipt from a 3rd party application

    I think jmcilhinney's point is that you're not really providing anything for us to analyze; without seeing the code, all we can do is guess.
    Without more information, I would speculate that:

    1....
  3. Replies
    49
    Views
    7,330

    VS 2019 Re: Old man needs help

    Have you considered simply validating the resulting input when the user tries to leave the control and force them to enter something that is valid, for example:


    Private Sub...
  4. VS 2019 Re: Process.Start program to emulate Windows command line not working

    Your Arguments property doesn't include a space before the -v parameter, so when it's joined to the targetName variable it results in an invalid filename.
  5. Re: Creating user settings on the fly and issue with debugging an app using user sett

    You could use the ConfigurationManager to save settings to a per-user app.config file, ex:


    // Open and editable configuration file for use by the current user
    ...
  6. Re: Call this.Hide() but the Form is still activated on Win10

    I believe your call to Hide within the Form's Deactivate event is disrupting the Event chain which results in the Main Form remaining inactive.

    You could start a secondary thread and make your...
  7. Replies
    2
    Views
    696

    Re: List Array performing slowly

    I ran a test of your code, though not against an Oracble DB (I used a quick and dirty SQLite database) and my test completed in less than 3 seconds for all 65,000 customers.

    Now, the problem could...
  8. Replies
    4
    Views
    833

    2.0 Re: XML parsing efficiency

    Another quick and dirty method would be to utilize the DataTable's Read/Write XML methods:
    private void WriteSettings()
    {
    DataTable settings = new DataTable("Settings");
    ...
  9. Replies
    6
    Views
    12,892

    Re: VB - AssociateMyApp (File Association)

    Option Explicit

    Private Sub Command1_Click()
    AssociateMyApp "SDF File Type", "C:\MyApp.exe %1", "sdf", , "C:\SDF.ico"
    End Sub
  10. Re: [2005] checkbox and listbox check

    In my example, did you include the line: ' Create a list of all the Checkboxes (could use a container control instead)
    Dim checkBoxes As New List(Of CheckBox)(New CheckBox() _
    ...
  11. Re: [2005] checkbox and listbox check

    You could try something like this: ' Create a list of all the Checkboxes (could use a container control instead)
    Dim checkBoxes As New List(Of CheckBox)(New CheckBox() _
    ...
  12. Replies
    1
    Views
    506

    Re: [2005] ListBox Change

    Try something like this: Private Sub ListBox1_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListBox1.MouseDown
    If e.Button =...
  13. Replies
    3
    Views
    676

    Re: Reading strings in Binary file

    You can read a file in blocks using the StreamReader class, i.e. Public Sub ReadBinFile(ByVal filename As String)
    Dim colors As New ArrayList()
    Dim food As New ArrayList()

    '...
  14. Replies
    10
    Views
    974

    Re: [2005] Getting every file in directory

    Using a Generic List of strings will make it easier to add to the list of files as you're recursing the folders, which can be done easily with the IO namespace: Public Function GetAllFiles(ByVal...
  15. Replies
    2
    Views
    4,928

    Re: RegSetValueEx dword problem

    Here's a library of Registry functions I put together, including a function to write long (DWORD) values;

    In a standard module:Option Explicit

    ' Win32 API Declarations
    Private Const...
  16. Re: How to find the very first file created in a given directory

    Here's one way:Public Function GetOldestFileFromDir( _
    ByVal filePathAndPattern As String, _
    Optional ByVal attributes As VbFileAttribute = vbNormal) As String

    Dim strFile As String
    Dim...
  17. Re: Need Help to create a xml from existing xml file.

    You should be able to apply the techniques I've shown you in your other post to this problem.

    Regards,

    - Aaron.
  18. Re: Need Help in XML and vb to retrieve values

    You can use the Micrsoft XML DOM to manipulate XML documents very easily,
    here's an example...

    note: I have used latebinding here for the sake of making the example simple to run,
    you would...
  19. Re: pc idle state(not used by user): as screen savers work

    You could set a system-wide JournalRecord hook using the SetWindowsHookEx Win32 API
    and use it to monitor user input, in turn using that to determine when the system is idle, i.e.

    In a Standard...
  20. Re: Copying from one array to another

    Here's an example using the CopyMemory API which should improve performance,
    especially on larger arrays as it can copy entire rows at once.Option Explicit

    ' Win32 API Declaration
    Private...
  21. Replies
    9
    Views
    735

    Re: Multi-Step Operation? what is this?

    Microsoft Data Access Components, it's the underlying technology for ADO and other Data Access methodologies.

    http://msdn.microsoft.com/data/mdac/default.aspx

    Regards,

    - Aaron.
  22. Replies
    1
    Views
    783

    Re: vb6 pattern generation

    Here's an example of generating the combinations:Option Explicit

    Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

    Private m_flgStop As Boolean

    Private Sub...
  23. Thread: send email

    by Aaron Young
    Replies
    1
    Views
    691

    Re: send email

    Try inserting a call to ResolveName after setting your Recipient properties:Option Explicit

    Private Sub Command1_Click()
    MAPISession1.SignOn
    MAPIMessages1.SessionID = MAPISession1.SessionID...
  24. Replies
    9
    Views
    735

    Re: Multi-Step Operation? what is this?

    Are you sure it points to statements exactly like that?

    Typically I've run into this error when trying to "update" data, normally (for me),
    it was caused by trying to assign a value to a string...
  25. Re: how do you save the background of an application

    There are a number of ways to do this, the simplest is probably to use the supplied
    GetSetting and SaveSetting functions to store the background color
    in the registry:Option Explicit

    Private Sub...
  26. Replies
    4
    Views
    774

    Re: pop up confirmation

    If MessageBox.Show("Are you sure you want to delete?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) = DialogResult.Yes Then
    ' Do Delete Here.
    End...
  27. Replies
    3
    Views
    708

    Re: [02/03] Datagrid No currentcell

    I don't think so, no. Even when the Grid has no data, it still has a CurrentCell value of (0, 0).
    What exaclty are you trying to do, perhaps there's another approach that will acheive what you're...
  28. Replies
    8
    Views
    752

    Re: How do I make a file selection form?

    Add a Drive, DirListBox and FileListBox control to your form:Option Explicit

    Private Sub Drive1_Change()
    ' When the drive selection changes
    ' update the folder list
    Dir1.Path =...
  29. Replies
    2
    Views
    583

    Re: Creating new folders with attributes

    You can create shares using the Windows Management Instrumentation (WMI) API, i.e.

    In a Class <WindowsManagementMethods>:
    ' Import the Windows Management API - You'll need the
    '...
  30. Replies
    12
    Views
    42,025

    Re: write to notepad(.txt) using vb6

    You could just write the code out to a text file and launch the file with Notepad,
    otherwise you can use the Shell and SendKeys statements, i.e.Option Explicit

    Private Sub Command1_Click()
    ...
  31. Re: how to output registery folder names and key inside it in to listbox?

    Just add additional calls to the GetRegKeyValue() function, i.e. ...
    ' Get the username
    strUser = strUsers(lngKeyIndex)
    ' Now query the registry for this user's "Id" value
    ...
  32. Re: Object Variable or With block variable not set

    Are you checking for EOF and BOF before querying the value of the Recordset field?
    It could be your Find operation didn't yield any results.

    Regards,

    - Aaron.
  33. Re: sql server notification services with vb6

    From what I understand the SQL Server Notification Services are built on
    the .NET 2.0 Framework and supported through the SqlClient API in .NET

    So, technically, you probably could access the...
  34. Re: how to output registery folder names and key inside it in to listbox?

    Primarily you need to utilize the RegEnumKeyEx and RegQueryValueEx Win32 API's, i.e.

    In a Standard Module:Option Explicit

    ' Win32 API Declarations
    Private Const SYNCHRONIZE = &H100000
    Private...
  35. Re: Loop though an object getting key and value

    Try: Dim Rows As Object
    Dim Row As Object
    Dim Col As Object
    Dim winMgmts As Object

    Set winMgmts = GetObject("winmgmts:\\127.0.0.1\root\CIMV2")

    Set Rows = winMgmts. _
    ...
  36. Replies
    8
    Views
    978

    Re: running on startup

    Quick and dirty:Option Explicit

    Private Declare Function RegSetValueEx Lib "advapi32.dll" Alias "RegSetValueExA" (ByVal hKey As Long, ByVal lpValueName As String, ByVal Reserved As Long, ByVal...
  37. Replies
    8
    Views
    978

    Re: running on startup

    One way to have your application load when Windows starts is to place an entry in:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run

    You're unlikely to find a "fool-proof" way, the...
  38. Replies
    2
    Views
    1,041

    Re: Dir() reentrancy?

    There are a number of ways to approach this problem.
    As you have so many files to check, it may make sense to just
    enumerate the files in the directory once and then sort out what to do with
    them...
  39. Re: [RESOLVED] Text box LostFocus validation problem

    Instead of using the LostFocus event, use the Validate event
    and you won't need to use any kind of loop.Private Sub Text1_Validate(Cancel As Boolean)
    If Len(Text1.Text) < 7 And Len(Text1.Text) >...
  40. Replies
    5
    Views
    727

    Re: alter table error

    You're probably right, the code didn't elaborate though,
    so I just gave the basic syntax correction.

    - Aaron.
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width