Changing a Universal Windows app to function as a game [duplicate] - game-development

This question already has an answer here:
Disable pointer mode for webview in Xbox UWP
(1 answer)
Closed 2 years ago.
I have a standard Universal Windows app that is actually a game in a WebView container (because HTML5) and I was wondering if there's any way to change something in the files of my project so that it's actually treated as a game (and likewise would be installed as such when deployed to Xbox One, Series X etc.) Obviously I want to get rid of the "change input mode" dialog as well or else I can't map the menu button for a pause function or anything else for which one would do so (and yes, that includes "Konami Code" implementations).
UPDATE 2020-09-16: This ended up being a duplicate question. Refer to the link in the information bar for what ultimately did the trick.
UPDATE 2020-10-21: I totally forgot to inform the mods of the duplication in prior discourse. This has now been addressed and the answer is noted above. I have also removed the link and description from the post to clean things up.

Two things since I opened this question which require my immediate request to close it to further discussion:
It turned out that the game type change is automatic once in the store, and
It also ended up being a duplicate question (for which the link is now in the information bar).

Related

openWorldWithSpec making it impossible to return to previous windows

Reading the book "The Spec UI framework". Trying to implement the part described in chapter "Taking over the entire screen".
After executing the code suggested in the book:
WindowExample new openWorldWithSpec
it seems to be impossible to return to previous state. Tried to delete the new WorldMorph in the inspector. Also tried with halos, as the book suggests but those buttons that are available in the halo menu don't allow it to be closed.
Is it an intended behaviour for this (to be executed to prepare an end-user environment and disable programming UI) or am I missing something?
Working in Pharo 5.0, Mac OS X version.
That is indeed intended behaviour, as part of making applications that do not allow access to the development environment anymore. But you can take a look at the code for PharoLauncher to see how you can enable a developer mode
You can actually get back to normal by:
Alt-Ctrl-Clicking on the Morph (macOS combo may be different, this is for Windows).
Clicking on the little wrench and ask for inspect.
In the evaluation pane, do:
self delete
World menu is available again.
Open a browser.
Done.
If one disables halos in settings, this is a tad harder.

Cocoa Background Mode When all windows closed

I am developing an OS X app
That uses StatusBar and Also has Windows
I would to move my app to "background" (That only StatusBar will be shown and windows ofc and not applications main menu)
When all it's windows are closed.
(I want to do it so, the app won't appear in cmd+tab menu etc, I want only StatusBar to be).
I am quite don't know where in documents to look for it and if it is even possible.
I have found that in Info.Plist I can put a flag to enable "LSBackgroundOnly" - then I see only my StatusBar.
But I want to switch between background and foreground, Since I want to allow my user to open the main Application Window via the StatusBar menu as well.
What would be the best approach or where to look for this ?
Sorry to flag as a possible duplicate. The other question doesn't exactly have good keywords for searching, but the answer is the same:
Use or modify the code in the answer here.
The info.plist settings are or OSX versions before 10.9 and cannot be changed at runtime. 10.9+ you can use NSApplication's setActivationPolicy and application delegate functions to do what you want. See discussion here and here as well.

Forms open and load very slow. Sometimes they won't open

I have a relatively small VB winforms project.
It is currently used to launch numbers hyperlinks and some apps on a server.
There are a couple functions that do all the work, but the it really boils down to:
System.Diagnostics.Process.Start("iexplore.exe", urlVar)
or if it is an app sitting on the server, the variable passed into the function appLinkVar will contain the need file path to launch the application.
System.Diagnostics.Process.Start(appLinkVar)
The "items" are stored on a SQL Local Database (.mdf)
Id, appName, appLink, appClickCount, appFavList,anddecision, which tells the function if it is calling a website or opening an executable.
Currently, there are forty rows in the database and I project 150+ in the end that need to be updated centrally and often (weekly). But that's a different question for later. The reason I added in it in this question was for insight as to why I am using a database instead of a Setting or XML file for some links. (better suggestions welcome)
My admin main form loads Visible = False and loads the icon in the system try. So you can't actually see the first form that opens. It is a hidden admin window and it's main purpose is to put the icon in the system tray. The green RJ icon - http://snag.gy/VBa6c.jpg
Then all of the app interaction is around the notify icon. Example: the app loads on hover. right-click for settings and options etc.
Once the primary form loads, on mouse over the "Primary Label" for example and the white form to the left appears and so on. Not much to it. http://snag.gy/excKr.jpg
The Frequently Accessed items is currently stored on the database called appClickCount, this will be coming off of the database and to another recommended way of storing the data. But when I initially added the database, I noticed some lag in the main form loading. It would take it 5-7 seconds to populate the Frequently Accessed Items List and so on. So I changed the code from mainWindow.show() to mainWindow.visible(). Worked great for me. opened and closed very quickly. But after some use today by a tester, the application became almost unresponsive. He clicked on the notification icon numerous times and the app failed to load. Then threw a SQL time out error. It was the end of the day and I couldn't grab a screenshot.
I need to make this more reliable.
After some discussion the other day on SO, I was talking to someone that recommended I re-write the app in C# WPF, and that is definitely the plan. But I need this thing to past testing as is in VB this week. Where can I start troubleshooting the delay in opening? What other suggestions do you have to improve the application? Do I need to have an invisible form load first so I have access to a system tray icon or is there a better way?
I have talked to quite a few people on here lately and got some really good advice, I figured I would lay it all out here and see what input you guys can give a new guy... I'm also gonna go hang in the C# room for a little bit if you have any further questions.

Menu status applications doubts [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
How to create a Menubar application for Mac
I have implemented a feed with Cocoa, for Mac OS X.
It's a status application, displaying only the menu.Now basically I got three questions:
When I launch it I always see the application icon in the dock.But this is a menu status application, how do I remove the dock icon? It should be an application like Watts and Dropbox, a pure menu;
How do I prevent the user from launching the application multiple times? If the user does so, I would like to not launch a second instance of the application.
How do I prevent the user from launching the application multiple
times? If the user does so, I would like to not launch a second
instance of the application.
That would commonly be done using a filesystem lock (flock) on unix based systems.
But then again, Cocoa has an even simpler solution for that; you may check if an application is active by supplying its bundle identifier to the system.
NSRunningApplication runningApplicationsWithBundleIdentifier:
See the NSRunningApplication Reference for more.

Autocompletion in Xcode [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How can I make auto-complete display a list in Xcode
I'm just learning Objective-c and how to use Xcode, coming from a background of Python. In python, when using the interactive prompt, you can do something like this:
list = []
list.**tab**
pressing tab displays all the methods one can do on the list, like append things, et cetra.
I would like to know if there is a way to do something like this in Xcode, as it would save me a lot of time. Thanks.
You could hit the esc key and it'll show you list of methods. Also, typing will generally bring up some suggestions when Xcode believes there are matches.
The feature you're looking for is called code completion, and it's available in Xcode. When you start typing, Xcode will try to find the most likely completion and will display it in light colored text. Press tab to accept the offered text, or escape to get a list of other possible completions. You can of course customize the keys to your liking. Check the Xcode documentation for a complete description of how completion works.