|
I suggest you that add a form for this function.
Add some controls on it.
Then, you can do anything you want.
|
|
|
|
|
vb.net 2003
I create 3 Textbox put in to a form (Form Name : Find) Tab order is 0 ,1 ,2.
I take MDI application. Then select the menu using keyboard Example( Alt E) then
select find menu Then PressEnter key. The "Find" form is open. To automatically
call the First Textbox keyup Event. How can I stop this firing.
Continue...
|
|
|
|
|
This is the way that I thought……
Dim X As Boolean = False<br />
<br />
TestBox_KeyUp Event<br />
<br />
If X = False Then<br />
X = True<br />
Else<br />
(your code)<br />
End If
chatura
|
|
|
|
|
i was trying to make change on the text from the other form by using the array in a loop but the error about which it's not a member of the form1??? y?? i check properly the label was there and with correct name....
C:\Documents and Settings\acer\My Documents\Visual Studio Projects\SnL1\SnL1\PlayerSelect.vb(492): 'com' is not a member of 'SnL1.Form1'.
here my coding:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim com As Label() = ControlArrayUtils.getControlArray(Me, "com")
Dim x As Integer
Dim game as new form1
Game.NumPlayer.Text = ComboBox1.Text
Game.PTurn1.Text = TextBox1.Text
Game.PTurn2.Text = TextBox2.Text
Game.PTurn3.Text = TextBox3.Text
Game.PTurn4.Text = TextBox4.Text
For x = 1 To Val(ComboBox1.Text)
Game.com(x).Text = y
Next
Game.Show()
Me.Hide()
End Sub
|
|
|
|
|
"com" is a variable in your code, not a member of the form.
---
b { font-weight: normal; }
|
|
|
|
|
actually i found a lot of tis similar problem even i change the name it still hapen especially when refer to other form and not itself...
|
|
|
|
|
'com' is a local variable in your event handler method.
When you define a local variable in a function/method this variable is not in the group of from's/class's member variables so if you wish to use it just call it with it's name.
HL
|
|
|
|
|
rompnet wrote: i was trying to make change on the text from the other form
You should NOT be doing this. In proper OOP and UI design, one form should not be making any modifications to the controls of another. You should be exposing the data on your second form as Public Properties, so any other form that creates this form can retrieve any data it needs and can update it's own controls with that data.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
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?
|
|
|
|