|
|
help in making the code for the following buttons
1. copy
2. cut
3. paste
4. select
4. redo
5. undo
6. find and replace code
please reply me soon
zabsmarty
|
|
|
|
|
If you use a RichTextBox or a TextBox, it is very simple.
Eg :
RichTextBox1.Copy() …….. <br />
RichTextBox1.SelectAll() <br />
RichTextBox1.Undo() ……<br />
RichTextBox1.Find(……..), <br />
RichTextBox1.SelectedText = ………………..
chatura
|
|
|
|
|
hi , i wannt do progress bar work with send and retrieve and update data to sql serve 2000 .
like progress bar in form Copy Files
please some body help me
123
|
|
|
|
|
With what?
The ProgressBar works just by setting it's Value property to something between 0 and 100. All you have to do is calculate how much total work you have to do and how much you've done.
As for SQL work, you'll have to read up on the SqlDataAdapter[^], SqlConnection[^], SqlCommandBuilder[^], SqlCommand[^], SqlParameter[^], and DataSet[^] classes.
Basically, you use an SqlDataAdpter with Connection, Command, and CommandBuilder objects, to fill a DataSet object that will hold a copy of your data to be used with whatever controls you want to use to manipulate it. After the modifications are done, you call the DataAdapter's Update method to write the changes back to the database.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
thank you ... please send to me sample.
please,God bless you ..........
123
|
|
|
|
|
There are plenty of examples on The Code Project[^] and MSDN[^]. All you have to do is put the effort into finding them.
Learn to use the search engines on those websites and Google[^].
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
(Translation: I'll show you the way, but not write the code for you.)
|
|
|
|
|
i wannt display this message to another language and all like this message :
(Column 'BillId, productid,billtype' is constrained to be unique . value '1,90,c' is alreadly present do you want to correct the value ? (Yes - No) )
123
|
|
|
|
|
You're thinking about localization. You'll have to supply all the translated strings since there is nothing that will translate into any language for you.
Localization Tutorial[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
thank you for asnwer , but i don't meaning this , i know localization . i meaning show other message like( this new item inserted before (but other language)
i can useing datatable.haserror , but it not work ..
i wait your answer........
123
|
|
|
|
|
OK. Catching the constraint failure and giving the user the option to make changes depends on how your updating the database. If you're iterating through the records in the ataSet yourself and calling the appropriate Sql Command, then you can cach the SqlException thrown at that time and give the user appropriate options.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
thank you.. i know that . but my problem in DataGrid, when change current row in dataGrid.it display this message....
sample ?!
Dataset.enforceConstraint = true
this datagrid :
-id-------name----------Price-----------------
-1--------Vir1----------1.2 $
-1--------Vir1----------1.2 $
123
-- modified at 19:24 Sunday 12th March, 2006
|
|
|
|
|
Why are you letting the user type in a Primary Key value??? This is normally done by the database engine itself.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi All
I need to write an application that checks A CSV file for a user and if they exist update a corresponding number into their "primaryTELEX" attribute.
CSV File
==================
john smith 1234
jane jones 3421
==================
I have found articles with examples in C but am having trouble converting the syntax over to VB.Net (Never worked in C)
The two examples I found are.
Find User:
The following sample code uses the FindOne method of the DirectorySearcher class to find the same user we authenticated a moment ago. We will limit the properties that are retrieved during the search.
<br />
<br />
DirectoryEntry entry = new<br />
DirectoryEntry("LDAP://dev.codeguru.com");<br />
try<br />
{<br />
DirectorySearcher search = new DirectorySearcher(entry);<br />
search.Filter = "(SAMAccountName=administrator)";<br />
search.PropertiesToLoad.Add("Name");<br />
search.PropertiesToLoad.Add("displayName");<br />
SearchResult result = search.FindOne();<br />
if( result != null )<br />
{<br />
Console.WriteLine("User found");<br />
foreach( string key in result.Properties.PropertyNames )<br />
{<br />
foreach( Object propValue in result.Properties[key] )<br />
{<br />
Console.WriteLine(key + " = " + propValue);<br />
}<br />
}<br />
}<br />
else<br />
{<br />
Console.WriteLine("User not found");<br />
}<br />
}<br />
catch( Exception ex )<br />
{<br />
throw new Exception("User not authenticated: " + ex.Message);<br />
}<br />
Console.ReadLine();<br />
Update Atribute:
<br />
try<br />
{<br />
string path = "LDAP://CN=Users,DC=dev,DC=codeguru,DC=com";<br />
DirectoryEntry entry = new DirectoryEntry(path, <br />
"dev.codeguru.com\\administrator", "password");<br />
DirectorySearcher search = new DirectorySearcher(entry);<br />
search.Filter = "(SAMAccountName=testuser)";<br />
SearchResult result = search.FindOne();<br />
DirectoryEntry user = result.GetDirectoryEntry();<br />
user.Properties["description"].Value = "New description for user";<br />
user.CommitChanges();<br />
}<br />
catch( Exception exception )<br />
{<br />
Console.WriteLine( exception.Message );<br />
}<br />
<br />
Looking for any aritcal that does this in VB, (examles would be great...
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
I understand that you wish to manipulate a CSV file.
I think the best way to deal with CSV files is to refer to them like refering to databases.
Using the following link you can learn how to connect to the CSV file as a database and all you need is some knowledge in SQL queries.
http://weblogs.asp.net/fmarguerie/archive/2003/10/01/29964.aspx
HL
-- modified at 6:26 Sunday 12th March, 2006
|
|
|
|
|
The CSV file is no problem it is the query to LDAP and how to find user than update that is what I am having problems with.
I have not work with LDAP for the Directory Service in .net and am fairly new to the whole dev world..
Thanks for your input thow...
When people make you see red, be thankful your not colour blind.
|
|
|
|
|
Why is it when I have a child from, called from a mainmenu control of an MDI Container form that the combobox (on the child form) ignores the .SelectedIndex = -1, and the cbo box just loads the first value of the SQL table? Yes, the cbo is bound. When this child form is set as the active for, it obeys the .selectedindex = -1, and doesn't display a value until the cbo value is selected. Any one know?
|
|
|
|
|
I should say:
When this child form is set as the startup form, it obeys the .selectedindex = -1, and doesn't display a value until the cbo value is selected. Any one know?
|
|
|
|
|
i no this is a common bug when the desired startup object changes its name and this has happened to me.
I had a single form then added a second then deleted it and now when i try and compile it comes with the error sub main not found in ....(name of project) can any one help please???
|
|
|
|
|
Instead of setting your form as the startup object, why not change it to "Sub Main"? You can launch your form from there.
Public Class Main
Public Shared Sub Main(ByVal args() As String)
Application.EnableVisualStyles()
Application.DoEvents()
Application.Run(New MyForm)
End Sub
End Class
|
|
|
|
|
Hello!
Yes I know I have already posted two more questions (sorry!). But I was wondering how I could show a place holder for a picture box at runtime. I should be able to adjust the size of the picture by holding the one edge of picture. Whenever I go over the picture by mouse, placeholders must show up and then I should hold the one edge of it to resize it...
uh!
Thanks
|
|
|
|
|
You need handle the PictureBox's MouseEnter and MouseLeave events as follows. You can make it display an image at runtime by setting the PictureBox.Image property.
Private Sub PictureBox1_MouseEnter(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles PictureBox1.MouseEnter
PictureBox1.Image = myImage
End Sub
Private Sub PictureBox1_MouseLeave(ByVal sender As Object, _
ByVal e As System.EventArgs) _
Handles PictureBox1.MouseLeave
PictureBox1.Image = Nothing ' Clear the PictureBox.
End Sub
You can make the entire image fit inside the PictureBox by setting the PictureBox.SizeMode property to StretchImage.
|
|
|
|
|
I was wondring if there is a way (statement) to create clips for a picturebox. Likely place holders showing on the edge of the picture. It is likely not dealing with a image but something arround the image (a frame with the clips)....
|
|
|
|
|
I'm not sure if I understand what you want here.
Do you want several images reduced in size at one side of your PictureBox? Like say the bottom, kind of like Microsoft Explorer's Film Strip mode?
If so, then there is no "magic" function to render this for you. You're going to need to handle the PictureBox's Paint event and draw these clips there yourself via GDI+. Have a look at the System.Drawing namespace.
|
|
|
|
|
Hello!
My aim is to get command line arguments inside the code. Would you please show me the statement for the purpose. How can I get multiple arguments that are passed via executable program name. eg( abc.exe c:\def.jpg)
Thanks.
|
|
|
|