|
That's funny, it always returns 0 == no error occured.
|
|
|
|
|
What happens if you call this function with the same arguments and for the same window but from a c++ program?
|
|
|
|
|
Hi,
I haven't tried that but I can't see the purpose here. Why would I do that? Even if it worked, how would it help in my situation? Are you trying to say that I should write a dll in C++ , import it to C# ...
|
|
|
|
|
Hi all,
I am doing an Day planner using c#.net and MS.ACCESS. My query is how to compare two dates excluding the seconds in c#.
For eg:
Datetime time1 = convert.ToDateTime("06:12:45");
Datetime time2 = convert.ToDateTime("09:25:09");
DateTime.Compare(time1,time2);
In the above i wish to compare time excluding the seconds in both the time format.
Plz any one help, it's urgent
Thanks in advance
Know is Drop, Unknown is Ocean
|
|
|
|
|
If you read the documentation you'll see that DateTime has the following properties and methods:
* Second[^]
* AddSeconds[^] (hint: add a negative number of seconds)
|
|
|
|
|
Does anyone know a nice clean way (pref Regex) to detect URLs and hyprelink them?
For example I have in plain text:
www.myserver.com danc@myserver.com
I want to convert to hyperlinks like:
<a href="www.myserver.com">www.myserver.com</a> <a href="mailto:danc@myserver.com">danc@myserver.com</a>
I have been googling and found various examples of how to detect the latter and convert to the former but nothing the way I need.
Cheers,
Dan
|
|
|
|
|
Some time ago , I had same problem. After hours spent on google looking for sollution, I've decided to make it myselft (using regex). Unfortunately, the code is gone
So if you want to make it yourself, I can help you out whith some ideas wich I found important when parsing text:
Email :
- there are many examples how to parse text to find e-mail adress, so I'm not going to discuss that.
Links :
- there are serveral protocols (at the time I was doing that it was about 7, so consider link to be anything that starts with : http:// ftp:// gopher:// etc...
- if that string doesn't start with any protocol, it needs to be at least three alphabetical words connected by DOT, where there may be more words and last word may contain almost all possible characters (Not all, but I don't remember which are not allowed. Remember that the first word doesn't have to be www like www.codeproject.com , there are also adresses like video.google.com . I think that the first and second string cannot contain any special characters.
Hope that helps...
|
|
|
|
|
Hi,
Thanks for the reply.
With the context this is going to be used in it is unlikely that anyone would add http:// before a url, it would more than likely be www.server.com/page
I have been copy/pasting some Regex code I found with no luck so far. I know absolutely nothing about Regex but I have just downloaded the Regex coach which will hopefully help me learn a bit.
If you have any pointers as to what the regex should look like or links to good places to learn (It's not making much sense at the moment!) that would be great
Cheers,
Dan
|
|
|
|
|
send me the code for Forums using C#.net
|
|
|
|
|
|
<br />
while( true )<br />
{<br />
doForum();<br />
}
I hope that's of some use to you.
|
|
|
|
|
vasavi.polisetty wrote: send me the code for Forums using C#.net
Only if you say "please".
|
|
|
|
|
www.forums.c#.net2.0
may b...
*************************
SetNewGoal:
while (GoalNotAchieved){}
goto SetNewGoal;
*************************
|
|
|
|
|
Hi,
I use this function :
textControl1.Load("C:\\ENUtxt.pdf", TXTextControl.StreamType.AdobePDF);
but I have an error:
Value does not fall within the expected range.
please help.
Thanks.
|
|
|
|
|
|
I have one schedule application done with a form having several controls. Now i want to create windowsservice and want to add the task to OnStart() method but what should i add?
If you know what I mean?
I mean i have form "Form1.cs"with events one different buttons and "schedule.cs" having main method to run the form.
Now when i add new item or new project as windows service both have then main methods?
Please advice?
|
|
|
|
|
A windows service can call other dlls. I would suggest putting the code that is in form1.cs in a new class library. Then add a windows service add a reference to the class library. Then the windows service can call the same code the windows form calls.
Ben
|
|
|
|
|
What you mean ben?
Are you saying create a different project or what because class library cannot be added in this project.
I tried to create clean class library project and this form1.cs code doesnt fit there because it complains abt different controls.
I am now kind of confused a lot
|
|
|
|
|
That is true, you can not put windows controls in your class library. You should not try to do this anyway. What should go in the class library is the methods that are in the form1.cs that use the data from the windows controls. You should have methods that get called by button click events etc.
Then you can add a class library project to your solution and move the code to there. As long as the windows project has a reference to the class library everything should work.
Ben
|
|
|
|
|
I know that application is same as mine but i dont know how to do registry things.. I mean how to save my data in registry?
ok i think i am misleading everybody. Following what i have and what i want to do
I have form1.cs which have different events and what i am doing on this form is adding some tasks in ListView. Now the next task is to add scheduling functionality to those tasks.
How would you start implementing it? Can somebody please guide me the steps of tasks as how to add schedule functionality?
Yes I need a kind of service which will run any tasks which were added in listview in Form1.cs. how would you implement that?
Anu guidance please?
|
|
|
|
|
I am trying to make an application similar to as following:
http://www.filedudes.com/JIT_Scheduler-screenshot-31062.html
But in my case i have gui ready as JIT_Scheduler but now the tasks that has been added i want to schedule them how would you start it or what can be different ways to schedule them?
Thanks - please help
|
|
|
|
|
|
Hello,
System.IO.Path has a lot of fancy methods like:
string extension = System.IO.Path.GetExtension(filename);
All the best,
Martin
|
|
|
|
|
You can check for extension of openFileDialog1.FileName
|
|
|
|
|
Don't delete your question - It is considered rude.
|
|
|
|