# Little Alt Code Utility



## Kreij (Jan 16, 2012)

I wrote a simple little utility that shows some of the more common alt-codes you may want to put in a forum post. I am forever forgetting these and using the character map is a PITA.







If you hover over a button it shows a tooltip of the alt code and a description.
If you click on a button it copies the alt code character to the clipboard so you can just ctrl-V it into the post editor (or wherever).
After you click a button the status bar tells you what it sent to the clipboard.

If you in another window editing (like a post or whatever) clicking on a button will now automatically put it in the window where your cursor is.

You can put the exe anywhere as it does not use any other files or resources.

I can add more codes if anyone finds this useful and would like a few more added.

Any feedback is appreciated ... even if you feel it's worthless.


----------



## theJesus (Jan 16, 2012)

This is an awesome app.  I have it pinned in my taskbar now.


----------



## qubit (Jan 16, 2012)

Awesome, it's gonna help with putting in that ™ character. 

Here are a few more: ™¢€µ¼•


----------



## A Cheese Danish (Jan 16, 2012)

Nifty I must say. Helps a lot


----------



## Kreij (Jan 16, 2012)

For a little 15KB utility it's memory usage (private working set) is a little large at ~5M
I'll see if I can make it's memory footprint smaller.


----------



## xbonez (Jan 16, 2012)

Interesting about the 5MB memory usage. It's a winform app, right?


----------



## Kreij (Jan 16, 2012)

Yes it is, xbonez. It is compiled using my default VS settings, so I should be able to do a some bit twiddling to make it smaller.

I wrote this because I got sick of going to sites that listed the codes.
This little app is one of those things that falls under "necessity is the mother of invention."


----------



## ctrain (Jan 16, 2012)

Kreij said:


> For a little 15KB utility it's memory usage (private working set) is a little large at ~5M
> I'll see if I can make it's memory footprint smaller.



You can call SetProcessWorkingSetSize() to try and go lower yet, but it's pointless really, you will likely damage performance if anything in trying.

It's best to leave the runtime and OS to their own devices really, .NET programs using a "lot" of memory is well known and stripping the working set is a common idea that seems like a good one but is really not.


----------



## FordGT90Concept (Jan 16, 2012)

How about adding:
Þ = 0222
þ = 0254


You must be feeling better.   I can't code when in pain. :þ


----------



## Deleted member 3 (Jan 16, 2012)

What's does it do that a list in notepad won't?


----------



## Kreij (Jan 16, 2012)

ctrain said:


> You can call SetProcessWorkingSetSize() to try and go lower yet, but it's pointless really, you will likely damage performance if anything in trying.
> 
> It's best to leave the runtime and OS to their own devices really, .NET programs using a "lot" of memory is well known and stripping the working set is a common idea that seems like a good one but is really not.



Not sure how I could reduce performance on an app that does almost nothing. 
I was just going to poke around with a few VS settings and not do anything dramatic.




FordGT90Concept said:


> How about adding:
> Þ = 0222
> þ = 0254
> 
> ...



I was thinking of adding the TPU smileys so you could use the little app with "post quick reply" and have them available for copy/pasta. Thoughts?

If the pain gets too bad the coding stops (as I usually lie down), if I take painkillers coding slows down dramatically due to general mental foginess. lol



			
				Banjo said:
			
		

> What's does it do that a list in notepad won't?


Functionally it makes copying to the cliboard a little faster (just click the button). Other than that, not much at the moment.


----------



## Deleted member 3 (Jan 16, 2012)

Kreij said:


> Functionally it makes copying to the cliboard a little faster (just click the button). Other than that, not much at the moment.



Then, what will it do?


----------



## Kreij (Jan 16, 2012)

DanTheBanjoman said:


> Then, what will it do?



You lost me on that question, Banjo. Probably the painkillers. lol


----------



## Deleted member 3 (Jan 16, 2012)

Kreij said:


> You lost me on that question, Banjo. Probably the painkillers. lol



You said it does nothing else currently, what features are planned?


----------



## Kreij (Jan 16, 2012)

Whatever anyone comes up with that they think will make it better.
I'm always open for suggestions. You have any ideas Banjo?


----------



## theJesus (Jan 16, 2012)

It would be cool if it worked like the on-screed keyboard.  Not totally necessary, but if you're bored . . .


----------



## Mindweaver (Jan 16, 2012)

