|
Anyone know if there's code out there for generating a paginated interface like Word, with a drawing area the size of the page selected in the printer settings?
|
|
|
|
|
I don't know if it will help in your context but I think there is a print preview control available in .NET for Windows Forms.
Need software developed? Offering C# development all over the United States, ERL GLOBAL, Inc is the only call you will have to make.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
Most of this sig is for Google, not ego.
|
|
|
|
|
In VB.net when we define DaySel as:
Dim DaySel As Date then when we use the command totaldays = DaySel.DaysInMonth(DaySel.Year, DaySel.Month)
it will response the corresponding days of the selected month (28 or 29 or 30 or 31 days)
However when I define in VC#
System.DateTime DaySel = default(System.DateTime);
- I only can get DaySel.DayOfWeek or DaySel.DayOfYear
Anyone can show me how to get the total days of the selected month?
Thank for nay help
|
|
|
|
|
//
// Summary:
// Returns the number of days in the specified month and year.
//
// Parameters:
// year:
// The year.
//
// month:
// The month (a number ranging from 1 to 12).
//
int daysInMonthCnt = System.DateTime.DaysInMonth(int year, int month);
|
|
|
|
|
The DaysInMonth is a static method, so you use the class name to call it, not a variable instance:
DateTime.DaysInMonth(DaySel.Year, DaySel.Month)
I don't know the exact reason why you can call static methods using a variable instance in VB, but it's not very logical.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi,
I need to be able to execute a SQL request thru a thread and wait till the end of the execution of the query to get the error code of the query.
What is the best way to do so ?
I am using the System.Data.SqlClient and System.Threading libs
Thanks in advance
Regards
Pierre
|
|
|
|
|
Check out the BackgroundWorker component
|
|
|
|
|
hi
i have some qus.s i hope u answer me please
1- am working on C sharp 2003 i want when i click on a command in form1 it opens new form and this new form it contain text box >>>
what the code i wrote i command ?????????
2- what it mean by UCOMIStream???? and should i used it n C# too or just in v.b
Thanx
|
|
|
|
|
Miss_hacker wrote: what it mean by UCOMIStream
I have been using C# for 6 odd years, and never needed to even find out what that is used for. I suspect something to do with COM. Well, COM is dead!
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Miss_hacker wrote: 1- am working on C sharp 2003 i want when i click on a command in form1 it opens new form and this new form it contain text box >>>
what the code i wrote i command ?????????
For starters, have a look at the documentation how to Show a window (or control) Control.Show Method [^]. There's a simple example in doc.
Miss_hacker wrote: 2- what it mean by UCOMIStream???? and should i used it n C# too or just in v.b
UCOMIStream is needed when communicating with COM objects, if you need the communication in streams between managed code and COM-object you'll neeed the interface regardless of the language, but you would be better off not using COM objects unless it's a requirement.
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
You d´ont want to do that.
1) use mdi child/parent forms or
2) use usercontrol as pages, for that you will have to use delegates.
About second question i d´ont know nothing about that.
nelsonpaixao@yahoo.com.br
trying to help & get help
|
|
|
|
|
Not a technical question, rather a fairly nebulous question about a UI design.
In summary, I have an application that may or may not perform a task every minute. I need to create a visual representation of when this task will be performed over a day/week. Something like a time line where a user can view a single day/week that displays when the task will execute.
As an example, the task is configured to execute at 12,34,45,50,56 past the hour in the hours 1,4,8,15,18,20,21,22
The problem is that there are 2440 minutes in a day, so creating a visual UI is somewhat complicated. Unless of course the user has a 500 inch wide screen monitor
Just incase anybody has heard of it, I am trying to create this for Crontab jobs.
|
|
|
|
|
Why don't you 'steal' MS Outlook's calendar view... I think it's a neat way to present events over time.
|
|
|
|
|
MrEyes wrote: The problem is that there are 2440 minutes in a day
Wow, you are either cursed or lucky with an extra 1000 minutes a day
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 beta 1 - out now! ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
leppie wrote:
Wow, you are either cursed or lucky with an extra 1000 minutes a day
I don't know. There have been days when I've felt like there's an extra 1000 minutes in there.
|
|
|
|
|
Vogon Guard Well, the hours are good.
Ford They'd have to be.
Vogon guard But now you mention it, I suppose most of the actual minutes are pretty lousy.
|
|
|
|
|
Cursed with fat fingers and the lack of a typing wand
|
|
|
|
|
There are several third party calendar controls available (free and licensed). I would pick up a nice looking and use that.
Some of those have even Gantt-like view just in case that you want to visualize the length and other information for the tasks some point in future.
I wouldn't believe that it has any effect on visualization if the task scheduling system is crontab. Only when getting the data into the calendar (or similar), you must implement your own 'parser' for crontab syntax (how to separate minutes, hours, days, what * means etc).
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Hii
Can anyone tell me what's the exact difference between validating and validated events. What I know is validated occurs after successful execution of validating. But what's the need of 2 events I cant understand. plz help
if possible give code for illustration
thanx
|
|
|
|
|
One is an event you hook into when your object is validating, and the other is the event you hook into when your object has finished validation. You hook into the validating event if you want to perform some work when the validation is started off.
|
|
|
|
|
hello everyone..
please help me about this.
I have an application that requires cv loader... For example, I have a resume (in any format, txt or doc file), then when I upload it using c# or in any language and i need to get the name, address and contact number of the person that will be saved in an oracle database...
Is there someone who can give me some hint in creating this functionality
thanks in advance.
jyn
|
|
|
|
|
There's no foolproof way to accomplish this, but I'd suggest that you take a look at using IFilter . There are a couple of decent articles here on CP that will help.
|
|
|
|
|
thanks for your reply...
i'll try it.
jyn
|
|
|
|
|
Please don't cross post. If your question isn't language specific, you should not post it in the language specific forums.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I have four select statement in 1 stored procedure, I will use it for 4 different dropdownlist.
SqlDataAdapter sqlda = new SqlDataAdapter("populatelist_sp", osql);
sqlda.Fill(DS);
<code>Cache.Add("listTables", DS, null, DateTime.Now.AddMinutes(60), TimeSpan.Zero, System.Web.Caching.CacheItemPriority.Normal, null);</code>
DropDownList1.DataSource = DS;
DropDownList1.DataBind();
The PROBLEM: When I used the cache object to populate another dropdownlist it gives me error "Object reference" meaning the value in the cache object is NULL. Out of 10 run I encounter 8 times.
if (DropDownList2.Items.Count == 0)
{
DataSet localDS = new DataSet();
localDS = (DataSet)Cache["listTables"];
DataView dv = new DataView(localDS.Tables[1]); --- Failed on this part
DropDownList2.DataSource = dv;
DropDownList2.DataBind();
}
Is there any settings that I need to do to retain the value inside the cache object?
GAIN: Instead of 4 roundtrip to the database in getting the value of the dropdownlist I only used 1 connection and the rest is Caching dependent.
Regards
Dabsukol
|
|
|
|