|
Hi all.
To ease the code writing of a propietary language I want to build a Visual Studio 2003 add-in that colors the syntax, provides auto-completion capabilities, etc. I am new to this VS automation stuff and I have googling a lot but still haven't found anything about changing the attributes of certain characters of a text editor. Does anybody has any ideas of how can I do this? Furthermore, how can I handle key press events without using the VS 2005's EnvDTE80 assembly?
Thanks beforehand.
The traveller
|
|
|
|
|
Hello World,
I just would like to open a dialog window asking me if I really want to delete the contact i chose when I'm trying to delete a contact. If you don't know how in c#. Thank you very much!!
-- modified at 14:30 Wednesday 18th January, 2006
|
|
|
|
|
if (DialogResult.OK == MessageBox.Show("Do you really want to delete ?", "Delete confirmation", MessageBoxButtons.OKCancel)
{
// do it here
}
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi.
As you know I'm not so very good at programming but I like it very much.
To the question. I want to know how to be able to unable a keyboard button. I want it so if you press the enter button absolutely nothing happens? don't laugh att me because I can't a simple thing at this but as I said I'm a big amatuer.
Any help and maybe some tutorials would be nice?
Thank you very much,
Simon an amateur in c# programming.
|
|
|
|
|
If you want this within your app, you can handle the keypress event and sent e.Handled to true when enter is pressed. For a system wide approach you need a keyboard hook.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I came to the e.Handled but how to I get that to start when I press the enter button?
I'm slow minded.;)
Thank you.
Simon an amateur in C# programming.
|
|
|
|
|
You may need to handle the KeyDown event. Then you can do this:
if (e.KeyData == Keys.Return || e.KeyData == Keys.Enter)
e.Handled = true;
But from memory, KeyPress is the one that works, but it doesn't get passed the Keys enum. Return has an ASCII value of 13, you could check if it's 13, but I'm not sure how safe that is.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Does anyone have, or know of, a decent peforming and free B+Tree in native C#?
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Is there a way to call MessageBox.Show() and to have it not beep?
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
As far as I know, that depends on the user settings of your windows...
If you have a beep sound asociated with messageboxes then there will be a beep...
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
hi,
How do i remove white space in the bigging of a text in a rich text box
Nana
-- modified at 15:30 Wednesday 18th January, 2006
|
|
|
|
|
string.Replace will do it for you.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I believe the Trim() function will remove blanks from beginning and end of input
There are 10 kinds of people in the world.
Those that read binary...
...and those who don't.
|
|
|
|
|
I have a pet project designed for VC++ 6 that uses SQLite3 as a database engine. The database component is used to manage approximately 2500 entries with the following:
- PID (string, 63)
- GID (short integer)
- TID (short integer)
- ID1 (string, 7)
- ID2 (string, 15)
It's not a terribly data-intensive application, so SQLite3 serves well, and the price is right. Eventually, the project will be distributed to about 12 people.
I'd like to migrate the project to C#, so I need to replace the database component. I'd really like to avoid having everyone get a copy of SQL Server, so I'm hoping for a suggestion or two for a suitable replacement. I'd prefer to stick with something SQL-y if possible; I like to SELECT things.
Thanks!
--
I've killed again, haven't I?
|
|
|
|
|
Typically, you can just write a .NET component (typically written in Managed C++ for performance, but could be written in C#) that calls unmanaged code to manipulate the underlying umanaged database. This is how the various database providers in the .NET framework are written.
So you *could* write your own .NET data provider for SqlLite, if you were up to the challenge. If you'd prefer an already existing solution, have a look at VistaDB[^] or the MySQL .NET adapter[^].
*edit* looks like someone's already written a SQLLite for .NET driver[^].
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Little House on the Flickr
Judah Himango
|
|
|
|
|
|
Oh wow, I can still use my SQLite database. That should work nicely!
--
I've killed again, haven't I?
|
|
|
|
|
Forget about SQL and learning more and more languages. You can use a native object database like db4o (http://www.db4o.com/) which is extremely fast and reliable.
Regards
|
|
|
|
|
If each of these 12 people is using their own copy on their own desk/lap top, you can look at MSDE (old name) / SQL Server Express (new name) which is a three connection max version of MS SQL Server and totally free. It's a lot more mainstream and you can pick up the 120 day trial copy of SQL Server and have the Server Manager for development as well.
|
|
|
|
|
Thanks for all the suggestions, everyone.
Since I can access SQLite with just a slight modification to my overall design scheme, I'm going to use the wrapper to get this first iteration out.
After that, I'll weigh these alternate DB solutions.
--
I've killed again, haven't I?
|
|
|
|
|
I know this sounds simple. And I have done numerious redirection using ASP, VB.NET. I am new to C# and I modify someone else code. I tried every single way I know and it still can't recgnize response.direct! BTW, this is asp.net 2.0, the code list below is reside /App_Code fodler. Not the direct code behind. Please help!
using (OleDbCommand command = new OleDbCommand("AddSite;", connection))
{
command.CommandType = CommandType.StoredProcedure;
command.Parameters.Add(new OleDbParameter("@skid", skid));
command.Parameters.Add(new OleDbParameter("@email", email));
connection.Open();
try
{
command.ExecuteNonQuery();
// Response.Redirect("Links.aspx", false);
}
catch (Exception ex)
{
throw (ex);
}
}
}
Sue
|
|
|
|
|
Uncoment this line:
// Response.Redirect("Links.aspx", false);
?
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
I comment the //Response.redirect("links.aspx" false); by accident. because it gives me error. It still doesn't work.
|
|
|
|
|
Well that line would normaly redirect a user.
Would you mind posting the error message?
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Compiler Error Message: CS0103: The name 'Response' does not exist in the current context
Source Error:
Line 83: {
Line 84: command.ExecuteNonQuery();
Line 85: Response.Redirect("Links.aspx", false);
Line 86:
Line 87: }
Source File: c:\hshome\jackgoog\edream.org\App_Code\SiteManager.cs Line: 85
|
|
|
|