Nice work kreij! on "*The Little Alt Code Utility ® ™*" Works great!


----------



## Kreij (Jan 16, 2012)

theJesus said:


> It would be cool if it worked like the on-screed keyboard.  Not totally necessary, but if you're bored . . .



More info please. Yes, I am bored.


----------



## theJesus (Jan 16, 2012)

Kreij said:


> More info please. Yes, I am bored.


Basically, have an option for it stay in the foreground at all times and whenever you click a character in it, then it automatically pastes that into whatever text field your cursor was in.

Open up the onscreen keyboard to see what I mean.


----------



## Kreij (Jan 16, 2012)

Cool. I never used the OSK before. Will work on that for next version.


----------



## ctrain (Jan 16, 2012)

Kreij said:


> Not sure how I could reduce performance on an app that does almost nothing.



You might up causing some page faults as a result of trying to trim the working set, worrisome if you're counting precious milliseconds 

What I was getting at is that the seemingly large working set of .NET programs isn't worth playing with. The OS will reclaim the uneeded memory for other use if it really needs to and will not allocate so much "fluff" in the first place if it's scarce to begin with.


----------



## Mindweaver (Jan 16, 2012)

Kreij why not go ahead and throw in all the forum codes [spoiler}[/spoiler], [B}{/B}, etc..  You could create two windows/Multi Line Textboxes one to type the complete post and the second window to view the post in real time. Once the user is ready to post the response have something like a send button for them to click. You could create a toggle switch to go from thejesus direct imput mode or the multi window method.


----------



## Kreij (Jan 16, 2012)

That's not as easy as it sounds, MW. It would require a realtime bbcode parser and tokenizer, as well as working with the RTF format for use with a RichTextBox for realtime display. It gets pretty ugly quick. lol

I was working on something like that awhile ago as an offline editor for people writing articles and/or news.


----------



## Completely Bonkers (Jan 16, 2012)

Any chance of a user-defined line of buttons? Set in a .ini or cfg file?  I have need for certain character code sets when writing emails, like üöä and čěřňš

Actually; http://www.typeit.org/ is pretty useful


----------



## Kreij (Jan 16, 2012)

I had originally thought of including all of the characters with accents and a lot of other special punctuation, but I was trying to keep the GUI small.
The intent of this app was for quick characters when forum posting and not a comprehensive list of all the possible alt codes.
I will give it some thought. Maybe a settings option so the GUI only displays the character sets that you need/want.


----------



## Mindweaver (Jan 16, 2012)

Kreij said:


> That's not as easy as it sounds, MW. It would require a realtime bbcode parser and tokenizer, as well as working with the RTF format for use with a RichTextBox for realtime display. It gets pretty ugly quick. lol
> 
> I was working on something like that awhile ago as an offline editor for people writing articles and/or news.



You said you were bored.. hehehe and I never said it would be easy...  hehehe If we didn't push our self who would? Now hurry up I want to see something by the end of the day!  lol 

EDIT: Here I'll Help you 


```
Dim Bold as string
```


----------



## Easy Rhino (Jan 16, 2012)

damn kreij, you need to get the cancer more often! lol, j/k obviously.


----------



## MT Alex (Jan 16, 2012)

Kreij said:


> I will give it some thought. Maybe a settings option so the GUI only displays the character sets that you need/want.



Now you're talkin'


----------



## Mindweaver (Jan 17, 2012)

Easy Rhino said:


> damn kreij, you need to get the cancer more often! lol, j/k obviously.



I know right? 

@kreij.. I'm waiting..  Have you made any browser add-ons? It would be kickass if you tried to do that with this.


----------



## Kreij (Jan 17, 2012)

Currently trying to get the little app to work like the OSK (not take focus and output to the window that contains the cursor and focus).
So far this is not working at all like the references says it should. 

When I get this working, I can add user defined buttons and other requested functionality.

@MW : Still pondering a bbcode editor.


----------



## Mindweaver (Jan 17, 2012)

Kreij said:


> @MW : Still pondering a bbcode editor.



Awesome! Looking forward to it! 

app
BBCeditor

Online
bbcode to html


----------



## Kreij (Jan 17, 2012)

I tried the BBCode editor app you posted and I am now considering why I should write one since that one rocks. It does everything you would ever want except output the display in realtime as you type (which is not all that necessary anyway). :/


----------



