The problem I encountered when registration of my program in Windows Context Menu
But I'm having trouble in void main() function. To get the path parameter, the function void main() will be:
static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
frmMain main = new frmMain();
MainTool.frmmain = main;
Application.Run(main);
}
In void main() function:
frmMain main = new frmMain();
MainTool.frmmain = main;
Perform logic checking of data in Excel file (inherited from MainTool class in the project)
And I do not know how to get args [0] for the main variables to get the path program. Like this:
Application.Run(main(args[0]);
I tried several times but have not been successful!
Detail about question: http://www.c-sharpcorner.com/Forums/Thread/164970/how-to-get-the-path-parameter-in-voidmain-function-add-prog.aspx
Problem with void main(function) when registing program in window context menu
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Manh Thao7 pointsPosted Mar 23, 2012, 5:40 PM EDT
I still have not solved this problem. Detail about my problem: http://www.dreamincode.net/forums/topic/271255-how-to-get-the-path-parameter-in-void-main-function/
Hope to receive your instructions!
THANKS!
1 short reply
Suthish NairRank #93 · 22.6K pointsPosted Mar 23, 2012, 6:56 AM EDT