|
MSDN? Alternatively, make use of the code snippets manager in Visual Studio.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I want to be able to take only certain data from a .txt file and display it on my page... the example is this. I want to be able to select all the data inserted in that .txt file where there is a specific date ie. 30 January 2008. Where I have the problem is selecting data that falls across more than one lines in the text file, remembering that the next date is coming up a couple lines later and I don't want to use that data that coincides with that date.
Any advice?
Thanx
Dan
|
|
|
|
|
Loop through the file line by line. Take which bits of data you need. Without knowing more about the file structure I can't be of further help.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
What if I dont know what data I need? All I know is the date that links me to whatever data coincides with that date. What can I use as a exit from the loop in that case?
example of text:
26 January 2008
Go to Dentist
Eat toast
27 January 2008
Sleep
Write books
28 January 2008
...
and so on...
|
|
|
|
|
Being ill at home I thought I'd write you the pseudocode for how to do this.
So this is one of the ways you can do this - just pop the relevant C# in there:
displayline = false
while not readline end of file
if line is date
if date is selecteddate
displayline = true
else
displayline = false
endif
endif
if displayline
display line to screen
endif
while end
You always pass failure on the way to success.
|
|
|
|
|
I want with click on Image get cartesian cordinate from image(X,Y)in c#
please help me
|
|
|
|
|
Just use the MouseDown-event of the control containing your image
|
|
|
|
|
Hi,
I am doing an application in WPF. The application is in maximized state with no minimize and maximize box.However on double clicking over the tool bar, the application got minimized. I have to always keep it in maximized state that would work in all resolutions. Please help me.
|
|
|
|
|
You can have the line Me.WindowState = FormWindowState.Maximized in your
Form1_SizeChanged event.
|
|
|
|
|
Hai Everybody,
I have a dataset and I am binding the same to a combo box in windows application.
I want a item named "Select" to be in the top and it should be the default one.
Can any one tell me how to add an extra item after binding the combo box with the datasource.
Thanks in advance.
|
|
|
|
|
You can just add it in the form designer and switch on AppendDataBoundItems.
Or you'll have to go with adding it after with ddl.Items.Insert(0, "Select...");
|
|
|
|
|
Thanks a lot.
Actually I have set the text as "Select", but I have forgot to change the drop down style.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Why have you deleted your original message? You got an answer to your question, so what's the problem?
It's considered rude to do this.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I am running msinfo32.exe programmatically in my application to output the system information. When this runs especially on windows 2000 sp4, it is scanning the floppy drive and resulting in some noise.
How can i avoid it from scanning the floppy drive?
Thanks.
|
|
|
|
|
|
Maybe it doesn't like it when you put questions into unrelated questions.
|
|
|
|
|
Hi all,
I have to make a library to convert the Color from Lab value to RGB value. However, it requires an algorithms to do so.
I read some documents, it mentioned that the steps should be
1. Lab -> XYZ
2. XYZ -> RGB
I really have no idea what the calculation should be.
I hope to fine some example from here, as I think some of the experts
must have done the same things, or have this experience.
Could you please provide me some examples? Thanks Thanks ...
|
|
|
|
|
Hi,
hope this can help you..
Link[^]
Thanks,
Sun Rays
To get something you must have to try once.
My Articles
|
|
|
|
|
|
Can someone share me some example programe code for this?
I need it urgently... >_<
|
|
|
|
|
Maybe this CodeProject article[^] will help.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- 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 PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
I am trying to call the following method from a library to an exe file using a delegate, can anyone help with the following:
namespace xxx
{
public delegate void DelegateGetMethodA(Int32 b);
class Library1
{
MethodA() // How do I call MethodA here using delegates
}
}
namespace xxx
{
static class Program
{
[STAThread]
public static void Main()
{
ExecutionClass exe = new ExecutionClass();
DelegateGetMethodA GetMethodA = new DelegateGetMethodA(exe.MethodA);
}
}
}
namespace xxx
{
class ExecutionClass
{
void MethodA(Int32 b)
{
a = b + c;
}
}
}
Thanks in advance,
Michael
|
|
|
|
|
create an instance of the delegate
like
DelegateGetMethodA _delegateGetMethodA = null; in the class where you want to invok the method.
Then set the method to the delegate
Library1 _library = new Library1();
_library.SetDelegate(exe.MethodA);
In the SetDelegate methods assign the value to the _delegateGetMethodA
Then you can call the delegate
_delegateGetMethodA (parameters);
Sudeesh
|
|
|
|
|
Hi Guys.
I have been trying to make the following happens, but as a newbe to c# I beleive I need some help out there.
I made a (C# :: MDI Application) , as we call it in delphi, that creates a child with a blank white image on it.
What I need to do is to create an image(a small image that differs from that big white one), every time the user clicks on the first big white image, and put this small image on the position of mouse clicking...
Here the program must store the names and positions of those small images in an array, and update this array every time the user moves one of the small images....
Does any one know how to make this work...
Any Thoughts could Help..
Thanks in advance.
|
|
|
|
|
Yes, create a class, inherit System.Control. Overide the OnPaint, OnPaintBackground, and OnClick OnMouseMove events. Add code as necessary.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|