## Mindweaver (Jan 17, 2012)

Kreij said:


> I tried the BBCode editor app you posted and I am now considering why I should write one since that one rocks. It does everything you would ever want except output the display in realtime as you type (which is not all that necessary anyway). :/



Yea it is a nice little app, and you are right why create a new one? Err because TPU doesn't have one of it's on..  hehehe and you're bored.. hehehe You could make a TPU Web Browser with these built in features. Or even better a Forum app with these features. You could do something like Opera's start page.. let the user bookmark a few forums and then all he or she would do is launch your "*Kreij's Forum Browser*" select a forum and post away with shortcuts to BBCode.


----------



## Sinzia (May 13, 2012)

I gotta say, I use this thing a lot for the trademark and copyright ones! I can -never- remember the codes for those.

Thanks for making this handy lil thing!


----------



## Kreij (May 13, 2012)

Hey !! I forgot about my little program.

New version in OP (0.0.2) will now work like on screen keyboard and pastes the codes directly into whatever you are editing in the active window. It still copies it to the clipboard at the same time just in case you want it there too.

Because I am overriding the creation parameters of the form so it does not activate when clicked in, dragging the window works but gives you no visual feeback that the window is moving.


----------



## theJesus (May 13, 2012)

Thanks for implementing that feature, it works great!  Also, if you click outside of the window and then click back in again, you can move it with visual feedback until you click one of the buttons again it seems.


----------



## Kreij (May 13, 2012)

I never get visual feedback when moving the window no matter what I do. Oh well ...

Well, I over-engineered the whole thing originally and getting it to work like the OSK is stupidly easy.
Sometimes it pays to set something aside for awhile.

In any form, create a constant as such...

```
[color="blue"]private const int[/color] WS_EX_NOACTIVATE = 0x08000000;
```

Then override the CreateParams method of the form and make it so it won't activate (become the active window) ...

```
[COLOR="Blue"]protected override[/COLOR] [COLOR="Teal"]CreateParams[/COLOR] CreateParams
{
    [COLOR="Blue"]get[/COLOR]
    {
        System.Windows.Forms.[COLOR="Teal"]CreateParams[/COLOR] p = [COLOR="Blue"]base[/COLOR].CreateParams;
        p.ExStyle |= WS_EX_NOACTIVATE;
       [COLOR="blue"] return[/COLOR] p;
    }
}
```

Then in a button click event (or whatever event you want to use), send the value out ..

```
[COLOR="Blue"]private void [/COLOR]button_Click([COLOR="blue"]object[/COLOR] sender, [COLOR="Teal"]EventArgs[/COLOR] e)
{
    [COLOR="Teal"]Button [/COLOR]btn = ([COLOR="Teal"]Button[/COLOR])sender;
    [COLOR="Teal"]SendKeys[/COLOR].Send(btn.Text);
}
```

Free code tip !! No charge.


----------



## puma99dk| (May 13, 2012)

thx Kreij and also thx from my wife. It's an awesome small problem for all does symbols i can remember remember it only once i remember are µ (CTRL+ALT+M), € (CTRL+ALT+E) and $ (CTRL+ALT+3) ^^

so maybe adding an icon for it later?


----------



## Kreij (May 13, 2012)

What do you want added, puma?


----------



## puma99dk| (May 13, 2012)

Kreij said:


> What do you want added, puma?




just feeling there is something missing dunno if it's me ^^;






i got no idea of what icon u maybe wanna use maybe someone got one in mind i just feel like i miss a icon ^^;


----------



## Kreij (May 13, 2012)

Ohhh .. lol ... a custom icon for the app.
I suck at making icons. Maybe some kind soul who is good at it will offer their services. 

Version 0.0.3 is up on OP.
Making the window inactive broke the tooltips, so I fixed that.
Also added Ford's favorites Þ and þ


----------



## Irony (May 13, 2012)

Hey, this is awesome Kreij. I just saw it; i'm always looking for those.


----------



## Kreij (May 14, 2012)

Okay ... beta testing time !

