Form.Close isnt working in Windows CE 7 - winforms

I have windows application that used to run on a Motorola Scanner that used Windows Mobile 6.1. We upgraded the scanner to a newer model which uses Window CE 7. The application has a login form and a main form. One the user is authenticated, the login form closes and the main form opens up as expected but whenever a date is changed on the main form , the login screen reappears. Its as though login.Close() isn't really closing the login form but actually pushing it to the background and its reappearing. This application used to work fine in the older scan gun. I tried searching for specific issues but to no use.

I am not sure this is what you are looking for but you can try to set the minimizebox property to false on the form as winmobile tends to not close application but send them to background instead. With that property to false, it will close it. Although it would be interesting to see your code because calling the close() statement on the form should close it...

Related

Form input fields don't respond to being clicked

So, we have a .net 5.0 wpf application which on startup loads a window containing a cef browser. The browser then loads our login form. The application is running on win 10 64 bit machines exclusively. This has worked without a problem for the past 6 months. Yesterday i installed the application on one of our customers' laptops. The installation went down without a hitch, but after the cef browser loaded the login form I was unable to interact with the input fields. By that I mean that if I put my cursor above the text field my cursor changes shape, but upon clicking no cursor would appear inside the text field and anything I typed wouldn't appear in the text filed. Clicking the Login button didn't have the expected effect of telling me that I am missing username and password, instead it moved the trigger areas of all input elements downward while they were still being rendered at the same position as before.
This problem is exclusive to this one machine. All other machines running the application aren't experiencing and never have experienced anything like this so i'm not expecting it to be a bug within cefsharp.
My question is if anyone has had a similar issue or any idea how to workaround it.
CefSharp version being used is 94.4.110.

How to integrate payment gateway in applications created using javascript frameworks like ExtJs?

Our application is a one-page application created using ExtJs. For any user action, the browser tab is never reloaded and all the actions are performed using ajax. A user can open/close multiple ExtJs windows/panels within the same browser tab, and this way everything remains confined to the same browser tab.
Now, we need to integrate payment gateway in the application, which involves redirecting the user to the bank website and having her brought back to our application.
The issue is that when browser redirects the user, then all the application javascript code along with panels and windows get destroyed, and when the user comes back to the application then she finds it to be different from one she left.
As a solution to this, we were thinking of using following two appraoches:
Option 1. Maintaining the state of application - When user leaves for the bank's website then somehow we maintain the state of application - like which windows are opened carrying what data, which variables have which values etc.. and when user returns back, we generate the same application state for her.
Option 2. Have a browser pop-up window for payment gateway - We intend to provide a button which will open a small pop-up window carrying the transaction details, and in this pop-up window the entire payment gateway process will take place taking care of redirection and everything.
Option 1 is proving to be very cumbersome and complicated as maintaining the exact state is not getting feasible.
For Option 2, we are not sure if this is safe and possible?
Has anyone implemented such an approach earlier. Otherwise, what are the other options which we can go for?
Thanks for any help in advance.
I faced the problem and I implemented it using websocket/polling in the main application while a new window pops up for the payment.
After the payment is successful the main application will be notified.
That way each payment runs in it own sandbox totally unbound from the main application which makes maintenance quite easy. Note that our backend create a new session for each payment using the existing one.
I think it is not uncommon to open new windows for payment that's why I decided to go this.

Selenium IE webdriver - how to cope when the application closes the browser window and launches a new one?

I have an instance where user try to log-in application (simple webpage). After successful log in, the application closes the current page and open a new webpage. Rest of the business operations start from there.
Till the point API clicks log-in button, everything goes fine. After log in (once the log in webpage closes and a new session gets opened), the API throws "Unable to find browser". This is true as the original driver instance has been closed by the application.
Is there a way to achieve these kind of scenarios using selenium, as they are very common now-a days in a typical business application.
Thanks.
If you need to driver a different browser window or iframe, you need to use switchto. From the WebDriver faq:
Q: How do I handle pop up windows?
A: WebDriver offers the ability to cope with multiple windows. This is done by using the "WebDriver.switchTo().window()" method to switch to a window with a known name. If the name is not known, you can use "WebDriver.getWindowHandles()" to obtain a list of known windows. You may pass the handle to "switchTo().window()".
Thanks for the Answer.
I did the below to achieve my query.
Execute a javascript to open a new window.
IJavaScriptExecutor jScript = driver as IJavaScriptExecutor;
jScript.ExecuteScript("window.open()");
Switch to the newly opened window.
List<string> handles = driver.WindowHandles.ToList<string>();
driver.SwitchTo().Window(handles.Last());
Start the Navigate and Login operation on the new window
driver.Navigate().GoToUrl("Your website");
After login, the application will close the new window but the main driver window will still be alive.
Implement a simple SwitchTo() for the new window to start new business operations
List<string> handles = driver.WindowHandles.ToList<string>();
driver.SwitchTo().Window(handles.Last());

How do I access the existing running windows forms application through url?

I have a windows forms application and which provides a way to search the database based on the provided value. Sometime I need to open the application through a simple html hyperlink with the search result while loading itself. There are two questions/doubts from here.
How to access the existing running windows forms application as url? If this is possible, how can I pass the argument?
If the application is not running, we have to start the application and search the value. This also has to be happened when I click the link.
Simply we can say like, if you open a website link from your outlook email, the link will be opening in existing opened default browser or it will start the new browser(if the browser is not already opened.) I want to achieve the same behavior.
Seems to be the below post is somewhat related to my queries, but this does not solve my problem.
Activate existing browser window with given URL from C# application (without triggering reload)
You can't do this. The default browser launches when you click on a link because it is set up in the registry as the default handler for hyperlinks.

Silverlight Out of Browser (OOB) app crashing only on OS X

We have a Silverlight application that runs OOB (out of browser) so the user can install it. When it's running OOB we display a button that calls Application.Current.MainWindow.Close() so that the user can exit the application. This works perfectly fine on windows, but causes an error saying the application has quit unexpectedly on OS X. Anyone have any ideas why this might be? Thanks!
Found out the problem. This is apparently a "protected" action and must be done directly in response to a user action. It cannot be scheduled to happen later (we were playing an animation on the button click and then after a timer expired trying to close the window; we have to just close the window).
An exception was actually thrown on the windows version, it just never displayed any sort of message box.

Resources