|
One whay is to use custom datetime picker. I Think netAdvantage has it (Not free).
Or you coud simply try to paint another control like MonthCalendar, and maybe it will fell like pop up
|
|
|
|
|
i have made a form which at as splash in starting of my application...i dont know how to show it for few mins and then get disappear and show other forms???? plz help me.
thanks.
|
|
|
|
|
Just set a timer within the form class, so it closes itself after the interval you have in mind.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I've create a UserControl with 2 TabPages. First TabPage got 1 TextBox and Second TabPage got 2 TextBox(s). During Form Design Time I drag the UserControl from toolBox to the new Form the UserControl show up correct in the Form. However i'm unable Click on the Second TabPage as selected TabPage to see how second TabPage look like. Please help.
|
|
|
|
|
Is there a way programmaticly to make a application change it's CPU Priority? Everything I keep reading shows it has to be called from the command prompt to load in a certain priority. What I want to do is have the application check and see it's current priority and automatically change it to a specified high or real time priority.
|
|
|
|
|
I found it out ....
System.Diagnostics.Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.RealTime;
|
|
|
|
|
RealTime is almost always a bad idea.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
This is a really bad idea. Unless the system is dedicated to that app, setting RealTime can screw with other apps running in the system. Read this.[^]
Also, not every user that runs your app will have the permissions to set the priority.
|
|
|
|
|
That's not an app I'd want running on my system; would you?
|
|
|
|
|
i agree. it was set to high, not real time.
that exAmple was one i fund that worked
|
|
|
|
|
Hi,
i am developing windows dot net 2.0 version application .
my requirement is i have export a form which consists of line, picture, data grid and other control.
so i have export total form to word
please help me this
thanx
|
|
|
|
|
I believe that a form has a method that will draw it to a bitmap. You're going to need some sort of screen capture or otherwise a programatically generated image of your screen, then you will export that to word.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Native BitBlt should be appropriate for that.
Life is a stage and we are all actors!
modified on Tuesday, August 18, 2009 3:09 AM
|
|
|
|
|
I have an aspx page which contains multiple instances of my user control. The user control reads text into a label from an xmlreader.
each instance of the control will read different text.
Im not sure how to access the label.Text property? Do I need to use a delegate to do this? I dont know how this works but would appreciate any help I can get!
|
|
|
|
|
You were looking for the ASP.NET forum ?
It's very simple. If your user control needs to expose an inner property, you write a property to expose it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi,
Here is my task to accomplish so far: Modify the date class of (provided) to perform error checking on the initializer values for instance variables month, date, and year. Also provide a method NextDay to increment the day by one. The Date object should always remain in a consistent state. Write a program that tests the NextDay method in a loop that prints the date during each iteration of the loop to illustrate that the NextDay method works correctly. I have to be careful that I make sure my program increments into the next month and into the next year.
I did created classes and intiliaze values, and created next day. I tried different method but,could not get it right.Can you point me in the right direction. Thanks, and here is my code:
Date.cs
using System;
using System.Collections.Generic;
using System.Text;
public class Date
{
public static void Main(string[] args)
{
}
private int month, day, year, nextday;
public Date(int theMonth, int theDay, int theYear, int nextDay)
{
Month = theMonth;
Year = theYear;
Day = theDay;
Nextday = theNextDay;
Console.WriteLine( "Date object for date {0}", this );
}
public int Year
{
get
{
return Year;
}
private set{
if (value > 0 && value <= 3000)
year = value;
else
{
Console.WriteLine("Invalid Year ({0}) set to 1.", value);
year = 1;
}
}
}
public int Month
{
get
{
return Month;
}
private set
{
if (value > 0 && value <=12)
month = value;
else
{
Console.WriteLine( "Invalid Month ({0}) set to 1.", value );
month = 1;
}
}
}
public int Day
{
get
{
return day;
}
private set
{
int[] daysPerMonth = { 0, 31, 28, 31, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
if (value > 0 && value <= daysPerMonth[Month])
day = value;
else if (Month == 2 && value == 29 && (Year % 400 == 0 || (Year % 4 == 0 && Year % 100 != 0)))
day = value;
else
{
Console.WriteLine("Invalid day {0} set to 1.", value);
day = 1;
}
}
}
public override String ToString()
{
return String.Format("{0}/{1}/{2}", Month, Day, Year);
}
public string ToDateString()
{
return month + "/" + day + "/" + year;
}
public int getnextDay()
{
//int nextDay = 1;
{
if (day.equals("Sun"))
return "Mon";
else if (day.equals("Mon"))
return "Tue";
else if (day.equals("Tue"))
return "Wed";
else if (day.equals("Wed"))
return "Thu";
else if (day.equals("Thu"))
return "Fri";
else if (day.equals("Fri"))
return "Sat";
else
return "Sun";
for (nextDay=0;nextDay<30;nextDay++)
{
nextDay = 33; // This line will ERROR!
Console.WriteLine("Loop: {0}", nextDay);
}
}
}
//end of file
DateTest.cs
using System;
using System.Collections.Generic;
using System.Text;
namespace Date
{
public class DateTest
{
public static void Main(string[] args)
{
Date myDate = new Date();
myDate.nextDate(); // display date
}
}
}
|
|
|
|
|
lopatko wrote: public Date(int theMonth, int theDay, int theYear, int nextDay)
Why would you take a nextDay property ?
I don't see anything that looks like a shot at a NextDay property. Your code needs to add one to the number of days, then check if you've gone over to the next month, and if you have, go back to 1 and increment the month. It also needs to check if this increments the year.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
I´m confused (or miss the point complete): Why not use the AddDay Method?
DateTime dt = DateTime.Now;
Console.WriteLine(dt.AddDays(1).ToString("dddd").Substring(0,3));
|
|
|
|
|
SQLValues = SQLValues + " '" + ckbxCreateShortcut.Checked.ToString() + "', '" + ckbxUniqueName.Checked.ToString() + "', '" + rbtnClientMachine.Checked.ToString() + "', '" + rbtnClientUser.Checked.ToString() + "' ";
This one is wrong somehow?
SQLValues = SQLValues + "'{0}', '{1}', '{2}', '{3}' " ckbxCreateShortcut.Checked.ToString(), ckbxUniqueName.Checked.ToString(), rbtnClientMachine.Checked.ToString(), rbtnClientUser.Checked.ToString();
|
|
|
|
|
If I have understood what you are trying to do:
SQLValues += string.Format("{0}, {1}, {2}, {3}", ckbxCreateShortcut.Checked.ToString(), ckbxUniqueName.Checked.ToString(), rbtnClientMachine.Checked.ToString(), rbtnClientUser.Checked.ToString());
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
You put quotes around it, the paramaterised queries take care of that for you.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Is there a way to determine if a type is nullable, other than hitting it with a tryparse (somewhat like hitting something to see if it will break). IE is there a property on the type that indicates if it is nullable.
I have a generic convert from datarow to properties that is stumbling on nulls, I don't particularly want to do a switch on the type but would like to determine if the type property type will accept a null before attempting to load it.
I may need to do the switch eventually to support the hierarchy type
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
If you mean, is it able to be null like a string, and not like an int, I believe the answer is no. If you mean is it an instance of an INullable, then 'as' will do that for you.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
This thread on MSDN Forums has several methods that claim to be able to do this. Clickety[^].
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks Henry, thats what I was looking for. It's a bit weird when an MVP is asking the same question, there are a number of excellent responses.
|
|
|
|