March 2013

Setup Project in Visual Studio

Create a new project

  • Right click on Soultion Explorer of a Project.
  • Select New Project.
  • Select Project Type ‘Setup and Deployment’ under ‘Other Project Types’.
  • Enter project name in text box in front of Name:
  • Press OK

How do I change the Product Name, Author, Manufaturer, etc?
Select created a project from the Solution Explorer and Press F4. Properties list will appear where you change the Properties of Product like Author, Description of Product, Manufacturer, Product version, Product Name, Product Code etc.

How do I add readme/license form into Setup Wizard?
Select setup project from the solution Explorer and Right click on it. Select ‘View’ option from the context menu than after select ‘User Interface’. User Interface screen will in front of you. Now, right click on ‘Start’ and Select ‘Add Dialog’. A popup will shows up with some forms, from them select Read me form and press OK. Now, click on right Readme form and select ‘Properties Window’ and set Readme File path by selecting .rtf file from Application Folder. Keep in mind for doing this setup you have to create a .rtf document and add into the Application Folder under the File System of the Setup Project.

How do I add shortcuts of Product at User’s Desktop, User’s Program Menu, User’s Startup Folder?
Select setup project from the solution Explorer and Right click on it. Select ‘File System’ option from context menu.
Right Click on Application Folder and select Add->Project Out from the context menu. A popup window will appear, select main Project (source project) and select Primary Output. And press OK. Again right click on Application Folder and select ‘create shortcut. After that rename the Shortcut name and right click on it and select Properties window. Change the Icon property. Keep in mind you have to select the executable file from Application Folder. So the executable file ICON automatically set as Shortcuts Icon.

HttpResponse to String android

HttpClient httpclient;
	HttpPost httppost;
	HttpResponse response;
httppost = new HttpPost("website-url-goes-here");
try {
				response = httpclient.execute(httppost);
				HttpEntity entity1 = response.getEntity();
				InputStream is = entity1.getContent();
				
				String w1url = convertStreamToString(is);
				
				
			} catch (ClientProtocolException e1) {
				// TODO Auto-generated catch block
				e1.printStackTrace();
			} catch (IOException e1) {
				// TODO Auto-generated catch block
				e1.printStackTrace();
			}

Add function into a class

private static String convertStreamToString(InputStream is) {

	    BufferedReader reader = new BufferedReader(new InputStreamReader(is));
	    StringBuilder sb = new StringBuilder();

	    String line = null;
	    try {
	        while ((line = reader.readLine()) != null) {
	            sb.append((line + "\n"));
	        }
	    } catch (IOException e) {
	        e.printStackTrace();
	    } finally {
	        try {
	            is.close();
	        } catch (IOException e) {
	            e.printStackTrace();
	        }
	    }
	    return sb.toString();
	}

Last Page is Blank in Crystal Report

When you check the checkbox New Page After, you will see an icon just right to it. This icon represents Formula Workshop. Click this icon and type NOT OnLastRecord.

Save and close the window, you are good to test this and praise me for the rest of your lives 🙂