|
O.K.
I had the same problem (and I didn't whanted to se the carret inside the textbox), so as a workaround I handled (overrided) the OnFocus and reseted the focus on an other (hidden) Control.
All the best,
Martin
|
|
|
|
|
Oh and another thought, how about disabling the controls and hooking the paint event to display them as though they were enabled.
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
Ian Shlasko wrote: * I don't want to just set the Enabled property, as this grays out the control, making it difficult to read and therefore useless as a viewer. Textboxes have their ReadOnly property, but this doesn't help for dropdowns, checkboxes, etc.
One other option would be to manually change the color from gray to black when you disable it. IIRC if you do this though and subsequently want the control both disabled and grayed you'll have to manually set it to gray.
--
You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
|
|
|
|
|
Hello I have one executable file "prog.txt" made in the folder "glpsol" created with this command line glpsol -m tsp.mod -o prog.txt in command prompt I want to know how can I do this from c# not from Command prompt(to create prog.txt in folder glpsol with that command line glpsol -m tsp.mod -o prog.txt)...thanks
lavi
|
|
|
|
|
System.Diagnostics.Process.Start(@"glpsol -m tsp.mod -o prog.txt");
Standards are great! Everybody should have one!
|
|
|
|
|
Use System.diagnostics name space.
"In quiet and silence, the truth is made clear."
|
|
|
|
|
you can use post-build and pre-build events of your project to do this.
right click on your project go to properties and then to build events
then chose whatever is suitable to u. (post-build or pre-build)
|
|
|
|
|
|
Hi friends..
I have designed one windows application with one button control on it..I want to open one new Internet browser window with some url on click of that button..
regards,
Rahul
|
|
|
|
|
To open in IE System.Diagnostics.Process.Start("iexplore","http://www.codeproject.com/");
To open in the default browser use System.Diagnostics.Process.Start("http://www.codeproject.com/");
Last modified: 59mins after originally posted --
|
|
|
|
|
|
We need to provided the full path of the IEXPLORER.EXE as 1st parameter.
like
System.Diagnostics.Process.Start(@"C:\Program Files\Internet Explorer\IEXPLORE.EXE", @"http://www.yahoo.com");
Manoj
Never Gives up
|
|
|
|
|
Why do you need to provide it? Just using System.Diagnostics.Process.Start("http://www.codeproject.com/"); will open it in the default browser.
|
|
|
|
|
Does anyone know where this is a list of the solution explorer icons and their meaning? I tried a search on google, but the search terms return a mess of useless links.
Thanks.
C26
|
|
|
|
|
Just have a look in "VisualStudio2005\Common7\VS2005ImageLibrary\VS2005ImageLibrary\bitmaps\outline\24bitcolor"
(might have to uncompress VS2005ImageLibrary.zip)
dir vsproject* , will give you :
VSProject_asa.bmp
VSProject_asp.bmp
VSProject_bmp.bmp
VSProject_brokenlink.bmp
VSProject_brokenreference.bmp
VSProject_cab.bmp
VSProject_component.bmp
VSProject_control.bmp
VSProject_CSCodefile.bmp
VSProject_css.bmp
VSProject_database.bmp
VSProject_dynamicdiscovery.bmp
VSProject_form.bmp
VSProject_generatedfile.bmp
VSProject_genericfile.bmp
VSProject_genericproject_small.bmp
VSProject_hiddenfile.bmp
VSProject_html.bmp
VSProject_imagefile.bmp
VSProject_reference.bmp
VSProject_report.bmp
VSProject_resourcefile.bmp
VSProject_schema.bmp
VSProject_script.bmp
VSProject_VBCodefile.bmp
VSProject_webcomponent.bmp
VSProject_webcontrol.bmp
VSProject_webform.bmp
VSProject_xml.bmp
VSProject_xsl.bmp
Is that what your are looking for ?
thod_Friend.bmp
VSObject_Method_Private.bmp
VSObject_Method_Protected.bmp
VSObject_Method_Sealed.bmp
VSObject_Method_Shortcut.bmp
VSObject_Module.bmp
VSObject_Module_Friend.bmp
VSObject_Module_Private.bmp
VSObject_Module_Protected.bmp
VSObject_Module_Sealed.bmp
VSObject_Module_Shortcut.bmp
VSObject_Namespace.bmp
VSObject_NamespacePrivate.bmp
VSObject_NamespaceProtected.bmp
VSObject_Namespace_Friend.bmp
VSObject_Namespace_Sealed.bmp
VSObject_Namespace_Shortcut.bmp
VSObject_Object.bmp
VSObject_ObjectShortcut.bmp
VSObject_Object_Friend.bmp
VSObject_Object_Private.bmp
VSObject_Object_Protected.bmp
VSObject_Object_Sealed.bmp
VSObject_Operator.bmp
VSObject_Operator_Friend.bmp
VSObject_Operator_Private.bmp
VSObject_Operator_Protected.bmp
VSObject_Operator_Sealed.bmp
VSObject_Operator_Shortcut.bmp
VSObject_Properties.bmp
VSObject_Properties_Friend.bmp
VSObject_Properties_Private.bmp
VSObject_Properties_Protected.bmp
VSObject_Properties_Sealed.bmp
VSObject_Properties_Shortcut.bmp
VSObject_Structure.bmp
VSObject_Structure_Friend.bmp
VSObject_Structure_Private.bmp
VSObject_Structure_Protected.bmp
VSObject_Structure_Sealed.bmp
VSObject_Structure_Shortcut.bmp
VSObject_Template.bmp
VSObject_Template_Friend.bmp
VSObject_Template_Private.bmp
VSObject_Template_Protected.bmp
VSObject_Template_Sealed.bmp
VSObject_Template_Shortcut.bmp
VSObject_Type.bmp
VSObject_TypeDef.bmp
VSObject_TypeDefShortcut.bmp
VSObject_TypeDef_Friend.bmp
VSObject_TypeDef_Private.bmp
VSObject_TypeDef_Protected.bmp
VSObject_TypeDef_Sealed.bmp
VSObject_Type_Friend.bmp
VSObject_Type_Private.bmp
VSObject_Type_Protected.bmp
VSObject_Type_Sealed.bmp
VSObject_Type_Shortcut.bmp
VSObject_Union.bmp
VSObject_UnionPrivate.bmp
VSObject_Union_Friend.bmp
VSObject_Union_Protected.bmp
VSObject_Union_Sealed.bmp
VSObject_Union_Shortcut.bmp
VSObject_ValueType.bmp
VSObject_ValueTypePrivate.bmp
VSObject_ValueType_Friend.bmp
VSObject_ValueType_Protected.bmp
VSObject_ValueType_Sealed.bmp
VSObject_ValueType_Shortcut.bmp
Is that what your are looking for ?
|
|
|
|
|
Hi
Can someone tell me how to return an array from a function???
Regards
sAqIb
"Our scientific power has outrun our spiritual power. We have guided missiles and misguided men."
Dr. Martin Luther King Jr.
|
|
|
|
|
object[] MyFunction()
{
}
|
|
|
|
|
public string[] myfunction()
{
string[] myarray = {"test","test","Test"};
return myarray;
}
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
saqib82 wrote: tell me how to return an array from a function???
But What is the type of the array
string[] function()
int[] function()
IF you don't what will the type then check for Generic new in Dot net Framework
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Haven't handled arrays in generics, but here is an article[^]
An excerpt shows this:
23 // output array of all types
24 static void PrintArray< E >( E[] inputArray )
25 {
26 foreach ( E element in inputArray )
27 Console.Write( element + " " );
28
29 Console.WriteLine( "\n" );
30 }
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
Yes but i think the function you have written is similar to genric
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
|
hi every one,
just wanted to know how can we make a text box or a datagridview column in a windows application display 3 digits after the decimal point. Does it have some thing to do with SQL Server or u can just do it on the Application end.
2) please tell me how can we restrict a text box to take input as a numeric data. I can restrict this using KeyPress event but I got a bit googled when I thought I should take floating point number for an input. the problem is that the user can input the decimal point more than once... so how can we stop that from happening
thanks in advance
Rocky
|
|
|
|
|
Why don't you just use the numeric control?
If you don't want to do that, then you can use the [textBox].DataBindings[0].Parse, and [textBox].DataBindings[0].Format events to handle how data is manipulated between the datasource and presentation layers.
|
|
|
|
|
Rocky71 wrote: display 3 digits after the decimal point
the ToString function of decimal does it. But you will need to pass format as a parameter.
Rocky71 wrote: 2) please tell me how can we restrict a text box to take input as a numeric data. I can restrict this using KeyPress event but I got a bit googled when I thought I should take floating point number for an input. the problem is that the user can input the decimal point more than once... so how can we stop that from happening
search for validating decimal number or you can use maskedtextbox
|
|
|
|