Type: Posts; User: Frans C

Page 1 of 13 1 2 3 4

Search: Search took 0.48 seconds.

  1. Replies

    Re: Connection string problem

    In Openconnection you open connection cnnMain , but in your declarations you have declared ADOCn.

    Change either one of them to match.
    Also I don't see where you call the Openconnection sub.
  2. Re: How to Convert String 111007 to date 11/oct/07 ?

    Your own solution is the best, as long as the string is always in this format.

    Any output from the Format function is a string, and when assigned to a date variable, the output is dependent on you...
  3. Re: how to open excel workbook as read only mode

    There are some problems with your code.

    xlApp is not declared.
    xlWB1 is declared as variant, and not as Excel.Workbook

    ReadOnly is the third parameter to the Open method.
    The code will be...
  4. Replies

    Re: how to use this dll

    The link doesn't work
  5. Replies

    Re: Lock Windows Update

    Set the MDI form's AutoShowChildren property to false, and you can remove the LockWindowsUpdate and Frm2.Visible code.
  6. Replies

    Re: How to speed my code

    You already got most answers, but it basically comes down to something like:

    Dim str As String
    str = frmEditor.txtMain.Text
    For a = 1 To Len(str)
    If Mid$(str, a, 3) = "ss{" Then
  7. Thread: Access DLL

    by Frans C

    Re: Access DLL

    If you don't have the source code, forget it.
    Otherwise, open the sourcecode (the *.vbp file, of if there is one, the *.vbg file) with vb6.
  8. Replies

    Re: Any SQL guru's?

    Don't use EXISTS, because it is slow and not necessary.
    Try this:

    SELECT a.Dsp_ref_id, a.Account_no, a.Voucher_No, a.Voucher_Date,
    a.Name_1, a.Street, a.City, a.Postal_code, a.Carrier_code_ext,...
  9. Replies

    Re: Using Text As Object Name

    If the form is already loaded, you can use:


    assuming formname is the variable that holds the form's name.
  10. Re: Small problem regarding duplicate strings.

    I think the Found = False line is to early. It should be after the For Each .. line
  11. Replies

    Re: user id in multiuser environment

    Create a table with UserID's and passwords.
    When the user log in, check the UserID and password in this table. If OK, store the UserID in a global variable, so when you need to log it with an action...
  12. Re: common dialog - check which button clicked

    Because these dialogboxes only have two buttons, you are sure the other button is clicked if the cancel error does not occur.
    So two possibilities:

    1: No error occured. The user clicked Open/Save...
  13. Re: Error in loading DLL on this line of code - Set WObj = New Word.Application

    Is the version of Word installed on the machine the same as the version referenced in the application?

    I normally use late binding for automation of office applications, to avoid versioning...
  14. Replies

    Re: sql Connection error

    Your conectionstring puzles me, because it is a mixture of ADO and DOA (with ODBC) connectionstrings. What technology do you use?

    Connect to the master database (this is the database with the...
  15. Replies

    Re: sql Connection error

    You can always connect to the master database.
  16. Re: Insert in one table and Update in another

    Your code:

    sSQL = "UPDATE tblStock INNER JOIN tblStockAdd ON tblStock.ProductID = tblStockAdd.ProductID " & _
    "SET tblStock.Quantity = [Quantity]+ " & txtProdQty.Text & ",...
  17. Replies

    Re: Can I do this with a variable.

    Milk's solution is the best. Don't store the DC in CurrentForm, but the form.
    If you need to know the DC, you can always use CurrentForm.hDC
  18. Re: can u say how to create a .exe file for V.B 6.0 application

    Why did you include a (relative) path in the declare, if the dll is in your programs directory?

    Show us also the source code where you use this function (including the code where you initiate the...
  19. Re: can u say how to create a .exe file for V.B 6.0 application

    Is this error on the develpoment machine, or on another machine?
    If the last: Did you install the program on the other machine, or did you just copy the exe?
  20. Thread: OCX help.

    by Frans C

    Re: OCX help.

    Normally an ocx is being installed in the windows\system directory, but it shouldn't matter, as long as it is properly registered.
  21. Re: [RESOLVED] Need your side on Load Code and Activate

    A late replay to post 7 by Martin Liss:

    The Sub FormActivateCode is only called in Form_Load, so it will not run on a second Activate of the form.

    If you call the sub also in Form_Activate, it...
  22. Re: Need your side on Load Code and Activate

    Of course the order of events doesn't change.
    Form_Load will fire before Form_Activate. There is no way to change that.
    But with my approach Form_Activate will fire before Form_Load is completed,...
  23. Re: Need your side on Load Code and Activate

    In general Martin's approach is the best, but it could result in code being executed twice in this case.

    If you want to force the Activate events to run first, you could make the form already...
  24. Replies

    Re: VERY Strange SQL query problem

    Of what type is rs2 and ConnectionAccess?
    Is this ADO?

    If you use ADO, you should use the % sign as wildcard, and not the asterisk (*).
  25. Re: how make image picture = picture drawed in picturebox

    You need to change 2 things:

    Set AutoRedraw of the picturebox to True.
    Image1.Picture = p.Image

    Oh, and remove the Exit Sub :)
  26. Replies

    Re: SQL query

    I have tried many times to find something for this, and unless you start using user defined functions in your query, it can't be done as far as I know.
  27. Replies

    Re: StretchBlt interesting problem, Why?

    I also don't understand what is the purpose of the picturebox.
    If he uses a picturebox, he doesn't need a memory dc.
    If he uses a memory dc, he doesn't need a picturebox.
  28. Replies

    Re: Listview Data Encrypted

    How do you mean revert back to 127?

    You can call this function the same as the old one:
    outputdata = Encrypt(inputdata, 127) 'Encrypts Text1 contents.
  29. Replies

    Re: Listview Data Encrypted

    To solve this, add or substract 256, to make sure the ascii value is in the range 0-255

    Public Function Encrypt(EncryptString As String, Key As Integer, Optional Decrypt As Boolean = False)
  30. Re: Limited number of controls in control array?

    Instead of using bitblt, you can also use the native vb function PaintPicture.
    The functionality is similar.

    For bitblt there is a tutorial in the codebank, or you can check the MSDN library...
  31. Re: Limited number of controls in control array?

    Unfortunately I don't know any of the Intersection control, Weatherview control, sensorview control, and a griddisplay control.
    Probably they are custom controls as well.

    This makes it difficult...
  32. Re: Writing code for print preview for a notepad type application.

    Normally the same code that is used for printing is also used for print preview.
    For printing, the printer object is used for the drawing, for the preview, a picturebox is being used.

    You could...
  33. Re: Limited number of controls in control array?

    The ligthweight controls are controls with limited functionality, but which use also limited system resources.

    Which and how many controls you use in your nuser control?
    Do you use a picturebox...
  34. Replies

    Re: Listview Data Encrypted

    You should add code like this:

    For cnt = 0 To UBound(sLines)
    sLines(cnt) = Decrypt(sLines(cnt),127,True)

    somewhere after:
    Close #1
  35. Re: Limited number of controls in control array?

    OK, I think this is the problem for sure.
    I would not try to change the limit, because the limit is already pretty high.
    Why does it create so many GDI objects?
    Why do you need to load so many of...
  36. Replies

    Re: Listview Data Encrypted

    Show us the code of the Encryption as well.
    Or did another program encrypt it, and you try to crack the code?
  37. Re: Limited number of controls in control array?

    Task manager, Processes tab.
    From the menu: View--> Select Columns
    Select the GDI Objects checkbox.
    All graphic objects that have a handle count as one.
    There is a registry setting that by...
  38. Re: Limited number of controls in control array?

    How about GDI object?
    There is a limit on these, depending on the machines resources.
  39. Replies

    Re: What is XOR and MOD

    MOD returns the modulus.
    This is the remainder of a division


    3/2 = 1 remaining 1, so: 3 mod 2 = 1
    9/2 = 4 remaining 1, so: 9 mod 2 = 1
    12/4 = 3 remaining 0, so: 12 mod 4 = 0

    XOR is a...
  40. Replies

    Re: StretchBlt interesting problem, Why?

    I don't understand why you need the picturebox, but in general, you must do the following:

    Create a device context, using CreateCompatibleDC. I would use the printers dc and not the dc of a...
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4

Click Here to Expand Forum to Full Width