![]() |
|
[.NET] GDI - Textbox with Cue Text - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] GDI - Textbox with Cue Text (/showthread.php?tid=4667060) |
GDI - Textbox with Cue Text - BerryP - Feb 2, 2015 Hey, I am coding a project atm and needed a textbox with a Cue Text function. I designed a little class, which does the job nearly perfect I think :) The search just showed up an crappy example, so I decided to share it with HF. PHP Code Its nothing special, but it works great 👍 You can change the watermark in the Visual Studio designer itself or do it like this: PHP Code Will look like this: (Thanks to: StreetLight.) ![]() Peace 🤝 * - Naywyn - Feb 2, 2015 Hello, could you show us a screenshot of the textbox please ? thank you. :) * - SIM-1847363 - Feb 2, 2015 ^ Agreed please show us the textbox with some images please. * - gghitman - Feb 2, 2015 hi sorry but textbox.text is similar * - Streetlight. - Feb 2, 2015 I made a gif for OP.
* - Only3 - Feb 2, 2015 without api Code Class WMTextBox* - Temploit - Feb 2, 2015 Not sure but isn't this called a placeholder/hint? A watermark would refer to the 'created with gifrecorder.com' in the gif. Other than that, it's still a nice snippet. * - Hawk HF - Feb 2, 2015 (Feb 2, 2015 02:37 PM)Only3 Wrote: without api I prefer this method more than the original. I just like to avoid API calls. Thanks for this. * - Streetlight. - Feb 2, 2015 Instead of watermark, should be more of a "hint" textbox. * - nathan72389 - Feb 2, 2015 this is actually called "Cue Text". google it, its been around for ages. * - nuk - Feb 2, 2015 OP: Thanks for sharing this...although I don't need it & Nathan: Thanks for that info "Cue Text" - I actually never heard of that before ;) * - BerryP - Feb 3, 2015 (Feb 2, 2015 02:27 PM)StreetLight. Wrote: I made a gif for OP. Thanks awesome 🤝🎉 (Feb 2, 2015 02:37 PM)Only3 Wrote: without api And what if I write the Watermark string itself in the textbox ? This code is buggy, sorry... (Feb 2, 2015 04:22 PM)Hawk HF Wrote: I prefer this method more than the original. I just like to avoid API calls. Why wouldnt you use an API call ? Mh. But use what you like :) (Feb 2, 2015 06:33 PM)nathan72389 Wrote: this is actually called "Cue Text". Going to add this to the title 🎉 Thanks Peace 🤝 * - Only3 - Feb 3, 2015 (Feb 3, 2015 11:49 AM)Maember Wrote: And what if I write the Watermark string itself in the textbox ? This code is buggy, sorry... 🤦♂ change it to Public Code Class WMTextBox* - BerryP - Feb 3, 2015 (Feb 3, 2015 11:59 AM)Only3 Wrote: 🤦♂ change it to Public Doesnt work 🤝 And why would this change anything ? 😊 You have to work with MyBase and Me, to tell the difference... This is to much work. Just use the API... AND what do you do if you want to get the real text ? You will get the Watermark if the text is nothing... [img]http://www11.pic-upload.de/03.02.15/mcx9qzchaoj5.gif[/img] Peace 🤝 * - KingDeath360 - Feb 3, 2015 (Feb 3, 2015 01:01 PM)Maember Wrote: This is to much work. Just use the API...Made this real quick, probably the best cue text so far. I left some bugs in it for anti-leech :) Code Public Class YetAnotherCueText : Inherits Control |