Search:

Type: Posts; User: Comintern

Page 1 of 13 1 2 3 4

Search: Search took 0.28 seconds.

  1. Re: VB6 - Treat a file like an array without reading to memory.

    That's kind of correct... The "TestTestTest" string is actually in a file. The code maps the file to memory and places an array structure onto it. This allows the file to treated like an array in...
  2. Replies
    13
    Views
    67,999

    Re: How to read .xls file using vb

    Try using the first snippet. Add a reference to Excel, and replace the debug statement with a write to file. Or, you could wrap it in a function and have it return the vValue variable.

    A search...
  3. Replies
    13
    Views
    67,999

    Re: How to read .xls file using vb

    It's not meant to be compiled alone -- it's just a couple code snippets to demonstrate how to do it. What exactly are you trying to do?
  4. Replies
    19
    Views
    129,882

    Re: VB - Fast Base64 Encoding and Decoding

    Try:

    iFile = FreeFile()
    Open file.bin For Binary As #iFile 'replace with the destination file name.
    Put #iFile, , sBinary
    Close #iFile
    file.bin would be replaced...
  5. Re: Any way to have a form implement and interface?

    I have several different types of displays in ListViews, and need to update all of them in a loop. Right now, I check the TypeName of the forms in a loop through the Forms collection. Problem is,...
  6. Re: How to open a Fax file then to save it as an .tiff image

    We do something similar to this, as our document storage system favors .tifs. Our solution was to just print them all automatically when they come in using the Microsoft Office Document Image...
  7. Replies
    6
    Views
    650

    Re: Classes and errorhandling

    My personal preference is to test for the error instead of using an Exit statement. That lets me put all my cleanup code under the error handler and not have to write it twice. Perfect example of...
  8. Any way to have a form implement and interface?

    I have a handful of MDI forms with the same set of public functions. Is there any way to have a form implement an interface and then test for that interface, ie. "Implements iCustom". I've played...
  9. Re: Stumped -- Compiled executable errors, debug fine.

    Freaky :confused:. This resolved itself when I changed the variable name from lIndex to lColumn. I double checked that lIndex is never used higher than procedure level scope (it wasn't). Looks...
  10. Re: Stumped -- Compiled executable errors, debug fine.

    1.) csColumns is created by splitting a string in the form's initialize event, so it would always have a 0 LBound. I use the same code in a different form as well, and that one works perfectly.
    ...
  11. [RESOLVED] Stumped -- Compiled executable errors, debug fine.

    I can't figure this one out. I get a subscript out of range error in the compiled executable that I'm not getting in the IDE. The error handler that fires is in this routine:

    Private Sub...
  12. Re: Build problem: RMA the RAM or the MB?

    Yep, it's the MB. I just reran the memory tests and noticed that all 3 sticks fail at the same offset. Coincidence? I think not.

    Thanks for the input.
  13. Re: Build problem: RMA the RAM or the MB?

    Yes, I read the manual (I've also been building PCs for 15 years). :)

    The keyboard is PS2 and works fine. The motherboard's splash screen comes up, and I can access a couple other functions...
  14. [RESOLVED] Build problem: RMA the RAM or the MB?

    OK, so I finally got all the parts together for my new build:

    (relevant parts)
    Gigabyte GA-P35C-DS3R
    2 sticks 1GB Crucial Ballistix 12864AA1065 DDR2 1066mHz
    Core 2 Quad 6600 2.4G

    The...
  15. Replies
    3
    Views
    707

    Re: VB 6 Collection

    Seems to work with a Dictionary object. What about using that instead?

    Private Sub Test()

    Dim oDict As Scripting.Dictionary, sArray() As String, lCount As Long

    sArray = Split("T...
  16. Re: [Access] VBA coding to read VBA modules/code in another db

    That's a good question -- I'm assuming that it would since all you're doing is automating the normal opening of the DB file. I've never automated a DB with startup events, but assuming that they...
  17. Replies
    7
    Views
    901

    Re: Select A Candidate Quiz

    I personally like RuPaul.

    http://www.imagehosting.com/out.php/i1526418_ruronpaul.jpg

    Gotta love PhotoShop. :bigyello:
  18. Re: check directory empty or not,if empty delete the directory-vb6

    Set a reference to the Microsoft Scripting Runtime and use the file system objects to walk the directory tree.

    Private Sub EnumFolders(sDrive As String)

    Dim oFS As...
  19. Re: [Access] VBA coding to read VBA modules/code in another db

    Give this a shot. Pass the database path to this function -- it returns an array with the code in each of the code modules:
    Private Function GetAccessCode(sFile As String) As String()

    ...
  20. Replies
    3
    Views
    663

    Re: runtime error 440 and 53.

    What does your program do? The error codes (OLE automation error and "file not found") you're citing would indicate that the problem stems from running as a temp file. I'm guessing there are some...
  21. Replies
    10
    Views
    1,272

    Re: Adding A .chm Help File

    Why does it matter if you need an API call? The code to open a .chm file is trivial:
    Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
    (ByVal...
  22. Re: How can i know if a folder on a server was opened or deleted?

    You might be able to do this with the FindFirstChangeNotification API.
  23. Replies
    5
    Views
    939

    Re: [RESOLVED] delay/ pause

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

    ...

    Sleep 5000 'Pause for 5 seconds.
  24. Replies
    4
    Views
    616

    Re: 12 Hour functions

    Cast the date and time from the string into a Date type and use the DateDiff function:

    Private Sub TryThis()

    Dim sInput As String, dDate As Date

    sInput = "1/17/2008-8:53:25...
  25. Replies
    1
    Views
    1,620

    Re: Range to array of doubles

    I thought this might be possible by hacking the array:

    Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (pDst As Any, pSrc As Any, ByVal ByteLen As Long)

    Private Type...
  26. Replies
    4
    Views
    720

    Re: argument not optional

    For i = 1 To datefilelength
    Call List1.AddItem(events(i).appointments)
    Next i
  27. Replies
    13
    Views
    1,133

    Re: Deleting a file from VB

    How about just using the intrinsic VBA functions?

    Sub Reset()

    If Len(Dir$("C:\temp\Intersect_result.shp")) <> 0 Then
    Kill "C:\temp\Intersect_result.shp"
    End If

    End Sub
  28. Replies
    4
    Views
    872

    Re: teile von einem string löschen

    Willkommen ins VB Forums. Erstmals, Englisch ist die Sprache des Forums. Ich habe ein bissen deutsch, aber nur ein bissen. Versuchen Sie diesen Code:

    If Left$(sData, 8) = "abc123 -" Then
    ...
  29. Re: C++ DLL from VB6 (Run-time error ‘49’: Bad DLL calling convention)

    Have you tried passing a string pointer instead of the actual string (probably a long shot)?

    Private Declare Function SomeFunction Lib "XYZ.dll" ( _
    ByRef FileName As Long, _
    ByRef...
  30. Re: Convert a Decimal into its digits?

    Many ways to skin this cat. I was mainly trying to minimize the string functions. If the calls to Sub1(Var1) etc. are inside the loop, it doesn't really matter what is in the array. You just...
  31. Re: Convert a Decimal into its digits?

    Couple ways to do this. First, you can split any string into characters by passing it through a unicode conversion (sticks a null between each char) and then splitting on the null:

    Private Sub...
  32. Re: comboboxText doesn't stick after value added programmatically

    The zip file is apparently missing a bunch of forms. I suspect though, that you are somehow going through the click event twice. Toss some Debug.Prints in and test the order of events. I'd also...
  33. Re: comboboxText doesn't stick after value added programmatically

    I'm not sure I understand what you want to do then. Are you adding the new record to the ComboBox?
  34. Re: C++ DLL from VB6 (Run-time error ‘49’: Bad DLL calling convention)

    :blush:
    Forgot about that. Regardless, once the .dll call is made you need to manipulate the addresses passed manually into a variable. It works in .NET because you are getting a pointer...
  35. Re: C++ DLL from VB6 (Run-time error ‘49’: Bad DLL calling convention)

    This should be the correct declaration:

    Private Declare Function SomeFunction Lib "XYZ.dll" ( _
    ByVal FileName As String, _
    ByRef PackedTemplatePtr As Long, _
    ByRef PackedMaskPtr As...
  36. Re: comboboxText doesn't stick after value added programmatically

    ComboBoxes have a property that stores the index of the last item added. Just capture that somehow:

    cboBook.ListIndex = cboBook.NewIndex
  37. Re: Reset Directory changed using ChDir()?

    Just cache the current directory and ChDir back to it:

    Dim sTemp As String

    sTemp = CurDir
    ChDir (App.Path & "\subsets\Core\")
    DoubleVar = Shell("install_subse contractor.cmd",...
  38. Replies
    6
    Views
    779

    Re: how to create folder

    You need to add a reference to the Microsoft Scripting Runtime.
  39. Replies
    15
    Views
    1,287

    Re: assign multiple values

    All you need to do is track the state of the button:

    Private Sub Command1_Click()

    Select Case Command1.Tag
    Case vbNullString
    Label1.Caption = "A"
    ...
  40. Replies
    3
    Views
    844

    Re: CommonDiloag MaxFileSize

    Ahhh... Try the GetOpenFileName API. The common dialog control seems to just be a wrapper for the API. No idea why it declares that parameter as an integer though, the OPENFILENAME structure has...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width