|
could change the font color, or custom draw the button and add like a outline around the text (ie. draw the text twice but a larger size behind)
|
|
|
|
|
howlettt wrote: add like a outline around the text (ie. draw the text twice but a larger size behind)
Kinda what I was thinking about too...
I'm drawing the buttons. So I 'think' what I'm going to need to do is draw the text using a brush that highlights? Matrix?? Haven't done it before so maybe I'll have something to do an article on!!
Thanks!
ed
~"Watch your thoughts; they become your words. Watch your words they become your actions.
Watch your actions; they become your habits. Watch your habits; they become your character.
Watch your character; it becomes your destiny."
-Frank Outlaw.
|
|
|
|
|
Just use the mouse hover and mouse click events and change the background and foreground color of the button as you wish.
Mark Brock
"We're definitely not going to make a G or a PG version of this. It's not PillowfightCraft." -- Chris Metzen
Click here to view my blog
|
|
|
|
|
listen, is it a flashing color text?
i don´t really recall know how to code that but, try to add a timer object, set interval propriety for 1 second. After add a timer_tick event, there you change the color of the forecolor or backcolor.
You can query for if textbox forecolor is red then textbox forecolor to blue or if textbox forecolor is blue then textbox forecolor to red.
There you go, you have the color changed each 1 second. Check windows genereted code to set colors.
(i didn´t post code, i dont have c# turn on, but is very simply d´ont worry you will manage it easy)
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
nelsonpaixao wrote: try to add a timer object
Why? The original post has nothing to do with toggling back and forth between two colors in a given interval.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
I asked: "is it a flashing color text?"
Is it a mouse_hover event what he is talking about?
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
No, they are actually rubber looking buttons. We'd like the text on them to appear as if it glows. As if there were a light behind the button. It's not a web app with the mouse over stuff.
Thanks!
ed
~"Watch your thoughts; they become your words. Watch your words they become your actions.
Watch your actions; they become your habits. Watch your habits; they become your character.
Watch your character; it becomes your destiny."
-Frank Outlaw.
|
|
|
|
|
You should be able to do so with a custom control inherited from the Button class and have the MouseHover event handle it.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
There are a few photoshop tutorials online that demonstrate the functionality. You would just need to take said images and create a custom control.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
|
|
|
|
|
If you're using WPF, you can use the GlowBitmapEffect.
Simon
|
|
|
|
|
No such luck!
Thanks!
ed
~"Watch your thoughts; they become your words. Watch your words they become your actions.
Watch your actions; they become your habits. Watch your habits; they become your character.
Watch your character; it becomes your destiny."
-Frank Outlaw.
|
|
|
|
|
did you follow my first post? i don´t know if what i adviced is what you are trying to do?
if you want a flashing text that should be enought
to make it glow i really don´t have a clue!!!
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
Light up but not flash. Glow is a better term, sort of like the button is lit up from the back.
Thanks!
ed
~"Watch your thoughts; they become your words. Watch your words they become your actions.
Watch your actions; they become your habits. Watch your habits; they become your character.
Watch your character; it becomes your destiny."
-Frank Outlaw.
|
|
|
|
|
I have this line:
string sAuthor = (string)oDataSet.Tables[0].Rows[0]["Author"];
On some rows the Author is null, so I get a cast error. I'm not sure what to do about this. Can someone help.
Everything makes sense in someone's mind
|
|
|
|
|
Take a look at the DataRow.IsNull method. That might do what you want.
Tony
|
|
|
|
|
simply use
try
{...}
catch
{sAuthor = null}
you are processing nulls so should be ok
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
This answer gave me another idea... I believe that the prefered way of dealing with casts in c# is to use:
string sAuthor = oDataSet.Tables[0].Rows[0]["Author"] as string;
This sets sAuthor to null when it can't be converted to a string, and shouldn't (hopefully) cause an exception.
Tony
|
|
|
|
|
I understand your code here,
in datagridview when i am processing null values i use ...=dbnull.value, like you used tablerow.isnull (never used that before d´ont know here) for a table, but like he is not sending data do a database or whatever table, he has to do string X = null, because he is setting a string not a Dgv or a table, string X = dbnull.value or string X = tablerow.isnull wouldn´t work.
You just forgot that or not noticed, its simply i know you know that, i make errors in really simply things all the time, makes me mad
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
I have the dataset bound to textboxes on the form:
txtTitle.DataBindings.Add("Text", oDataSet, "ItemRow.Title");
txtCategory.DataBindings.Add("Text", oDataSet, "ItemRow.Category");
txtAuthor.DataBindings.Add("Text", oDataSet, "ItemRow.Author");
txtCatNo.DataBindings.Add("Text", oDataSet, "ItemRow.Catalogue_No");
txtIsbn.DataBindings.Add("Text", oDataSet, "ItemRow.Isbn");
txtPublisher.DataBindings.Add("Text", oDataSet, "ItemRow.Publisher");
In SaveChanges I then pass the oDataSet variable to this code in my Data Access class:
public bool UpdateDataSet(DataSet oDataSet, string sTableName)
{
bool bRetVal = true;
try
{
DataRow oRow = oDataSet.Tables[0].Rows[0];
DataRowState state = oRow.RowState; \\state = Unchanged
oAdapter.Update(oDataSet, sTableName);
}
catch(SqlException e)
{
oException = e;
bRetVal = false;
}
return bRetVal;
}
The DataAdapater is stored as oAdapter on the data access class. When I run this, it doesn't error, but it also doesn't save. Notice that the RowState is unchanged at this point.
I'm not sure what I'm missing here.
Everything makes sense in someone's mind
|
|
|
|
|
The insert and update commands need to be defined as well as verifying that the row state allows for an update. Personally, I do not use the Dataset for updates as it makes such a simple thing complicated.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
|
|
|
|
|
Isn't that the purpose of the SqlCommandBuilder?
I have:
public DataSet ExecuteQuery(string sCommand, string sTableName)
{
bool bError = false;
DataSet oDataSet = new DataSet();
DataSet oRetVal = null;
SqlConnection oConn = GetConnection(false);
oAdapter = new SqlDataAdapter(sCommand, oConn);
SqlCommandBuilder oBuilder = new SqlCommandBuilder(oAdapter);
try
{
oAdapter.Fill(oDataSet, sTableName);
}
catch(SqlException e)
{
oException = e;
bError = true;
}
if(! bError)
{
oRetVal = oDataSet;
}
return oRetVal;
}
Everything makes sense in someone's mind
|
|
|
|
|
hi
do you have any example that to report(crystalreport) from proc(sql server 2005)?
thanks a lot
|
|
|
|
|
Yes, I have plenty. However, an example is not necessary. In the report creation wizard you can select ADO.NET as the report source, and then select a stored procedure from the list that appears. (If memory is failing me you may have to select ODBC source and not ADO.NET since I think ADO.NET is for datasets only)
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
|
|
|
|
|
thanks for your answer
but i have problem about to send parameter to proc
please send me 1 or 2 example
i need it
thank you very much
|
|
|
|
|
Hi,
I use conditional compiling via to block login dialogs while debuging.
#if DEBUG
sSqlUserName = "me";
sPwd = "123456";
#else
#endif
This work well and saves me typing my user name and password a thousand times.
However I was wondering if any of the code or strings inside the if #DEBUG make it into the exe when compiling the release version. If they do, I suppose one should make sure to remove the hard coded user name and password prior to releasing the app.
Anyone know how this works?
Thanks.
Tim
|
|
|
|