|
Just set comboBox.Enabled = false;
|
|
|
|
|
I dont like to make the enable property to false. I just want the combox to be visible and the user can show all the items in it. But will not be able to select any items from it(combo box).
|
|
|
|
|
<br />
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)<br />
{<br />
comboBox1.SelectedIndex = 0;<br />
}<br />
|
|
|
|
|
how to create a numeric textbox!
i want coding...
|
|
|
|
|
MaskedTextBox[^]
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
You could use a validator with a regular expression that only excepts number.
Do the code youself its more fun and you'll never learn otherwise.
Grady Booch: I told Google to their face...what you need is some serious adult supervision. (2007 Turing lecture)
http:\\www.frankkerrigan.com
|
|
|
|
|
I m getting this error "Because of security restrictions,the type System.Runtime.Remoting.ObjRef cannot be accessed."I have tried many things like
<clientproviders>
<formatter ref="binary">
<serverproviders>
<formatter ref="binary" typefilterlevel="Full">
writing this in XML or in source code file like
Hashtable props = new Hashtable();
props.Add( "port", "0" );
BinaryServerFormatterSinkProvider serverProvider = new BinaryServerFormatterSinkProvider();
serverProvider.TypeFilterLevel = TypeFilterLevel.Full;
chan = new TcpChannel( props, null, serverProvider );
ChannelServices.RegisterChannel( chan );
string url = String.Format( "tcp://{0}:9000/ChatServer", textServer.Text );
chatServer = (ChatApplication.ChatServerObject)Activator.GetObject( typeof(ChatApplication.ChatServerObject),url);
but it doesn't work.Itz urgent.Plz help.
Thanx in advance.
Rizvi
|
|
|
|
|
hi all,
I have a dataview where i have included sorting.
I need to have all the rows of a dataview (sorted values) as a XMLNodeList. How can i convert the dataview sorted values into a xmlnodelist.
Can anyone help me plz
Thanks in advance.
Regards
Anuradha
|
|
|
|
|
Good Day Sir/Maam,
I wish to ask a very basic question. As I understand, the Try-Catch method catches all the error exception thrown and execute something inside the catch clause. The basic try-catch example:
<br />
try<br />
{<br />
}<br />
catch<br />
{<br />
MessageBox.Show("ERROR!");<br />
}<br />
A more advance try catch is indicating the exception thrown..
<br />
try<br />
{<br />
}<br />
catch(some exception)<br />
{<br />
MessageBox.Show("ERROR!");<br />
}<br />
catch(another exception)<br />
{<br />
MessageBox.Show("ERROR!");<br />
}<br />
My Question is this, if I indicated what exceptions to catch (like in the example above), How can I tell the try-catch to catch even the exemptions that wasn't indicated.
I Mean, when comparing it to an If-ElseIf-Else statement, what is the equivalent of "ELSE" in try catch?
I hope im not confusing you.
Thank you in advance.
|
|
|
|
|
You can specify a specific exception, a base exception (that matches all specific exceptions that inherit from it), the base for all .NET exceptions, or no specific exception class at all:
try {
} catch(NullReferenceException ex) {
} catch(SystemException ex) {
} catch(Exception ex) {
} catch {
}
---
single minded; short sighted; long gone;
|
|
|
|
|
be very careful catching totally unexpected errors. Trapping errors and 'swallowing' them can lead to some very hard to find problems further down the road.
Russ
|
|
|
|
|
Hi,
yes, just specify one or more catch blocks; their order is important, the first one
that matches gets executed, the others not.
And in general dont ignore exceptions, i.e. dont create empty catch blocks; they
would completely hide a malfunction that sooner or later will puzzle you forever.
|
|
|
|
|
Totally Right! I once created a catch block that contains //Do Nothing then I created an unexpected exception and it took me 7 hours to find.
|
|
|
|
|
How can I disable the 'information dialog' that pops up before the print
preview form shows itself?
|
|
|
|
|
by not using PrintDialog at all.
|
|
|
|
|
how to capture packet in promiscus mode using dotnetwinpcap.dll.
coz i want to capture all the packets passing in the kernel level.
|
|
|
|
|
Hi,
I'm having a user control in .Net 2.0 created with Visual Studio 2005. Where would you place cleanup code? I ask because the partial file of the designer contains the Dispose method where I normally placed my cleanup code. But generally I'm trying to avoid to manually change the code of the Designer.cs files.
What are the common practices concerning this?
Robert
|
|
|
|
|
Hi,
When a form is disposed, all child controls are disposed. So you have hust to dispose the form.
HTH.
|
|
|
|
|
You can use the Disposed event to add an event handler that will be called when the controls is being disposed.
---
single minded; short sighted; long gone;
|
|
|
|
|
Good point. Should have thought of this myself. Although I normally try to override base functions instead of binding events in the user control/form itself this sound good in this particular case where the Dispose method is already overriden in the Designer code.
Thanks.
Robert
|
|
|
|
|
Hi friends, I am developing Shopping cart in ASP.NET. Whenever I am entering username and password in ASP.NET Login Control, the problem with focus is occured. I want to Login the user without requiring user to click LOGIN button....means whenever the user enters the username and password, and If he do enter, he should be Login.
Chintan Mistry
|
|
|
|
|
Try using cookies to store the login detail after first login. Search google as there are millions of example of ASP.NET cookies to store credential details.
Grady Booch: I told Google to their face...what you need is some serious adult supervision. (2007 Turing lecture)
http:\\www.frankkerrigan.com
|
|
|
|
|
I have a ListView in details view. I need the item to be in a different position than the default one so I have written de code for DrawItem event. The items show in the correct position but when I select one and move to another one the control doesn't refresh its contents very well.
This is the code in the DrawItem event
Rectangle r = e.Item.Bounds;<br />
<br />
int charIndex = this.richIzquierda.GetFirstCharIndexFromLine(Convert.ToInt32(e.Item.Tag));<br />
<br />
r.Y = this.richIzquierda.GetPositionFromCharIndex(charIndex).Y;<br />
<br />
if (e.Item.Selected)<br />
{<br />
e.Graphics.FillRectangle(Brushes.Blue, r);<br />
e.Graphics.DrawString(e.Item.Text, e.Item.Font, new SolidBrush(Color.White), r);<br />
e.DrawFocusRectangle();<br />
}<br />
else<br />
{<br />
e.Graphics.DrawString(e.Item.Text, e.Item.Font, new SolidBrush((sender as ListView).ForeColor), r);<br />
}
This is the control shown on screen Link
How can I fix this problem? Thanks
|
|
|
|
|
Hello,
I am currently developing a DVD Playback Windows Application using C#. I am using the "IDvdInfo2.GetCurrentLocation Method " to get the current location of Playback.
I have an option in the windows application which allows the user to go throu the DVD one step at the time. The following the code for this.
private void stepForwardToolStripMenuItem_Click(object sender, EventArgs e)<br />
{<br />
int hr;<br />
DvdPlayLocation theVariable;<br />
<br />
playState = PlayState.Paused;<br />
hr = videoStep.Step(1, null);<br />
dvdInfo.GetCurrentLocation(out theVariable);<br />
txtlogDvd.AppendText("bFrames : " + theVariable.timeCode.bFrames + "\r\n" +<br />
"bHours : " + theVariable.timeCode.bHours + "\r\n" +<br />
"bMinutes: " + theVariable.timeCode.bMinutes + "\r\n" +<br />
"bSeconds: " + theVariable.timeCode.bSeconds); <br />
}
Unfortunatly, the display value for the frame "bFrames" is only updated every 14 steps (Frames)!!! Therefore my famre number is wrong most of the time, expect the time it gets updated which is every 14 frames. Can someone be kind enough to tell me what is going on?
Thank you very much and have a great day.
Khoramdin
|
|
|
|
|
Why can't we use the protected / private modifiers on interface signatures?
company, work and everything else @ netis
|
|
|
|