Here is version 0.0.4.2 (it's not in the OP yet).
It adds user defined functionality.

Click on User Defined button "U" and the app will open larger showing 21 buttons with "?"
Right click on any button and it will give you a context menu to define/edit the button. Click on it.
If the small form enter the Alt # (just the number, like "0153") and a description, then click the OK Button.
It should add to whatever button you right clicked on.

If you edit a button and just click OK without a code or description, the button will reset to the "?" (undefined).
I also added a "Clear User Defined" menu option on right click to make that easier.

Clicking the User Defined button "U" again will hide the user defined section.

Time for bug hunting. lol


----------



## Kreij (May 15, 2012)

Bump, looking for testers and suggestions.
I know almost everyone is playing D3, so if you take a break ....


----------



## Irony (May 15, 2012)

The code for the paragraph symbol would be nice. And maybe Pi and square root.


----------



## Kreij (May 15, 2012)

@Irony : You think those would be commonly used in forum posts?
I wanted the main button (non-user defined) to be what's used the most, so if you think some should be replaced with others tell me what you would almost never use.


----------



## Irony (May 15, 2012)

The ones you already have are probably the most common that I would use. I can't really think of others I ever need, the ones I mentioned were the only ones I could think of that I would theoretically ever use. I doubt they would be used very often at all.


----------



## Kreij (May 15, 2012)

That why I added the user defined section in the latest release (in post #43).
Some people commented they wanted more international characters and such, but I don't see them as being used as often as the ones that I chose for the main ones.

Still, I'm open to suggestions. A utility is only decent if people find it useful.


----------



## mlee49 (May 15, 2012)

Nice app, can it display the actual ALT code if you hover over the icon?  That might be handy. 

Plus my favorite ALT Code is ALT+0186.   I use it alot.


----------



## Kreij (May 15, 2012)

It does do that, mlee. All buttons have tooltips with the alt code and a description listed in it.



> Plus my favorite ALT Code is ALT+0186.  I use it alot.



The masculine ordinal number in Spanish, Italian and Portugese? I'm not even sure what it is for ... lol


----------



## N3M3515 (May 17, 2012)

N3M3515™
nice!


----------



## mauriek (Sep 26, 2012)

excuse me..sorry for posting in old thread, I'm getting Net framework error message each time i run the 0.4.2 version, if i click continue in the error message box then the utility will open normally.

edit: Avast anti virus also think this utility doing suspicious action, just adding to the avast ignore list.



> See the end of this message for details on invoking
> just-in-time (JIT) debugging instead of this dialog box.
> 
> ************** Exception Text **************
> ...


----------



## Kreij (Sep 26, 2012)

Thanks for the heads up.
I'm getting this error in all of the 0.0.4 versions now for some reason (not in the debugger though).
Try using the 0.0.3 version that is in the first post in this thread for now while I look into it.


----------



## Kreij (Nov 27, 2012)

Sorry for the long delay.
Please check out this build and let me know if the exception still occurs.


----------



## mauriek (Nov 27, 2012)

nice..thank you for the update, no error this time, i have tried it in windows 7 64 pro and Windows 7 32 few minutes ago. small utility but useful for me.


----------



## Kreij (Nov 27, 2012)

I tested it on Windows 8 Pro x64 and it seems to work fine too.

It just overlooked a minor thing. I was checking to see if one of the default properties was empty and not checking to see if it was null, which it was prior to any user defined codes being added. Thus the null exception.


----------



## Kreij (Nov 27, 2012)

TESTING TIME !!!

I wrote a little app to compliment AltWinCodes called QuickPhrases.
It's the same as AltWinCodes except it allows you to enter phrases that can be inserted into anything you are editing by clicking the phrase. Works the same.
You can even use altWinCodes (if you have it open) to insert special characters into your QuickPhrases when you are editing them !! How cool is that !!!

Let me know what you think.


----------



## Irony (Nov 28, 2012)

I love to eat chicken sauce with every meal.®

Hey, it works! Thats awesome


Not sure what I did, cant seem to replicate it; it pasted the phrase over and over like 30 times per second until the message box was full the first time I tried it. Maybe it was just me. Working fine now tho!


----------



## Kreij (Nov 28, 2012)

I gave AltWinCodes to our new Customer Service rep and she asked if I had one to do simple phrases that may be used a lot when writing marketing or customer letters.
There is really no limit to the size of the phrase. but it's not really meant for large amounts of text.

Here is the next version, it fixes some anchoring on resize.


----------



## Mindweaver (Nov 28, 2012)

Nice buddy! I like them both!


----------



## Kreij (Nov 28, 2012)

As always, comments and suggestions are appreciated for either utility.
Except for a real icon ... I suck at making icons. lol


----------

