I have a Web application programmed in C#.
There are several printers and I want to choose any of them and execute the action, I would like some kind of Form to load all printers.
I found this for Win forms:
this.printDialog1.Document = this.printDocument1;
DialogResult dr = this.printDialog1.ShowDialog();
But I couldn't find something for ASP.NET.
Thanks for any help.
You really can't do it from a web app, if it was allowed then pop-up loving sites all over the internet would I'm sure be accounting for most of the worlds ink usage.
I had this issue when building a web app for a college, the most its possible to do is call up the print dialogue and have the user select the printer (best to have a decent print targeted CSS here):
javascript:window.print();
Its not perfect but to be honest although they insisted on it when it was put in a year ago, emails and PDF's are much more widely used.
The printer is assigned at the workstation.
Related
I would like to create or ideally use a pre-made program that will start-up every time a user logs into our lab computer (Windows 10), I am asking for simple information such as name, type of experiment, etc. Ideally this form would be mandatory. I have read about using the Credentials Provider in windows, but my programming knowledge is frankly limited to Matlab and I have no experience with SQL, C# or creating any windows applications.
This question is probably to open-ended for this forum, but I have no idea where to start! Google searches only direct me to windows login-related issues :/
Any insight on possible ways of doing this would be greatly appreciated!
If you create a windows form in C# with some text box entry fields then you can add the program to the windows startup items for all users (https://www.labnol.org/software/add-programs-to-windows-startup/13013/). If you're really at the beginning then you need to get visual studio community here (https://visualstudio.microsoft.com/downloads/) and then follow a windows forms tutorial (probably easier than WPF) here: https://msdn.microsoft.com/en-gb/library/dd492132.aspx.
I am looking a tutorial for develop a C# application for windows, which can give a extra functionality to the browser controls. i.e. input fields such as input box, text area.
When I using Google+, Facebook, and Twitter also my blog I use my native language. (Sinhala)
My native language has a complexity when is it come to using in computer. it has its own keyboard but it is really difficult to remember. In this case there are some tools to convert English characters in to its phonetic word in my language
i.e.
http://www.ucsc.cmb.ac.lk/ltrl/services/feconverter/t2.html
this above online tool help to convert English character in to is phonetic meaning in my language
i.e. Apal => ඇපල් (Apple)
This tool is developed by University of Colombo School Of Computing SriLanka. That English to Sinhala conversion control by JS.
My requirement is how this get in to C# application and running in particular pc, and when I open my web browser (Firefox, IE, Chrome, etc. ).
It should have run on system background and there should be a system tray icon to on/off it functions on browser (or Short cut key). And when it turn on.
I am wondering how I write a C# app for control Browser inputs and so on.
if you can show me a way to start or If I can have any suitable tutorial, guideline, or code sample, it will be great.
p.s. C# or Java is my prefer language
many thanks
Cheers
Umanda
I would check out the MSDN documentation here for the Web Browser Control. It also provides a sample of the source code at the bottom of the page.
It should have run on system background and there should be a system tray icon to on/off it functions on browser (or Short cut key). And when it turn on.
What you require is a Windows Service, that can be found here.
First of all, sorry for my English :)
I'm web developer. Generally coding in PHP.
Recently started to learn C++.
I want to create simple application which will simplfy daily routine works. For ex,Every time when I check my internet banking account, must login to my account via any browser. What I wanna do is, to create mini windows application which will store my login and pass, will login to my account, and show exact page what I see on browser directly after login. Website that I'm talking about is here
The problem, I can't find any tutorial about creating such application. Don't know where to start. Did research but found nothing about this. (Maybe I selected wrong keywords :)) So decided to post question here. I don't need your code, just give me starting point, where to learn to create applications as I described above.
And one more question: Is it important to know website's coding language before building such windows apps? I mean: PHP/C#... etc
Thx in advance
Not sure why you would pick C++ for this type of project, though it's possible, it would be quite tedious. I would recommend looking into Java, perl, ruby, python, or some other language that supports the Selenium Webdriver API. You can also use the mechanize API with Perl, which is also a bit tedious. I've done things like this in the past with success using Selenium (http://seleniumhq.org). Unfortunately, I don't think there is a Webdriver API for C++ as of yet (you could try writing one!), but there are definitely APIs available for the other languages I posted. Check out: http://seleniumhq.org/about/platforms.html#programming-languages.
EDIT
If you're more interested in screen scraping with C++, this question, and some answers within the thread, may prove useful to you as well: https://stackoverflow.com/questions/489522/library-recommendation-c-html-parser
I want to develop a windows based application in silverlight. I went through many articles and every where I found that "Silverlight is for web based application". I don't know whether I am wrong or right, as my superiors told me that in Silverlight5 we can develop Windows based application. Can any body help me to give a clue for how to start. Any help would be highly appreciated.
Thanks in advance
If you mean a Windows based application which can connect with internet you go for Out of Browser application which silverlight supports but if you want simple plain desktop application, there is no point in using Silverlight, WPF would be the right choice in that case.
Look at this article for building an out of browser app using Silverlight.
Silverlight specializes in building rich UI based Web applications and WPF is best for making UI rich applications for Desktop.
You can run silverlight apps "Out Of Browser", its just a setting in the config. Here's a video with more info: http://www.silverlight.net/learn/videos/all/out-of-browser-experiences/
silverlight is a web-based technology that runs on the client machine. it is, basically, Microsoft's version of Flash.
Now, that being said, you CAN write silverlight apps that run out of the browser. but, they are not "really" windows apps. silverlight is a sub-set of WPF. However, you can also make WPF apps that run in a browser. Confused yet?
The bottom line is that WPF is for desktop apps and is full-featured with access to the machine resources.
while silverlight is a light-weight version of WPF that is intended to be run in a browser, similar to flash. it does not have all the features of a full desktop application due to security model and that sort of thing.
Both have elements that cross into the domain of the other.
Like all good things, the answer is "it depends on what you're trying to do". If you want an application that can run inside the browser, outside the browser, plus on Windows and Mac then Silverlight is the answer. You also get for free/are restricted by a security sandbox; you can get around this sandbox by requiring additional permissions from the user. If you're trying to do something that requires multiple monitor support, access to COM objects, stroke/pen/stylus input, 3D hardware acceleration, or access to a large local file store then WPF is probably the better answer. Silverlight out of browser applications also have a nice "phone home" feature that will automatically download updates; WPF requires you to roll this by hand.
Some folks have mention XBAPs (running WPF inside of a browser). Stay away from this error prone steaming pile of stuff. It's good for demoware, but is not something which you'd want to support.
You heard right.
This is called "out of browser":
Silverlight-based applications typically run within Web pages, but you can enable users to install them from the Web and run them outside the browser.
Scenario- I have a website that tracks/manages data stored in a DB(I know this covers 90% of websites :)). I have users that need to print specialized labels and barcodes. The app will need to print to a specialized Zebra RFID printer as well as a specific printer for bar codes. All users must use IE 7. Only 3-4 users will print these items. I want to give the user a button they press and then the barcodes/reports are just printed.
Question-
I can create all the files that need to be printed on the server but can I use an XBAP to automate the specialized printing? If not is there any other way?
Access to special hardware from within Internet Explorer is not always easy - even for something as basic as a printer. You can try using the built-in printing facilities of IE7 - but you are likely to run into formatting and layout problems when printing something like barcodes.
XBAPs run an a sandbox and have limited access to hardware as well - but you may be able to print from one - it all depends on whether you need access to any Win32 print or device APIs.
A gauranteed way to implement something like this is using an ActiveX control - but that a much more complicated thing to implement - and it will only work on Internet Explorer - and on a machine that is configured to allow ActiveX controls to run.