Page 2 of 2 FirstFirst 12
Results 41 to 46 of 46

Thread: [VB6] Simple Unicode Textbox (Input Only)

  1. #41
    Hyperactive Member
    Join Date
    Sep 2014
    Posts
    373

    Re: [VB6] Simple Unicode Textbox (Input Only)

    Dragokas,

    I've been to the Private Message page, but it seems I can't send an attachment there. Under the circumstances, can I send you a Google Drive link for the ZIP file (about 15K)? Or you PM me an URL to which I can send the ZIP?

    Brenker

  2. #42
    Member Dragokas's Avatar
    Join Date
    Aug 2015
    Location
    Ukraine
    Posts
    740

    Re: [VB6] Simple Unicode Textbox (Input Only)

    Anywhere what easy for you. No problem. If you think your solution represent something not for public, I can't insist.
    Malware analyst, VirusNet developer, HiJackThis+ author || my CodeBank works

  3. #43
    Hyperactive Member
    Join Date
    Sep 2014
    Posts
    373

    Re: [VB6] Simple Unicode Textbox (Input Only)

    Dragokas,

    I've PM a Google Drive link. Please PM me if you have any problem downloading.

    As explained in my reply to LaVolpe, I did upload one to public before (many years before the one in this threasd) but for certain reasons I had to take it down..... I don't come to vbForums regularly, sometimes the absence may be for months, now if there are postings I have to follow up, it wouldn't be practical.

    Brenker


    Edited:
    DragoKas informed me the following day that the "Simple" approach of my user control worked fine on his test bed for all Windows systems, except for two older ones, e.g. 2000 SP2. But then Krool's user control also didn't work there. Just for info.
    Last edited by Brenker; Feb 21st, 2018 at 11:52 AM.

  4. #44
    New Member Hemendra Singh's Avatar
    Join Date
    Dec 2017
    Location
    USA
    Posts
    1

    Re: [VB6] Simple Unicode Textbox (Input Only)

    This code is used to set a restriction on a textbox and allow only number to be entered in Visual Basic .NET
    Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
    If Asc(e.KeyChar) <> 13 AndAlso Asc(e.KeyChar) <> 8 AndAlso Not IsNumeric(e.KeyChar) Then
    MessageBox.Show("Please enter numbers only")
    e.Handled = True
    End If
    End Sub
    The code will be added to the TextBox KeyPress event. In other words, each time the user hit a key to be entered in a textbox, the program will check the key pressed and make sure it is a number

  5. #45
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    5,904

    Re: [VB6] Simple Unicode Textbox (Input Only)

    @Hemendra Singh: this thread is about a Unicode Textbox for VB6, so please don't post .Net samples, these are useless.

  6. #46
    Fanatic Member
    Join Date
    Aug 2016
    Posts
    678

    Re: [VB6] Simple Unicode Textbox (Input Only)

    Quote Originally Posted by Brenker View Post
    Please take this as "for info" / "for reference" / "for feedback" only.

    We all know and agree that for a full-blown and sure-win usage, something like the user-control done by krool is required. However, from the keyword "Simple" in the thread title, LaVolpe is just to explore the possibility of having a much simpler approach, e.g. to handle a Unicode input only. It is in this "Simple" spirit that I entered into the discussion, and submitted my light-weight user-control in #13 (which I subsequently removed - see below).

    The difference between what LaVolpe's #1 and my light-weight user control is that, the former uses a textbox and code on the spot and the latter uses a textbox and code in a custom control instead. Both don't involve subclassing, manifest or a third party DLL/OCX. Despite that, my posting in #13 is still against the criteria set in #1 (no custom control). As soon as realized it, I had the said #13 removed (see posting #31).

    In #24 (prior to #31), I said that "I haven't got a chance to try my Unicode TextBox on Win 10 1607", but now I got a chance to do that, after I got a new PC with Win 10 1709.

    Everything remains the same, no subclassing, no manifest, no 3rd party DLL/OCX and no need to set anything in the system, only a textbox and the code -- if you still have my user control, you can verify that. Per the two screenshots below, you can see that my user control accepts Persian/Iran and Chinese (Remarks: I know the meaning of the two Chinese characters, but I have no idea what the Persian means - I got it at random after adding Persian in Google's Language setting. The original intention was to test out whether a program of mine could load a JPG file with a Persian file name, I pasted the copied Persian to replace an English file name, the result proved it could load the JPG file. I then went back to Google's Language setting to remove Persian entry, leaving only English (U.S) entry behind. After that, it occurs to me about this thread, that is how I am here.)

    As said earlier, there is basically no difference between what LaVolpe is doing and what my user control is doing. Therefore I come back to "feed" this piece of information, in case LaVolpe is still doing experiments on the subject.

    Edited:
    The above implies that if my user control can do that, LaVolpe's #1 should be able to do that also, albeit there may be some difference in code lines used. The textbox in the screenshot with a red circle is my user control. The font, font size and color etc settings do not affect the text box entry, they affect the actual text writing on PicureBox when user clicks Proceed button in the Antialiased Text dialog shown.
    can you give me your control link??

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width