I need to write a program for my computer to run at startup, and its doing fine. However, I need the program to hide(); when it starts up, so my friends don't see it open up. I am currently using Microsoft Visual C++. I've tried placing the code in many places of my project, which includes:
the Form1(void) thingy, right below InitializeComponent();
inside the void InitializeComponent(void) thingy
inside the #pragma endregion thingy
BUT TO NO AVAIL!!!
Can anyone please tell me where to put the start-up code? I basically just tried putting
hide();
and
HWND findwindow or whatever it is :/
...into my code.
I would appreciate any help available. I am also willing to take examples and substitutions for my code. Thanks!
OK everyone, I know what I have to do. I Googled this for days and finally... I just have to put the line on the Load thingy on the properties window. That's it! So simple but I missed it...
Thanks, though!
Related
I'm writing a VB program where I want to be able to "push" an Exit button with a keyboard shortcut to close the program. I understand that if I put an & in the text of the button (E&xit), I can create a Alt-X shortcut to exit.
I've written programs where it's worked before; it's simple, but now it's not working. In fact, it's not even underlining the x in the text on the button. It's like a setting is telling it to be ignored. (I'm using the latest version of MS Visual Studio.)
I have found that if I turn on the form setting KeyPreview=True, it will work, but the x is still not underlined, so there is no visual indication of the shortcut being available. I feel like I'm missing some setting or switch that make this activate normally. Can someone explain or point me in the right direction? Thanks.
jmcilhinney, well, now it's working, both on new and existing apps, even with keypreview turned off. I think there was something strange going on with Visual Studio that day. Other parts of my program (with KeyPress handling) were not working correctly either at that time. Then suddenly everything started to behave as expected. Or maybe it was something I was doing with Keypress that messed up the Access Keys. I wish I could explain better, but now I can't reproduce the problem.
To get a head start on a new UWP project, I copy a sample (NavigationMenu from https://github.com/Microsoft/Windows-universal-samples.git) into my own project, learning in the same time.
I am being very careful, and everything looks OK. But I get the above error a few times, while I can jump to the unrecognized member with F12 or actually have intellisense finding that member while typing in XAML.
I am at a lost about what to do to solve this, as I don't see what to "fix".
Is there any way to "debug" XAML in design time?
Thanks for your help!
Bernard
Solved!
The least that I can say is that the errors triggered had NOTHING to do with the real cause!
For whatever reason, I opened the project in Blend. There I saw that I had inadvertently created a click event on a list item (in XAML), so it was not handled in code behind. I just deleted that click event, and everything finally compiled!
Lost quite a bunch of time chasing for false errors in Visual Studio...
If it may help someone else.....
How can i best determine whereabouts in my code a program was up to when it hung?
I've got a misbehaving app and I can't tell whats causing the issue.
Dont want to post code and ask you guys to tell me, I'd rather figure out how to figure it out myself :)
Thanks!
If it's still responsive to the Visual Studio IDE, then just press the pause button.
I have written a program and have used it (in debug mode) multiple times to test it out sometimes adding code and/or changing it. After a while any code I wrote or new buttons or features I added to the form would not appear while debugging. I don't know what circumstances led to this.
The only solution I found was to rewrite my code from scratch, however, the problem came back after a while. I don't know what is going on and I can't move on without starting all over again.
Thanks for all the help.
try rebuilding your entire solution, I believe to do this you must right-click on the project and there should be a menu option that says "rebuild solution". Try that.
Usually I code C# in VS10, but I have to code a small program in VB.NET in VS10.
And I am used to selecting something with code-assist with Enter, but now in VB Enter also make a new line, which is very annoying because I can't help doing that all the time.
How can I turn this off/on so it's like when I code C#? I have looked, but could not find anything.
You cant, you have to get used Tab or Space.