desktop-application

Java communication fails through web proxy using Apache HttpClient

空扰寡人 提交于 2019-11-30 14:43:37
I have a desktop client that sends data to a web server and I can't seem to get through the proxy server. Update : I am getting a 407 HTTP error when trying to communicate through the proxy. When downloading information from my web server, everything is fine. Once the user configures the proxy server (using a dialog box I wrote) the download works fine. But uploading data using org.apache.http.client.HttpClient is not working. I am configuring the proxy server with code like this after gathering the information from a JDialog. System.setProperty("http.proxyHost", proxyHost); System.setProperty

How to remove actionPerformed methods in NetBeans

牧云@^-^@ 提交于 2019-11-30 13:42:48
问题 When a JButton is added to a content pane, we can set an action by double clicking the button or Right click->Event->Action->actionPerformed.Let say, we set somthing to happen. Then we need to remove that function.It can be done easily by deleting the code we wrote in that buttton's actionPerformed. But the problem is, that button's actionPerformed method is still there even though it is not used any more and not needed. private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { /

How can I use google text to speech api in windows form?

我是研究僧i 提交于 2019-11-30 10:36:30
I want to use google text to speech in my windows form application, it will read a label. I added System.Speech reference. How can it read a label with a button click event? http://translate.google.com/translate_tts?q=testing+google+speech This is the google text to speech api, or how can I use microsoft's native text to speech? M.Babcock UPDATE Google's TTS API is no longer publically available. The notes at the bottom about Microsoft's TTS are still relevant and provide equivalent functionality. You can use Google's TTS API from your WinForm application by playing the response using a

Get the URLs of opened tabs in browser

*爱你&永不变心* 提交于 2019-11-30 10:26:05
I'm working on a project, and I need to get the URLs of all opened tabs in browsers (such as Google Chrome, IE, Firefox, ...) Is there any way to do that using c# or vb.net? p.s. it is a windows form application ie: Dim browser As SHDocVw.InternetExplorer Dim myLocalLink As String Dim myDoc As mshtml.IHTMLDocument2 Dim shellWindows As SHDocVw.ShellWindows = New SHDocVw.ShellWindows() Dim filename As String For Each ie As SHDocVw.InternetExplorer In shellWindows filename = System.IO.Path.GetFileNameWithoutExtension(ie.FullName).ToLower() If filename = "iexplore" Then browser = ie myDoc =

Create Desktop shortcut

佐手、 提交于 2019-11-30 09:17:23
问题 I am working on a java application. I want to create desktop shortcut of my application's Exe file. Is is possible to do it from my application itself ? Or user has to do it manually by right clicking ? 回答1: package farzi; import net.jimmc.jshortcut.JShellLink; public class Sc { JShellLink link; String filePath; public Sc() { try { link = new JShellLink(); filePath = JShellLink.getDirectory("") + "C:\\Program Files\\Internet Explorer\\iexplore.exe"; } catch (Exception e) { } } public void

How to remove actionPerformed methods in NetBeans

北慕城南 提交于 2019-11-30 08:09:52
When a JButton is added to a content pane, we can set an action by double clicking the button or Right click->Event->Action->actionPerformed.Let say, we set somthing to happen. Then we need to remove that function.It can be done easily by deleting the code we wrote in that buttton's actionPerformed. But the problem is, that button's actionPerformed method is still there even though it is not used any more and not needed. private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { //no function here.. but this code is still remaining. need to remove this code part as well } How can

Using the browser for desktop UI

爷,独闯天下 提交于 2019-11-30 07:07:29
How can I use the browser as a UI for a desktop app? The ways I have come up with so far are... Use all HTML/Javascript. Problem: Can't access filesystem or just about anything else. Run a local webserver while the application is in use. Problem: How do I kill it when the user is done? My users are not technical enough to Ctrl+C. Embed a browser component in a regular GUI. Problem: Embedded browser components tend to be glitchy at best. The support for Javascript/CSS is never as good as it is in a real browser. ...? The ideal solution would work with any technology. I know there are options

Send Keystrokes to a program even if its in background using c#

夙愿已清 提交于 2019-11-30 07:01:15
问题 I wanna send key stroke to a program even if it is running in background. But I can do this only for NOTEPAD like this, [DllImport("user32.dll")] protected static extern byte VkKeyScan(char ch); [DllImport("user32.dll", SetLastError = true)] protected static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string lpszClass, string lpszWindow); [DllImport("User32.Dll", EntryPoint = "PostMessageA")] protected static extern bool PostMessage(IntPtr hWnd, uint msg, int wParam,

What do you log in your desktop applications to improve stability?

浪子不回头ぞ 提交于 2019-11-30 04:01:56
I've started using SmartInspect in my Delphi applications because my users were running into bugs/problems I couldn't reproduce on my machine. When I have a general idea of the problem I'll monitor the application in a few specific places to confirm what is or is not working. When the bug doesn't have an obvious cause, I feel lost. I don't know where to start logging in order to narrow down the problem. Are there common techniques or best practices for using a logger? SmartInspect seems to be quite powerful, but I don't know quite what to log or how to organise my logs so the data is

How Do I Get Started on the Legacy 1.2.0.RC4 TideSDK? [closed]

心已入冬 提交于 2019-11-30 02:31:46
I have downloaded the legacy 1.2.0.RC4 from the http://tidesdk.org . What do I do with it following the download. How do I get started? Comprehensive Guides on their Way TideSDK is an open source software development kit for creating multi-platform desktop apps using HTML5, CSS3, and JavaScript. With TideSDK you can also use other common scripting languages such as Python, PHP or Ruby to harness the skills you already possess as a web developer. TideSDK is the best way to create unique desktop apps using simple web technologies. The TideSDK team is currently preparing comprehensive guides to