|
It seems that you convinced me. I guess your totaly right. I will start using the enumeration from now on.
Thanks anyway
|
|
|
|
|
Stefan Troschütz wrote: Sure, it will work, but what if Microsoft decides to change the return values of toString in the next framework version. Comparison with the enumeration members will still work, but your string comparison will not.
Not just then, but what about foreign language OSes. Wouldn't they have localized button names?
--
Rules of thumb should not be taken for the whole hand.
|
|
|
|
|
But if you have a typo somewhere in your string the compiler won't tell you about it which he would do when using enumeration values.
Robert
|
|
|
|
|
Can I change the color of perticular cell in C# for DataGrid control.
I want to change the color of the cells which have numeric value below 100.
|
|
|
|
|
foreach (GridViewRow row in GridView1.Rows)
{
long cellValue = long.Parse(row.Cells[1].Text.ToString());
if (cellValue > 100)
{
row.Cells[1].BackColor = System.Drawing.Color.Red;
row.Cells[1].ForeColor = System.Drawing.Color.Blue;
}
}
Here Cells[1] 1 should be the index of the Column that you want to compare.
for(int i=0;i<500;i++)
Console.WriteLine("I Love C# \n");
|
|
|
|
|
But I am not using any WEB page , can I use (GridViewRow control ) for the desktop application aswell.
|
|
|
|
|
I want to learn how to create custom skinned GUIs like the ones we see
when using products like StyleXP or WindowBlinds.
I've just started with basic windows forms programming, and I'm finding
the default styles to be sucky.
What are the techniques of 'skinning' a window's form? (In Visual C++ 6
and in Visual C#) Will it vary depending on languages? as in VC++6 and
VC#?
A detailed explanation would be very helpful.
Thanks.
ASP - AJAX is SEXY. PERIOD.
|
|
|
|
|
A good place to start could possibly be to create a UserControl , override the OnPaint method and spam some GDI+
|
|
|
|
|
Can you create a Usercontrol in .Net compiled as ocx?
I would need to add it to VC6.0 resources.
(it takes me less time to make the usercontrol in .Net then making an ocx in C++ )
thanks
V.
I found a living worth working for, but haven't found work worth living for.
|
|
|
|
|
I am a noob. But as far as I know the final output from .NET is Assembly, Merge Module (.exe, .dll, .module)
Activex have versioning problem thats why the concept of Assembly comes into view .
Am I right Geeks?
|
|
|
|
|
Lol, many thanks for the reply, I did some searching on the net.
The only thing I came up with where people in forums arguing whether or not it was possible, but I didn't find any actual answers.
I think it must be possible, but up until now, I haven't found an answer .
It is to no avail anyway, I made a quick ocx in VB6 and it doesn't get fired in the dialog anyway. (the ocx's sole purpose was to call an exe).
|
|
|
|
|
Hi,
I'm creating a tool, in which i have to pass data from one project (B)
to other project (A).
But i dont want the A's object to be created in B..
How can i achieve this..
Can i add one more project C.. that only listen and stores.
C is accessible to B to write the data.
And can be extracted whenever necessary to the A.
Please help me..
Note: A & B are separate projects.
Regards,
nas
|
|
|
|
|
Actually yesterday there was a thread that talk about the same issue.
i will give you the reference to it,
the link is this
|
|
|
|
|
Try using IPC messenger or remoting.
Or you can have an xml file and implement a file system watcher on it.
When ever you try to write into the file , file changed event can be fired and fetch your data from the xml file.
|
|
|
|
|
i have bind a data source to a datagrid..datasource contains datetime type data ,..decimal and string....
i want select datas using datatable.select method passing filterexpression..
i used
dtblViewAll.Select("[" + [column name(datetime)] + "]" + " LIKE '%" + [strValue(string)] + "%'"))
but when we do like that it gives an error...without casting the field type of sqlquery ,.are there any ways to filter data..
thanks in advance....
|
|
|
|
|
My code is,
AxMSChart20Lib.AxMSChart chart = new AxMSChart20Lib.AxMSChart();
chart.Title.Text = "My first chart";
this.Controls.Add(chart);
When i use this code, i get this exception,
"InvalidActiveXSateException was unhandled"
Exception of type:
'System.Windows.Forms.AxHost+InvalidActiveXStateException' was thrown.
Can u tell, how can this be corrected?
Thanks for your time and patience-Guna
|
|
|
|
|
Hi all,
I am working on Microsoft SharePoint services.
Now when i create a new site on SharePoint i have first add a entry in the DNS for this new site.
Currently i do this manually, but i want to do this through code in C#.
Are there any API's for this?
Any links or pointers in the above regard will be appreciated.
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
Hi all,
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
Hello
I make a sample project that have a crystallReportViewer and a context menu
and a simple report that using an Access DB
My program work correctly But I make an installer program for it.
When Running this (installer)program on another machine( that have/not have VS and crystallReport ) show bellow error
cabinet file '_7c4f0ff510d579da233b321904df6a1c' that requared for install
not found
please help me to correct this error
thanks for you
|
|
|
|
|
how can i get text for particular element .
i.e for example: its an xml file i jus couldnt put greter then or smaller arrow key so i put braces
(testnode)
(element1)Element1 Text(/element1)
(element2)Element2 Text(/element2)
(element3)Element3 Text(/element3)
(element4)Element4 Text(/element4)
(element5)Element5 Text(/element5)
(/testnode)
i want to know for element1 the text is element1 text from xml textreader class.
feeling sad today
|
|
|
|
|
if you are using xmltextreader then you can check it use this article
http://www.c-sharpcorner.com/UploadFile/mahesh/ReadWriteXMLTutMellli2111282005041517AM/ReadWriteXMLTutMellli21.aspx[^]
but i think better option will be XmlDocument, you can get your data from following code:
<div style="font-family: Consolas; font-size: 10pt; color: black; background: white;"><p style="margin: 0px;"> XmlDocument doc = <span style="color: blue;">new</span> XmlDocument();</p><p style="margin: 0px;"> doc.LoadXml(<span style="color: maroon;">"<testnode><element1>Element 1</element1></testnode>"</span>);</p><p style="margin: 0px;"> <span style="color: teal;">Console</span>.WriteLine(doc.SelectSingleNode(<span style="color: maroon;">"testnode/element1"</span>).InnerText);</p><p style="margin: 0px;"> <span style="color: teal;">Console</span>.ReadLine();</p></div>
Regards
Shajeel
|
|
|
|
|
how can i get text for particular element .
i.e for example: its an xml file i jus couldnt put greter then or smaller arrow key so i put braces
(testnode)
(element1)Element1 Text(/element1)
(element2)Element2 Text(/element2)
(element3)Element3 Text(/element3)
(element4)Element4 Text(/element4)
(element5)Element5 Text(/element5)
(/testnode)
i want to know for element1 the text is element1 text from xml textreader class.
feelib sad today
|
|
|
|
|
Hi All
Can someone share with me the architecture or Design for any large localization Web project which primarily publishes the content , I mean
something like MSDN help being localized to different languages.
Please suggest me how I can approach for localizing MSDN if I have all my resource files in XML format.
A guy in China should see in Chinese and in US in English , also
1)There are some security implications to be added like all content should not be seen in a particular page outside USA, only specific sections pertaining to that country should be seen in that localized language.
2)Can manifest of an assembly be useful in doing a dynamic way of localizing.
Any reference or suggestions with the pros and cons of the architecture is highly appreciated as this is a bit urgent need.
Rgds
ind_coder
|
|
|
|
|
Hi this mail is regarding the addition of context menu in Visual Studio IDE. We want to add a menu item in the context menu after right clicking on VS Template, the approach is to open an another window after clicking the context menu item which would allow us to add some files in solution explorer.
We have tried it through VSIP(Visual Studio Integration Package) but were not able to add the context menu item. As we found, we can add item in Context Menu for Code window, Tool Box Item, Solution Explorer, Toolbar etc. which where very generic. But here we are looking for specific context menu item and that’s with VS Template only.
After study for VSIP we found that for each context menu there is Context Menu Identifiers and these Identifiers are used with GUID Identifiers. Both the Context Menu identifiers and GUID identifiers use hexadecimal numbers and all are different from each other. So if we want to define our own context menu for a particular scenario(Let say right click on VS Template) then
How we should pick this hexadecimal number for GUID and Context Menu Identifier.
Where to write the event binding code for the user defined context menu.
Following are few examples of GUID and Context Menu identifiers available in Visual studio Shell which we have taken from vsshlids.h files found in <drive:>\ \Program Files\Visual Studio 2005 SDK\2006.09\VisualStudioIntegration\Common\Inc folder.
// Guid for Shell's group and menu ids
DEFINE_GUID (guidSHLMainMenu,
0xd309f791, 0x903f, 0x11d0, 0x9e, 0xfc, 0x00, 0xa0, 0xc9, 0x11, 0x00, 0x4f);
// Guid for Shell's group and menu ids
#define guidSHLMainMenu { 0xd309f791, 0x903f, 0x11d0, { 0x9e, 0xfc, 0x00, 0xa0, 0xc9, 0x11, 0x00, 0x4f } }
//////////////////////////////////////////////////////////////////////////////
//
// Context Menu Identifiers, created by Visual Studio Shell
//
//////////////////////////////////////////////////////////////////////////////
#define IDM_VS_CTXT_PROJNODE 0x0402
#define IDM_VS_CTXT_PROJWIN 0x0403
#define IDM_VS_CTXT_PROJWINBREAK 0x0404
#define IDM_VS_CTXT_ERRORLIST 0x0405
#define IDM_VS_CTXT_DOCKEDWINDOW 0x0406
#define IDM_VS_CTXT_MENUDES 0x0407
#define IDM_VS_CTXT_PROPBRS 0x0408
#define IDM_VS_CTXT_TOOLBOX 0x0409
// UNUSED: 0x040A - 0x040C
#define IDM_VS_CTXT_CODEWIN 0x040D
#define IDM_VS_CTXT_TASKLIST 0x040E
#define IDM_VS_CTXT_RESULTSLIST 0x0411
#define IDM_VS_CTXT_STUBPROJECT 0x0412
#define IDM_VS_CTXT_SOLNNODE 0x0413
#define IDM_VS_CTXT_SOLNFOLDER 0x0414
|
|
|
|
|
Can anyone provide me the usage details or documents or code related to this AxMSChart20Lib.AxMSChart control using C#?
|
|
|
|