|
The MessageBox is a build in Windows dialogue, not even really .net. You can't change the button text, though there are many combinations of buttons you can show.
You will have to replicate it with your own Form and then you have total control over the buttons.
|
|
|
|
|
CodeProject is a beautiful website. It has many features. One of the most important features is "SEARCH".
A simple search for message box could easily have given you some suggestions for your answer.
Amin shamooni wrote: please insert source code to c#.net 2005
Noone is going to give you a source code. If you show some proof that you have done some work, people here will help you.
In any case, have a look at this Article on CodeProject: XMessageBox - A reverse-engineered MessageBox()[^]
|
|
|
|
|
my mail is :simon.thirteen@gmail.com
|
|
|
|
|
|
I am having an issue with a Fax component. It works when installed on a WinXP machine, but has an exception on Server 2003.
Here is my exception:
The COM class factory for component with CLSID {D73733C8-CC80-11D0-B225-00C04FB6C2F5} failed due to the following error: 80040154.
I found a couple of articles stating that this is a problem seen in 64-bit operating systems. I have personally confirmed that neither system is 64-bit, yet the problem persists (no exception in XP, exception in server 2003).
This is my first time using FAXCOMLib, so if I am making some rookie mistake please let me know. Thank you!
Here is the section of code that is failing:
FAXCOMLib.FaxServer faxServer = new FAXCOMLib.FaxServerClass();
faxServer.Connect(Environment.MachineName);
FAXCOMLib.FaxDoc faxDoc = (FAXCOMLib.FaxDoc)faxServer.CreateDocument(file.FullName);
faxDoc.RecipientName = recipientName;
faxDoc.FaxNumber = faxNumber;
faxDoc.DisplayName = displayName;
faxDoc.Send();
faxServer.Disconnect();
|
|
|
|
|
It should be easy to fix it:
It means that your module is not registered, so you have certainly copied the library to your target system without registring it.
* regsvr32 xxxx.dll if you have an error use a tool to check if a missing dependency is not missing (dependency [^]
Keep update us.
|
|
|
|
|
OK, the COM problem is fixed - the Windows Fax service was not configured on the account the prog is using. (Apparently Windows fax must be configured for each account?)
However, a different exception is being thrown by the same code block:
Access is denied. (Exception from HRESULT: 0x8007005 (E_ACCESSDENIED))
So apparently, it has permissions issues in reaching the Fax service...
|
|
|
|
|
The difference maybe in UAC control which may prevent to load the DLL or to access a specific resource.
Look at this policy explainations for more details:
http://www.15seconds.com/Issue/040121.htm[^]
Because, remotely it will be difficult to find any potential security reasons. Depending on the installation and the way you have installed your software.
Good luck. Keep us updated.
|
|
|
|
|
Hi,
I created setup and deployment to my project and would like to provide license agreement for the installation. Please guide me. Thanks in advance
|
|
|
|
|
There is a License agreement dialog which can be added to the set up project. Try that.
|
|
|
|
|
Hei,
Is there any option to change the rows color of datagrid on some condition,
like i wan to change the alternate color of the dg like this
conditionalcolumn color
1 Blue
1 Blue
2 white
3 blue
4 Blue
5 Blue
6 Blue
7 Blue
8 Blue
9 Wite
Thanks
Syed Shahid Hussain
|
|
|
|
|
I have not used DataGrid, but looking at the properties it offers, I guess painting it yourself should help.
|
|
|
|
|
|
U r the best......
Thanks a lot my great friend.
for u
Syed Shahid Hussain
|
|
|
|
|
You're welcome
|
|
|
|
|
If I recall correctly, since .net 2.0, the cells have had a background color property.
However, back when I was thinking of doing that, I decided to use a TreeView instead -- I avoid data grids whenever possible.
|
|
|
|
|
I have <Contact> nodes within <Contacts> elemnt and I am binding it to a datagrid using ReadXML. If I place a button for MOVE UP and another button for MOVE DOWN, the how can I re-position the nodes in the XML file?
|
|
|
|
|
I would use XPath or XmlDocument and then rebind the grid.
|
|
|
|
|
am sorry! how?! let me give an example
<Contact>
<Description>Mobile</Description>
<Number>111111</Number>
</Contact>
<Contact>
<Description>Office</Description>
<Number>333333</Number>
</Contact>
<Contact>
<Description>Home</Description>
<Number>222222</Number>
</Contact>
How can I move the Home to be be in the middle?
|
|
|
|
|
jrahma wrote: How can I move the Home to be be in the middle?
Either manually, or by sorting the entries. Assuming that you'd want to sort it, there's two ways of doing so. The first option would be to use XSLT[^], the second option would be using the XmlDocument class to sort[^] the nodes.
I are Troll
|
|
|
|
|
but this will sort based on something.. what I actually want is just a simple MOVE UP and MOVE DOWN button which will move the row in the DataGrid as well as the actual XML file
|
|
|
|
|
jrahma wrote: what I actually want is just a simple MOVE UP and MOVE DOWN button which will move the row in the DataGrid as well as the actual XML file
Simple as it may sound, it still needs to be programmed. The buttons should do something to the grid, and the XML. Back to Danish;
Danish wrote: I would use XPath or XmlDocument and then rebind the grid.
His answer is completely valid; you can use the XmlDocument-class to manipulate the XML. "Rebind the grid" means that the next step would be to load that XML back into the datagrid.
Another option would be to add a field that says "order", and to sort on that - that way the buttons only need to change a value, as opposed to changing the complete order and structure of the Xml file.
I are Troll
|
|
|
|
|
I have a datagridview bound to a datatable. When I remove a row from the datatable the grid reflects the change, but when I attempted to add a row back in I get an error System Index out of Range? I have tried datagridview1.Refresh() with no luck. What am I missing?
Thanks
|
|
|
|
|
Instead of refresh you can try to rebind the grid after deleting.
(or) if this is a wrong solution a code sample would help a lot to give clear solution.
|
|
|
|
|
Is there an article or code sample showing rebinding? Here is my code:
//Are there rows that need to be deleted?
for (int x = 0; x < dsInvoice.Tables["Invoice"].Rows.Count; x++)
{
if (dsInvoice.Tables["Invoice"].Rows[x]["QTYORD"].ToString() == "0")
{
dsInvoice.Tables["Invoice"].Rows[x].Delete();
dataGridView1.Refresh();
}
}
Thanks for all your help
|
|
|
|