|
Hi All,
Can any one send the code for
by giving Week number,week day and month name
i want date
example: week no 4,Monday,March,present year
then it should get the date as "22 march 09"
Thanks&Regards
Shavil
|
|
|
|
|
Send you the code - not what we do here.
However if you chuck your date into a DateTime type and explore the DateTime object I'm sure you can get the answer you are after.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
shavil wrote: Can any one send the code
I am afraid nobody will ...
I Love KongFu~
|
|
|
|
|
[sarcasm] Sure, we will. But please post your email-address so people are able to send you the codez directly. That way you don't need to come to the forum looking for an answer. Makes things more comfortable for you. Maybe you also should put the words "URGENTZ NEEDZ CODEZ, I WANT SOLUTION!" into your post, to make clear how important the matter is.[/sarcasm]
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
Hi ,
I am trying to generate an excel report from ASP.Net using C#.
My development server as ExcelObject Library 5.0. Where as my server as 11.0 Installed. I get the below error when trying run it in server
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80070005.
We don't have admin rights in the server which leaves us with no option in 5.0 library.
Is there a way to solve this issue?
|
|
|
|
|
This is the primary reason that Office is almost NEVER used for report processing. You need the same version and sometimes service pack on ALL MACHINES, a bloody support nightmare.
I STRONGLY recommend moving to a dedicated report product eg SSRS.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello friends,
How can we Open a file with setting focus to specific line numner.
eg.
Process.Start(path);//path is detail path of a .cs file
using above command i am able to open a file but focus is at first line of file.
Where as i want to set a focus to specific line, just like..in VS2005 FindFile window if we double click on file name it will open a file with selected line number.
Thanks in advance..
|
|
|
|
|
Hi,
How can we send emails using exchange server with out using SMTP server.
Is tr any additional configurations or settings on exchange server to send mails.
Thanks
Anup
|
|
|
|
|
try something like this
SmtpClient mail = new SmtpClient("my Exchange Server");
mail.UseDefaultCredentials = false;
mail.Credentials = new NetworkCredential("user", "password");
mail.DeliveryMethod = SmtpDeliveryMethod.Network;
MailMessage msg = new MailMessage(from, to, subject, body);
msg.IsBodyHtml = true;
mail.Send(msg);
You will need to fill some of the info, see here [^] and here[^]
Yusuf
|
|
|
|
|
|
you welcome, it is nice to see someone who appreciates it.
Yusuf
|
|
|
|
|
Can you please reply with the code ... I have similar problem ...
Thanks in advance.
Regards,
KK
|
|
|
|
|
Hi,
I am trying to listen my system in port number 399, but some times it is accessed by some other process. How can i select another free port automatically?
Thankyou,
YP
|
|
|
|
|
Read this Port numbers[^].
Choose something in the range of 49152–65535
|
|
|
|
|
In this case the generally we use a try catch block
The prototype is
Try
{
//Here try to Listen at a prot number
}
Catch (//For port already in use expection)
{
PortNumber = portNumber ++ ;
//Again try to connect but to new port number
}
Continue this till we find a free port , or till you think its enough of trying (Throw an message to user , no port available to listen)
Also make sure that the socket connecting to this kind listener also need to try different ports , because it does not know , which port was free for the listener.
I hope this provides some clue , feel free to ask , if you have doubts
-Regards
Bharat Jain
bharat.jain.nagpur@gmail.com
|
|
|
|
|
Hi,
I have written a basic UserControl (called bevel). On it I have a Label and nothing else. I can successfully add this to a form and it does what it should.
From various web examples, I added code to add a 'verb' to the design time context menu. The resulting file looks like...
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using System.ComponentModel.Design;
namespace MyNameSpace.Components
{
[Designer(typeof(BevelDesigner))]
public partial class Bevel : UserControl
{
public Bevel()
{
InitializeComponent();
}
}
internal class BevelDesigner : ComponentDesigner
{
public override System.ComponentModel.Design.DesignerVerbCollection Verbs
{
get
{
DesignerVerbCollection v = new DesignerVerbCollection();
v.Add(new DesignerVerb("Flip", new EventHandler(FllipHandler)));
return v;
}
}
private void FllipHandler(object sender, System.EventArgs e)
{
}
}
}
Trouble is now the component does not display on the design form any more but rather sits at the bottom rather like the 'Timer' component does. When I right click on the component, the verb "Flip" has been added, however. I was wondering if it was somehow bypassing the "Bevel.Designer.cs" form and if so what I could do about it. I was also wondering if the above example was for 'raw' code and was incompatible with a project done in an IDE. I am using Visual Studio 2008 should that makes any difference. I figure I am missing something really basic as every example has a variation of the above example without any further elaboration.
Regards,
David Bailey.
|
|
|
|
|
You appear to be inheriting from the ComponentDesigner class; perhaps the System.Windows.Form.Design.ControlDesigner class may be more suitable?
|
|
|
|
|
Hi Computafreak,
Thanks for pointing that out. Tried it and you were spot on.
- David Bailey
|
|
|
|
|
i am adding one custom property to textbox.when i click on this item i need to show one form (like popup window).and this form having one textbox and one button..after entering the text in textbox and click on ok button.i need to display the text in this custom property item..
please any one help me.
|
|
|
|
|
How do you add the custom property to textbox? Do you mean inherite from textbox control? If so, just register the click event of OK button from the custom control. Then you write the code to update the property.
I Love KongFu~
|
|
|
|
|
i am adding one custom property to textbox.when i click on this item i need to show one form (like popup window).and this form having one textbox and one button..after entering the text in textbox and click on ok button.i need to display the text in this custom property item..
please any one help me.
|
|
|
|
|
hello
i have an assignment (don't run!) about a computer vision system for a robot.
My team and i are stuck on it, because this is the very first time in our lives we use c# (please, don't run!. We do have basic programming knowledge, tho, so we are not totally lost. The point is we need to manage the webcam images data in a list of list; we know it's possible to do this but we are not so sure of how.
List<PixelData> Shape = new List<PixelData>();
List<List<PixelData>> ShapeList = new List<List<PixelData>>();
ShapeList.Add(Shape);
Shape = ShapeList.IndexOf(List<PixelData>, 2);
(we are testing code, that's why it might not seem to make sense.)
as we track down a binary bitmap, we need to identify shapes and we will never know how many shapes are we going to find on each bitmap; so, as a start, we want the list of shapes, but each shape is actually a list of the pixels that build it up... (am i clear?)
the questions:
gt;do we need to give a name to every list of datapixels inside the mayor list? how do we do that?
gt;how do we retrieve each shape (list of datapixels from the main list) as a whole and then each shape data (datapixels from every list)?
gt;... does the little bit of code makes any sense at all ?
please please help.
tnx
atte: my classteam and i
VB
|
|
|
|
|
VitroBlue wrote: do we need to give a name to every list of datapixels inside the mayor list? how do we do that?
No., If you want to name them, use a hashtable. As it stands, you address them by index in the array. foreach(List<PixelData> list in ShapeList) or ShapeList[0]
VitroBlue wrote: how do we retrieve each shape (list of datapixels from the main list) as a whole and then each shape data (datapixels from every list)?
Foreach at each level. Top level to get the lists, foreach on each list to get each pixeldata object.
VitroBlue wrote: does the little bit of code makes any sense at all
Yes, all of it bar the last line. To find an index, you need the object whose index you are searching for, so that just plain won't work at all.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
if PixelData is a class representing one pixel, are you aware of the fact that this will lead to:
- a huge waste of memory: an object typically has 32 bytes of overhead, so say you are holding 4 bytes of useful information, it will take 36 bytes of memory
- a very slow execution: just enumerating the pixels will take forever, due to a number of indirections in your setup.
IMO the normal approach to this would be:
- either store image information in arrays, say red[], green[], blue[] for the color components of all pixels in the image, or at least in the scanline;
- or use existing classes, such as Bitmap (which internally stores pixel data in an array of structs, each struct holding one byte or red, green, blue, alpha). An array of struct seems most appropriate, since now you can use pointers and don't use unnecessary extra indirections.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 9:09 AM
|
|
|
|
|
Hi,
iam developing windows application using c#..
iam Exporting Datagridview data to Excel file it's working properly..
but in one system exporting function is working only one time,if i restart the
system and again it's working for one time..
what's the problem,can anybody please help me ..
but iam running the sample application in another system,there exporting function working N no:of times..(continuously working..)
Thanks in Advance...
murali krishna
|
|
|
|