|
I think i will have to construct a datatable in code and then set it as DGV's datasource.
Thanks!
|
|
|
|
|
yeah that would be a good way
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
You have to create a Template Field and place a label inside that. Then create a formatting method in the ASP.NET page's code-behind class (or in a separate class library, implemented as a static method) and invoke it from the template.
|
|
|
|
|
Hi,
I have a special keyboard which doesn't have "@" key... it's a problem for my application (including Webbrowser).
For textbox controls, there is no problem : I use the keypress event and add following code :
if (e.KeyChar.Equals('ù'))
{
e.KeyChar = '@';
}
But I have a problem with the webbrowser component. There is only a PreviewKeyDown event which allows to catch "ù" but not to remove it. How can I do that ?
I have tried to override wndproc to catch "ù" and to remove it but I only get windows message WM_GetDLGCode (with no information on lParam and wParam)
I have no more ideas...
|
|
|
|
|
Hi,
this might work: inside PreviewKeyDown event handler when a 'ù' is received
1. send a '@' (I think there are many ways to do this, SendKeys class being one of them)
2. use PreviewKeyDownEventArgs.IsInputKey to suppress further processing
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Thanks for your quick answer.
I've tried this solution but there is a problem. Here is the code added on previewkeydown event :
if (e.keyvalue == 192)
{
e.IsInputKey = true;
Sendkeys.SendWait("@");
}
When I press "ù" key on my webbrowser, I have two characters printed on screen "@ù".
I've tried to remove "e.IsImputKey = true;" and the result is quite strange : "@@ù" !!???
I've added a breakpoint on this part of the code and it is called 3 times (should be because of Keydown, Keypress and Keyup ??)
Is there another way to remove "ù" on previewkeydown event ?
Ric
|
|
|
|
|
did you try e.IsInputKey = false; ?
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
Yes. But in this case, I have "@@ù"...
Any idea ?
Ric
|
|
|
|
|
OK, this is what I would do:
- set Form.KeyPreview=true for your Form;
- create a Form.KeyDown handler;
- in that handler if input char is 'ù'
1. send a '@'
2. suppress further processing of 'ù' by setting KeyEventArgs.SuppressKeyPress=true;
and KeyEventArgs.Handled=true;
BTW: what is your keyboard? is it the usual French keyboard? How do you call its layout
(is it AZERTY?).
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
This only works for components like textboxes on the form but not for the WebBrowser. When you press a key on your Webbrowser, it is not detected on keydown event of the form...
I think the only way is by previewkeydown event of webbrowser component. As you know, the result is always that I have characters "@ù" when I press "ù". Is there a solution to remove the "ù"? I don't know... I'm searching a solution since 1 week now, and I'm starting to be crazy
The keyboard is dedicated for kiosk application (metal steel keyboard) and, yes, the layout in France and for this keyboard is "AZERTY"
Please HELP
|
|
|
|
|
Hi,
I looked into WebBrowser and discovered it does not handle keyboard events like normal Controls,
it does not have the regular keyboard events and it also does not allow its parent Form to
preview them. This tells me you need to dig deeper to solve the problem, look for "system hook",
which solves all kinds of system wide event stuff below the application level, so you can teach
your PC to always replace 'ù' by '@'
I haven't done this myself yet (I use QWERTY!) but I trust it works well, I don't recall having
read any problems with it; there are several articles on CP about system hooks, and then there is the bible.[^]
Hope you get it working without much ado.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
hiee,
i'm writin an prg 4 sending mails
this is ma code ,its works fine .
bt i want to display de error msg that might occur as in de exception
|
|
|
|
|
Daljeet515 wrote: this is ma code
Your mother is writing the code ?
writin prg 4 ma bt de - these things make you look like a moron. This is not a mobile phone, it's a computer. You have 101 keys, use them.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Daljeet515 wrote: hiee,
i'm writin an prg 4 sending mails
this is ma code ,its works fine .
bt i want to display de error msg that might occur as in de exception
WTF is this? Are you MC Daljeet515 the baddest homeboy on the boards? Are you down with the coders or are you just a moron who's scraped the paint off most of the keys so you've only got 12 left?
Please, please, please learn about the wonderful consonants and vowels that are available to you - I mean you've got 26 of them in the English language. The 14 you left out are feeling lonely and unwanted.
By the way - what code? You have mentioned this being your code and yet it has failed to materialise like the fat ugly girl on prom night.
|
|
|
|
|
Maybe this person is writing in this manner intentionally just to annoy a few people on these forums.
Is this the current standard communication of software developers this day in age ?
How hard is it to display an exception ?
try
{
SendEmails()
}
catch(Exception e)
{
MessageBox.Show(e.Message);
//or
Console.WriteLine(e.Message);
// or
System.Diagnostics.Debug.WriteLine(e.Message);
}
You might want to catch specific exceptions first before handling a generic exception.
|
|
|
|
|
ekynox wrote: Maybe this person is writing in this manner intentionally just to annoy a few people on these forums
Without doubt. In fact, this is one way, I apprehend, these low profile creatures are staging a Denial of Service attacks. As we focus on such people, we can actually help other deserving ones right?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
I have created a visual C# windows application project with one form. I have removed the close x button by setting ControBox=False. Then if I use this.close() method to close the form I get error. It doesn't show any error message but shows dialog "application has top close...".
I was under the impression that it was happening due to Application.Run method. But can anyone please suggest a solution to this?
|
|
|
|
|
Do you have any other threads running ? this.Close() should work just fine.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
No, I don't think so. It is a very simple application with 2 functions. Is there a way to figure out if any other thread is running?
Thanks.
|
|
|
|
|
harsha1305 wrote: Then if I use this.close()
Application.Exit();
led mike
|
|
|
|
|
*grin* I knew there was an Application. method, but couldn't recall. Does that do a hard close, or still post WM_CLOSE to all windows ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: Does that do a hard close, or still post WM_CLOSE to all windows ?
Who knows, it's .NET so it might all change from version to the next anyway! :-> At one point I do believe I read something that said it does stop all the threads in that process. But again that was some time ago so now, on what versions, I don't really know or probably care. When I care about those types of details I will fall back to C++ native development.
Like someone said the other day, C# is VB in wolfs clothing. I added, yes just like Delphi and Java. Really it's the .NET platform as opposed to the languages. When one of the main purposes of the platform is to hide the details of how stuff works from the developers it's difficult to remain interested in them. The platform is fine for many projects but not necessarily for any project.
I eat my peas with honey
I've done it all my life
It makes the peas taste funny
But it keeps them on my knife
led mike
|
|
|
|
|
It tells the message pumps to terminate and then closes the app windows.
|
|
|
|
|
I should Application.Exit() be called in main()? If so I tried it, but shows the same error.
|
|
|
|
|
I tried this.close() again and got system.objectdisposedexception exception. So I called this.dispose() before this.close(), but still the same exception. What is the proper code for closing the form?
Thanks.
|
|
|
|