But I still do not load the excel file into my program by selecting the program from ContextMenu (right click on excel file and choose program). Although if select the path to excel file from the program, the data from excel file is loaded into the program.
I'm still missing something at function OpenExcelFileWithEasyForm(). How to complete this function to load the excel file into my program when selecting programs in ContextMenu.
I'm trying to build an app, but i don't know which is the best language choice. For starters, the app should be able to:
1. run from context menu 2. when selecting some text from a web browser (ff, ie), that text is captured (preferably not in clipboard) and sent as argument to the program via context menu and the program starts executing...
I have a datagridview with many columns. I want a context menu to show up when user right-clicks on the fifth column (column index = 4).
private void dgv_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) { if (e.Button == MouseButtons.Right) { DataGridView.HitTestInfo hit = dgv.HitTest(e.X, e.Y); if (hit.ColumnIndex == 4) { contextMenuStrip1.Show(Cursor.Position); } } }
The problem is, the hit.ColumnIndex value is either 0, -1 or 1, no matter where I click. So the condition never met and the context menu never shows up. Why the values 0, -1 or 1?
I am trying to write a menu program that will be broken down into a series of calls to function for each of the menu items. Two of the menu items will be simple programs which I wrote.
I want two of the functions to run one of the two programs I am trying to include as items in the menu.
So far I am only familiar with variables, loops, if statements, and I just learned how to write functions.
The problem I am have is that I don't quite understand how to write a function that will run one of the two programs. Also I am having a hard time writing the program in away that would allow the user to select the menu items.
I'm creating a program that is based on a menu system. Basically each menu is its own user-defined function. The problem is at each menu you can input 'b' to go to the previous menu. I just have it call the function of that menu.
However, do the functions need to complete themselves eventually? If I just keep calling functions will I just keep going further and further deeper into ever running functions?
If so how do I avoid this and yet keep the option to go back to a previous menu/function?
I hate vague errors where I don't even know where to start looking for an error. Error happens immediately and it says "Unhandled exception at 0x5981c9c7 (msvcr100d.dll) in experiment.exe: 0xC0000005: Access violation reading location 0xabababab."
I just started learning the basics of programming. While encountering one of the practice problems in the book by Alex Allain I got a little confused. The question is as follows:
Write a menu program that lets the user select from a list of options, and if the input is not one of the options, reprint the list.
The author assumes you can answer this question only using if statements and/or loops (while, for and do).
This is the code I've written thus far:
Code: #include <iostream> using namespace std; int main() { int option; char reset;
[Code] ....
For some reason, the nested while loop keeps repeating even when you input a valid option (1, 2 or 3). I can't seem to figure out why this happens.
Can not seem to get the program to perform the calculations within the cases. Also, how do you set up the a prime function program within the menu. Have been trying for five days now.
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices.WindowsRuntime; using Windows.Foundation;
[code]....
I am using Visual Studio 2013.i was writing my first code for Windows in C#.I had got everything all right but Visual studio keeps showing me the problem that The name 'contentGrid' does not exist in the current context.I have tried Everything I could think of.I recentered the app to Windows 8.1.
This is what I have so far, it gives me a nice menu to select from and it all works but after I make a selection it closes the program. I tried to return to it but it won't work for me
#include <stdio.h> int main() { int choice; int deposit; int balance = 500; { printf(" CHOOSE FROM THE FOLLOWING
I decided to create a simple program to display a menu with options, while that is easy enough I had some difficulty when selecting an option that has options inside which also has an option again. While I had many issues in the past I'm finally finished with it and it works fine, but being new to programming and not knowing various other methods available.
Code: //:::::::::::::::::::::Simple Menu Program:::::::::::::::: //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
I just started learning C and trying to create a program in C that will have a starting menu for a calculator. The problem is that I could do that with a switch/case but the assignment requires me to use if/else.
Here's what I have so far:
Code:
#include <stdio.h> int calc(); int menu(); int main() { printf("Hello. Welcome to the program. "); printf("Press RETURN key to continue...
[Code]...
How should I go from now using if/else to have those 4 choices?
I tried to write a menu program as a switch-case structure with a separate function for a switch-case structure itself. The outcome for it currently is an undesired one
Code:
#include <iostream> using namespace std; int menu(int answer); int main()
[Code].....
The output I get is one where it's just an infinite loop of "Bad choice! Please try again later.".
I'm trying to write a program that has a menu with a switch statement. I'm getting "case label'1' not within a switch statement" and subsequent errors for the other two choices and the default.
int main(){ int choice; Matrix A,B,C; cout <<"What would you like to do? "<< endl;
I just recently finished up a program that implements Dijkstra's Algorithm and I thought I would make a nice little menu for the user.
so the user can input their locations, I use Getline just in case their location contains spaces. However, when the user selects 2, It skips over the first input for the "Source" location and only lets the user input for the "Destination".
Any reason why this would happen? Am I missing something with Getline? Anyway, here's the code...
The program is not showing my full menu just the 0 Exit and the last line of text. This is the full main source file (not implementation file or header file).
I'm working on what I thought was a pretty simple program. I'm writing a menu driven program that will allow users to obtain specified measurements of several geometric figures. I was trying to test each each time I add a function.
I keep getting this error. error C3861: 'AreaOfSquare': identifier not found.
#include <iostream> #include <string> #include <iomanip> #include <fstream> #include <cmath> using namespace std; int menu() { int choice;
I've read that we can write a program that displays a menu of commands for the user to choose from.We can write some functions that implement these commands, then store pointers to the functions in the array :
We can get a similar effect with a switch statement but using an array of function pointers gives us more flexibility since the elements of the array can be changed as the programm is running.
I decided to write an example about this in order to understand better the context, I am facing some problems though :
Code: TEST2.c:9: warning: initialization from incompatible pointer type TEST2.c:9: warning: initialization from incompatible pointer type TEST2.c:25: error: too few arguments to function "*(arr + (long unsigned int)((long unsigned int)i * 8ul))"
The problem is that I want to scale the output. I was trying to send message to my control before blitting:
SendMessage( EM_SETZOOM, numer, denom ).
It scaled the control itself, but the blitted context was still the same size as original content CRichEditCtrl (befeoe scaling). Is there any way to blit/render scaled content of CRichEditCtrl to any device context (screen/paper) ?
I have to write a program that simulates a handheld gaming system. a system can have power toggled so its either on or off. when the system is on, its volume level can be raised or lowerd. a system has minimum volume level of zero and a maximum volume level of 10. a system stores games.
// simple game menu //simulates a handheld gaming system using namespace std; class Game { public: Game(int GameNumber = 3, int volume = 10);
I have two menu items. When item 1 is disabled, I want item 2 to be disabled as well. In the OnUpdate handler of menu item 1, I have tried to use "t_pMenu = pCmdUI->m_pMenu;", "t_pMenu = pCmdUI->m_pSubMenu;" and "t_pMenu = pCmdUI->m_pParentMenu;" but I always get NULL t_pMenu. How can I achieve this purpose?
'm new to programing and I'm trying to get this program to add up a price of coffee to the add on extras such as cinnamon, etc. But once the program runs it doesn't add up the coffee price with the extras and I've been at it for hours...
Code:
#include <iostream> #include <cstdlib> using namespace std; int main()