Sign in to follow this  
Followers 0
valerio81

vb and cxserverlite

5 posts in this topic

Hi i'm using vb6 and cxserverlite i'm using some Omron's control such as "Display" but programming in vb, i cant do "display_click()" function but only "display_GotFocus()". the problem is that display_GotFocus() run twice... i dont know if problem is mine or is on the control. some one can help me??? thanks Valerio

Share this post


Link to post
Share on other sites
Hello, Do you have an SSTab component on your form? If you have, you may face some troubles, some keyboard and mouse event can trigger twice. Microsoft accepts this bug, and offers avoid using SSTab component Also, Microsoft offers using a global variable to store event trigger status as follows: Option Explicit Private DisplayGotFocus As Boolean Private Sub Display_Click() If DisplayGotFocus Then Exit Sub ' /// Write your code here ' /// End of your code DisplayGotFocus = Not DisplayGotFocus End Sub I don't know why display_click does not work, try either: * Right click on "Display" and choose "Bring to front" * Program may see your "Click" as "DoubleClick", try to see if DoubleClick event triggered. I can't offer any more. If you find the reason, we will be glad if you share it in forum. Best Regards,

Share this post


Link to post
Share on other sites
i use SSTab i try to use: Option Explicit Private DisplayGotFocus As Boolean Private Sub Display_Click() If DisplayGotFocus Then Exit Sub myCODE DisplayGotFocus = Not DisplayGotFocus End Sub but it doesent work... also i cant use Click() and DoubleClick() i'll use a label and not OmronDisplay thank u again. if anyone have some news.... best regards valerio

Share this post


Link to post
Share on other sites
Hello again, It is my foo, excuse me about misguiding you. Here is the right code: Option Explicit Private DisplayGotFocus As Boolean Private Sub Display_Click() DisplayGotFocus = Not DisplayGotFocus ' Reverse status before controlling If DisplayGotFocus Then Exit Sub ' /// Write your code here ' /// End of your code End Sub

Share this post


Link to post
Share on other sites
the problem isn't the code but the Display_Click() option... i dont know why but vb doesen't recognize the click input... it recognize only gotfocus... and not only with Omron display but also with Segment... thank you again for support bye Valerio

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0