|
Hello folks.
how can use a javascript so that if i clicked on a treenode it wont post back to the server and close the root tree!
what im asking, if there is anyway to do it using javascript so when i click on a tree node it wont close the root.
thanks in advanced
Estarta
|
|
|
|
|
How do I get keyboard inputs like 'X' to exit and maybe right arrow to go to next frame, etc. I tried
protected override void OnKeyDown(KeyEventArgs e)
{
if(e.KeyCode == Keys.X);
Close();
}
ut I am not sure about the event handler I need to put out
Thanks!
Samuel
|
|
|
|
|
Hi!
What's wrong with the code? What do you mean by "putting out" an event handler? Your implementation of OnKeyDown is a way to handle the KeyDown event...
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Like the below
Convert.ToInt32 (e.KeyChar ) == 95 // this is for 'a'
you can find constant integer valus of X and validate against it then proceed.
|
|
|
|
|
Hi,
there are several Keyboard events:
- KeyDown and KeyUp events provide e.KeyCode (type Keys) and e.KeyValue (the int value of KeyCode); it also fires when pressing/releasing modifier keys (CTRL, ALT, SHIFT, ...)
- for printable keys (the ones that normally add text in a text editor) you
better use KeyPress event which provides e.KeyChar (char), so you dont need to refer
to the Keys enumeration nor the explicit conversion to integers.
|
|
|
|
|
How do I get keyboard inputs like 'X' to exit and maybe right arrow to go to next frame, etc. I tried
protected override void OnKeyDown(KeyEventArgs e)
{
if(e.KeyCode == Keys.X);
Close();
}
ut I am not sure about the event handler I need to put out
Thanks!
Samuel
|
|
|
|
|
Hello,
On your MainForm you have to set the "KeyPreview" property and handle KeyPress.
this.KeyPreview = true;
}
protected override void OnKeyPress(KeyPressEventArgs e)
{
if(e.KeyChar.Equals('X')||e.KeyChar.Equals('x'))
Close();
else
base.OnKeyPress (e);
}
Hope it helps!
All the best,
Martin
|
|
|
|
|
Yes It Worked, exactly what I was looking for. Thanks Martin!
|
|
|
|
|
Glad I could help!
All the best,
Martin
|
|
|
|
|
Hi,
Currently i'm working on a project that tries to create xml files by getting data from backend. The problem now is that i'm unable to preserve the whitespaces between the tags.
Can any one help on this.
Thanx and Rgds,
Seenivasan
|
|
|
|
|
What are you using for creating the xml file DOM or xmlTextWriter ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
I'm quite curios myself. How do you deal with this if you use XmlTextWriter?
|
|
|
|
|
Add this after writing every tag i think that will create some white space
What you think ?
ObjectxmlTextwriter.WriteWhitespace(" ");
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
Good Morning Friends
we are using asp.net with c# i have a problem in password display.
this coding is retrive a data from database to display username and password in c#
txtPassword.Enabled = false;
txtUserName.Text = drStaffDetails["UserName"].ToString() ;
txtPassword .Text = drStaffDetails["Password"].ToString() ;
now problem is username is displaying and password is not displaying in a password char field showing blank
Bellow coding is in asp.net
asp:textbox ID="txtPassword" Runat=Server textMode="Password">
from above coding if i used as a textmode as text it displaying a password.
another thing i am using breakpoint for checking whether the password is retrieving or not , it is displaying
pls help me urgent
Kankeyan
|
|
|
|
|
i think you can not display a text while the textMode=Password.
then there is no benefit of displaying a password
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
Mr i cannot able to display a password in password format the field is being cleared and there is no value while the textmode is in password.
But textmode is in text password is visible and in a text format i don't want to visible in text format.
give a solution
kankeyan
|
|
|
|
|
How to check if someone is logged on Server Console (local logon)?
Manual steps > TaskMgr.exe > Users Tab > Check user with ID=0
We have Terminal Server farm and need to know console logons.
Many Thanks.
h.
|
|
|
|
|
Hi all
I am reading a DB into a binding source that I am then displaying in a datagridview
I want to do a few things like go through and format a few rows (example: companyname/username to just display the user name)
i also want to get a count on of how many of each type in a certain column
lastly i know i can use the .filter to the binding source but i have two questions i need clarified
1a) how do you string more than one filter together.
2a) if i use the filter and then i ran a counting loop or something in the binding source would it give me the account for all the info in the binding source or would it give me the totals for the filtered info.
Thanks
|
|
|
|
|
Hai,
I want to place an microsoft office document imaging in a windows form in c#.net ie(C#.net + windows application)
My requirement is to place the image in the half of the winform and below some controls such as labels and textboxes are to be placed and by seeing the data from the image user is going to enter the data in the controls if he enters the correct data user has to save the data.if any body finds a solution and what area the dlls to be imported .
Please send to me
suryaprakash_kk@apollohealthstreet.com
surya prakash
|
|
|
|
|
hi did u found the solution for doing this....can u gv me some sample for this code if ur done with this....
|
|
|
|
|
Hello everyone,
I am trying to add a Splash Screen to my Windows Application. I have searched the internet and I have came across "A Pretty Good Splash Screen in C#" by Tom Clement.
As I tried to follow the Tom's tutorial, I came to the point that he asks, "Add a Windows Form to the project and name it SplashScreen. Delete Form1.cs.". I am wondering if I delete my Windows Form, then what I am making the splash screen for?!!!
I am puzzled and I was wondering if someone can help me out on this.
Thank you very much and have a great day.
Khoramdin
|
|
|
|
|
Here is one of the easiest one:
In your main Program.cs call a Form:
--Name that form splash screen,
--Set the property 'FormBorderStyle' = 'None'
--call a method show splash so basically you will write as below:
public SplashForm()
{
InitializeComponent();
}
public void ShowSplash()
{
Thread.Sleep(1000);
this.Close();
}
Now in main write this:
SplashForm f2 = new SplashForm();
f2.Show();
f2.ShowSplash();
This will work as a splash screen!!
|
|
|
|
|
Better ask your question to Tom Clement itself instead of posting it here.
there is a Discussion board below the article.
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
Try this it is workin on my project its also from "A Pretty Good Splash Screen in C#" by Tom Clement.
<br />
using System;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Drawing;<br />
using System.Text;<br />
using System.Windows.Forms;<br />
<br />
namespace GasDistributionManagement<br />
{<br />
public partial class SplashScreen : Form<br />
{<br />
static int var =0;<br />
public SplashScreen()<br />
{<br />
InitializeComponent();<br />
}<br />
<br />
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)<br />
{<br />
<br />
}<br />
<br />
private void SplashScreen_Load(object sender, EventArgs e)<br />
{<br />
this.ClientSize = this.BackgroundImage.Size;<br />
timer1.Start();<br />
}<br />
<br />
private void timer1_Tick(object sender, EventArgs e)<br />
{<br />
var++;<br />
progressBar1.Value++;<br />
if (progressBar1.Value != 100)<br />
{<br />
int i = 1 + ((100 - var) / 8);<br />
if (i / 3 > 2)<br />
{<br />
Timelabel.ForeColor = System.Drawing.Color.DarkViolet;<br />
Timelabel.Text = "Time Remaining is " + i + " Seconds";<br />
}<br />
else if (i / 3 == 2)<br />
{<br />
Timelabel.ForeColor = System.Drawing.Color.Red;<br />
Timelabel.Text = "Time Remaining is " + i + " Seconds";<br />
}<br />
else<br />
{<br />
Timelabel.ForeColor = System.Drawing.Color.DarkKhaki;<br />
Timelabel.Text = "Time Remaining is " + i + " Seconds";<br />
}<br />
}<br />
else<br />
{<br />
timer1.Stop();<br />
this.Hide();<br />
Login log = new Login();<br />
log.Show();<br />
}<br />
}<br />
<br />
}<br />
}
|
|
|
|
|
Hi All,
Plz give code me code to take a difference between two date (difference must be in the days) one of them is present date other may be any.
Thanx in advance,
|
|
|
|