I developed one swing application but each time you run application new window is opened.
I want that if one window is already opened other not allow to open.
hi,
i have to create window service which read the xml file and and take the node's value to connect the sql server and create the log file i have already created window application for that but i don't know how to create win services.
How to trace the Memory Leaks in Android Development? I am working on eclipse IDE to develop the application. i cant find out how to rectify the memory or window Leaks Exceptions? Any Idea.
Mainly the Window Leaked error raises the Illegal Argument Exception? how to rectify both og this. Please Help.
I want my window to always maintain a certain ratio of let's say 1.33333333. So, if the window is width = 800, height = 600 and the user changes the width to 600, I want to change the height to 450 automatically.
I'm already intercepting WM_SIZE but I don't know if it's enough; also I don't know how to change the width or height to maintain my ratio.
Hi!
How do i go about passing the value of width ,height,resize received as parameter to window.open using javascript?
Thanks
Example
function poponload(mywidth,myheight,resizeVal)
{
testwindow = window.open ("http://www.yahoo.com", "mywindow","location=1,status=1,scrollbars=1,width=+mywidth+,height=myheight,resizeVal");
testwindow.moveTo(0,0);
}
<body onload="javascript: poponload(200, 500,yes)">
I am totally stuck on this, i want to implement Scroll Bar Less Scrolling Window. can some one provide me some hint on how to implement scrolling window using GtkViewport.
I want to implement something as displayed follows:
When user clicks on the ScrollUp or ScrollDown button list will scroll up or down.
Is it easy to implement or it is very very complected?
I have a asp.net textbox(textarea which is in a repeater have single texarea for each record which are read only) I have button (open in new window) when i click on it the content of the text area needs to be rendered in a new window using javascript .
Currently I'm using the following as a bookmark in Firefox 3.6.3. It redirects me to the RFC just fine, but the active tab says [object Window]. What do I need to do to get rid of that artifact?
javascript:var rfc=prompt("RFC Number");window.open("http://ietf.org/rfc/rfc" + rfc + ".txt")
I have a winform app with a webbrowser control embedded in the main form using SHDocVw.dll
When dialog is shown I need to disable the browser window.
The window class is "Internet Explorer_Server". pinvoke EnableWindow() did not work.
What else can be done ?
I'm making a small Windows Forms application that contains a lot of grid views. I want all the grid views to resize with the window. I could make a function that detects window resize and then changes the size of each grid view but that feels a bit clunky. Is there not an easier/more intelligent way to do this
Using bindInfoWindowHtml to create an info window on a Google map, any images in the info window with a title attribute don't show it on hover in Firefox 3.6. They do show up correctly in IE8 and Chrome.
I want to create multiple versions of print-friendly pages from a single page. I am considering to do it in this way: placing several buttons on the original page and, clicking one button will popup a new window with the same html as its parent window, but with some modifications (e.g., set display attribute of some DIV's to none).
It is possible to use javascript to do this?
I have the following code to copy files
sprintf(command, "copy /Y %s %s", sourceFile, targetFile);
system(command);
It works except for the dos window showing up which is very annoying.
I am trying to use CreateProcess() (with an #ifdef for WINNT), but not sure how to setup the command line for the same.
Any other options for copying files in C (on windows) without showing dos window?
<a href="facebook.com/sharer" target="_blank" >Share this</a>
How do I make this a certain width and height, in a new window, when the user clicks on it?
In firefox, the current code only opens up a new tab (not a new window)
I have this code
$("#window").dialog({
resizable: true,
height: 180,
title: titles,
width: 500,
modal: false,
buttons: {
"OK": function () {
$(this).dialog("close");
}
}
});
i am able to get the popup perfectly but the problem I am getting here is..
On the top of the Dialog box I have 'X' I am not able to see that X on dialog popup's but when I resize my window I can able to see..
what I am doing wrong in this?
Thanks for your all help
i have the Code:Block ide in window.
my compiler is in linux machine that is GCC.
can i write the code in window & compile in linux with the Code:Block ide.
if i can , then how ?
if not, is there any alternative to do that.
thanks in advance for all suggestion.
I have two displays (two monitors) connected to my machine, and I noticed a strange thing happening today. I had an Explorer window open with my compiled exe on my primary display, and when I double-clicked it, it opened in the primary display (left monitor). However if I pressed enter to launch the executable, it started in the secondary display (right monitor). The window state of the initial form is maximized. Is there a way to tell C# to open the initial form in the primary display?
Hi guys, how can I open a modal window using javascript only. I can't use own html-file so I have to pass html-data directly to method which will show window. Could you help me with this?
upd:
I can't use any own library.
Just wondered if anything like that exists? Certainly in Eclipse it does.
A small window like the solution window listing all the methods in the active class would be great
Any ideas?
Thank you
Hi,
I want to shape my own browser or at least modify a existing one so far that it meets my needs.
I want a fast browser (starting and running, not necessarily faster rendering) without any stuff I don't use and simple productive navigation (like Firefox + Vimperator + Tree Style Tab), only much more integrated into each other and a different GUI.
I was thinking about just looking into the current two top browsers chrome and firefox (open-source wise) and branch my own smaller version out of it.
By just using WebKit or Gecko I will have to implement all the Connection-stuff, too, but I really am not interested in doing that.
So my questions are:
Does it make sense to start off with a current browser and strip off certain features and the frontend and replace it with my own code?
Chrome or Firefox? Which one is less complex? I don't care much about Plugins and Extensions, so they aren't they pretty much even in features otherwise?
Thanks for your answers
p.s.: It's a just-for-fun at-home project, so please no "just use the browsers..."-stuff...
function checkEnter(event) {
var charcode;
if (event && event.which) {
charcode = event.which;
alert("Case 1. event.which is " + charcode);
}
else if (event && !event.which) {
charcode = event.keyCode;
alert("Case 2. event.keyCode is " + charcode);
}
document.getElementById("text1").value="";
}
<input type="text" id="text1" onkeyup="checkEnter(event)" />
The above function works on both IE7 and Chrome.
function checkKeyPressed() {
document.onkeydown = function(event) {
var charcode;
if (event && event.which) {
charcode = event.which;
alert("charcode is " + charcode);
}
else if (event && !event.which) {
charcode = event.keyCode;
alert("charcode (keyCode) is " + charcode);
}
}
}
<input type="button" id="button1" onclick="checkKeyPressed(event)" value="Button" />
However this one works only in Chrome. Any idea why?
I'm trying to create a chat room with emoticons. When a user types an emoticon such as :) in the chatroom, the CSS takes the proper image off the sprite sheet. But my code only seems to work in Opera and IE (odd combination). It doesn't show in Firefox or Chrome (if you manage to hone in exactly where the image should be, you can find the image blank.gif which is used as the stand-in to place the background-url over). Does anyone know what might cause this in Firefox/Chrome?
Site: ttony21.byethost24.com
Relevant CSS:
image.emo {
width:19px;
height:19px;
}
image#smile {
background:url(img/diceSprite.png) 0 0;
}
image#bigsmile {
background:url(img/diceSprite.png) -19px 0;
}
etc...
Relevant HTML:
<img class="emo" id = "smile" src="img/blank.gif" width="1" height="1" alt=":)" title=":)" />
<img class="emo" id = "bigsmile" src="img/blank.gif" width="1" height="1" alt=":D" title=":D" />
etc...
Hi, I have a main wpf window and one of its controls is a user control that I have created. this user control is an analog clock and contains a thread that update hour, minute and second hands. Initially it wasn't a thread, it was a timer event that updated the hour, minutes and seconds but I have changed it to a thread because the application do some hard work when the user press a start button and then the clock don't update so I changed it to a thread.
COde snippet of wpf window:
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:GParts"
xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes
assembly=PresentationFramework.Aero"
xmlns:UC="clr-namespace:GParts.UserControls"
x:Class="GParts.WinMain"
Title="GParts"
WindowState="Maximized"
Closing="Window_Closing"
Icon="/Resources/Calendar-clock.png"
x:Name="WMain"
>
<...>
<!-- this is my user control -->
<UC:AnalogClock Grid.Row="1" x:Name="AnalogClock" Background="Transparent"
Margin="0" Height="Auto" Width="Auto"/>
<...>
</Window>
My problem is when the user exits the application then the thread seems to continue executing. I would like the thread finishes automatically when main windows closes.
code snippet of user control constructor:
namespace GParts.UserControls
{
/// <summary>
/// Lógica de interacción para AnalogClock.xaml
/// </summary>
public partial class AnalogClock : UserControl
{
System.Timers.Timer timer = new System.Timers.Timer(1000);
public AnalogClock()
{
InitializeComponent();
MDCalendar mdCalendar = new MDCalendar();
DateTime date = DateTime.Now;
TimeZone time = TimeZone.CurrentTimeZone;
TimeSpan difference = time.GetUtcOffset(date);
uint currentTime = mdCalendar.Time() + (uint)difference.TotalSeconds;
christianityCalendar.Content = mdCalendar.Date("d/e/Z", currentTime, false);
// this was before implementing thread
//timer.Elapsed += new System.Timers.ElapsedEventHandler(timer_Elapsed);
//timer.Enabled = true;
// The Work to perform
ThreadStart start = delegate()
{
// With this condition the thread exits when main window closes but
// despite of this it seems like the thread continues executing after
// exiting application because in task manager cpu is very busy
//
while ((this.IsInitialized) &&
(this.Dispatcher.HasShutdownFinished== false))
{
this.Dispatcher.Invoke(DispatcherPriority.Normal, (Action)(() =>
{
DateTime hora = DateTime.Now;
secondHand.Angle = hora.Second * 6;
minuteHand.Angle = hora.Minute * 6;
hourHand.Angle = (hora.Hour * 30) + (hora.Minute * 0.5);
DigitalClock.CurrentTime = hora;
}));
}
Console.Write("Quit ok");
};
// Create the thread and kick it started!
new Thread(start).Start();
}
// this was before implementing thread
void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
this.Dispatcher.Invoke(DispatcherPriority.Normal, (Action)(() =>
{
DateTime hora = DateTime.Now;
secondHand.Angle = hora.Second * 6;
minuteHand.Angle = hora.Minute * 6;
hourHand.Angle = (hora.Hour * 30) + (hora.Minute * 0.5);
DigitalClock.CurrentTime = hora;
}));
}
} // end class
} // end namespace
How can I exit correctly from thread automatically when main window closes and then application exits?
Thanks very much!