User Profile

Collapse

Profile Sidebar

Collapse
pureenhanoi
pureenhanoi
Last Activity: Sep 7 '10, 09:57 AM
Joined: Mar 27 '07
Location: VietNam
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Use masked textbox instead of origine textbox...
    See more | Go to post

    Leave a comment:


  • pureenhanoi
    replied to problem with timer
    If you store 10 random number by a For routine, the time for each number are the same (coz the coputer can store thousands of number in a Second). So, you can use a Timer like your first post

    Desiging:

    put one timer and one Command button into form
    set Timer Interval to 1000 (or any inteval you want)

    Coding:
    [CODE=vb]Option Explicit
    Dim numberStored As Integer
    Dim NumberArray(0...
    See more | Go to post

    Leave a comment:


  • pureenhanoi
    replied to error in printing the date
    Try:
    Con.Excute Str3...
    See more | Go to post

    Leave a comment:


  • There is a shorter way:
    Private Sub cmdPrint_Click( )
    myDateReport.Se ctions("Section Name").Controls ("ControlName") .Caption = Date
    End Sub

    When you design your report, you know exactly which Section you put the control. Do not need parse all Sections, and all Cotrols to find out the lblDate
    ;)...
    See more | Go to post

    Leave a comment:


  • pureenhanoi
    replied to picture box in visual basic
    Option Explicit
    dim mX As Single
    dim mY As Single 'store mouse X, and mouse Y


    Private Sub Picture1_MouseD own(Button As Integer, Shift As Integer, X As Single, Y As Single)
    mX = X
    mY = Y
    End Sub

    Private Sub Picture1_Click( )
    Dim pointRGB As Long
    pointRGB = Picture1.Point( mX,mY)
    'now, store this value any where you want
    Ens Sub...
    See more | Go to post

    Leave a comment:


  • pureenhanoi
    replied to Hotkeys not working
    You made an user control, and it must have the AccessKey. Does this correct?

    To set access key for yor control, you must use:
    UserControl.Acc essKey = "C" 'or any alphabet you want

    You can determine which should be the accesskey by analyze the "Caption" property of this control. The accesskey must be the Character following the Ampersand symbol.

    The event will be fired when the...
    See more | Go to post

    Leave a comment:


  • the statement Rs.Open is invalid gramma
    it must be: rs.Open "[Source]", cn, adOpenStatic, adLockOptimisti c, adCmdText

    and the connection String of cn is invalid too. I'm not sure can it work without correcting, but you must use this:
    Cn.Open "Provider=Microsoft.Jet.O ledb.4.0; Data Source=C:\database.mdb;"...
    See more | Go to post

    Leave a comment:


  • pureenhanoi
    replied to How do I access a .dbf file?
    I think you better create an ODBC DataSource, an point it to your DBF file
    To Create ODBC DataSource:
    Open Control Panel > Administrative Tools > ODBC DataSource
    On the System DSN tab, click Add
    Select "Driver do Mircosoft dBase" driver, and then Finish
    Now, name the datasource is AKTTXT, select the right version for dBase file (you can change version latter if it does not correct)
    Uncheck...
    See more | Go to post

    Leave a comment:


  • pureenhanoi
    replied to problem with timer
    see these statements:
    startTime = Now
    endTime = Now

    Each time Timers fire event, the startTime and andTime varriables always get the lastest moment.
    Now, two timers have inteval is 5S different. If Timer2 fires event first, so Duration = Now - StartTime = 5
    If two timer fire event together or Timer1 fires event first, so Duration = endTime-StartTime = Now - Now = 0.

    I think, you should set...
    See more | Go to post

    Leave a comment:


  • I've got the same proplem. Does any one know how to post a request to a web page with an fixed URL, and get the content of this page into memory (or file).
    I know how to parse Strings from webpage content to get out dirsered infomation. But i need the content be loaded dirrectly from Internet...
    See more | Go to post

    Leave a comment:


  • pureenhanoi
    replied to Forms to act like dialogs
    I think you must use vbModal Const, instead of vbModeless
    Form1.Show vbModal...
    See more | Go to post

    Leave a comment:


  • It seems very good. But it may not distinguish Required and Not Required numbers.
    If you've used MS-Access, you can see the Format String. In format string, "0" are not required numbers and "9" are required numbers...
    See more | Go to post
    Last edited by Killer42; Mar 12 '08, 02:11 AM. Reason: Reduced quote block, corrected "distinguild" and "verry".

    Leave a comment:


  • Thanks for you help. I tried using LIKE operator. It works verry well with "*" character. But it recorgnize "*" character only, and all character are in case sensitive. With other characters like "?", "0", "9", it cannot work.
    Example: ("T12345.DOC " LIKE "T*.DOC") -> return TRUE (its good)
    ("T12345.doc " LIKE "T*.DOC") -> return False (abit...
    See more | Go to post

    Leave a comment:


  • StrComp cannot recorgnize special characters like "*", or "?"

    See: StrComp("TIE1.D OC","TIE1.DOC ") -> return 0 (its correct)
    StrComp("TIE*.D OC","TIE1.DOC ") -> return -1 (its correct too)
    but, what it like is StrComp("TIE*.D OC","TIE1.DOC ") will return 0, because "*" character is represent for "1", or any characters...
    See more | Go to post

    Leave a comment:


  • pureenhanoi
    started a topic Compare string like file name compare

    Compare string like file name compare

    Hi bro!
    Can anyone tell me, how to compare two strings like Operating System compare file names.
    Example: if i have two string "T*.DOC" and "TIET1.DOC" . The comparision operator must return TRUE values when compare them
    See more | Go to post

  • No no, not that SQL state ment. See my reply above. you can copy that code and paste into your program. After that, you can delete all comment line. Try that code.
    One more else, the saldetail table, as i think it has more than one field (ID), so, why do you SELECT only ID on salDetail...
    See more | Go to post

    Leave a comment:


  • pureenhanoi
    replied to Memory Issues in VB
    Ofcourse we need some varriables to save infomation about current view.

    Let take a look in our forums. One Topic start, and have many Replies for it. Admin can control how many Replies are displayed on one page, and what page is current page of view.
    So, i think we need only two varriables to processing data: recordsOnOnePag e and currentPage
    First, select All records into Recordset. Then, calculate the record start of...
    See more | Go to post

    Leave a comment:


  • pureenhanoi
    replied to exe problem
    When move your application to another computer, you must make an Setup program. This program will bring your EXE file, your Report and database file and any needed DLL.
    If you dont know how to write an Setup program, you can use an ultility that was given in Microsoft Visual Studio (called Package & Deploy Wizard). If have more mony, you can buy a third-party setup ultility (e.x: Install Shield, or Setup Factory)...
    See more | Go to post

    Leave a comment:


  • Your actual code can do things you need, except it has lot of extra statement...
    See more | Go to post

    Leave a comment:


  • pureenhanoi
    replied to Matrix Analysis
    VB cant find a,b,c,d by it-selft.
    You must find the algorithm for your-selft, VB can help you do complex calculation only....
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...