tag:blogger.com,1999:blog-70859412008-01-14T21:37:13.611-08:00Experience in C++, C#, Java and Process : Living in MontrealJoehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comBlogger30125tag:blogger.com,1999:blog-7085941.post-1166507505084881362006-12-18T21:51:00.000-08:002006-12-18T21:51:45.246-08:00'.NET: Introducing Generics in the CLR,'bloggerForm','scrollbars=no,width=475,height=300,top=175,left=75,status=yes,resizable=yes<a href="http://msdn.microsoft.com/msdnmag/issues/06/00/NET/default.aspx">'.NET: Introducing Generics in the CLR,'bloggerForm','scrollbars=no,width=475,height=300,top=175,left=75,status=yes,resizable=yes</a>: "Generics are an extension of the CLR type system that allow developers to define types for which certain details are left unspecified. These details are specified when the code is referenced by consumer code, making for enhanced flexibility. Jason Clark explains how."Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1165516916797765162006-12-07T10:40:00.000-08:002006-12-07T10:42:29.393-08:00How do I debug a custom action/installer class?You can use one of the following methods:<br />Add a call in your code to System.Diagnostics.Debugger.Launch. This method opens Just-In-Time debugging and allows you to attach a new debugger to your code.<br />Add a call in your code to MessageBox.Show("Debug Me"). When the message box is shown, use Visual Studio to attach to the <a onclick="javascript:Track('ctl00_LibFrame_ctl18ctl00_LibFrame_ctl19',this);" href="http://msdn2.microsoft.com/en-us/library/system.windows.forms.messagebox(VS.80).aspx">MessageBox</a> process. Then place breaks (for Visual C# projects) or stops (for Visual Basic projects) in the code.<br />Set your debugging preferences to start InstallUtil.exe (which is located in \winnt\Microsoft.net\Framework\version) and pass it your assembly as a parameter. When you press F5, you hit your breakpoint. InstallUtil.exe will run your custom actions the same way that MSI does.Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1124826441930677042005-08-23T12:44:00.000-07:002005-08-23T12:47:21.936-07:00DBDate, DBTime, DBTimeStamp, DateSystem.Data.OleDb.OleDbType.DBDate = store date only in the database;<br />System.Data.OleDb.OleDbType.DBTime= store time only in the database;<br /><br />>>> The wrong one<br />System.Data.OleDb.OleDbType.DBTimeStamp= store date&time only in the database;<br /><br />>>> The right one<br />System.Data.OleDb.OleDbType.Date= store date&time only in the database;<br /><br />Example:<br /><br />this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_TradeTime", System.Data.OleDb.OleDbType.Date, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "TradeTime", System.Data.DataRowVersion.Original, null));Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1116532769058718632005-05-19T12:57:00.000-07:002005-05-19T12:59:29.063-07:00Change color of one cell in the DataGrid control ( C#)<a href="http://datawebcontrols.com/faqs/CustomizingAppearance/ConditionalFormatting.shtml">http://datawebcontrols.com/faqs/CustomizingAppearance/ConditionalFormatting.shtml</a><br /><br />The DataGrid provides a plethora of properties that can be set to specify the DataGrid's formatting. For example, you can have each consecutive row of a DataGrid alternate between two different colors merely by setting the DataGrid's AlternatingItemStyle's BackColor property.<br />While the AlternatingItemStyle is a great way to apply different formatting for every other DataGrid row, oftentimes developers want to perform conditional formatting based on the value(s) of a DataGrid row. For example, imagine a DataGrid that displays a list of products, including the product's name and price. Perhaps you want to draw the user's attention to products that are at "bargain-basement" prices. Namely, if a product has a price less than, say, $10.00, you want to have that row highlighted.<br />This can be accomplished by providing an event handler for the DataGrid's ItemDataBound event. The ItemDataBound fires once for each DataGridItem added to the DataGrid (that is, it fires once for each row that is added to the DataGrid). Essentially, what we need to do is in this event handler, check to see if the price is below the threshold ($10.00, or whatever lower bound you choose). If it is, then we want to set the DataGridItem's BackColor property to Yellow, thereby highlighting the row.Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1116271794069904852005-05-16T12:28:00.000-07:002005-05-16T12:29:54.073-07:00Setup with Serial Key required<a name="vxgrfserialnumbertemplateproperty"></a>SerialNumberTemplate Property<br /><br /><####-????-%%%%-????-%%%%-????-%%%%><br /><br /><br /># Requires a digit that will not be included in the validation algorithm.<br />% Requires a digit that will be included in the validation algorithm.<br />? Requires an <strong>alphanumeric</strong> character that will not be included in the validation algorithmJoehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1116208621314776372005-05-15T18:51:00.000-07:002005-05-15T18:57:01.320-07:00DataSet Form Problems ( As always)- When I used the Data Set Form Wizard in VS.NET 2003 to generate a dataset form, I got the error: "there were errors configuring the data adapter". My god, it happens again. I spent 1 hour to repeat the whole procedure and I spent 3o minutes on Internet to find out how other people say about it.<br /><br />Finally I recalled the problem happend before:<br /><br />- If a column name in the Access database is special (I am not clear how special it could be), it will have this problem.<br /> So I check the column name, find one is called Symbol, which looks special. I changed it to ProductSymbol, Great! the dataset form wizard worked.Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1115501127042286702005-05-07T14:24:00.000-07:002005-05-07T14:25:27.046-07:00Good about Manifest<a href="http://blogs.msdn.com/junfeng/archive/2004/11/02/251318.aspx">http://blogs.msdn.com/junfeng/archive/2004/11/02/251318.aspx</a>Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1114350097731740292005-04-24T06:39:00.000-07:002005-04-24T06:41:37.733-07:00Mix cin >> and cin.getline in C++ programIf the cin.getline() is used after cin >>, the getline may just get a '\0' bacause the last cin >> call left it.<br />How to fix it?<br /><br />cin.ignore(100,'\n'); <br />cin.getline(buffer1, 80, '\n');Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1110551885056348812005-03-11T06:22:00.000-08:002005-03-11T06:38:05.056-08:00ADO.NET Datagrid database caching in VS.NET// Add a new record to the database directlly<br />// It is very slow since it is operating to the db without caching<br />//<br />public void AddLog(string info) <br />{ <br />objDatasetLog.LogTable.AddLogTableRow( DateTime.Now, 0, "User", info);<br />}<br /><br />//<br />// Better approach:<br />//<br />// Create a cache record, then merge to the real database laterly<br />//<br />public void AddLog(string info) <br />{ <br />// Create a new dataset to hold the records returned from the call to FillDataSet. <br />// A temporary dataset is used because filling the existing dataset would <br />// require the databindings to be rebound. <br />PDFAuto.DatasetLog objDataSetTemp; <br />objDataSetTemp = new PDFAuto.DatasetLog();<br /> try <br />{ <br />// Attempt to fill the temporary dataset. <br /><br />objDataSetTemp.LogTable.AddLogTableRow( DateTime.Now, 0, "User", info); <br />} <br />catch (System.Exception eFillDataSet) <br />{ <br />// Add your error handling code here. <br />throw eFillDataSet; <br />} <br />try <br />{ <br />grdLogTable.DataSource = null; <br />// Empty the old records from the dataset. <br />objDatasetLog.Clear(); <br />// Merge the records into the main dataset. <br />objDatasetLog.Merge(objDataSetTemp); <br />grdLogTable.SetDataBinding(objDatasetLog, "LogTable"); <br />} <br />catch (System.Exception eLoadMerge) <br />{ <br />// Add your error handling code here. <br />throw eLoadMerge; <br />}<br /> <br />}Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1109906374329633982005-03-03T19:17:00.000-08:002005-03-03T19:19:34.330-08:00Set width and precision in iostream of STD1. Call precision and width close to cout;<br />2. fixed to enforce to show a float as 23.45 format<br /><br />int nLine = 1; for ( int i = 0; i < 100; i += 5)<br />{ <br />cout.precision( 2); cout.width( 6); <br />cout << fixed << inch2cm( i) << " ";<br />if ( nLine % 10 == 0) <br />{ cout << endl; } <br />nLine++;<br />}Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1107208071951615082005-01-31T13:42:00.000-08:002005-01-31T13:47:51.953-08:00Could not access 'CDO.Message' object while using SMTP in System.Web.Mail Could not access 'CDO.Message' object: <br /> <br />1. The SMTP server must accept your outcoming email address <br />2. The SMTP server uses the standard port 25 for SMTP <br /> <br />MailMessage Message = new MailMessage(); <br /> <br />Message.To = "<a href="mailto:joe@xxx.com">joe@xxx.com</a>"; <br />Message.From = "<a href="mailto:xxx@sympatico.ca">xxx@sympatico.ca</a>"; // This address must have been registered in the SMTP server you are using in SmtpMail.SmtpServer <br />Message.Subject = "Test"; <br />Message.Body = "It is a testing message"; <br /> <br />SmtpMail.SmtpServer = "smtp8.sympatico.ca"; // The SMTP server <br /> <br />SmtpMail.Send(Message); <br />Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1106877733072834532005-01-27T18:01:00.000-08:002005-01-30T07:08:39.056-08:00Reference places<ul><li>HTML <a href="http://www.w3schools.com/">http://www.w3schools.com/</a> </li><li>C# <a href="http://www.sloppycode.net/">http://www.sloppycode.net</a></li></ul>Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1106792053609405242005-01-26T18:13:00.000-08:002005-01-26T21:29:20.806-08:00Regular expression in C#It is time consuming to build a regular expression. <br />I have a text file as below: <br /> <br />idnameaddressemailfaxpassowrd <br />example: <br />000010034981Mr. Ray BabsMontreal Canada Test@glinknet.com5142842903PassWord <br /> <br />How do I parse it? Note it is possible no value for address, email, fax, or password <br /> <br />Here is the regular expression I built ( 2 hours work) <br /> <br />(?<id>\d+)\(?<name>(.[^]+))\(? <br /><address>()(.[^]+))\(?<email>(.[^]+)())\(?<fax>()(.[^]+))\(?<pdfcode>(.+())) <br /> <br />It retrives the value to groups defined by "?<group>" <br />(<span style="color:#ff6666;">? </span><span style="color:#993300;">()</span><span style="color:#990000;"></span><span style="color:#66cccc;">(.[^]+)</span>) <br /> <br /><strong><span style="color:#ff6666;">Can you find better expression?</span></strong> <br /></address><div align="left"><address>Regex regx = new Regex( @"(?<id>\d+)\(?<name>(.[^]+))\(? <address>()(.[^]+))\(?<email>(.[^]+)())\(?<fax>()(.[^]+))\(?<pdfcode>(.+()))", RegexOptions.IgnoreCase RegexOptions.Singleline RegexOptions.IgnorePatternWhitespace RegexOptions.Compiled ); <br />Match m = regx.Match( line); <br />if ( !m.Success) </address><address>{ </address><address>System.Diagnostics.Debug.WriteLine( line, "Import Text Error"); </address><address>continue; </address><address>} </address><address> </address><address>string id = m.Result( "${id}"); </address><address>string name = m.Result( "${name}"); </address><address>string address = m.Result( "${address}"); </address><address>string email = m.Result( "${email}"); </address><address>string fax = m.Result( "${fax}"); </address><address>string pdfcode = m.Result( "${pdfcode}"); <br /></address><address> <br /> </address></address></div> <br />Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1106680509195526042005-01-25T11:14:00.000-08:002005-02-10T09:30:23.520-08:00Data access in VS.NET demo : C#1. <a href="http://www.dotnetjunkies.com/Tutorial/92FD33CA-7528-42A0-B974-8607A04B8B56.dcik">http://www.dotnetjunkies.com/Tutorial/92FD33CA-7528-42A0-B974-8607A04B8B56.dcik</a> <br />2. Introduction <br />When using the Visual Studio.NET IDE to create connections to MS Access databases, the default wrapper only puts Dates into Date/Time fields. This causes only the date to be saved and on the time when a date/time is written to the data set and Update is called. <br />How to fix it? <br />1) This is caused by the Wizard using DBDate rather than DBTimeStamp in the OleDbParameter method generated by the wizard. Ofcourse each time you regenerate this code using the wizard you will have to do the replace again. <br />Note: This has to be done in all OleDbParameter calls that use System.Data.OleDb.OleDbType.DBDate and replace with System.Data.OleDb.OleDbType.DBTimeStamp <br /> <br /><span style="color:#ff0000;">Actually, this solution does not work. INSERT causes an error about type mismatch</span> <br /><span style="color:#000000;">2) Just change to <span style="color:#ff0000;"><em><strong>System.Data.OleDb.OleDbType.Date</strong></em></span> and it will work. </span> <br /> <br />3. Don't use 'Level' as a row name in a table, VS.NET IDE will not generate data adapter for it. <br /> <br />4. Expend the width of a column <br /> int nWidth = objColumnStylegrdLogTableEvent_Level.Width+objColumnStylegrdLogTableInfo.Width + objColumnStylegrdLogTableTime.Width; <br /> objColumnStylegrdLogTableInfo.Width = grdLogTable.Width - nWidth; <br /> <br />Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1106670937207294342005-01-25T08:33:00.000-08:002005-01-25T08:35:37.206-08:00Get the application start up path : C#// Gets the path for the executable file that started the application, including the executable name. <br />string aPath1 = System.Windows.Forms.Application.ExecutablePath; <br /> <br />// Gets the path for the executable file that started the application, not including the executable name. <br />string aPath2 = System.Windows.Forms.Application.StartupPath; <br />Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1106540977384219422005-01-23T20:28:00.000-08:002005-01-23T20:29:37.386-08:00.NET Framework Launch Condition<a name="vxtskaddingnetframeworklaunchcondition"></a> <br />See Also <br /><a href="ms-help://MS.VSCC.2003/MS.MSDNQTR.2004OCT.1033/vsintro7/html/vxconlaunchconditionmanagementindeployment.htm">Launch Condition Management in Deployment</a> <a href="ms-help://MS.VSCC.2003/MS.MSDNQTR.2004OCT.1033/vsintro7/html/vxgrfsupportedruntimesproperty.htm">SupportedRuntimes Property</a> <a href="ms-help://MS.VSCC.2003/MS.MSDNQTR.2004OCT.1033/vsintro7/html/vxgrfmessageproperty.htm">Message Property</a> <a href="ms-help://MS.VSCC.2003/MS.MSDNQTR.2004OCT.1033/vsintro7/html/vxgrfinstallurlproperty.htm">InstallUrl Property</a> Working With Multiple Versions of the .NET Framework Side-by-Side Execution <a href="ms-help://MS.VSCC.2003/MS.MSDNQTR.2004OCT.1033/vsintro7/html/vxconlaunchconditionproperties.htm">Properties for the Launch Conditions Editor</a> <br />The .NET Framework launch condition is used to check for the common language runtime on a target computer during installation. This launch condition is automatically added to a deployment project when a dependency on the .NET Framework is detected; it cannot be removed. <br />If a version of the runtime specified in the SupportedRuntimes property is not found, the installation is halted. The user is presented with a Yes / No dialog box containing the text specified in the Message property. If the user chooses Yes, he is redirected to the location specified in the InstallUrl property (the default is a Microsoft Support Web site that contains a downloadable copy of the .NET Framework redistributable file). <br />In many cases, you will want to modify the InstallUrl property to point to your own location for the redistributable file. For example, if you are distributing your application on CD-ROM, you should include the redistributable file on the CD and change the InstallUrl property to a relative file path. If you change the InstallUrl property, you should also change the Message property to explain what is being installed and from where. <br />In addition, any Visual Studio .NET application or component that includes data access has a dependency on Microsoft Data Access Components (MDAC) version 2.7 or later. You will also need to add a launch condition to check for MDAC if your application includes data access. For more information, see Adding a Launch Condition for Microsoft Data Access Components. <br /> <br />Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1106498473496619152005-01-23T08:39:00.000-08:002005-01-23T08:41:13.496-08:00Add a taskbar tray in C#C# provides the NotifyIcon in task bar as a component. Here is some event it has to handle: <br /> <br />private void FormMain_Resize(object sender, System.EventArgs e) <br />{ <br /> if (FormWindowState.Minimized == WindowState) Hide(); <br />} <br />private void notifyIconTask_DoubleClick(object sender, System.EventArgs e) <br />{ <br /> Show(); <br /> WindowState = FormWindowState.Normal; <br />} <br />Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1106179096253996482005-01-19T15:51:00.000-08:002005-01-19T15:58:16.253-08:00Thread pool in C#There is pre-created threads pool in C#. Use this threads in the pool could make the programming easier and faster. But be noted, if all of the threads in the pool are used, you will get an exception. <br />How does it exactly work for a threads pool? Can a application creates its own threads pool with the same design? <br /> <br />Need to be clarified! <br />Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1106085573917041302005-01-18T13:46:00.000-08:002005-01-18T13:59:50.596-08:00Broken Software Design theory It must exists a research area to break software design. <br />A software is designed for purpose and it must run correctly following the procedure designed. In the design process, the designer may only think of how to make it works smoothly which assumes every condition is followed correctly. It is not designed for exceptions which may make the software failed. <br /> <br />The Broken Software Design theory stduies how to break a software in the design stage. <br /> <br />It helps the designer to look at the design from different perspectives and improve the design as well. <br /> <br />For more information, please keep trace this blog. <br />Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1105498839293096882005-01-11T18:50:00.000-08:002005-01-11T19:00:39.293-08:00XP can't boot to safemode !!!Big problem: <br />1. I am working on a project and I installed a MIDI input device simulation driver called MIDI-YOKE. <br />2. After computer restarted as required, it stopped just before the login screen showup <br />3. I can not boot into safemode; I believe that the problems was in the YOKE driver. <br />4. What I am going to do? reformatting the disk and install XP again? No way! I have a lot of work to do: a new system release is coming and my computer can's stop <br /><span style="color:#ff0000;">5. Clam down, Joe.</span> <br />6. Search online, didn't find something really helpful. <br />7. I am a Microsoft believer. There must a way to let windows booting procedure ingore the YOKE driver <br />8. I tried to boot into Safemode command <br />9. OK, I can type dos command <br />10. Regedit, search the drive name, delete everything related to it. <br />11. Control.exe. Cool! the control panel shows up. Goto System->Device Management, find the YOKE device, delete it! <br />12. Reboot, then it is working! <br />13. I have to Ghost my disk C and back up all of my work. <br /><span style="color:#ff0000;">14. Never try anything stupid</span> <br />Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1105201318666304132005-01-08T08:18:00.000-08:002005-01-08T08:21:58.666-08:00C# : Marshal class is a bridge between managed memory and unmanaged memoryMarshal provides a collection of methods: <br />- allocating unmanaged memory, <br />- copying unmanaged memory blocks, <br />- converting managed to unmanaged types, <br />- interacting with unmanaged code. <br />Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1103602915892308722004-12-20T20:20:00.000-08:002004-12-20T20:21:55.893-08:00Show a form as a dialog box in C#About about = new About(); <br /> <br />// Show it as a diaglog <br />about.ShowDialog(); <br /> <br />// Show it as a form <br />about.Show(); <br /> <br />Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1103510048653718882004-12-19T18:11:00.000-08:002005-01-27T07:43:59.393-08:00VS.NET Setup Project : Issues and Solutions<strong>Environment:</strong> <br />Microsoft Visual Studio.NET 2003 <br />Windows XP SP2 <br />DELL Inspiron 8200, CPU P4-M 1.6M ,512MB 15.4LCD, 40G, 3COM Wireless, DVD+CDRW, Logitech MX310 <br /> <br /><strong>Project:</strong> <br /> <br /> <br /><ol><li>During the install process , the setup asks users to give a project name [ProjectName]. If the user select Link.NET Example, the setup will install a [defult database]; if not, the database will not be installed.</li><li>The [defult database] contains a few of folders up to 20.</li><li>Add an Uninstall menu along with the main program menu.</li></ol><p><strong>Solutions & <span style="color:#ff0000;">Problems</span>:</strong></p><ol><li>Add a new dialog Textboxes (B) in the user interface editor, press F4 to show its property window. Assign "EDIT_PROJECTNAME" as Edit1Property and "Link.NET Example" as Edit1Value, so [EDIT_PROJECTNAME] can be used anywhere to represent "Link.NET Example".</li><li>Drag/drop a database folder to the Application Folder in the File System. VS.NET will add the whole folder hiberarchy to the setup folder. <span style="color:#ff0000;">[Problem] </span><span style="color:#ff0000;">If you wnat to delete the folders from the setup project, it would be nightmare. The root folder can not be deleted if each of its subfolders contains any files. To remove the whole folder, first of all, you have to remove all files in each folder, by hands! I have tried to move the database file to a MSM file, but it never works.</span></li><li><span style="color:#ff0000;"><span style="color:#000000;">Show the database folder property, set the Condition property as "[EDIT_PROJECTNAME] == "Link.NET Example"". During the setup procedure, this Condition will be checked to determine if the database should be installed.</span></span></li><li>[More about Condition] Add a provision that allows users to create a shortcut to the FormattingApplication in their desktops. As before, you'll need to add the shortcut to the User's Desktop folder. Right-click on Primary output from the FormattingApplication (Active) item in the Application folder and select Create Shortcut to Primary output from FormattingApplication (Active) from the context menu. Rename the shortcut Formatting Application. Drag and drop it in the User's Desktop folder. However, you want this shortcut to be installed only if the user wants to install it. Therefore, set the Condition property of the User's Desktop folder to SHORTCUTDEMO. This ensures that the shortcut will be installed only if this condition is set to true. Later in this article, you will create a dialog box where this property can be set. <a href="http://www.codeguru.com/Csharp/.NET/net_vs_addins/visualstudioadd-ins/article.php/c7245/">Web like help</a></li><li>VS.NET setup project does not encourage to add a uninstallation menu along with the application invoking menu. To do that, you have to add a shortcut for <strong>"msiexec /x [productcode]". </strong><span style="color:#ff0000;">But, you have to add msiexec into your application folder first before creating the shortcut.</span></li><li>I can create a menu with static name during the setup, but I want to assign the menu name with user's own defined project name. <span style="color:#ff0000;">It is impossible to do it in VS.NET setup project.</span></li></ol> <br />Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1103323307756429112004-12-17T14:40:00.001-08:002004-12-17T14:41:47.756-08:00Add a new link for Employment<a href="http://www.newworldproducts.org/Employment/">Employment</a> <br />Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.comtag:blogger.com,1999:blog-7085941.post-1103122412370892512004-12-15T06:50:00.000-08:002004-12-15T06:53:32.370-08:00C# Practise: System.Diagnostics.Process.StartThe following two code blocks are same: <br />1. <br />System.Diagnostics.Process.Start("<a href="http://www.glinknet.com">http://www.glinknet.com</a>"); <br />return; <br /> <br />2. <br />System.Diagnostics.Process p = new System.Diagnostics.Process(); <br />p.StartInfo.FileName = "<a href="http://www.glinknet.com/">http://www.glinknet.com</a>"; <br />p.StartInfo.Verb = "Show"; <br />p.StartInfo.CreateNoWindow = true; <br />p.Start(); <br />Joehttp://www.blogger.com/profile/04618327687649458144noreply@blogger.com