C Sharp :: How To Create Manual Printer Settings

Jan 19, 2014

My professor assign me a task to create a manual printer settings, not necessary same as printer setting the important thing to do is to have a combobox. In the combobox that you will see the available installed printers, and one command for print that if going to select one available printer in the combobox. It is possible ?

View 1 Replies


ADVERTISEMENT

C Sharp :: How To Shrink Size Of Word Documents By Changing Format Settings

Jul 31, 2012

I've created a solution who exported Access reports (graphics/tables) to a Word- and a PDF-format. Therefor I use PDFSharp and PDFFocus.

The PDF document is okay. But the Word-document looks good. Only the size of the Word-document, it has to send by e-mail, is much too big (17MB).

I have to open the Word document again to change the PageSettings to be sure, that the page-margins and the print orientation are correct.

using System;
using Microsoft.Office.Interop.Word;  
namespace PageSetup {
    class TestPageOrientation {
        static void Main(string[] args)

[Code] .....

I don't know how it works in the Word-library source. But I've tried WdOrientation.wdOrientPortrait and once I was surprised. I saw this page in Landscape-format.

I think there is something wrong with my document sections, because the documents (with a lot of tables, graphics and a image) is much too big. And that's only after using this method.

So my next question is: How can I shrink the size of this Word document?

And what do I have to do to limit the amount of format-settings in this word-document?

View 1 Replies View Related

C Sharp :: How To Set Printer For A Web Page

Sep 20, 2012

I have a test web page and a windows form which call a printer and sends a print job to a printer that is on the network. I have been able to successfully do this from the windows form, however, I can figure out how to do it from an aspx page to the server's default printer. Sample codes are below.

Windows Form:
  public partial class Form1 : Form   {
    private const string TEMPLATE_DIRECTORY = @"C:Program FilesBrother bPAC3 SDKTemplates";    // Template file path
    private const string TEMPLATE_SIMPLE = "NamePlate1.LBX";    // Template file name
    private const string TEMPLATE_FRAME = "NamePlate2.LBX";        // Template file name
    public Form1() {
      InitializeComponent();

[Code] ....

View 1 Replies View Related

C Sharp :: Write Escape Sequence For Epson Printer

Sep 7, 2012

I want to send control codes for Epson printer with c# application, I wrote some code, I have the connection with the printer, but when I am sending codes it not responding. On the other side, I found Java application for sending control codes, from that app some of the codes is working but not all of them. For example I want to use ESC EM 66 control code but when I am sending this code, printer not responding or just print the code in numbers.

The code who I use is:

class Program {
public const short FILE_ATTRIBUTE_NORMAL = 0x80;
public const short INVALID_HANDLE_VALUE = -1;

[Code]....

When I am using the method GetDocument() printer is not responding, but it prints only text when I call the buffer variable:

lpt.Write(buffer, 0, buffer.Length);

View 1 Replies View Related

C++ :: Using Vectors For Manual Multiplication?

Jan 15, 2013

I'm trying to solve Project Euler 16 where you have to calculate 2^1000. SO I made a program that would solve multiplying a number b a single digit factor through manual multiplication in a vector, just to test things out.

The problem is when I take things out of main and try to make a separate function, the original number is never multiplied.

Here's my code with functions...

/*Using vectors manually to multiply a number to a positive power.*/
#include <iostream>
#include <vector>
using namespace std;
void print_vector(const vector<int>& v);

[code]....

Here is the other code, not using functions but even if I use an extra for loop to multiply by the same factor several times, it still does the same thing.

/*Using vectors manually to multiply a number by two (or any single digit factor).*/
#include <iostream>
#include <vector>
using namespace std;
void print_vector(const vector<int>& v);

[code]....

View 5 Replies View Related

C Sharp :: Create Xml File From Xml Stored In A DB

May 15, 2013

I have a table in my database that has a 3 fields.

RuleID | RuleName | Rule

the ruleID is a randomly generated string of characters, RuleName is the name the user gives to the rule, and the Rule field is about 600 characters long and is just XML text.

I want to read that Rule field from the database and use it inside the function below.

private static List<MenuItem> LoadRules(bool evaluationType)
{
//string path = HttpContext.Current.Server.MapPath(string.Format("/Rules/{0}/{1}/", ip, evaluationType ? "Evaluation" : "Execution"));

[Code]...

This function loads an xml file from a static location and parses out some information to a context menu.

BUt i'm culeless on how to have the function read the xml info found inside my database.

View 1 Replies View Related

C Sharp :: How To Create Excel File In C#

Dec 28, 2013

I am currently having issues with the following code when trying to create a excel file using C#. This is the code that I have at the moment.

    oXL = new Microsoft.Office.Interop.Excel.Application();
            oXL.Visible = false;
            oWK = (Microsoft.Office.Interop.Excel._Workbook)(oXL.Workbooks.Add(System.Reflection.Missing.Value));
            oWK.SaveAs(path + "" + fileName);
            oWS = (Microsoft.Office.Interop.Excel._Worksheet)oWK.Worksheets.get_Item(1);
            oWS.Cells[1, 1] = "Student ID";
            oWS.Cells[1, 2] = "Student Name";
            oWK.Save();  

The line that I am having issues with is

oWS = (Microsoft.Office.Interop.Excel._Worksheet)oWK.Worksheets.get_Item(1);

If I remove it, I am able to create and save teh workbook in the directory. However, I want to make some changes on a worksheet, and that is where the issue is. I have also tried using the line of code:

oWS = (Microsoft.Office.Interop.Excel._Worksheet)oWK.Worksheets[1];

This line had no luck either. The issue I am having is the error regarding InvalidOperationException: Dynamic operations can only be performed in homogenous AppDomain.

View 2 Replies View Related

C Sharp :: To Create Globe List Of Templates

Jun 23, 2012

//////////////////////////////////////////////
struct FaceTemplate {
public byte [] templateData;
}
List <FaceTemplate> faceTemplates;
////////////////////////////////////////////

I want to create this structure as globally to access this list in every window form. how can i create and how cam i access.

View 1 Replies View Related

C Sharp :: Create A DropDownList (Hardcoding Data)

Apr 3, 2013

I am using MVC3 (C#) and I need to hard code the data in a DropDownList.

View 2 Replies View Related

C++ :: Reading Settings File

Aug 26, 2014

I'm trying to make a basic settings text file and I'm wondering why pos_y = strAxisData.find(",", pos_x, strAxisData.length()); returns std::string::npos when pos_y = strAxisData.find(","); works fine ? The settings text file format is:

string strAxisData;
while(finConfig)
{
getline(finConfig, strAxisData);
pos_x = strAxisData.find("=");
if(pos_x != std::string::npos)
}

[code]....

View 1 Replies View Related

C Sharp :: How To Create Multiple Word Documents Dynamically

Sep 18, 2013

Need to create multiple word documents on the run.

My problem is its creating the last one only.

View 1 Replies View Related

C++ :: Singleton Class For User Settings?

Oct 11, 2014

My current idea of how to work with user settings goes like this:

1. Create a class to hold all of the user settings.
2. Use that class to load/save/hold settings in memory.
3. Create an instance of that class once in the entry point of the program (int Main or whatever).
4. Pass, by reference this same class instance around to all of the other classes that need the user settings.
5. Once all other objects deleted, save and then delete the User Settings class.

I created a psuedo-code example below of this. My question is if this is the best way or should I be doing something else. In particular, I am wondering if somehow I can avoid passing the settings class by reference all of the time. Would this be a good case scenario for a "Singleton" type class?

#include <string>
class UserSettings {
private:
std::string SettingOne;
int SettingTwo;
bool SettingThree:

[Code] ....

View 9 Replies View Related

C++ :: Configure Netbeans Basic Settings

Nov 22, 2013

I want to configure netbeans 7.4 settings for c++.I'm posting here because netbeans forums are close to dead. How to do the following things :-

1) When you create a new project of a 'new application' type, main.cpp is already there with some code. I want that main.cpp to be completely empty when I create a new project.

2) When you compile/build your program and run it, the output is shown in a small log window at the bottom. I want it to be shown like in a black output terminal (console ?) just like in Visual Studio or CodeBlocks. (I have some reasons for not using them instead, so don't bother about me not using them)

3) When you click the green 'Run' icon in the upper toolbar, the project is compiled/build again and then runs afterwards. I want it to just run without compiling. (Compiling/Building should be done by 'Build' icon, just like in CodeBlocks or Visual Studio)

View 3 Replies View Related

C/C++ :: What Settings Has To Be Made To Run Language In Jgrasp

Nov 25, 2012

Running c in jgrasp.. i am getting error has gcc not found.

View 4 Replies View Related

Visual C++ :: Cannot Find The Property Settings File

Jul 31, 2013

Here the max sdk plugin is looking at X:projects rather than x:program files (x86)autodeskmaxsdk Inside the autodesk folder, there is a projectsettingspropertysheets subfolder where the plugin is looking for.

Now an error pops up saying it needs X:projectsprojectsettingspropertysheets....How can I fix that?

<Import Project="........ProjectSettingsPropertySheets3dsmax.general.project.settings.props" />

I find it hardcoded / How do I set where visual studio to search the correct property setting files automatically?

View 3 Replies View Related

Visual C++ :: Hex Values From Stream - Unicode Settings?

Feb 18, 2014

I am using VC++ 2005, Multibyte char set. I am getting hex values from stream and i have to show it in respective language.

in below example

char mt[] = { 0x0C, 0x85, 0x0C, 0x86, 0x0C, 0x87,0x0C, 0x88,0x0C, 0x89, 0x0C, 0x8A,0x0C, 0x8B,
0x0c, 0x85 , 0x0c , 0x86 , 0x0c , 0x87 , 0x0c , 0x88 , 0x0c , 0x89 , 0x0c , 0x8a , 0x0c , 0x8b , 0x00 , 0x20,
0x0c, 0x8e , 0x0c , 0x8f , 0x0c , 0x90 , 0x0c , 0x92 , 0x0c , 0x93 , 0x0c , 0x94 , 0x00 , 0x20 , 0x0c , 0x95,
0x0c, 0x96 , 0x0c , 0x97 , 0x0c , 0x98 , 0x0c , 0x99 , 0x00 , 0x20 , 0x0c , 0x9a , 0x0c , 0x9b , 0x0c , 0x9c,
0x0c, 0x9d , 0x0c , 0x9e , 0x00 , 0x20 , 0x0c , 0x9f , 0x0c , 0xa0 , 0x0c , 0xa1 , 0x0c , 0xa2 , 0x0c , 0xa3,
0x00, 0x20 , 0x0c , 0xa4 , 0x0c , 0xa5 , 0x0c , 0xa6 , 0x0c , 0xa7 , 0x0c , 0xa8 , 0x00 , 0x20 , 0x0c , 0xaa,
0x0c, 0xab , 0x0c , 0xac , 0x0c , 0xad , 0x0c , 0xae , 0x00 , 0x20 , 0x0c , 0xaf , 0x0c , 0xb0 , 0x0c , 0xb2,
0x0c, 0xb5 , 0x0c , 0xb6};

How can i convert the mt string to below string?

"ಅಆಇಈಉಊಋ ಎಏಐಒಓಔ ಕಖಗಘಙ ಚಛಜಝಞ ಟಠಡಢಣ ತಥದಧನ ಪಫಬಭಮ ಯರಲವಶ"

To cross check the mt array, If you place the above string to the below link you get mt array [URL] ....

Cant i do it in "Multibyte char set" settings? or should i use Unicode settings.

View 3 Replies View Related

C# :: Change Settings In User Config Of Different Applications Directly

Jan 10, 2014

I have a service that has some settings. As the service is running as a system user, the settings file is located in

C:Windowssystem32configsystemprofileAppDataLocal<PRODUCTNAME><ExecutableName+GUID><VERSION>user.config

Now i want to be able to change some settings at runtime using a normal Winforms App. Is there a good and easy way to change the user.config of a different application directly? I tried with ConfigurationManager but that does not seem to work.

View 8 Replies View Related

Visual C++ :: Basic Settings - How To Configure Color Of Selected Text

May 4, 2014

How to configurate color of selected text. I am not sure why, but in Visual C++ it is not displayed as in other programs like notepad, which should be harder color. So I cannot find the selected text. Where can I configurate it or where to search it in desktop theme settings?

View 3 Replies View Related

C :: Using A Printer In ANSI

Oct 29, 2014

Is there a way to access the printer in ANSI C ?

I have written a program and would like to print out the data (held in a file).

All I can find is that there seems to be no way to send a file to the printer and stay within the confines of ANSI C.

I am restricting my use to ANSI specs for the portability. Do I have any options?

View 1 Replies View Related

C++ :: How To Get Information About Printer

May 21, 2014

The problem is when i run this program and program is stop working but the output is out.

#include <iostream>
#define _WIN32_WINNT 0x0500
#include <windows.h>
#include <conio.h>
using namespace std;
void EnumeratePrinters(DWORD flags);

[Code] ....

View 6 Replies View Related

C++ :: USB Printer Detection?

May 16, 2014

take a look at this project : [URL] i want to change this project for this purpose : when a USB PRINTER is connected show a message that tell us -> hey this is a printer. which part of this project should i change and how can i separate printer devices from the others?

note: if you are using visual studio 2010 or higher and get error for this line after conversion :

#define _WIN32_WINNT 0x403

just replace all of such these lines to stdafx.cpp file. means stdafx.cpp at last should be like this :

// stdafx.cpp : source file that includes just the standard includes
// HWDetect.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#define _WIN32_WINNT 0x403
#include "stdafx.h"

View 1 Replies View Related

C++ :: All Pages Being Sent To Printer With PrintDialog

Dec 16, 2014

I'm not new to C++ programming but I'm not an expert either. I'm using Borland C++ builder 5. I know it's extremely antiquated, but I have no choice right now. Writing a database reporting program, using third party report building components (ACE) which has it's own print dialogs built in. However, in this report we cannot use the build in dialogs and have to use a standard TPrintDialog. When the TPrintDialog is executed and you click print on the dialog, only one page is sent to the printer.

Here's some code:

// The dataset for the report is executed prior to this code and does not //change.

Once the data is gathered, the report can be run as often as you like // and the same data will appear in the report.

Code:
if (cbxShowForm->Checked){
OverlayBand->Visible = true;
AllowPrint = false;
SctReport1->Prompt = false;// disables ACE Reporter Print Dialog
SctReport2->Prompt = false;

[Code] ....

View 1 Replies View Related

C++ :: How To Start A Printer Queue

Nov 30, 2014

Write a program to simulate a printer queue (priority queue or heap – Bentley article has code) where 3 printers are “fed” by this queue. Each print job has an unchanging priority and higher priority jobs go first (although once started, a job isn't stopped to let a higher one go). For each unit of time, there is a 26% probability that a job will be added to the queue and all jobs take 8 time units to complete. Print job priorities are between 5 and 100. The queue opens 20 time units prior to the start of printing for adding print “jobs”. A print “day” is 1000 time units. The output from your program is:

1) A list of jobs completed with their priorities for each printer

2) A list of jobs not completed (if any).

#include <iostream>
#include <cstdio>
#include <cstring>

[Code].....

View 1 Replies View Related

C :: How To Send Programme Output To A Printer

Aug 10, 2013

I want to print the output of a c programme to a printer. Operating system is MS Windows xp sp2. This is the programme:

Code:
#include<stdio.h>
#include<conio.h>
void main()
{
printf("
Hello Chandan2... ");
getch();
}

The output "Hello Chandan2..." is to be printed in printer, when i run the programme , but how to do it?

View 6 Replies View Related

C/C++ :: Developing PDF Printer Driver For Windows?

Apr 29, 2015

I've got a project to develop a virtual pdf printer driver for windows in C++ programming language.

how to develop a virtual pdf printer driver. google only shows results for .NET languages but I need for C++ language only.

How to proceed to develop this driver.

View 2 Replies View Related

C# :: Connect Printer Till To Database

Dec 21, 2014

I'm in the middle of creating a ePOS for my uncle and so far I've created a database for it where it will create, update and delete records successfully.

My next step I would like to do is to create a printer till thing, but how do I connect my database to that ?

I can create a till but how do I do link my database with it? I followed this example here [URL] ....

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved