|
Hi,
i have 2 textboxes txt1 and txt2 and a button(mybutton) which inserts variables into my textboxes.
problem:
i enter text into txt1 eg "my name is " and click on mybutton to enter a variable
so that my variable appears right after the text i entered eg "my name is xVariable_namex".
how do i let my button know which textbox it needs to enter the variable,in other words where the cursor position is.
remember i have two textboxes
hope you understand my question
thanks for your help;)
regards paula
|
|
|
|
|
just check the focused property of the textboxes and set
the value in the one which has the focused property true.
Regards,
Pramod
|
|
|
|
|
I'm not sure I understood well, but if you want to add the content of a variable to the textbox that contains some string, these should be helpful:
check if your control has focus:
control.Focused
check if your textbox has some text in it:
textbox.Text.Lenght
textbox.Text != string.Empty
appends new text to existing text:
textbox.Text += "your new text";
|
|
|
|
|
Any one have an example of using C# (ASP.NET web app) and JMP? Thanks, Eric
Here is the link to the white papaer.
http://www.jmp.com/software/whitepapers/pdfs/automating_jmp_wp.pdf
-- modified at 11:04 Wednesday 12th April, 2006
|
|
|
|
|
Hi,
Just one quick question: Do you have to register COM DLLs first using regsvr32 before you can create any instances of classes in the COM DLL? If so, is there anyway around this?
Any help would be much appreciated!
Thanks!
|
|
|
|
|
YES, COM dll's need to be registered before they can be used, and No there is no way around this.
|
|
|
|
|
Is there anyway to do this at runtime?
|
|
|
|
|
should be...something like
Process.Start("regsvr32 \i C:\path\to\yourdll.dll");
|
|
|
|
|
I have a problem when I am programming in C#.
I have a RichTextBox and in this RichTextBox, I put a sentence ( a string of characters). It is: " This program is edit by HieuNT". Now, I want to transform (move) this sentence from the botton to the top of this RichTextBox.
How to I code for achieve this problem.
Could you show me some others effect with string (of characters) or characters.
Thank you very much!
|
|
|
|
|
If you're wondering why you got voted down and no responses then:
1) Lack of a descriptive subject line
2) The word "Immediately!!" - we answer questions is OUR time when WE have the time ... not when you dictate. Also, asking for an answer "Immediately" is just plain rude!
-- modified at 9:56 Wednesday 12th April, 2006
|
|
|
|
|
I think that you are too stupid to answer my question. Read my question carefully and try to understand what it is before answer. Thanks.
|
|
|
|
|
WOW!!! The unmittigated gall!! And you want these people to answer your question!? I think you've just placed yourself on everyone's black-list. I didn't even read your original post and, now, I don't think I'll even bother!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
LOL
|
|
|
|
|
*PLONK*
I don't suppose there's any chance of getting a real killfile added anytime soon...
|
|
|
|
|
I sure as hell hope you dont need my help in future, because you aint gettin' it!
|
|
|
|
|
Wow...
You see, I actually come on this message board from time to time to help out where I can... I'm by no means an expert... To return the favor I'd received when I was a new developer. Your "subject" message said nothing about your problem, and I'm assuming mis-worded. "Help me please! Immediately!" is rude. It assumes that readers are required to help you. You probably (hopefully) meant, "Need help with RichTextBox Control, need help to meet deadline." This would have gotten you help immediately.
The response you gave to someone commenting on your poor word useage was very rude. I'd suggest you follow the suggestions of people on this board in the future.
And, so that it can't be said of me "You're not smart enough to help me anyway", I'll throw in my 2 cents...
Since you aren't very descriptive in your description of the problem, I'll assume that you just want your text to appear at the top of the string you have in the rich text box. If that's all you want to do, on the "OnChange" event fired by the control, grab the text in the control, do a replace on the string for your text (replace with an empty string) and append your text to the front of the string.
This really is a simple problem (if the problem truly is as stated), and I haven't offered any source code for you deliberately.
|
|
|
|
|
Hi, I`m using visual studio 2005. I`ve created a local database "db.mdf", and I`m just trying to connect with, but when I run code it throws an exception:
ServerVersion = 'sqlconn.ServerVersion' threw an exception of type 'System.InvalidOperationException'
and after that the program stops to respond...What should I do to connect?
here is my code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace DB
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
string c = "Data Source=(local);database=db.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True";
SqlConnection sqlconn = new SqlConnection(c);
sqlconn.Open();
string query = "SELECT ASM_VARDAS, ASM_PAVARDE, ASM_GIM_DATA FROM v_ASMENYS WHERE ASM_AK = ";
SqlCommand sqlcomm = new SqlCommand(query, sqlconn);
SqlDataReader reader = sqlcomm.ExecuteReader();
reader.Read();
}
}
}
|
|
|
|
|
valiovalio wrote: database=db.mdf;
I think that is 'Attach Database=db.mdf;'
|
|
|
|
|
You meant 'AttachDbFilename=db.mdf;'?
|
|
|
|
|
Shouldn't it be like this:
string c = "Data Source=(local);Initial Catalog=db.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True";
HTH
|
|
|
|
|
I don`t think it`s a problem with connection string... I`m not able to connect no mathet what I write in that connection string...
|
|
|
|
|
Hi all,
I have a grayscale image (8-bit indexed). I want to operate pseudo coloring on it.
How should I do this. Can any one help me with source code or any resources?
Thanks in advance
Anindya Chatterjee
|
|
|
|
|
hi , i want to know if any one one have any idea about how to convert from char to binary in c# , and how to know the the size of the binary array after converting
|
|
|
|
|
Hi AbdallahZiad
When you say binary, what do you mean?
Do you want the char 'A' to be converted to an array of bytes
byte[] theA = new byte[] {0,1,0,0,0,0,0,1}; or what?
And what do you need it for?
Kind regards - Jakob
*********************************************
Three kinds of people in the world:
- Those who can count..
- Those who can't!
10 kinds of people in the world:
- Those who understand binary
- Those who don't
|
|
|
|
|
yes , my man
char 'A' to be converted to an array of bytes
and i need it to write a program for "hamming code "
so plz help me.
-- modified at 7:38 Wednesday 12th April, 2006
|
|
|
|