473,763 Members | 7,719 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

IntelliSense in .net application

i am creating a formula editor and would like to provide intellisense feature
to the textbox in formula editor. does any one know how can i do that?

thanks
Feb 2 '07 #1
1 2656
Hi,
>i am creating a formula editor and would like to provide intellisense
feature
to the textbox in formula editor. does any one know how can i do that?
You're not going to be able to use IntelliSense, AFAIK, but you could make
your own, similar tool.

When the user presses some key combination in your editor, show a ComboBox
in DropDownList mode near the text cursor after filling it with the
appropriate items.

Monitoring key presses is a simple matter of handling the appropriate event
for the editor control, which is probably KeyUp. Showing and hiding the
ComboBox is easy with the Show and Hide methods, respectively. Discovering
the position of the text cursor depends a lot on how you've implemented, or
are planning on implementing, your editor.

For your editor, you might find that using the WebBrowser in design mode [1]
or with isolated editable content [2] will be much more functional [3] than
using a simple TextBox. You can locate the position of the text cursor
using the TextRange Object [4]. Using the editor you can provide very rich
behavior using a combination of managed code, JScript and the DHTML DOM.
With the WebBrowser control you can create your own edit designers and
custom glyphs. You could even add visual markup such as squiggly red lines
if you're up to the challenge. To use many of the DOM functions from within
managed code, you'll need a reference to the MSHTML assembly. There is a
primary interop assembly (PIA) that you can reference as of the .NET
Framework 2.0 [5].

If you decide to just use a TextBox then I believe you must calculate the
text cursor's position based on the Font size and the SelectionStart
property using the Graphics.Measur eString method. Get a Graphics object
from the CreateGraphics method and dispose of it immediately after the code
has finished using it, but don't attempt to paint with it. You may also
have to account for scroll bars. I haven't tried this approach myself so
there might be an easier way, but it's doubtful.

--
Dave Sexton
http://davesexton.com/blog
http://www.codeplex.com/DocProject (Sandcastle in VS IDE)

[1] designMode Property
http://msdn2.microsoft.com/en-us/library/ms533720.aspx

[2] CONTENTEDITABLE Attribute | contentEditable Property
http://msdn2.microsoft.com/en-us/library/ms533690.aspx

[3] How to Create an HTML Editor Application
http://msdn2.microsoft.com/en-us/library/aa969729.aspx

[4] TextRange Object
http://msdn2.microsoft.com/en-us/library/ms535872.aspx

[5] Accessing Unexposed Members on the Managed HTML Document Object Model
§ Accessing Unmanaged Interfaces
http://msdn2.microsoft.com/en-us/library/ms171716.aspx
Feb 3 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
8099
by: Stefan Kronberg | last post by:
I'm working on a solution containing about 20 projects. Some of the projects contain class definitions that are used in other of the projects. Most of the time intellisense is working ok, i.e. if I work with objects declared from my own classes intellisense will show me all alternatives (methods and properties from my classes and from the classes they are derived from). But sometimes I will get nothing from intellisense, completely nothing,...
0
1331
by: Jim | last post by:
I had a strange problem the other day when using Intellisense, and wondering if anyone has any experience with or advice on this... Just to give some quick background, I have a multi-tier application, with business objects coded in a business layer (C# project), the service interfaces and service objects coded in two C# projects, respectively. In my service objects project, I go to call on one of the
9
2681
by: Ulf Lindback | last post by:
Hi! We have an application surveillance product with a number of API's for different languages; one of them is a C API. Now I wonder how we can supply intellisense to our Visual Studio.Net (native C/C++) users (preferably both VS 7.0 and 7.1). I would like to have something like the parameter info you get for e.g. printf when you enter the opening parenthesis, printf(
26
1876
by: S. Justin Gengo | last post by:
I installed the release of Visual Studio.NET 2005 Professional a few days ago. I've been using the Beta for a few weeks and one immediate problem is that I don't seem to have full intellisense in the web.config file. I get intellisense, but it's only displaying three very basic choices: <!-- <!www.aboutfortunate.com "Out of chaos comes order." Nietzsche
12
4836
by: Peteroid | last post by:
I was creating my application just fine for the last 3 weeks or so. Then, starting this morning, IntelliSense seems to be having problems. It goes into a locked 'Updating IntelliSense..." mode. When this happens its time to close VS C++.NET, which can only be done via the Windows Task Manager. I tried repairing C++. It did seem to help, but the problem is back a few hours later. I will try creating a new project, copy over source files,...
1
1310
by: tool | last post by:
Hi all, I Followed these steps : 1. Added a .master file with 3 contentplaceholder controls. 2. Added an aspx file with the @Page directive parameter 'MasterPageFile' set to my .master file. 3. Added an asp:Content in the page. intellisense in my .aspx file worked and the application ran and
2
1913
by: avanti | last post by:
Hi, I am developing an application where the scripts are written in the XML files. The application parses them and creates required CS files and runs them. The application has set of APIs that are used in the XML scripts. While writing the XML scripts, there is no intellisense available. I want to have intellisense in the XML editor for a particular dll. Is that possible? Does VS support it? Or are there any other editors that have...
1
2578
by: RLN | last post by:
Re: Access 2003 I found a method here in the newsgroup that works for clearing checkboxes, but don't understand a particular line of code and how it works. Here is the code: 1. Dim ctrl As Control 2. For Each ctrl In Me.Controls 3. 'uncheck all of the checkboxes...
3
2324
by: Joseph Geretz | last post by:
Our application is primarily VB6, however we are migrating toward .NET and a newer architecture. For the time being though, we're stuck with a hybrid approach with our ActiveX client application accessing .NET Web Services provided by the new server-side application. We like the benefits of Intellisense in the IDE. Visual Studio .NET will provide Intellisense for a .NET client which references and accesses a Web Service. Unfortunately...
3
4015
by: =?Utf-8?B?SmltIFJvZGdlcnM=?= | last post by:
It's perhaps not the end of the World, but I find it annoying that I lose IntelliSense when I reference Subs and Functions I have moved to an #Included file. Does anyone know of a reasonable way to restore the IntelliSense feature in this case? Thanks for your thoughts... Jim Rodgers
0
9563
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10144
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9997
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8821
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.