I am creating a web chat facility in visual studio 2008 using Visual Basic,I want to be able to highlight certain keywords that are sent and received to each user, can someone please tell me how I can do this? Thanks in advance
If you're creating an Asp.net app. with VB.Net then here's something you can do:
1. On your page you may have a textbox (where the user types the text for chat) and there may be a "Send" button that postbacks the page.
2. On click of "Send", pick the text from the text box and search for your keyword, you may do something like this:
if(txtChat.Text.Contains(keyword_string)) {
//Highlight the text ---
}
else
{
//Send logic
}
You can put the if/else in a loop if you wish to scan multiple values from the db.
As for selecting the text, it's a tricky part and I myself haven't found a simple way to select partial text in an Asp.net textbox. Here's are a couple of links discussing alternate ways to perform this:
http://forums.asp.net/t/1520680.aspx
http://bytes.com/topic/javascript/answers/167174-highlighting-part-text-text-box
If it's possible you can show the words separately in a label beneath the textbox.
Related
I am working on Winforms with VB.Net.
The below paint diagram is a coarse depiction of my requirement.
When I click on the "Add Filter" button, a window opens containing a list of criteria. When i click one of the criteria, the window closes and the selected value is populated in a tag like control with ability to be removed when clicked over X
I have worked previously with J-Query Tags Input. I need a Winform control with such capability. I saw that DevExpress has such a control called TokenEditor but I don't have access to it. I have access to Telerik.
The requirement is something on these lines
Any help in directing me in the right direction would be helpful.
I'd use Telerik's RadAutoCompleteBox control. See the Telerik documentation. One way to set the source would be:
List<string> source = new List<string>() { "Shawn Smith", "Toby Huck", "Steven Ratcliffe", "Dennis Smith" };
radAutoCompleteBox1.AutoCompleteDataSource = source;
If you start typing, the AutoCompleteBox pops up with your source items. If you want to separate the items with a special character, set the Delimiter property.
radAutoCompleteBox1.Delimiter = ',';
Default character is semicolon (;).
I was wondering if anyone knows what a simplest way to create a data entry form in Sharepoint 2010 Foundation would be. Basicly I am looking to create a form that will submit its data to a custom list on the site, I don't want the users to interact with the list directly but use the form to enter data instead.
Also I can't use Designer or InfoPath, not being able to use these is what is causing the problem it seems. Just curious if anyone else has done something like this or could point me in the right direction.
Thanks
Every list is born with forms by default - one for item creation, one for edition and one for displaying. If you use content types, then you get a trio of these for each different type.
You never interact with the list directly, you do it through these forms. If you can't use either Infopath nor Sharepoint Designer, you can still edit them by clicking on the Page tab, then the Edit Page button. From there you can add or remove web parts, and connect them among themselves.
However, the amount of control you have is too limited when compared to editing pages through either of the tools or mentioned, or Visual Studio. For example, there is no straightforward way to add or remove list fields based on content type. Be prepared for ever increasing frustration if you can't use those tools.
In a label box, I want to list a couple of websites, email address along with some text. How do I go about it?
Potential uses-
As a Help > About dialog box where websites, email of the author can be listed.
Why?
To make things as easy as possible for the user, and encourage visiting of the mentioned websites.
Simple text will be ignored, while standard blue color, underlined text with hand mouse-cursor will need no thinking on user's part.
The LinkLabel.Links property gives you the ability to add multiple links.
To quote the page:
A LinkLabel control can display any
number of links within the text of the
control.
This should be pretty a pretty common scenario, but I have not found a solution yet.
I would like to highlight some text within the body of an e-mail and then click on something (context menu, toolbar button, etc) to perform a URL navigation using the selected text. For example, highlight the Fex Ex tracking number and then navigate to their web site using it as a query parameter (like "ww.fedextracking.com?packageid=12345").
How can you capture the selected text within an e-mail and then perform an action? I would greatly appreciate any suggestions or examples.
Thank you!
For Outlook 2007-2010 (or previous versions using WordMail), you can retrieve a Word object from the Inspector.WordEditor property. Then you can work with Word.Selection to access the selected text.
However, for Plain Text or Rich Text scenarios with Outlook 2000-2003, you have to use the SafeInspector object with Redemption (http://www.dimastr.com/redemption/) to access the selected text. I can't remember, but for HTML format messages with Outlook 2003-2003 you may be able to access the selected text with the IHTMLDocument object retrieved from SafeInspector.
I appreciate it's 588 days since you asked your question Loki70, but if somebody else Googles up this page (like I did, looking for how to create a selected text right-click context menu entry) then this may be an answer for you.
I have been using AutoHotKey, which works not just in Outlook, but everywhere in Windows, and have been writing utilities to Google the selected text, open an SSH session in PuTTY to the selected hostname, and similar.
If you don't mind running an extra application on your PC to capture the hotkey combination that you send, then this would do exactly what you're asking.
Here is my post on the AutoHotKey forum with a link to my code:
http://www.autohotkey.com/community/viewtopic.php?t=86402
It would be trivial to adapt this to do the FedEx query you've mentioned.
I hope this helps.
I'm a noob to VB.NET and I was wondering how to make something you type into a textbox on the application type that text into a website textbox and submit whats in the textbox by pressing a button? I am using visual studio 2008.
That is a little tricky to do, but it is possible. However, without more details on the specific browser or what you are trying to copy over, you aren't going to get a lot of answers on here.
Better Suggestion: Have you considered instead of trying to control the browser via "voodoo", that you might just have your VB.NET application submit the form/request directly to the web server and cut out the middle-man (the browser)?
I'm assuming you're trying to POST data to a web form from some other application. Check this out; it's in C# but you can translate it to VB.NET. It uses a WebBrowser control and the SetAttribute method to set input values on the web form.
// C#
WebBrowser browser;
...
browser.Document.GetElementById("username").SetAttribute("value", "MyUsername");
...
form.InvokeMember("submit");