|
Just tried it, with a browser docked in a panel, and a textbox with button outside the panel. Set URL to "http:\\www.Google.co.uk" in design properties, TabIndex is Textbox = 0, button = 1, panel = 2.0
Works fine, Cursor in textbox on form load. How is this different from yours?
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Its not different. When i do the same thing, the cursor automatically goes to webbrowser
I just discovered that the problem exists only with some pages (google, orkut, youtube, hotmail etc). When i use any of my local sites (.ee) then it works just fine.
Why is that so? google and microsoft using some fancy scripts?
modified on Wednesday, September 2, 2009 2:54 AM
|
|
|
|
|
How can I prevent the ^ character from being typed in a textbox? The problem seems to be that the character is not added before another keydown/keyup event.
For some other keys I used the following code to prevent them from being typed:
void textBox_KeyUp(object sender, KeyEventArgs e)
{
if ((Keyboard.Modifiers & ModifierKeys.Alt) == ModifierKeys.Alt)
{
if (e.PlatformKeyCode <= 12)
e.Handled = true;
switch (e.PlatformKeyCode)
{
case 226:
e.Handled = true;
break;
}
}
else if ((Keyboard.Modifiers & ModifierKeys.Shift) == ModifierKeys.Shift)
{
switch (e.PlatformKeyCode)
{
case 52:
e.Handled = true;
break;
case 186:
e.Handled = true;
break;
}
}
}
However, this does not work for the ^ character.
Thanks for help!
|
|
|
|
|
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if(e.KeyChar == '^')
{
e.Handled = true;
}
}
|
|
|
|
|
Couple of things:
1) KeyUp is probably not a good place to disable keys, as KeyPress happens repeatedly before KeyUp occurs. Try handling KeyDown, KeyPress and KeyUp with Console.WriteLine in each to show the flow of events.
2) If you are going to use magic numbers then comment the damn things so the next poor sod stands a chance of understanding what you are doing:
case 52: is a lot more useful than
case 52: By preference, use '%' instead of magic numbers, or constants with sensible names, or even "Keys."
3) Use KeyPress to disable your code:
private void textBox_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '^')
{
e.Handled = true;
}
}
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Thanks for the replies guys. Sorry, but I forgot to mention that I work in Silverlight. I can't get to the KeyPress event. Only KeyDown and KeyUp.
Thanks again.
|
|
|
|
|
In that case you should probably post your question in the SilverLight Forum.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I need to have a popup window asking user for yes and no when he selects delete if he says yes i go ahead and delete otherwise i return back to screen and do other things.
Can I write a javascript method and call it in onclick of my delete button?
will it work?
not sure as delete linkbutton runat="server".
|
|
|
|
|
wrong forum -> goto ASP.NET
|
|
|
|
|
Hi everyone.
I'm having an error in my application that is confusing me.
The error is this one:
Could not find a part of the path "C:\CrkBusinessplatform\Aplicacao\Publico\sistemas\ccs\CRK.Monitores\sistemas\ccs\CRK.Monitores\monitor_arquivos\xslt\ACCS001.xslt"
Here are the facts: The correct path would be C:\CrkBusinessplatform\Aplicacao\Publico\sistemas\ccs\CRK.Monitores\xslt\ACCS001.xslt -> A part of the path is coming twice.
The archive ACCS001 is in this correct path.
The code line of the error is like this:
xslt.Load(Page.Request.PhysicalApplicationPath+"/monitor_arquivos/xslt/ACCS001.xslt");
I'm using .NET 1.1 on IIS 6.
The folder CRK.Monitores is a virtual directory in IIS. So the code should return the right path, right?
Oh, one more thing. The DLL of this page is the same here and there(I have checked it). And the error does not occur here.
Thanks in advance.
|
|
|
|
|
wrong forum -> goto ASP.NET
|
|
|
|
|
you seem to be mixing slashes and backslashes, Windows doesn't like that very much. Try using backslashes consistently.
|
|
|
|
|
Have you tried echoing Page.Request.PhysicalApplicationPath to confirm that what you think it outputs is what it actually outputs? To me, this looks like you're making a false assumption about the returned value.
|
|
|
|
|
How to add Sort Icon to Gridview Header in Windows Forms(Win Application)?
|
|
|
|
|
HI...
want a Auto hide control component. The control like Visual studio 2008 IDE Solution Explore or Tool view.. If mouse over or click Tool view , tool view item are expanded... i want like control... how can create this control or if its in build control , name of that control and how use that control
Thanks....
|
|
|
|
|
|
Thank you for that Source Code....
|
|
|
|
|
Hi All,
I have created a custom video player in C#. This player has two forms.
1. The Video Player window ( running in primary (UI) thread )
2. The content playing window (running in a secondary thread)
Everything goes fine for nearly 5-6 hours, then the main video player window freeze.So i cannot access any of the buttons (stop, pause ,exit) in the player.
But the secondary thread keeps playing the files for even two days continuously ( which is the max i tested).
Things i have checked :
1. There is no memory issue, since i dispose the objects i create after playing each file ( few min videos) . I have checked the process in task manager, where status is running and memory usage as same as it is started.
2.I have used BeginInvoke from secondary thread to update the current playing file in the list box on the main video player window ( once the main window freeze, the update is not visible)
3. I have used a timer in the main video player window and tried refreshing form , calling Application
.DoEvent() for every few minutes , still it gets freeze up after 5-6 hours.
Why the UI window freeze up?
Is my architecture for the player is wrong?
(I need to do lots of processing in secondary thread for the images and videos to be played, but it is working fine)
Kindly give me your suggestions.
|
|
|
|
|
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
This error occured when connected to remote sql server from windows
service
|
|
|
|
|
|
Dear All,
I have one Componenet1datagrid in this I want to put on combo box. That i have done but prob is this now when i m selecting the value from drop dowm it is not reflecting in the grid..
Can u plz help me.....
Thanks
|
|
|
|
|
Have you considered trying the component one forums.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
hello everybody
i want to convert an image into binary in C# and return back to image how it can be possible
plz any body reply
|
|
|
|
|
hi
//To binary
MemoryStream ms = new MemoryStream();
bitmap.Save(ms);
ms.Position = 0;
byte[] arr = ms.ToArray();
// From binary
MemoryStream ms = new MemoryStream(arr);
Bitmap bitmap = Bitmap.FromStream(ms);
regards
|
|
|
|
|
You can get another image manipulation idea from the link below..
An Easy Way to Resize an Image
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
Thanks
Md. Marufuzzaman
|
|
|
|