|
You can simply write bat file or VS plugin.
My english is not so good. Please, correct my errors.
Best regards, Alexey.
|
|
|
|
|
Weird thing with VS (2005 at least)... If you aren't relying on DB data for your controls when you initialize them (which I learned not to do the hard way...) you might need to delete the bin and object directories from your solution folder.
Close all designer tabs open in the IDE. Close VS. Delete those folders. Re-open VS. Recompile the app. Then re-open the files that were having problems.
Don't know why this happens, just know this sometimes solves it.
|
|
|
|
|
i have to create a group box then in the groupbox i have to put one radio button, when i will select the radio button it will enable one datagrid.In the datagrid there are 4 columns . all these column names are Name, Type, Attribute and Length.
All these columns are text boxes.
Attribute column it shall be replaced by a read only text. Possible values shall be “Read only” or “Editable“..
Length shall be replaced by a read only text.. Possible values shall be “Fixed” or “Variable“
i have to adda tooltip for this datagrid and while cursor p[oint will move from one text box to another it should display the user information . Information could be any thing.
Could you please send me the code for this particular requirement..
|
|
|
|
|
I'm not sure what to call this. but i rember once seeing this color wheel which showed the best opposing colors...like yellow was the color opposite black.
I'm not trying to figure out how to invert a color.
so i want a function where if i send in the color black, it returns yellow.
i'd settle for the name of that sorta color wheel :P
|
|
|
|
|
substract the RGB combination of current color from RGB(255,255,255)
|
|
|
|
|
Hi,
After reading your disccission i have a question.
that is how to get the rgb codes of the specific color,
for example what are the rgb combinations of the color yellow.
thanks.
Nitin...
|
|
|
|
|
Try this:
Color original = Color.Yellow;
Color opposite = Color.FromArgb(255 - original.R, 255 - original.G, 255 - original.B);<pre>
|
|
|
|
|
Ok i did some research and it turns out that complementary colors is same as inverted colors, for most part. so blue is the opposite of yellow, not black
Here's another way to get inverted color... not sure if its more effecient.
private Color InvertColor(Color color)
{
byte bRed = (byte)~(color.R);
byte bGreen = (byte)~(color.G);
byte bBlue = (byte)~(color.B);
return Color.FromArgb(bRed, bGreen, bBlue);
}
This site helped to explain it: http://www.webwhirlers.com/colors/combining.asp
|
|
|
|
|
When I will press the backspace it shouldnt delete at a paricular position.How to do it
|
|
|
|
|
Hello
There are several approaches. This is the one I use:
bool ToChange = true;
string OldText = "";
private void TextBox_KeyDownHandler(object sender, KeyDownArgs e)
{
If(e.KeyChar == "\b")
{
OldText = TextBox.Text;
ToChange = false;
}
else
ToChange = true;
}
private void TextBox_TextChanged((object sender, KeyDownArgs e)
{
If(!ToChange)
{
TextBox.Text = OldText;
TextBox.SelectionStart = TextBox.TextLength;
}
}
You see. The text hasn't changed when the keydown event was fired. So if we don't want to accept thechanges we store the original text in a string. Once the text has changed, the TextChanged event will be fired. It will check to see if we want to accept the changes. If not, revert to the old text.
If anyone got a better approach, please post.
Regards
|
|
|
|
|
Hi,
You can also set the KeyChar = 0 in the KeyPress event ! I think you will have to cast 0 in to char for such assignment.
Try it !
Hope it works !
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
Anant Y. Kulkarni
|
|
|
|
|
private void textBox1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)
{
if(e.KeyChar == (char)Keys.Back)
e.Handled = true;
}
|
|
|
|
|
I use lower case to declare data variables in my classes. When doing this for objects like buttons and then adding an event handler by double cliking in the designer, the event handler uses the same lower case in the method name. Is there a setting to force this to uppercase?
For example:
I have a button called: moveUpBtn;
When I double click on this in the designer, I get the event handler: moveUpBtn_Click() .
I then refactor it to: MoveUpBtn_Click() , but would prefer to have VS handle this automatically.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Type whatever name you like into the properties window, or write an add-in ( and a CP article )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Christian Graus wrote: Type whatever name you like into the properties window, or write an add-in ( and a CP article )
Yeah, I'm lazy, what can I say?
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
i find this framework in
http://www.codeproject.com/cs/design/razorpt1.asp
http://www.codeproject.com/cs/design/razorpt2.asp
it's good framework,but it's documents and examples sources code less.
simple is better
|
|
|
|
|
I have a question about SqlDependency.
When using the SqlDependency class to get a notification of a change to a table, what is the best way to actually find out what data has changed? Is this even possible?
We are working on a stock trading system in which stocks are valued based upon notifications in the changes of the price, quantity, etc. Any light that you could shed would be helpful! Thanks a ton!
Ryan Heaney
rheaney@sgfallc.com
|
|
|
|
|
Hello,
Have a question. Trying to compare 2 arrays and adding the difference in a 3rd.
Array1 has {hello,bye,goodluck,bonjour} and Array2{hello,bye,bonjour}, and the
third should then get {goodluck}
Now, I found a way, but.. it's just plain cheap in my opinion and I'm sure there's a better, faster way of doing this. Here's what I got.
int count=0;
string[] array1 = new string[5];
string[] array2 = new string[3];
ArrayList array3 = new Arraylist(array1.length - array2.length);
for (int x = 1; x < array1.Length; x++){
listLocal.Items.Add(array1[x].ToString());
for(int y = 1; y < array2.Length;y++){
if (!local[x].Contains(array2[y].ToString()))
count++;
if(count==array2.Length-1)
array3.Add(array1[x].ToString());
}
count = 0;
}
Of course the way the code is now, it means that array1 while always
be larger then array2, so when array2 is larger I have to place another if statement.
So please, what's the better way? Show me the light and release me from these infernal
"IF"s and "FOR"s ..
Thank you,
Loneferret
_____________________________________________________________________
Cross my heart, smack me dead...stick a lobster on my head.
|
|
|
|
|
If you can sort the arrays first, that will help a lot, then you can use a binary search to find items, and just step through items in both that are alike until you find one that isn't.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Thanks for the advise. I'll look up binary search and see how it's done.
About the sorting, the arrays are allready sorted, forgot to insert that part.
Array.sort(arrayname);
If I strike out with the binary search, I'll cry for help again.
Thanks...
LoneFerret
-- modified at 7:36 Friday 18th August, 2006
Cool, thank you for the advice... It works like a charm and a lot faster too...
Thanks a lot
LoneFerret
Cross my heart, smack me dead...stick a lobster on my head.
|
|
|
|
|
Hi ,
I'm creating a custom control for a web project. I wanted to add flash content as part of that control. How do i do that in C# file. Pls help.
Thanks in advance,
Priya
|
|
|
|
|
There are two controls that are able to display Flash content_
- Internet Explorer control
- Macromedia Shockwave control
Add one of them to your tools list, drag it onto the form. Set the filename (or "Navigate" to the file in IE control) at runtime.
____________________________________
There is no proof for this sentence.
|
|
|
|
|
Dear gurus,
how can I store size and position (and may be more) of a form in any config-file if I close my application ( with C# and .net framework )
Can somebody help me here?
Some papers or articles?
Kind regards
|
|
|
|
|
Save an XML file into the user directory of the application. Do not use the app.config file as it is not meant to be written to.
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
I have a checkbox and a combo box that is enabled/disabled using a button(to put into edit mode)
The thing is, I want the user to be able to read the text/check that is in the field, but not edit it.
With a text box, I can just change the backcolor to white and when .enabled is set to false, it only grays out the text but is still legible.
Any ideas?
Thanks
modified on Wednesday, May 21, 2008 4:08 PM
|
|
|
|