|
Hi,
I suggest you start here:
http://www.microsoft.com/sql/editions/express/default.mspx[^]
And... I was writing too fast. The old version (MSDE, based on SQL Server 2000) was a bit bitchy (command-line installer with a lot of options, tricky to invoke during your own install - especially tricky to detect failures). Entirely new scenario with the 2005 version (SQL Server Express). And to be honest, I've never integrated that into a setup (as I develop mainly custom apps, I usually install the software myself) - the SQL Server Express setup can be run interactively and is self-explanatory.
Also, you need to register to redistribute and I haven't gotten around to that...
--
Peter
|
|
|
|
|
If you have a strong named assembly and it is hacked using ILDASM and ILASM the application will fail strong name checking, but you can flag the assembly for skipping strong name validation. My question can you in the application code force the Dotnet framework to do a validation check and then take the necessary acton based on the result.
Thank you in advance
williamt
|
|
|
|
|
I want to capture keyboard input and display it in a textbox the same way that, in Excel when you type into a cell, your text appears in the box at the top. I've tried the following code with weird results. The problem is that the input string variable accumulates KeyChar input in odd ways. The correct input is parsed; it's just not displaying properly in textBox1. As you can see, I've tried everything I can think of to clear out both 'input' and textBox1 with no luck.
public partial class Form1 : Form<br />
{<br />
string input;<br />
public Form1()<br />
{<br />
InitializeComponent();<br />
}<br />
void dataGridView1_EditingControlShowing(object sender, DataGridViewEditingControlShowingEventArgs e)<br />
{<br />
dataGridView1.EditingControl.KeyPress += new KeyPressEventHandler(EditingControl_KeyPress);<br />
dataGridView1.EditingControl.KeyDown += new KeyEventHandler(EditingControl_KeyDown);<br />
e.Control.KeyPress += new KeyPressEventHandler(dataGridView1_KeyPress);<br />
}<br />
void EditingControl_KeyPress(object sender, KeyPressEventArgs e)<br />
{<br />
input += e.KeyChar.ToString();<br />
textBox1.Text = input;<br />
}<br />
private void dataGridView1_CellParsing(object sender, DataGridViewCellParsingEventArgs e)<br />
{<br />
input = String.Empty;<br />
textBox1.Text = input;<br />
textBox1.Text = e.Value.ToString();<br />
}<br />
}
|
|
|
|
|
Not sure what you actually do there.
What would be the need of the first assignment, when you have the second one?
textBox1.Text = input;
textBox1.Text = e.Value.ToString();
Further comment: in case you want to consume a key, see here[^].
SkyWalker
|
|
|
|
|
You're right, those two lines are redundant. I was just trying various things and that's a relic. The purpose of all of this is simply to replicate keystrokes in textBox1 so that the keystrokes appear in the dataGridView1 cell simultaneously with textBox1. That is happening -- sort of -- but there's an unwanted accumulation of keystrokes appearing in textBox1. Try it and you'll see what I mean. I appreciate your comments.
|
|
|
|
|
hello
i have to read content of a fild in a record in datagrid , but i can not.
bizhan mp
|
|
|
|
|
Why not ? How about myGrid.Rows[index][colIndex] ???
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Can anyone here recommend a quality free, easy-to-use CHM editor???
|
|
|
|
|
I don't believe that you can edit with the application, but to create CHM files you can use HTML Workshop from Microsoft.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Yeah - I've tried that one. It's not very easy to use.
There must be another free CHM editor that is easier to use.
|
|
|
|
|
It is from Microsoft. What do you expect?
I am not aware of any other free CHM editors. You would have to google the subject.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Hey everyone,
I've got a short question whichs answer hopefully is as short too
I'd like to "concatenate" two integer values without casting them to strings. Let me illustrate what I want to do by showing you a code snippet:
int x = 1, y = 2;
string xyStr = x.ToString() + y.ToString();
int xy = int.Parse(xyStr);
And now the question:
Does someone know a possibilty to do this without casting the values to a string first?
Thank you in advance,
mik
|
|
|
|
|
Yep
xy = (x * 10 ^ z) + y
You need to find out how many to-the-power (z) you will need from y.
Edit: not x ^ z but x * 10 ^ z
modified on Friday, May 16, 2008 1:34 PM
|
|
|
|
|
And that can be done by counting the number of significant digits (places) after or before the decimal (depending on which way you're going).
"Every time Lotus Notes starts up, somewhere a puppy, a kitten, a lamb, and a baby seal are killed. Lotus Notes is a conspiracy by the forces of Satan to drive us over the brink into madness. The CRC-32 for each file in the installation includes the numbers 666." Gary Wheeler
"You're an idiot." John Simmons, THE Outlaw programmer
"I realised that all of my best anecdotes started with "So there we were, pissed". Pete O'Hanlon
|
|
|
|
|
I think it should be possible with some bitshifting, but this is a simple solution:
public int ConcatInts(int x, int y)
{
return (x * ((int)Math.Pow(10, NumDecs(y)))) + y;
}
public int NumDecs(int x)
{
int result = 1;
while (x >= 10)
{
x /= 10;
result++;
}
return result;
}
or, by using the logarithm with base 10:
public int ConcatInts(int x, int y)
{
return x * (int)(Math.Pow(10, (int)Math.Log10(y)+1)) + y;
}
Some time comparisons, with the string method being the slowest (100%, but might be optimized a bit using a StringBuilder):
Log: 31,62%
Loop: 30,57%
for 100000000 runs each.
regards
modified on Friday, May 16, 2008 2:15 PM
modified 12-Sep-18 21:01pm.
|
|
|
|
|
That's pretty easy, actually even easier than I first though:
int x = 1, y = 2;
int m = 10;
while (m <= y) m *= 10;
int xy = x * m + y;
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Should have been a Friday programming quiz.
|
|
|
|
|
hy everyone!
does anyone of you know which encoding has to be used to handle files in windows-1252 correctly via streaming, so no characters are lost or replaced by non printable signs?
thanks!
stephan.
|
|
|
|
|
Stephan,
You can get the 1252 encoder like this.
Encoding coder = Encoding.GetEncoding(1252);
AlanN
|
|
|
|
|
I like to know how much memory is available in the system before I allocate any memory block.
Is there any class or way to get the current memory information from the system.
Thanks you for your help.
|
|
|
|
|
It could change between the time you check and the time you try to allocate anyway. Just try the allocation and catch the exception if any.
|
|
|
|
|
Allocate the minimum amount of memory necessary for the given task.
Also, in c# a memory allocation should not fail unless it exceeds the allowable limit set by the framework for the application, the slowness will be OS based thrashing from VM.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
Thanks for your suggession.
Is there any way to know the amount of memory available programmatically even it might change from time to time. Just like taskbar, I like to know the snapshop of memory in any instance.
Thank you again
|
|
|
|
|
s196675m wrote: Just like taskbar
Not a wheel I would reinvent.
|
|
|
|
|
Is there a way PROGRAMATICALLY( by code) to get memory information just like taskbar shows us.
|
|
|
|