Can't get events in CSharp
I have an MFC OCX (ActiveX control) that uses the Frame API to talk to a device via CAN (pci-bus NICAN card). I get 'events' (unsolicited frames) just fine from this device from an MFC 'monolithic' application. There is a CSharp (VSNet2k3) variant that is able to use CAN to talk to these devices (uses SAME MFC OCX...), but it cannot receive these unsolicted frames. I'm pumping messages and Thread.Sleep(0) to beat the band, but they are NOT received by the OCX, so they are not signalled to my application.
Any ideas?
Hi George,
this would be a question for the person you got that ActiveX control from. As of NI-CAN 2.2, National Instruments still hasn't added ActiceX controls or .NET support to the CAN driver.
-B2k
Similar Messages
-
Can't get events to flow from Java to VB
I've seen some past topics relating to this but none gives a concrete example of making it work.
I've created a bean with a single method, a fw properties and one event. I've run the packager and regestered everything in VB. The bean has no GUI. I've created a simple VB app with one command button which creates the instance, sets some properties and calls the start method. All of this works great. My Java code runs to completion. When the Java code starts and finishes it sends a notify. The event code never gets popped in VB.
I've created the events and listener interface per the documentation. At run time I have one listener registered which is of the following class:
sunw.demo.encapsulatedEvents.DYN_EE_ADAPTOR.myPackageName.myListenrInterfaceName
This name comes from the toString() for the listener object.
That is my first question. Why is a demo class involved? Where did this come from?
My VB code is as follows:
Dim X As Object
Private Sub Command1_Click()
Set X = CreateObject("MyActiveXName.bean.1")
X.ConfigFile = "home.cfg"
X.LicenseKey = "0524416687182640982341"
X.start
End Sub
Public Sub X_started(ByVal StartedEvent1 As Object)
MsgBox "Got started event"
End Sub
Here is the definition of the event as it shows up in the ObjectBroswer in VB:
Event started(StartedEvent1 As Object)
I also have a stopped event but I didn't want to clutter the example.
Any help would be appreciated.I got it to work. If you look in the original post I was using a DIM statement to create the object. That doesn't seem to work for events.
I had to drag an instance onto the canvas (even though it is not visual) and have VB assign a variable name. Everything all of a sudden worked.
Now I have another problem. Sending a notification during a method call from VB works great. However, sending a notification from a separate background thread in my Java code causes VB the get a GPF. I put up a msg box upon receipt of the event. As soon as I click OK on the msg box, it blows up. Maybe I just shouldn't put up a msg box. -
I also notice that events I create on google calendar and events greate from my wife's calendar, while showing up on the MAC calendar program doesn't appear on either my ipad mini or my iphone.
I also notice that events I create on google calendar and events greate from my wife's calendar, while showing up on the MAC calendar program doesn't appear on either my ipad mini or my iphone.
-
Creating multiple dialogs issue. can't get events
Hey all,
I am creating a series of GUIs for my program.
The first GUI is a JPanel, and calls the second window which is a JDialog when the correct button is clicked. on the second window i create a third which is another JDialog. On this dialog, i can't click anything or do any actions unless the second window is closed. What is the reason for this, and what can i do to fix it?
Thanks
JasonYour dialogs are probably modal and you aren't setting the owner window to the correct window. If you have a modal dialog (let's call it "MD-1") open and want to open another modal dialog "MD-2", then you have to create "MD-2" with an owner of "MD-1", otherwise "MD-1" takes precedence as the first modal window and must be closed prior to "MD-2" having modality.
Someone correct me if I'm misinterpreting the rules. -
How to get event press ESC when plugin's GUI is flashUI
Hi all
I implement my plugin use GUI is FlashUI (CSExentersion suite).
when I pressed ESC. My GUI close imidately.
I want to check whe n ESC press. But I can't get event pressed key for ESC
I think that my GUI close from Illustrator. But I don't know how to get event press ESC.
Thank for your help.Put a trace() to print the keyCode into the stage's keydown handler and run your extension in debug mode of flash builder, you can check whether ESC is pressed or not.
However, I don't know how to prevent extension from closing neither. -
Events that are in the past do not appear on my calnedar on my iphone. Have I possibly changed a setting that caused them to disappear? Can I get them back on my iphone as they do still appear on my Outlook calendar on my PC?
Settings> Mail, Contacts, Calendars> in Calendar section change the Sync setting.
-
How can i set action on UITaBar and get event from that
Hi All,
I m doing one apps in which i have to add three UITabBarItem and this is UITabBarSystemItem.
Now i cannot understand that how can i set action and get event from the?
And how can i set various views on three tab bar item.
I have to use UITabBar means i have to use UINavigationController+UITabBar
My code id
tabBar =[[UITabBar alloc] initWithFrame:CGRectMake(0,370,320,50)];
tabBar.backgroundColor =[UIColor blackColor];
UITabBarItem *search =[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemSearch tag:0];
UITabBarItem *recents =[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemRecents tag:1];
UITabBarItem *favorites =[[UITabBarItem alloc] initWithTabBarSystemItem:UITabBarSystemItemFavorit es tag:2];
tabBar.items =[[NSArray arrayWithObjects:search,recents,favorites, nil] retain];
tabBar.selectedItem = search;
[myView addSubview:tabBar];
[tabBar release];
I add a action:
UITabBarItem *search =[[UITabBarItem alloc] InitWithTabBarSystemItem:UITabBarSystemItemSearch tag:0 action:@selector(select:)];
So it error: Warning -no'InitWithTabBarSystemItem:tag:action:' method fount
So any can help me regarding it?Thanks RickMaddy very much.
I read and do with sample at the View Controller Programming Guide . But when run it only view TabBar with title but haven't got any TabBarItem on it. I searched a few example about TabBar and i did, but i want do a form with a button then press on button it view a form with 2 TabBarItem on TabBar and press each TabBarItem will show correlative form page 1, page 2.
UITabBarController *tabBarControl = [[[UITabBarController alloc] initWithNibName:nil bundle:nil] autorelease];
tabBarControl.title = @"Tab bar";
ViewControl1 *view1 = [[[ViewControl1 alloc] initWithNibName:@"ViewControl1" bundle:nil] autorelease];
ViewControl1 *view2 = [[[ViewControl1 alloc] initWithNibName:@"ViewControl2" bundle:nil] autorelease];
tabBarControl.viewControllers = [NSArray arrayWithObjects:view1,view2,nil];
[self.navigationController pushViewController:tabBarControl animated:YES]; -
I updated my iPhone 4 to iOS5 and let it sync with my Macbook (running Lion) and now all my iPhone iCal entries are gone. How can I get my iCal events back on my iPhone?
Me too! Help anyone?
-
I updated my IPhone 5C to iOS8 and lost all my calendar events. How can I get them back? I had it saved to the cloud but then changed it because I did not want to save everything to the cloud. I changed it back and still don't have any events.
Are they still listed on your device when you go to Settings>iCloud>Storage>Numbers? If so, they should still be in iCloud but you may need to contact support to find out why the Numbers app isn't able to access them: http://www.apple.com/support/icloud/contact/.
-
I lost all my events on iphone prior to 2015 and this is not nice as I often need to look back on past dates they are on my Macbook air but how can I get them back to my phone
They're not lost, they simply don't show because you settings ask it not to.
Go to Settings --> Mail, Contacts, Calendar --> Calendar --> Sync --> All events -
Look at your iphoto 'page'.
On the left is a margin running vertically down the page and within that margin are shown your files/folders - e.g 'events', 'last 12 months', 'anniversary' etc etc.
Now visualize the 'page' but WITHOUT the margin and the entries in it. It just disappeared while I was editing photos.
I've tried all the 'File', 'Edit', 'View', 'Share' 'Window' & 'Help' options, but no success.
There is no apparent way of calling up onto the screen any photos, folders etc. because I can't get the margin and its contents back onto the iphoto page.
I've tried restoring the page from my backup, where it is all perfect, but that didn't work.
Help please!Move your cursor to the extreme left hand side of the iPhoto Window until it turns into a '+' and then click and drag right.
-
How can I get the events from a java program?
I want to make a monitor to watch a java program.How can I get the events from the GUI of this program some as mouse cliking, keyinput. So I can watch these in my monitor.
ThanksHi,
To put a monitor to the events occuring in the GHUI u need to register required components with the appropriate EventListeners.
Liek if u want to get notified when a mouse is clicked, then u need to add The MouseListener to the component which u want to be monitored.
Say
myFrame which is the JFrame object which shuld be monitored for the events.
Then in ur program u have to add following code
myFrame.addMouseListener( someObectReference );
Here the someObjectReference should be an instance to a concrete class ..i.e. U write a class like the following
public class MyMouseListener implements MouseListener {
// override the followig methods
public void mouseClicked(MouseEvent me){ sop("MOUSE CLICKED ON THE FRAME");}
public void mousePressed(MouseEvent me){}
public void mouseReleased(MouseEvent me){}
If u dont want to use another class for listening to the events. Then u can make teh current class monitor the events. To do so ur class should implement the appropriate listener and should override the required methods.
and u should say myFrame.addMouseListenet( this );
thats it -
Can we get the data from list without using any change event...
It is possible to get the current data from list without passing events?...
Thanks in advance,
senthil.Can you get what you want by accessing the selectedItem/selectedItems and selectedIndex/selectedIndices properties?
-
How do I return calendar to original view? All I can see is an hour by hour grid...can't get back to page where I can enter new appointments/events
Hi, at the bottom bar you should see a series of five buttons. Press the "Month" button if you desire to see the view of the month. As for creating a new calendar event simply press the "+" button in the upper right-hand corner to create a new appointment. *
* Please note that this is all within the app called "Calendar". -
I have an iPhone 5c I was messing with my calendar and pushed the little lines at the the top to create a list format. My events all disappeared and now I can not get anything back or add anything back. June reappeared and I can renter anything in July or August. I would like to undo this list format and return to my previous calendar view? Does anyone know what I am talking about?
tap again and choose the format month or let it be the day.
Maybe you are looking for
-
It is very frustrating. It will not come up as an option in the 'import video' window. I can only import video that is recorded from the 'in built' camera on my computer. Any one know how I can overcome this?? I would really appreciate any help.
-
My iphone does not recognize saved contact number while having incoming calls due to country and area code as auto prefix. How do i fix the problem. How do i ensure that the phone recognize calls with and without the country and area code. Please tex
-
VGA IPAD connection and itunes movie streaming
Using a vga connection between my ipad and samsung television, can I stream a movie from itunes so that it displays on the television?
-
Function to unformat HTML code
I start to build a report with CF Report Builder (8) and at some point, I realize that one of the field I need to display have HTML code (e.g.: <p>, <b>, etc...). The fact is that this field is using a Rich Editor (FCKEditor) when input the text. Unt
-
HELP!!! Trying to install new iPhone.
Hello, I am trying to install my iPhone. I am getting a message "Registry settings" warning when opening iTunes. I have reinstalled iTunes and Quick Time Player. I have also gone on Google and found a suggested resolution to open the registry ed