|
TimeSpan saat = DateTime.Now.TimeOfDay;<br />
lblLoginTime.Text = saat.ToString().Substring(1, t.IndexOf(".") + 1);<br />
|
|
|
|
|
DateTime.Now.ToShortTimeString()
|
|
|
|
|
hi, i don't know another way to do it. but you can try doing an substring to the string, in this way works to me jeje... hope you find it usefull
TimeSpan saat = DateTime.Now.TimeOfDay;
lblLoginTime.Text = saat.ToString().Substring(0,8);
|
|
|
|
|
i fill 1 data table from database . i have 1 datagrid on the form that i fill it manually. can i add one of the columns of the data table to my datagrid?
thank you
|
|
|
|
|
To read database name from App Config File and Compare this database name with database name in the database.
Please reply ASAP
|
|
|
|
|
u can try
System.Configuration.ConfigurationSettings.AppSettings[key]
where key is string associated with key tag in app.config file
the second question is not clear try to explain it more
rahul
|
|
|
|
|
You forgot to ask a question!
Reading from the app config can be as simple as
System.Configuration.ConfigurationSettings.AppSettings["YourKey"]
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
Hi,
I want to use DrawString using Trimming set to EllipsisCharacter, but this gives me stretched text (nonuniform spacing/kerning) when the text is trimmed.
But when I use another TextRenderingHint it does work, but I would rather use the default value, or at least draw non antialiased (or system default) text.
Is there a way to do draw trimmed text with an ellipsis without stretching it?
Thanks
|
|
|
|
|
hi
in dropdown i am populating the from the database, what i want when i select the data from dropdown the list i wanna show the selected the in textbox
i already setautopost dropdown true
BIG
|
|
|
|
|
Hi
write your code in SelectedIndexChanged event of that dropdownlist and then set AutoPostBack=true
ranandbe
|
|
|
|
|
Hi there,
Does anyone know how i can set an anonymous proxy IP as my IP in an email sent through System.web.mail - Any help really appreciated. Is there a way to hide or mask my ip from the email header.
Thanks in advance
|
|
|
|
|
anybody help me for convert vb.net project to C#
my mail address is rafimca78@yahoo.com
mohamad rafi
|
|
|
|
|
Sure, just send me your paychecks...
|
|
|
|
|
If it's a 1.0 or 1.1 project sharp develop can do this automatically IIRC. Reflector will do the same, but will eat any comments in the process. I'm not sure if either supports 2.0 yet.
|
|
|
|
|
There are a variety of tools available (just google on VB to C# converter).
We have a very well-established VB to C# converter called Instant C# - you can download a demo edition at www.instantcsharp.com with a 100-line snippet conversion limit.
Regardless of which converter you use, it's to your advantage to avoid the on-line converters since there's a lot that they do not convert:
http://www.tangiblesoftwaresolutions.com/Articles/Language%20Features%20not%20Handled%20by%20On-Line%20Converters.htm[^]
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter and VB to C++ converter
Instant J#: VB to J# converter
Clear VB: Cleans up VB.NET code
Clear C#: Cleans up C# code
|
|
|
|
|
hi all,
i have 16 checkboxes in a form. (4 in a row and total 4 rows = 4x4)
if any one checkbox is checked in a row, i want to disable others.
how can i do this ?
|
|
|
|
|
Use <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWindowsFormsControlClassDataBindingsTopic.asp" rel="nofollow">DataBindings property</a>.
Best regards, Alexey.
|
|
|
|
|
Message Closed
modified 27-Apr-15 11:00am.
|
|
|
|
|
Add this line to FormLoad event:
<br />
checkbox2.DataBindings.Add(new Binding("Enabled", checkbox1, "Checked"));<br />
When checkBox1 is checked checkbox2 will be enabled, and
when checkBox1 is unchecked checkbox2 will be disabled.
Best regards, Alexey.
|
|
|
|
|
Hi!
Nothing magic about it: Just set the Enabled property of the CheckBoxes you want disabled to false .
Regards,
mav
--
Black holes are the places where god divided by 0...
|
|
|
|
|
i think this could be worked
CheckBox[] ch1 = new CheckBox[] { checkBox1, checkBox2, checkBox3, checkBox4 };
{
for (int x = 0; x < 4; x++)
if (ch1[x].Checked)
{
foreach (CheckBox ch in ch1)
{
if (ch.CheckState == CheckState.Unchecked)
ch.Enabled = false;
}
}
}
|
|
|
|
|
Nothing hard to do the above things.... just put all the check boxes in a group box.. it will take care of enabling/disabling the states
|
|
|
|
|
The best way of doing this is to use radio buttons instead of checkboxes. That is what radio buttons are for.
Roy.
|
|
|
|
|
Sorry Roy is right... put radio buttons inside Group Box
|
|
|
|
|
I have to draw a picture using GDI, which is definitely bigger than the screen.
I dont know the drawing size intially, its dynamic one.
so, to see the whole picture i should have scroll bars.
how can i add scroll bar to form.
Please help me with sample code.
Thanks in Advance
-- modified at 5:06 Thursday 25th May, 2006
|
|
|
|