|
i need an example to create graph from C#
|
|
|
|
|
I want in my RichTextBox this action to do: Backspace key takes the same action like left arrow key. Speaking generally I don`t want to delete characters by backspace key inside the textBox field unless it is the last character.
This code works in TextBox (do the action which I want) but unfortunatelly doesn`t work in RichTextBox.
private void textBox1_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e)<br />
{<br />
<br />
char c = e.KeyChar;<br />
int start = textBox1.SelectionStart;<br />
int lenght = textBox1.Text.Length;<br />
<br />
if(c == (short)Keys.Back && start!=lenght)<br />
{<br />
e.Handled = true;<br />
SendKeys.Send("{LEFT}");<br />
return;<br />
}<br />
}
Can anyone help me?
|
|
|
|
|
Describe "how it is not working".
Do you get a error or what?
And aI think making this kind of behaviour is bad. There are standards and I hope you have a really god reason for doing this...
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
You asked me why it doesn`t work. It takes two action in the same time. First it deletes charakters (so backspace key works like should work), second it moves cursor to left like I want.
In textBox works only second action which exactly I want. In richTextBox work both of them.
e.Handled = true; code should make a backspace key action not allowed.
Why is that?
I need this action in my richTextBox to validate text which I enter to this.
|
|
|
|
|
hi
i need an example for creating a report in excel file from C# code
thanks
|
|
|
|
|
|
Hi
I need also to create a graph(in Excel) from the data i have in C# code
thanks
|
|
|
|
|
Where are you getting errors? Post
the code you tried.
|
|
|
|
|
Errors and Excel, I recently have resolved a major pain when using OLE DB. If you are using the Excel Object Model then ignore this. Basically I was glad to finally discover some info buried on MSDN that helped me resovle reading (importing) data from Excel via OLE DB.
Two things:
In your Connection String Extended Options there is a setting called IMEX. It can have one of the following values:
<br />
0 = Export<br />
1 = Import<br />
2 = Update<br />
Thus, let's say you want to read an Excel file that has a few questionable cells (i.e. IMEX=1). Well without some further intervenion in the Registry, OLE DB still may not fetch the records properly because it uses the first 8 cells in the column to guess the data type. Easy to fix but you have to know about this to make it work.
Nip into REGEDIT and goto to:
<br />
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Excel<br />
Then you have to tweak the value of a setting called no less than TypeGuessRows . You can choose a value that makes sense in your context, say it might take 100 cells to determine the type in your estimation. Then here it's definitely OK to try 100 as the value. This is an execise in tuning verus trial and error. If you have a humongous spreadsheet, you can use 0 which causes the Type Guess to scan up to 16,000 rows. That's a tad excessive for most apps, so like I said trial and error.
BUT Wait there's more.... when you finally go to deploy your application MAKE SURE your MSI updates the Registry!
Mike Luster
CTI/IVR/Telephony SME
|
|
|
|
|
How to use settimeout property in C#
can any one pls help me out
Neelam Ravi Kumar
|
|
|
|
|
try this link
http://www.dotnet247.com/247reference/a.aspx?u=http://www.kbalertz.com/Feedback_314190.aspx
Neelam Ravi Kumar
|
|
|
|
|
Is it possible to install the downloaded application in a quite mode. Using command line arguement "/q" we can install the application in a quite mode when we are installing the msi r exe file from the command prompt or from any other .Net application using the Process.Start with the arguement "/Q". Is it possible to do in the same way in the ClickOnce deployment.
Is it possible to get the values an do some processing like, checking the Licencse key and getting the email id or pin from the user or client.
Please reply me.
Regards
Mukilan.P.S
|
|
|
|
|
Not unless the installer has a quiet option, if it does check the docs for how to invoke it.
An alternative (although a bit more work) would be to use NSIS which does support quiet installs.
Sorry I'm not of more help
Ed
|
|
|
|
|
We can access delegate invokationList by mthod GetInvocationList (), But we can't use it in a event.
I want to Add a Eventhandler to handle event Control.LoadComplete, but when a server side event occurs such as Button_Click, the click event handler will be invoked before my handler, how can i do my job before it??
thanks for any helps.
|
|
|
|
|
Dear All,
Is it possible to change the user interface in the set up project. suppose i need a dialog in the END node with textboxes for example Texboxes (A) dialog.
but its not possbile to add that dialog in the End node. Can any one please tell me a way to customize the User interface in a set up project. Im doing set up project in a VS.net 2005
Regards
Mukilan.P.S
|
|
|
|
|
Hello,
maybe someone here can help me. I need something like a tooltip. In this tooltip should be displayed a string. Til now it is not complicated. But the problem is that the string should be bind to an object and so automatically updated. Is this possible? is there something available on the whole web?
Regards
Hansjörg
|
|
|
|
|
Have you looked into the ToolTip class?
MSDN
No hurries, no worries.
|
|
|
|
|
In this class I have not found any possibility to bind the shown text to a property of an object...
Maybe there is a possibility but I don't find any...
Regards
Hansjörg
|
|
|
|
|
hpetriffer wrote: bind the shown text to a property of an object
Do you want to automatically update the text in both object property and tooltip? Write an event handler that updates them if the text changes?
No hurries, no worries.
|
|
|
|
|
yes it seems that this is the only solution. But I have another problem with the tooltip. If I open a contextmenu of the object on which is displayed the standard tooltip (.net2.0). the tooltip is not displayed anymore. it is displayed only when I call SetToolTip another time...
Regards
Hansjörg
|
|
|
|
|
keep the text in memory instead of relying on the tooltip...
No hurries, no worries.
|
|
|
|
|
What do you mean with that exactly?
|
|
|
|
|
you have a string eg. "my dynamic text".
If this text should change, you'ld like to change the property of your object and of your tooltip?
Do something like:
public void SetMyDynamicText(string input){<br />
inmemorystring = input<br />
}
something like that, it's getting difficult without really knowing what you'ld like to do...
good luck.
No hurries, no worries.
|
|
|
|
|
Okay this I understand, this I can solve when I make an event OnDataChanged or something else, where I can change the text of the tooltip...
But I don't understand til now, why the tooltip doesn't show the text anymore when I open a contextmenu on the same object (I do nothing there!)
Regards
Hansjrög
|
|
|
|
|
check if the active property is still true after the context menu, if it is I wouldn't know either
No hurries, no worries.
|
|
|
|