Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Netpad | Full Notepad Replica in .NET | TextBox Control Flexibility

(May 26, 2015 03:14 AM)Odus Wrote:  I'm in talks with Microsoft over supplying it with every copy of Windows 10. My legal team has informed me I can expect several dollars; most likely $7.

Wow.. means we will get 3 editors with windows 10.. A notepad, wordpad & oduspad ;)
BTC - bc1q3efew3yzfwhdz290dafykaw0a2w56g2j69g2c6
ETH - 0xf1c873217032468990D3313da6509D1b813c4671
USDT - 0xf1c873217032468990D3313da6509D1b813c4671
PP - [email protected]
(May 26, 2015 03:14 AM)Odus Wrote:  I'm in talks with Microsoft over supplying it with every copy of Windows 10. My legal team has informed me I can expect several dollars; most likely $7.

Wow.. means we will get 3 editors with windows 10.. A notepad, wordpad & oduspad ;)
BTC - bc1q3efew3yzfwhdz290dafykaw0a2w56g2j69g2c6
ETH - 0xf1c873217032468990D3313da6509D1b813c4671
USDT - 0xf1c873217032468990D3313da6509D1b813c4671
PP - [email protected]
This is actually really cool
Damn good job, I'm impressed you exactly copied the Font form
could you add a fix so that when you press ctrl+backspace the whole word gets removed? now it just shows [] when i do it as well as in the standard notepad program

ty homie
Wow, that's amazing. That is a lot of hard work.
[Image: q4Rv062.jpg]
(May 26, 2015 11:45 AM)⁠Cammy Wrote:  could you add a fix so that when you press ctrl+backspace the whole word gets removed? now it just shows [] when i do it as well as in the standard notepad program

ty homie

I'm pleased you discovered this, turns out the TextBox isn't written to behave that way, not even Ctrl+A is supported by default and only because of the shortcut on the MenuStrip does it work.

So this has to be done manually from what I can see. Here's what I have so far in the KeyDown event:
Code
If e.Control AndAlso e.KeyCode = Keys.Back Then
    e.SuppressKeyPress = True

    Dim spaceIndex As Integer = txt.Text.LastIndexOf(" "c)
    If spaceIndex > 0 Then
      txt.Text = txt.Text.Substring(0, spaceIndex)
      txt.SelectionStart = txt.Text.Length
    End If
End If

This functions well until the very first word in the document. I'll update with a fix probably tomorrow.
I find it saddening that the source is not a one-liner.
Nice Work, where source!!
Nice! I like it 🤝
(May 25, 2015 03:45 PM)Odus Wrote:  Known issues:
-FontDialog doesn't accept decimal as size input. I can't find a workaround for this, even when digging around the CommonDialog lib.

Because the size properties of FontDialog are integers. http://referencesource.microsoft.com/#Sy...log.cs,278

(May 26, 2015 11:00 AM)$uicidal Wrote:  Damn good job, I'm impressed you exactly copied the Font form

He didn't, he used the FontDialog class as he explained.
FR1908
Minor issue... With the ".LOG" trick for notepad, after the timestamp is added to the text editor, the caret is placed on the line after the new timestamp which is automatically appended. Netpad places the caret at the beginning of the text editor control. Your ALT key shortcuts too for the menubar are not proper either. Remember to be naming each menubar item with the ampersand before the letter you want to use as well. (Ex: "E&xit")
Getting Started: C/C++
[C/C++/.NET/x86 ASM - Automation Programmer]


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by QuobiAug 6, 2022 02:23 PM 0 407 Aug 6, 2022 02:23 PM
Last Post: Quobi
[.NET] by i_am_BeginnerSep 21, 2018 03:32 AM 4 199 Sep 21, 2018 03:32 AM
Last Post: i_am_Beginner
[.NET] by adenfrMar 20, 2018 05:18 PM 15 487 Mar 20, 2018 05:18 PM
Last Post: EdwardSn0wdent