|
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
|
|
|
|
|
Here is reply from other forum:
quote:
Because this code is in the App_Code folder it is likely that it is not a page but instead a behind the scenes helper class, because of that, it doesn’t have ready access to Response.Redirect.
Response is a property of an instantiated page that inherits from the Page class... one fix for this would be to have your helper class in App_Code be aware of the page it is being called from ala: (making sure that you pass a reference in from the caller)
Well, I am still not quite sure how to do it. but at least i know I can't use Response.Redirect direcly in /app_code folder.
|
|
|
|
|
I had this happen to me when I was calling the Response object from an event fired from an IFrame .Inside the IFrame's Unload event I was doing a Redirect and it gave me this same error.
To fix it I had to just set a variable (boolean for me) in the unload event and watch for it in a different function
for example
bool isDone = false;
private void iFrame_Unload(object sender, e EventArgs)
{
isDone = true;
}
private void watchForDone()
{
if(isDone == true)
{
Response.Redirect("blah.aspx");
}
}
to better explain it, you have to move the Response.Redirect out of that function.
Steve Welborn
|
|
|
|
|
I need to open up multiple .doc files and merge them into one without opening WORD.
I am able to open the file for read and write to a temp file, but what I am having problems with is keeping the same format when copying.
Anyone know how to know if a word is bold, italic, underlined, etc and how to copy that into the temp file?
I'm doing a ReadLine() to get the text, I checked the string and its just words, nothing that will tell me if it's bold or not.
Thanks
Steve Welborn
|
|
|
|
|
This is because most of the Office apps use multiple stream files, otherwise known as OLE 2.0 docFiles. When using the FileStream objects, your restricted to seeing, and manipulating, the primary stream. You're missing most of the file, and most likely the formatting information, using your method.
For a taste of what your not seeing, check this[^] out.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 21:59 Wednesday 18th January, 2006
|
|
|
|
|
Interesting information here thanks.
I think im just going to ask the client to stick with the RichText format rather than standard Word file. Much easier to work with and I can view what's bold and what's not.
Have a great day.
Steve Welborn
|
|
|
|
|
Hi,
Before I go into detail, is there any way to force a button to get that dotted box on it that shows it's in focus? Just saying btn1.Focus(); isn't working for me. Btn1 is definitely the thing being focused on, but you wouldn't know by just looking at it. And it seems that the only way to get a button to show highlight is to Tab into it.
So, the weird details...
Say I put a custom button on my form (and gave it tabstop 1). I then add a textbox with tabstop 2. And finally another button (tabstop 3). If I click in the textbox and press the Tab key, the 2nd button gets that dotted line, no problem. Same goes if I press Shift-Tab (the 1st button shows focus). I made the textbox so that it recognizes if the up or down keys are hit, so when I'm in the textbox and press the up key, I say:
if (e.KeyCode == Keys.Up){SendKeys.Send("+{Tab}");}
and have no problem here either - the first button shows focus.
But if down is pressed:
if (e.KeyCode == Keys.Down){SendKeys.Send("{Tab}");}
it freaks out and everything freezes so that I have to open task manager to close it down.
One other thing - if a button has been highlighted (tabbed into) once, saying just btn1.Focus(); is enough. But, of course, I can't be sure that tab will always be pressed.
Hope this makes sense.
Thanks for any help on this!
Mel
|
|
|
|
|
It just hit me that the buttons I'm using are custom and descend from the checkbox class. Hopefully this will make more sense out of things, but I'd still like to know how to make it look in focus.
Thanks!
Mel
|
|
|
|
|
hi!
you can try this one:
<br />
protected override void OnPaint(PaintEventArgs e)<br />
{<br />
base.OnPaint(e);<br />
<br />
if(this.Focused) <br />
{<br />
Rectangle rec = new Rectangle(1, 1, Width - 2 , Height - 2);<br />
}<br />
ControlPaint.DrawFocusRectangle(e.Graphics, rec, ForeColor, BackColor);<br />
}<br />
}<br />
hope that helps!
|
|
|
|