|
Just override extend the standard Button class and a timer that changes the background color and a property to (de)activate it...
Standards are great! Everybody should have one!
|
|
|
|
|
Folks,
I am having trouble getting the value from the maskedTextBox.
It is formated in the property as $9,999,99#.##
Double dd
dd = Double.Parse(mstVcost.Text);
MessageBox.Show(dd.ToString(), "testD")
-- modified at 16:16 Thursday 29th March, 2007
|
|
|
|
|
Hi,
I have a List<activities>
Activities is a class made by me which has some properties, including the property name.
I want to be able to get a determined activitie from the list based on its name.
How can i do that?
I found the method FindIndex, but it needs a predicate.
I also found some examples about predicate, but in that example the type of the list was string.
I don't know how to make this for my case.
Any tips?
Thx,
Nuno
|
|
|
|
|
Helllllo!!!!
What is the best way to monitor the pressed keys (in pairs), such as Lshift+Rshift, Lctrl+Rctrl.
I've tryied the DirectX.DirectInput, but it isn't the easiest way.
P.S. solution is not the KeyDown, or KeyUp events.
Thanks to all!!!
One nation - underground
|
|
|
|
|
Saikek wrote: P.S. solution is not the KeyDown, or KeyUp events.
What's wrong with this?
|
|
|
|
|
Because you can't control the text, printed in background...
One nation - underground
|
|
|
|
|
Hi
We have developed .Net Windows Application in XP and it is working good. When i install our product into Windows - NT performance is gone down. Specially when i deal with XML file (Parsing) performance is pretty much depressing. Anything need to be done/installed for this.
Please let me know.
|
|
|
|
|
Its just selecting data from database and showing in a dropdownlist.
But dropdownlist was loaded, i have to show the data which was selected from database in dropdownlist as selected. its just showing user selected value from database in dropdownlist its used to update the user information....
karthik
|
|
|
|
|
I have no idea what you are talking about nor what your question is.
Obfuscation is for code, not for questions
only two letters away from being an asset
|
|
|
|
|
Hi,
I am using an itemplate coloumn in the datagrid. That template coloumn has a textbox, and i want to get the values from database to be assigned to that itemplate coloumn including other bounded coloumns. How is it possible.Plz help me.
yamini...
|
|
|
|
|
Text=<% Eval("ColumnName") %>
Look up databinding expressions
only two letters away from being an asset
|
|
|
|
|
Is there any way a Custom control which when placed on a form displays its current location on the form (in design time not at runtime)
So if it is placed on 0,0 then onthe control we have 0,0, drawn and if we move it to 50,50 it refreshes to 50,50
basically the component behaves differently according to its place on the form
Thanks for your time.
C++ where friends have access to your private members !
|
|
|
|
|
Hello,
You could override the OnLocationChanged method, like this:
protected override void OnLocationChanged(EventArgs e)
{
if(DesignMode)
{
}
base.OnLocationChanged (e);
}
Hope it helps!
All the best,
Martin
|
|
|
|
|
Thanks a lot
C++ where friends have access to your private members !
|
|
|
|
|
What you need to do is create a custom designer for your control. Since a bit of code is worth a thousand words, I will stop talking and just post a drop dead simple example.
<pre>using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms.Design;
using System.Drawing;
using System.Windows.Forms;
using System.Drawing.Drawing2D;
using System.ComponentModel;
namespace WindowsApplication1
{
[Designer(typeof(SomeControlDesigner))]
public class SomeControl : Control
{
public SomeControl()
{
this.Size = new Size(100, 25);
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
using (LinearGradientBrush brsh = new LinearGradientBrush(this.ClientRectangle,
Color.CornflowerBlue, Color.White, LinearGradientMode.Vertical))
{
e.Graphics.FillRectangle(brsh, e.ClipRectangle);
}
}
}
public class SomeControlDesigner : ControlDesigner
{
protected override void OnPaintAdornments(System.Windows.Forms.PaintEventArgs pe)
{
base.OnPaintAdornments(pe);
using(SolidBrush brsh = new SolidBrush(Color.Red))
{
pe.Graphics.DrawString(this.Control.Location.ToString(), this.Control.Font,
brsh, pe.ClipRectangle.Location);
}
}
}
}</pre> <br />
<br />
The OnPaint override is there just to make the point that this is a custom control. You'll also need to add a reference to System.Design.dll.
|
|
|
|
|
Excellent .... i am c++ coder and i am just loving C#
C++ where friends have access to your private members !
|
|
|
|
|
Very nice idea!
Got my "5"
All the best,
MArtin
|
|
|
|
|
what is Blob column and how to add in table
|
|
|
|
|
BLOB means Binary Large Object.
These columns store unprocessed binary data, typically files, that can be retrieved and manipulated like the other common datatypes. One sample use would be the storage of images into the database to be retrieved for a website to display.
Regards,
Satips.
|
|
|
|
|
This may not be a C# question but you can use SQL in C# so...
If you were to add a BLOB column to an existing table in SQL you would use:
ALTER TABLE {0} ADD COLUMN Image oleobject
After that, to add an image to that table you have to use a DataAdapter and store the image as a byte[] object to the Image field.
Brent
|
|
|
|
|
Hi,
I want to have a property grid to control properties of a class made by me.
I have searched the forum looking for some articles about it and the only thing i found that seemed to have interest was an article on how to show only some properties.
Assuming that i want to show all.
Isnt there a way of doing this directly?
For examle:
<br />
<br />
MyClass c = new MyClass();<br />
<br />
PropertyGrid.SelectedObject = c;<br />
This didnt work. What do i need more in order to see my attributes show in the property grid?
Thx,
Nuno
|
|
|
|
|
Yes you can show all you got to do is declare the attributes and description on the top of function which ever you want to expose and then you would be able to deal with it through your property grid
|
|
|
|
|
Humm, that was very vague.
Can you point me to a place where that is explain in detail?
At least, a simple example?
Thx
Nuno
|
|
|
|
|
<<<.csharpcorner.com/UploadFile/mgold/PropertyGridInCSharp11302005004139AM/PropertyGridInCSharp.aspx>>>>>>
|
|
|
|
|
Hi,
Thx for the reply but in the mean while i found a cool class here in codeproject which help me manipulating the property grid.
Thx,
Nuno
|
|
|
|