|
Wouldn't that "algo" be to ge the note, and also surrounding notes to find out the relative finger position to determine the overall finger/hand position.
|
|
|
|
|
I have a C# user control that I want to use in a VB 6.0 project.
The problem is :
When you open an instance of a Microsoft Windows Form from a COM client application, such as a Microsoft Visual Basic 6.0 application or a Microsoft Foundation Classes (MFC) application, the .NET Windows Form may behave unexpectedly. For example, when you press TAB, the focus does not change from one control to another control. Or when you press ENTER while a command button has focus, the button's Click event does not fire. You may also experience unexpected behavior for keystrokes or for mouse activity.
These symptoms occur because the earlier application does not implement the message loop support that a .NET Framework Windows Form must have to work correctly. ( better described here http://support.microsoft.com/kb/839076/ )
At this link they provide a solution for a Windows Form. I'm interested in a solution for a user control.
I think the problem resumes to : How do I create a message loop for a user control in C#?
Need help, please!
|
|
|
|
|
This is my code:
#region Using directives
using System;
using System.Collections.Generic;
using System.Text;
#endregion
namespace Enumerable
{
public class ListBoxTest : IEnumerable<string>
{
private string[] strings;
private int ctr = 0;
// Enumerable classes can return an enumerator
public IEnumerator<string> GetEnumerator( )
{
foreach ( string s in strings )
{
yield return s;
}
}
// initialize the list box with strings
public ListBoxTest( params string[] initialStrings )
{
// allocate space for the strings
strings = new String[8];
// copy the strings passed in to the constructor
foreach ( string s in initialStrings )
{
strings[ctr++] = s;
}
}
// add a single string to the end of the list box
public void Add( string theString )
{
strings[ctr] = theString;
ctr++;
}
// allow array-like access
public string this[int index]
{
get
{
if ( index < 0 || index >= strings.Length )
{
// handle bad index
}
return strings[index];
}
set
{
strings[index] = value;
}
}
// publish how many strings you hold
public int GetNumEntries( )
{
return ctr;
}
}
public class Tester
{
static void Main( )
{
// create a new list box and initialize
ListBoxTest lbt =
new ListBoxTest( "Hello", "World" );
// add a few strings
lbt.Add( "Who" );
lbt.Add( "Is" );
lbt.Add( "John" );
lbt.Add( "Galt" );
// test the access
string subst = "Universe";
lbt[1] = subst;
// access all the strings
foreach ( string s in lbt )
{
Console.WriteLine( "Value: {0}", s );
}
}
}
}
When I compile this code in the VS2005,the error ocurrs as following:
Error 1 'Enumerable.ListBoxTest' does not implement interface member 'System.Collections.IEnumerable.GetEnumerator()'. 'Enumerable.ListBoxTest.GetEnumerator()' is either static, not public, or has the wrong return type. E:\李良\WorkSpace\Test\Test\Program.cs 11 18 Test
I have implemented the GetEnumerator();what's wrong with this? Thank you!
|
|
|
|
|
GetEnumerator() needs to return an object that implements IEnumerator [^]. You're returning a string .
/ravi
|
|
|
|
|
Hi everyone.
I am facing problem using splitter. I have many panels in my form and 2 splitters. One is horizontal and other is vertical.
Vertical panel drags texts box and buttons out from the form location.
Horizontal panel doesn't allow itself to be drag forward from the mid half of the document.
Also If i resize my application text box doesn't move remain visible, crossing lower spliter portion as well.
How can i solve my problem.
thank you.
|
|
|
|
|
Hello
I wanted to ask about how to make MS Office 2007 interface in C#
do I need to know XML to make it
or should I use normal tabs and tweak them
any hint or advice will be very appreciated...
Thanks in advance
|
|
|
|
|
Depends on how much you want to pay or do yourself, some commerical versions:
Infragistics
DevExpress
Divelements
The only open source one I've come across:
mentas Ribbon
Just google them.
|
|
|
|
|
Thanks allot for your help
just I wanted to make this interface for my self to use in a later projects....
Thank u again...
|
|
|
|
|
Please tell me how we can give Windows XP look n style to buttons, menu items etc. to our application?
Thank you.
|
|
|
|
|
Add a call to Application.EnableVisualStyles(); at the beginning of your main method.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Thank you. It worked fine but the toolbar not showing images now.
|
|
|
|
|
...and don't forget to call Application.DoEvents() afterwards, or weird things can happen (at least that's the case with .NET 1.1. Does anybody know if this still hold true for .NET 2.0/3.0 ?)
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
mav.northwind wrote: Does anybody know if this still hold true for .NET 2.0/3.0 ?
Well.. didn't face this problem in .NET 2.0..
|
|
|
|
|
NOw i can see toolbar images. Using Application.DoEvents();
Thank you.
|
|
|
|
|
Which framework version are you using?
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
|
Hi Guys, I'm developing an application that sends ICMP echo requests (ping) via the .net Ping Class. I've some informations related to the network such as IP addresses,Urls,SiteNames and so stored in a xml file. I need to use theese informations in my ping method. The ping method will ping the sites and change the background color property of some shapes I've created.
In the first version of the application I created an Arraylist of all the Shape Controls an some arrays to store IP Adresses and SiteNames.The arrays was created at runtime just when the application was started.
So the method had just to iterate throw those arrays.
The question is: Do you think is better to read the values from the xml file each time I call the ping method (say once per second) or should I retrieve the values from the file and store them in a Array or Arraylist or whatever? Which of the two is the better performing way? I guess if I create Arrays I'll use much more memory but if have to read through the xml structure each time this would be processor consuming. Is that right?
|
|
|
|
|
ciriciri wrote: Is that right?
Yes.
Given that RAM is cheaper than disk access, you're better off storing the data in memory and writing any changes to the XML (assuming you want to persist the list across application runs) file.
/ravi
|
|
|
|
|
Hi,
I am getting following error while opening windows form in solution
"Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information..."
I Rebuilt the solution and all references are also fine. But still i am getting the error and could not able to open the form in design view.
I saw an article saying hotfix is available for this problem at MS site (http://support.microsoft.com/kb/912019/en-us), but the page is not available.
Any ideas are welcome
Thanks
kumar
|
|
|
|
|
I was wondering if anybody knew how this dll works?
http://www.deskperience.com/textcapture/index.html
Basically I need to get text information from another application's data grid. I could use api calls to get text from a textbox or list or just about anything but the data grid. Any ideas? Thanks.
P.s. I really want to avoid OCR if at all possible.
|
|
|
|
|
MrWhite340 wrote: I could use api calls to get text from a textbox or list or just about anything but the data grid.
You could do this, but unfortunately I can't remember which APIs you'd need to call, also it'd be fairly specific to your application.
|
|
|
|
|
It doesn't matter how specific it has to be per application, I just need to be pointed in the right direction. Does anybody know the API calls?
|
|
|
|
|
The basic strategy would be to use the Win32 API to get a handle to the required control and then look for functions which can extract text from that handle. I'm not sure which APIs you need to call but I think that if you look through the MSDN documentation the names of the functions are fairly self-explanatory.
|
|
|
|
|
I am getting as far as getting the handle to the control but there aren't any api calls for getting datagrid information. Only listboxes/text boxes, etc... This is where I am stuck! I searched msdn and didn't find a thing.
|
|
|
|
|
Is there a handle for the individual cells of the datagrid?
Are you trying to access a .NET datagrid or is it a "classic" Win32 control?
|
|
|
|