|
|
Hi!
I get a data in double[100,100]. but i have to transfer it into a function which accept double[]. I just "(double [])data", but doesn't permit.
Any idea?
|
|
|
|
|
novachen wrote:
Hi!
I get a data in double[100,100]. but i have to transfer it into a function which accept double[]. I just "(double [])data", but doesn't permit.
Any idea?
You can't. You only can pass double[n], where 0 <= n < 100. As an alternative, copy the whole double[100,100] to a linear double[10000].
while (!sorted)
;
|
|
|
|
|
UH... isn't the sql server installization file stored somewhere once you install vs.net???
where is it... if i remember correctly it was kinda hidden...
/\ |_ E X E GG
|
|
|
|
|
|
If you mean MSDE it should be under the VS.Net folder. For example:
c:\Program Files\Microsoft Visual Studio .NET\Setup\MSDE\
Robert
|
|
|
|
|
Yes, that's it thanks.
/\ |_ E X E GG
|
|
|
|
|
Ok...
now what exactly is the timer for...
Actually timing how long it takes somthing to finish...
or for,
scheduling somthing to execute at a certain time...
???
/\ |_ E X E GG
|
|
|
|
|
A timer is for repeatedly (or once) doing something at a specified interval - for use if you want to do something once every xx seconds.
GetTickCount() or QueryPerformanceCounter() is used for finding out how long something takes to complete.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
MSDN says it retrieves the number of milliseconds the system has been running...
how could I it to tell how long it was since a for loop started 'till it ends?
|
|
|
|
|
By calling it before you start, and then again when you finished, and subtracting the starting number from the ending number. This will give you the number of milliseconds the operation took.
int ctr=GetTickCount();
ctr=GetTickCount-ctr;
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
|
eggie5 wrote:
I also checked out the awsome timing article by Daniel S.
Thanks for the link - I'll add it to my toolbox. I've wanted to make something like that, but so far I've not had a compelling reason to do it, so I never did it.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Hi,
I want to know the code to show a windows from when i select a choice from menu.
In VB6 the command is as below, pls tell me equivalent code in C#.thanks
form1.show
|
|
|
|
|
Add the following inside the function that handles the specific menu option you are talking about. In this example, Form1 is the name of your class, f is just an instance of Form1 which you will work with.
Form1 f = new Form1();
f.Show();
-Nick Parker
|
|
|
|
|
I have an application that's running in the background. How do I enable it to catch keys pressed so I can route it to an event?
Nick Seng (the programmer formerly known as Notorious SMC)
God, I pity me! - Phoncible P. Bone
|
|
|
|
|
If it's only for one key or a few keys, you might want to register a hotkey. Otherwise, you might try a system-wide journal hook.
BTW, it might help us if you tell us why you need this capability.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Well, I was thinking of writing a background application, or windows service that can bind any application to a hotkey. That way I can start any application by pressing said hotkey.
Nick Seng (the programmer formerly known as Notorious SMC)
God, I pity me! - Phoncible P. Bone
|
|
|
|
|
Hi.
I need to know when a window is maximized.
Not only a window from my applications, but from all programs on the computer.
Example : Outlook window is maximized -> I need to know it
Example : IE window is maximized -> I need to know it
Example : SomeWindow is maximized -> I need to know it
Thanks
Heelios
|
|
|
|
|
My first thought was that you could implement a global hook, however after reading the Microsoft knowledge article: HOW TO: Set a Windows Hook in Visual C# .NET[^] I found out that global hooks aren't allowed in the .NET Framework So my thought now to you is to do some P/Invoke calling the EnumWindows Function[^] and then calling the IsZoomed Function[^] to determine if each window is maximized. Hope this is a pointer in the right direction for you.
-Nick Parker
|
|
|
|
|
I doubt if there is a way to catch an event, even if you use WndProc for messages.
You'll probably have to do what the previous poster wrote. Run a timer and check every window manually.
|
|
|
|
|
Thats gonna take bunch o processor speed
|
|
|
|
|
Here is what i have... I have a main form with the sortedlist declared on it. then on another for called "Edit" I have set up a struct declaring 2 arrays we will call them array1 and array2. now in the Main form when it is closed there is suppose to be a text file created that gets the info in sorted list. the info in the sorted list is as follows. the key is a student name, and the value is suppose to be thrown to the struct with the two arrays built in. my problem is i don't know how to properly call this function. i get the key in the sorted list to display fine in the text file but for the value instead of printing all the values in my array it prints Lab1.Grades. which is the name of my project(Lab1) and the name of my struct(Grades). here is my code in the exit button
private void btnExit_Click(object sender, System.EventArgs e)
{
FileStream fsFile = new FileStream("Roster.txt", FileMode.Create);
StreamWriter srOutPut = new StreamWriter(fsFile);
Grades studentGrades = new Grades();
foreach (DictionaryEntry Entry in this.slStudents)
srOutPut.WriteLine(Entry.Key.ToString () + "|" + studentGrades.labArray);
srOutPut.Close();
MessageBox.Show ("Thanks for using the Grade Calculator!", "Thank You", MessageBoxButtons.OK, MessageBoxIcon.Information);
this.Close();
}
any help is greatly appreciated thanks Kevin
|
|
|
|
|
Hi!
After months, and months of architecting, programming and debugging we have finished our first
multimedia educationnal software! Great!!!
...*But*, security is lacking..
**************************
Can what follows be done, and how please!??
1- Get a C# Windows Service installed silently (before the normal installation of the software)
that gathers the components' names of the target computer (where the software is installed)
2- Converts those components' names into a string (like, a GUID, sort of...) then sends it
to our web server, encrypted.
3- Our web server then sends back a DLL (or something!.. whatever..!) that is incorporated
with the software that is installed.
4- Every time the application starts, it checks for the Windows Service' string (or unique computer signature) to verify that it matches the DLL that our Web server sent.
DONE!
is this possible, or secure??
How can i do that? I'm fairly proefficient in C# (which is in what our app is written),
and to know how to do this kind of security would be great.
ps.: have any ideas on this method?
thanks!
Antoine Dubuc
Orchus Technologies
This by our hands that dream,
"I shall find a way or make one!" great quote heh?
This by our hands that dream,
"I shall find a way or make one!" great quote heh?
|
|
|
|
|