dcsimg

Search:

Type: Posts; User: VBClassicRocks

Page 1 of 13 1 2 3 4

Search: Search took 0.49 seconds.

  1. Re: How to read file that just create in same project

    1. 'open "temp.txt" as output as #2' syntax error
    2. Not sure where temp.txt is going unless you have done a ChDir to somewhere
    3. Always use FreeFile to get an open file number



    Private...
  2. Replies
    2
    Views
    353

    Re: Help: Date Sequence

    DateSerial & DateAdd are useful for this


    Option Explicit
    Private Sub Form_Load()
    Dim SD As Date
    Dim DA() As Date
    Dim i As Long
    SD = DateSerial(2015, 12, 27)
    FillArr DA(), 7, SD 'count...
  3. Re: autocomplete combobox with recordset

    I use this in an ado music app, using Access mdb
    Table named Main with Text Field named Artist



    Private Sub TxtAutoComplete(Txt As TextBox, KeyAscii As Integer)
    Dim SearchText As String
    ...
  4. Re: How to use Drag & Drop (Drop directory path into TextBox)

    Option Explicit
    Private Sub Form_Load()
    Text1.OLEDropMode = vbOLEDropManual '1
    End Sub
    Private Sub Text1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X...
  5. Re: Runtime Error '5' Invalid procedure call or Argument

    Hmm, I put an MS DataCombo on a form and found no such call for getSelValueAt
    Some other ocx/control??
  6. Replies
    9
    Views
    818

    Re: Image processing (math) question

    Hmm, the only thing that comes to mind is using the
    ExtFloodFill call set a color different from White or Red
    and then testing, say, the upper left corner and the
    center of the circle for the...
  7. Replies
    2
    Views
    604

    Re: Saving a .wav file

    Yes, this code is from a Microsoft demo program



    Private Sub SaveToWavFile(ByVal WaveFile As String)
    ' Dim Voice As SpVoice
    ' Set Voice = New SpVoice 'if not done previously

    ' Create a...
  8. Replies
    5
    Views
    786

    Re: CodeSense control questions

    Don't know about the font issue, never tried that font.
    For the line/col info:


    Dim R As Range
    Set R = CS.GetSel(True) 'CS is the CodeSense Control
    Debug.Print "Lin: " & R.StartLineNo + 1
    ...
  9. Re: select case with listview

    In your code, clicknum will always be 1
    What you want is a toggle
    Change the clicknum declare to Static clicknum as Integer (retains its value for successive calls)
    or declare it Private at the...
  10. Re: Help with checkbox(setting values and adding them all in one textbox)

    Welcome to the forums and good luck with your programming.

    Your algorithm is fine for determining how many checkboxes have been checked
    but the code should go in the checkbox's click event as...
  11. Re: handle all GotFocus events with a single line code

    That's the beauty of control arrays
  12. Replies
    9
    Views
    2,497

    Re: VB6 - Fast Sqr

    Hmm, hate to be a spoil sport but the code below
    shows the native VB Sqr() Function to be about
    4-5 times faster



    Option Explicit

    Private Sub Form_Load()
    Dim t As Single
  13. Replies
    8
    Views
    1,111

    Re: GDI+ Set/Get Pixel

    Well I've manged to implement free draw using GdipDrawCurve
    Thanks again for all your help.
  14. Replies
    8
    Views
    1,111

    Re: GDI+ Set/Get Pixel

    In the DrawAlphaPixel routine above, I replaced all the 'Call' statements with
    Debug.Print and they all return zero, which I believe means success.

    Looking at the routine, there is nothing that...
  15. Replies
    8
    Views
    1,111

    Re: GDI+ Set/Get Pixel

    Ok, thanks.
    I tried PixelFormat32bppARGB and now I get a value for hBITMAP
    but no joy with rendering the pixels.
    What about the Lock/UnlockBits thing?
  16. Replies
    8
    Views
    1,111

    Re: GDI+ Set/Get Pixel

    Thanks, Keith. The Color seems to be ok (&HFF3D6C00 in this case),
    but I just noticed that the hBITMAP vallue is zero. Problem with the
    create bitmap call?


    Public Sub DrawAlphaPixel(x As...
  17. Replies
    8
    Views
    1,111

    [RESOLVED] GDI+ Set/Get Pixel

    Working on a drawing program. Using standard GetPixel/SetPixelV for freedraw
    Would like to incorporate GDI+ & use its Alpha drawing routines
    Got it to work in a fair fashion using GdipDrawLine...
  18. Re: [vb6] Extending VB's Image Control for PNG, TIFF, and more

    Keith, thanks for sharing.
    Worked fine for both Image control and Autosized Picturebox.
    Handled bmp, jpg, gif, png, tiff, emf, and ico

    BTW, how do you create the 32bit bmp with alpha?
    MSPaint...
  19. Re: Anyone familiar with the CCRP Timer dll?

    Not really a com expert but for Implements, you have to expose all its 'events'
    even if you don't use them:

    Note: as soon as you type in an Implements line, VB will put the
    item in the left...
  20. Replies
    14
    Views
    1,330

    Re: Stopwatch with miliseconds

    Here's ONE way to get milliseconds



    Option Explicit
    Private Type SYSTEMTIME
    wYear As Integer
    wMonth As Integer
    wDayOfWeek As Integer
    wDay As Integer
  21. Re: auto load listbox using list last used

    If I understand your question, store the 'path' in an ini file, database, registry or text file at program
    end. Then load it back in at program startup.
  22. Replies
    5
    Views
    610

    Re: Store hex number >255

    Perhaps if you study this code you will see what's happening:



    Option Explicit
    Private Type tBytes
    b1 As Byte
    b2 As Byte
    b3 As Byte
    b4 As Byte
  23. Replies
    1
    Views
    396

    Re: add ico in combobox items

    Two options: 1) search for ownerdrawn combo
    2) use the ImageCombo control (ms common controls)



    Private Sub Form_Load()
    Dim i As Long
    Set ImageCombo1.ImageList = ImageList1 ...
  24. Replies
    11
    Views
    915

    Re: Changing frames with timer

    Change this line
    If y = 4 Then Timer1.Enabled = False
    To
    If y = 5 then y = 1
  25. Re: GetWindowRect and the 20 missing pixels

    Or just use ScaleWidth, ScaleHeight which excludes the titlebar & borders
  26. Re: GetWindowRect and the 20 missing pixels

    if you use GetCLIENTRect vice GetWindowRect
    you won't need the GetSystemMetrics calls.
  27. Replies
    13
    Views
    42,537

    Re: Free Download Visual Basic 6.0 IDE

    Oops, should have said NOT FREE
  28. Replies
    13
    Views
    42,537

    Re: Free Download Visual Basic 6.0 IDE

    The 1st link says only 1 left in stock, new
    The 2nd link is for used/open box items - risky perhaps
    ...
  29. Replies
    8
    Views
    3,413

    Re: Graphical waveform representation?

    http://www.vbaccelerator.com/home/VB/Code/vbMedia/Audio/WAV_File_Viewer/article.asp
  30. Replies
    2
    Views
    1,977

    Re: Combobox issue

    A fairly common 'gotcha'. Use the Click event vice Change.
  31. Re: clsMenuImage, add from imagelist?

    Yes, the Imagelist's ExtractIcon function returns an hIcon.



    Private oMI As clsMenuImage

    Private Sub Form_Load()
    Set oMI = New clsMenuImage
    oMI.Init Me.HWnd, 16, 16
    '...
  32. Replies
    8
    Views
    1,541

    Re: Listbox Control help

    Access: Suggest you use a Listview in Report Mode
  33. Re: [VB6] Code Snippet: Converting an hIcon to an hBitmap

    Public Function HIconFromHBitmap(hIcon As Long, cx As Long, cy As Long) As Long

    A bit confused. If it is returning an hBitmap, should it not be

    Public Function HBitmapFromHIcon(hIcon As Long,...
  34. Re: How do I use SPTI to access CD-ROM drive?

    http://www.vbforums.com/showthread.php?390620-VB6-Monoton-Audio-Lib

    This is very advanced but it does a class for SPTI which may give you some ideas.
  35. Re: [VB6] Subclassing With Common Controls Library

    Keith, thanks for sharing.
    One small nit:
    SuclassWindow Text1.hWnd, Me, "txt1"
  36. Replies
    4
    Views
    542

    Re: Question about Multipage

    I guess you are referring to the TabStrip control. It is not a container.
    You have to respond to the TabStrip's click event and show/hide
    the appropriate frame.
    This code uses a control array of...
  37. Replies
    6
    Views
    1,045

    Re: visual basic

    Or just use a textbox only that looks & acts like a label & vice versa
    Button & Textbox on a form with default props.


    Option Explicit

    Private Sub Command1_Click() 'toggle
    If...
  38. Re: How to tell the pixels of a JPEG image file using VB6

    Well, no one's mention GDIP. See the CommonDialog filter below for the image types.
    Needs a button and a CommonDialog on a form.


    Option Explicit
    Private Type GdiplusStartupInput
    ...
  39. Re: How to remove including word in listbox

    Listbox items don't have an item tag or key, but they do have
    the ItemData property. So:



    Option Explicit
    Private Sub Form_Load()
    Dim i As Long
    For i = 1 To 10
    List1.AddItem "Item " &...
  40. Replies
    2
    Views
    637

    Re: Find the correct path

    Without knowing the content of CCommonDialog.cls, I would assume it allows you to
    set an Initial Directory before showing the dialog. When the user selects a file, picture
    or whatever, you save...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Featured


Click Here to Expand Forum to Full Width