|
Why would you need to do that?
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
There's two items: your database, and a database-server. You can only manipulate databases that are (temporarily) attached. You can talk to a database-file after you informed the server where the file is located. Try something like this;
Server=.\SQLExpress;
AttachDbFilename=|DataDirectory|\myDatabase.mdf;
Database=DatabaseAlias;
Trusted_Connection=Yes;
The "AttachDbFilename" makes sure that you can access the database-file without having to "attach" it.
Good luck
I are Troll
|
|
|
|
|
If you don't want to rely on a DB server, you can us a smaler DBMS like SQLite
I use that from time to time with minor apps.
|
|
|
|
|
private void pbTextEdit_Click(object sender, EventArgs e)
{
Header header = new Header();
header.Show();
}
private void pbTextEdit_MouseHover(object sender, EventArgs e)
{
pbTextEdit.Image = Image.FromFile("C:/data/edit_color.gif");
}
I'f im hovering it it ain't changing the image?
What i wanna do is:
Only when I'm moving with my mouse over the picturebox that it is changing from picture then. And when I leave it it is going back to the normal one in the properties.
Dennis
|
|
|
|
|
The "hover" event will be fired continuously while your mouse is over the control. Try the OnMouseEnter[^] event to set the picture, and the OnMouseLeave[^] event to reset the original picture, that should do the trick
I are Troll
|
|
|
|
|
You should use "\" not "/" to write file location
use:
private void pbTextEdit_MouseHover(object sender, EventArgs e)
{
pbTextEdit.Image = Image.FromFile(@"C:\data\edit_color.gif"); // not ("C:/data/edit_color.gif");
}
to reveres the effect use the MouseLeave event:
private void pbTextEdit_MouseLeave(object sender, EventArgs e)
{
pbTextEdit.Image = Image.FromFile("Your privious image here....");
}
hope this helps
|
|
|
|
|
Hi
I want to markup one of the rows of mydatagridview for example i paint one of the rows.
what should i do?
|
|
|
|
|
Try this
private void DataGridView1_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
e.CellStyle.BackColor = differColour;
}
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
//Condition here
e.Row.BackColor = System.Drawing.Color.Red;
}
Definition of insanity:Doing the same think over & over again expecting different results
|
|
|
|
|
I was only formatting odd cells, didn't notice until your post that he wanted rows
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Hi.
I am using web application in which I have to fill some textboxes with data(text). In most cases textboxes are filled with same data. Filling these textboxes is taking a lot of time so I want to reduce it. But how? I do not have access to source code of web application.
I want do develop WinForms application which after hot key event will fill for example 1st textbox with 'aaa', 2nd textbox with 'bbb', 3rd textbox with 'ccc' etc.
How can I do it in C# WinForms? How can I access textboxes of web application which have to be filled and change its data?
Generally, when I will press Button on my WinForms application, textboxes on web application must be filled with some data.
best regards
|
|
|
|
|
You might do this either using
SendKeys.Send
or
you might use webBrowser.Document.GetElementById , and fill the innerhtml.
|
|
|
|
|
I am using web browser (IE, Firefox) to work with web application. I am not sure, but WebBrowser component is used to view web pages on WinForms application, so this is not what I expected. Or maybe it must be written in WinAPI?
|
|
|
|
|
use of SendKeys.SendWait method completely solved my problem.
Thank a lot Abhishek Sur
|
|
|
|
|
I need to warn you. Some anti virus software's can detect your application as trojan or Key logger
|
|
|
|
|
mpiotrek wrote: Thank a lot Abhishek Sur Smile
Most welcome..
|
|
|
|
|
Dear frineds.
have some clarification.
is it possible to Get the "File Extension" By Using "Mime Type"?
won't there be Two extensions haveing same "mime type"
By
Joe
|
|
|
|
|
It is not possible.
You can go the other way, from extension to mime type if you write an appropriate mapping function.
Example of a failing mime type would be text/plain which maps to .txt, .com, .conf, .cxx, .def and others. In addition many people incorrectly tag mime types and so you may get .xml, .csv, .rss and who knows what returned as text/plain!
A good list of mime types can be found at http://www.webmaster-toolkit.com/mime-types.shtml[^]
|
|
|
|
|
thanks for the replay..
and for the Exact answer
is there a way to find the "Native Application" for the "mime type"?
By
joe
|
|
|
|
|
Hi,
I am currently trying a sample on windows azure. Some where I heard that using windows azure. we can develop some mobile applications which runs plat form independently.
Can any one know about this or any samples related to this please send me..
Thanx in Advance..................
sampath-padamatinti
|
|
|
|
|
sampath-padamatinti wrote: any samples related to this please send me..
Here is one article from Codeproject
HelloAzure[^]
This may help
Abhijit Jana | Codeproject MVP
Web Site : abhijitjana.net
Don't forget to click "Good Answer" on the post(s) that helped you.
|
|
|
|
|
Thanks for reply,
It is useful for me......
sampath-padamatinti
|
|
|
|
|
Hi
I need somebody help.
In my c# project i need primary key of the row that i insert into my table;
what should i do?
If it is necessary to write storedprocedure , how can i use it in my project?
|
|
|
|
|
Use a statment like this:
string szStatement = "SET NOCOUNT ON; INSERT INTO tablename (column_1, column_2, ..., column_n) VALUES(?,?, ..., ?); SELECT @@IDENTITY AS ID;";
someDatabaseCommand = new SomeDatabaseCommand(dbConnection, szStatement);
int nNewId = (int)someDatabaseCommand.ExecuteScalar();
Greetings
Covean
|
|
|
|
|
I use GUIDs as primary keys. When I need the key of a row I'm about to insert I create the GUID in the application with System.Guid.NewGuid() and then pass it in with the rest of the data.
I never use autoincrement fields; they're so last century.
|
|
|
|