|
Be a programmer and write your own timer class. It certainly isn't hard to do. I'll even help you with a starting point - the class should use a BackgroundWorker object because it can already report progress (which would be the equivalent of a timer tick.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Thanks !! I need to get pitch into the same ...
|
|
|
|
|
satsumatable wrote: I need to get pitch into the same ...
Whatever that means...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Hi,
I have a public partial class "con_param_tou : UserControl" (standard userControl)
But i want to inherit or implement a interface of a class that i build.
So i want to maintain the designer mode of standard User Control but i also want to implement or inherit one of my classes.
My class is currently declared as public interface base_param_interface (because I know that i cannot inherit multiple classes... So what I want to do is inherit UserControl and implement one of my interfaces which has a couple of public properties and 2,3 functions...
How do I do that?
Thanks in advance!
|
|
|
|
|
Just change your class definition to read
class YourClass : SomeBaseClass, ISomeInterface
{
}
Cheers,
Vıkram.
I don't suffer from insanity, I enjoy every moment of it.
|
|
|
|
|
wat is the equilent expression in c# for the below code
const int DICT_INVALID = 0;
const int DICT_WORD = 1;
const int DICT_NUMBER = 2;
const int DICT_CHARACTER = 3;
const int DICT_ALPHANUMERIC = 15;
thanks
the quieter u become more u hear
|
|
|
|
|
Same should work ?
Lets say C# code...
const int DICT_INVALID = 5;
|
|
|
|
|
I suppose that you mean "equivalent"?
If you want to convert something, you should tell what language you are converting from. I don't know any language where that code is an expression, but perhaps you didn't mean exactly that...
You can use that code in a C# program without changing anything at all. However, it might not be the best solution in C#, it looks like something that would rather use an enumeraton for.
Despite everything, the person most likely to be fooling you next is yourself.
modified on Tuesday, January 13, 2009 7:10 AM
|
|
|
|
|
That code will definitely work in C#, so long as those lines are wrapped in a class. I agree with Guffa, though, you should use an enumeration instead:
public enum Dict
{
Invalid = 0,
Word = 1,
Number = 2,
Character = 3,
Alphanumeric = 15
}
|
|
|
|
|
Is there any way to change VSS Password using C# code? Please Help!
Thanks.
|
|
|
|
|
Having looked through multiple GUI libraries like DevExpress[^], Infragistics[^] or Telerik[^], they lack one essential feature (for me!):
Look on every platform like being developed for that platform!
I.e. on Windows 2003 look like Windows 2003 grids, buttons, list, fonts, etc., on Windows XP look like a native Windows XP application, on Vista like a native Vista application, you name it.
The only library that seems to support parts of my requirement is DotNetBar[^], but unfortunately their grid supports no grouping which I would required.
Question: Are you aware of any Windows Forms GUI library that is both complete and supports native look-and-feel controls?
Thanks
Uwe
|
|
|
|
|
what is the equalent fuction in c# for scope resolution operator used in c++
the quieter u become more u hear
|
|
|
|
|
"."
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
|
|
|
|
|
Hello,
How to Invoke Upgrade Method of Win32_Product.
SelectQuery qry = new SelectQuery("Win32_Product");
ManagementObjectSearcher searcher = new ManagementObjectSearcher(qry);
ManagementObjectCollection av = searcher.Get();
foreach (ManagementObject var in av)
{
try
{
listBox1.Items.Add(Convert.ToString(var["Name"]));
}
catch (Exception ex)
{
}
}
Please Help,
Thanks
Kiran Banker
|
|
|
|
|
hello
If remoting object is instantiated by Remoting framework on remote server, how can I pass a file handle on remote server to remote object's constructor? I am not sure if I want to do this by static variable/member.
Thanks
dev
|
|
|
|
|
hi guys,
Anyone knows how to play swf file in windows application.I tried window media player (axWindowsMediaPlayer control). .It is not working sometimes playing half only and then playing from the start.sometimes in middle goes to next swf file.My task is given below for better clarification...
I need to get duration of the SWF file.In axWindowsMediaPlayer I am getting the duration as Zero,other file type like avi,wmp,flv I am getting current duration.
There is a group of SWF file.its path I stored in an array & playing one by one.After playing all the files I need to do someother task.I also tried Shockwave flash object but dont know how to get duration ,the media end event not to loop etc....
How can I achieve this?
Is there any free third party tools available?
If give the explanation with the code I will be delighted.
Thanks in advance,
Ebin
|
|
|
|
|
|
HELP!! I am not the type to give up but I am way past wits end! This is for work ....
The goal was simple...
Given the starting and ending latitude and longitude calculate the direction in compass degrees of travel as the crow flies to get to the destination location.
For example if I wanted to travel from say Sacramento to San Diego CA, I might have to travel I want to know how many degrees and what heading to get to Denver.
But ... Every time I search for a solution, the answer evades me and my hopes are crushed as I run into a combination of the following problems over and over again.
1. The site launches into a diatribe dozens of pages long written by some author who seems to delight in hearing or reading his incomprehensible diatribe till my eyes glaze over and I am over-whelmed.
2. The site starts to answer the question but then half way through it changes direction and ends up answering an entirely different question. Example: Half way through they stop and answer a different question like finding the distance of travel between the two points or the longitude and latitude of the mid-point and then just stops right there and never gets to answering the problem.
3. The week before last this start out saying they will show the formula for this and stating the question completely but when they get to the formula and example page, their page is missing the controls for entering the destination latitude, and also the formula they use leave this out too, and of course the answer is not forthcoming.
So finally last Friday I find a site that says if you want the formula for calculating this than look no further and they give me the code.
Here it is below and it works between say Paradise CA, and Denver Colorado, and the other way around but when I asked what was the direction from Paradise, CA, to San Diego CA, instead of say 220 Degrees (SW Generally), it comes out and says it's 44 Degrees.
I am not the type to quit, which was what some friends said when I mention that I have failed and am defeated, I can't solve this and I've spent many times over the amount of time it should have taken to solve this but I am defeated completely.
here's the code. Here's your chance any smart folks out there to solve this, but for me I am the retard, and I can't figure it out and I give up. Hopefully someone is up to the challenge. It's over for me. I will have to hunker down to pencil and paper and make some rube-goldberg piece of code because I cannot find an elegant solution out there and I am beyond pissed about it.
Here is the defines for it ....
#define MILES 3963.1
#define NauticalMiles 3443.9
#define KILOMETERS 6378
#define ParadiseLat 39.743
#define ParadiseLon -121.605
#define SanDiegoLat 32.723
#define SanDiegoLon -117.165
#define ColoSpringsLat 38.835
#define ColoSpringsLon -104.823
#define PI 3.14159265358979323846
Here is the function the main function below calls...
double degreesToRadian(double x)
{
return (M_PI * (x) / 180.);
}
Here is the main function below, it works for say Colorado Springs to Paradise CA and vice versa but falls flat on Paradise CA, to San Diego. It returns a rediculous answer of 44 degrees. Good luck, if you can find a solution you are far smarter than I am which right now doesn't sound like much of a challenge.
double latitudeLongitudeLocationsToAngleOfTravelInDegrees(double latRad1, double lonRad1, double latRad2, double lonRad2)
{
double theRadians = atan2(cos(latRad1)*sin(latRad2)-sin(latRad1)*cos(latRad2)*cos(lonRad2-lonRad1), sin(lonRad2-lonRad1)*cos(latRad2));
double theDegreesInRad = radianToDegrees(theRadians);
theDegreesInRad = (theDegreesInRad * PI / 180) + 360;
int theDegrees = radianToDegrees(theDegreesInRad);
theDegrees = theDegrees % 360;
return theDegrees;
}
Been there, done that, forgot why!
|
|
|
|
|
Hi Garry,
I am not familiar with long/lat but I do remember some high school math and the internet is helpful too;
this link[^] looks trustworthy, scroll down to the "bearing" chapter, IMO the first formula giving theta is what you need.
I would suggest you handle everything in radians (that's the unit sin, cos, atan2, ... will accept and
return anyway), only as a last step you could convert back to degrees.
Remark: this is the C# forum, your code is C code, that is something entirely different!
PS: yes, some sites first calculate distance, then derive bearing from it. Looks like a detour to me.
Luc Pattyn [Forum Guidelines] [My Articles]
I use ListBoxes for line-oriented text, and PictureBoxes for pictures, not drawings.
modified on Friday, June 10, 2011 12:28 PM
|
|
|
|
|
It could be C#. Just yesterday while working on my sieve I played with some # define s... which I later removed.
|
|
|
|
|
Hi PIEBALD,
C/C++ preprocessing supports defines (or macros) as key-value pairs,
whereas C# only accepts only key names, the value is fixed at "true"
hence it couldn't possibly be C/C++ code.
PIEBALDconsult wrote: on my sieve I played with some # defines... which I later removed
sure, sieves are intended for removing things.
|
|
|
|
|
I pass my C# through the C-Preprocessor... just to prove a point.
|
|
|
|
|
PIEBALDconsult wrote: I pass my C# through the C-Preprocessor...
One could try and do that, I did consider it when I switched from Java to C#, but never actually did it.
|
|
|
|
|
Thanks kindly. I'll have a look at the link. The reason I posted it here is that CodeProject does not have C as a choice in the dropdown. The closest other choice for forum location was C++/MFC. Perhaps it should be called C,C++/MFC
I forgot to say I have this sick feeling in my gut as I realized the answer is not so simple if the user goes north or south over the pole, their north south heading will differ from Start to Destination.
I finally decided to drop down to saying X distance from West,East and North,South or vice versa but now it looks like I will have a four part answer.
I wish this weren't for work, but such is not the case, but like so many things about work, if the demand of the employer is not met however difficult or impossible the demand is, it can be the employment line for me.
Been there, done that, forgot why!
|
|
|
|
|
Garry Freemyer wrote: looks like I will have a four part answer.
No, I don't expect so; if you have two points on a circle in a 2D plane, you can apply sines and consines and everything no matter where the points are, it always works out; it suffices the coordinates (whether x/y or long/lat) uniquely define the location.
Garry Freemyer wrote: does not have C as a choice
I know, but C stuff is handled under C++/MFC over here.
Luc Pattyn [Forum Guidelines] [My Articles]
I use ListBoxes for line-oriented text, and PictureBoxes for pictures, not drawings.
modified on Friday, June 10, 2011 12:29 PM
|
|
|
|
|