|
I am adding pages like this:
TabPage newPage = new TabPage();
newPage.Text = "Text"+tabControl1.TabPages.Count;
tabControl1.TabPages.Add(newPage);
RichTextBox richTextBox1 = new RichTextBox();
richTextBox1.Location = new Point(0, 0);
richTextBox1.Size = newPage.Size;
richTextBox1.Dock = DockStyle.Fill;
richTextBox1.Name = "RichTextBox" + tabControl1.TabPages.Count;
newPage.Controls.Add(richTextBox1);
Now i would like to cut something from richtextbox of selected tab..how to??
|
|
|
|
|
You could use the Find() method of tabControl1.SelectedTab.Controls, passing the name of the RichTextBox you want to find. That will return a Control object, so cast it to a RichTextBox and call Cut()
|
|
|
|
|
Can you show me in code plz...
|
|
|
|
|
Control foundControl = tabControl1.SelectedTab.Controls.Find("RichTextBox name goes here");
RichTextBox castControl = foundControl as RichTextBox;
if(castControl != null)
castControl.Cut();
You set the name of the RichTextBox when you create it, in your first code sample
|
|
|
|
|
Sen^or
Ola. Que tal con usted ahoraita???? Que bueno. Como yo usar uno pequino solucion los problemas que ocurrian en mi vida???
Gracias por que lo estay egualen la todo.
|
|
|
|
|
You will find here that most, if not all people are reluctant to just do code for you. People will give you hints and instruct you on classes and design help, but almost none will give you the code to do your job or homework.
|
|
|
|
|
I am askin for one line of code...for which my didn't work.. plz help! Do i have to use focus for getting richtexbox of selected tab??
|
|
|
|
|
My code won't work on its own. The name property of the RichTextBox is needed, and it's easily obtainable from your original code sample
|
|
|
|
|
RichTextBox richTextBox1 =new RichTextBox();
richTextBox1=tabControl1.SelectedTab.Controls[0] as RichTextBox;
That works fine! Thanks anyway!
|
|
|
|
|
You get a five from me for taking the time to work out alternative solutions
|
|
|
|
|
hi
i make a game and i want to publish it, but i dont want to anyone can know what game engine i use in it easyly!
my resource is .jpg image and ... and i dont want to anyone can grab those.
i want a wrapper that convert my game files and folders to single .EXE file that be runable without any footmark. so others can not understand what is behind it.
what software i must use for it?
|
|
|
|
|
I you've got the cash, it can be done - here[^] is one offering - starts at $6000 though.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Why dont you create a Setup for your game? I mean an installation wizard.
|
|
|
|
|
Hi Peoples,
I am using an application, of that i want to know where the mouse is clicked on that application ??
can u peoples help me how to do that?
|
|
|
|
|
Handling the MouseDown, MouseClick (and probably many other of the mouse-related) events of a form will provide the location (as X and Y co-ordinates) within the event args.
Select your form, look in thew properties panel for a little lightening-bolt-looking symbol and click it This will list all of the events available to you and if you then double-click the one yo want i will even provide a code-stub for you to use.
|
|
|
|
|
If you handle one of the Mosue events (MouseClick etc) you can use e.Location
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Hello
i have a wss site with wiki pages .
i wont to read some info from a wiki page and insert it to a database.
i also would like to serach some info words from all the wiki pages in my wss site(like google);
Could someone Help me ?
|
|
|
|
|
|
I think it perhaps difficult. But you can try to use following statement to search it.
keywords site:YourWebsite.com
|
|
|
|
|
i am trying to store a image in sqlserver database, but doesnt effect.
help me.
public class Item
{
private int code;
private string name;
private float price;
private Category category;
private byte[] photo;
public Item()
{
}
public Item(int code, string name)
{
this.Code = code;
this.Name = name;
}
public Item(int code, string name, float price) : this(code,name)
{
this.Price = price;
}
public int Code
{
get
{
return this.code;
}
set
{
this.code = value;
}
}
public string Name
{
get
{
return this.name;
}
set
{
this.name = value;
}
}
public float Price
{
get
{
return this.price;
}
set
{
this.price = value;
}
}
public Category Category
{
get
{
return this.category;
}
set
{
this.category = value;
}
}
public byte[] Photo
{
get { return this.photo; }
set { this.photo = value; }
}
}
public class ItemsDAL
{
private string selectItemByCode = "Select * from ItemsWithCategory where code=@code";
private string selectAllItems = "Select * from ItemWithCategory"; // View
private string insertItem = "InsertImage";
public void InserItem(Item pic)
{
SqlConnection con = new SqlConnection(DALHelper.ConnectionString);
SqlCommand cmd = new SqlCommand(this.insertItem,con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = this.insertItem;
cmd.Parameters.Add(new SqlParameter("@photo", pic.Photo));
con.Open();
try
{
cmd.Parameters["@photo"].Value = pic.Photo;
cmd.ExecuteNonQuery();
}
finally
{
con.Close();
}
}
}
public partial class ManageItemsForm : BaseForm
{
Item itm;
ItemsDAL itemDal = new ItemsDAL();
MemoryStream mem = new MemoryStream();
public ManageItemsForm()
{
InitializeComponent();
itm = new Item();
}
private void selectImageToolStripMenuItem_Click(object sender, EventArgs e)
{
DialogResult r = this.openFileDialog1.ShowDialog(this);
if (r == DialogResult.OK)
{
pbxItem.Image = Image.FromFile(openFileDialog1.FileName);
this.pbxItem.BorderStyle = BorderStyle.None;
}
}
private void tabPage1_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
itm.Photo = mem.GetBuffer();
itemDal.InserItem();
this.pbxItem.Image.Save(mem, this.pbxItem.Image.RawFormat);
Dotnet67.Sales.Persons.Customer c = new Dotnet67.Sales.Persons.Customer();
c.Name = txtName.Text;
}
}
Maifs
|
|
|
|
|
refer : GridView all in one[^]
//in this i have stored image and retrived in grid and also in another page. Download the sample project and see.
Padmanabhan
|
|
|
|
|
but i dont have to save in grid view. i want to keep it in separate for single person
Maifs
|
|
|
|
|
Ola,
Que pasa. No tengo yo mas o mucho experiencia ahorita. Los todos son mi problema, estoy bueno o no???
|
|
|
|
|
Ola,
Que pasa. No tengo yo mas o mucho experiencia ahorita. Los todos son mi problema, estoy bueno o no???
<a href=""></a>
|
|
|
|
|