|
I wonder if anyone can help me. I have the following,
I have a form (ie FormM) that is IsMdiContainer = True.
Another form (ie FormA) which is not. This form is selected via a menu option
Question....
At the moment when I move the FormA it can go anywhere on my screen. What command or property do I use so that FormA cannot leave the MDI form (FormM) area.
I hope this makes sense
-- modified at 7:26 Wednesday 26th July, 2006
|
|
|
|
|
In the FormM add the following:
Private Sub XXXToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles XXXToolStripMenuItem.Click
FormA.MdiParent = Me
FormA.Show()
End Sub
|
|
|
|
|
can i bind variables to access-database directly like i can bind textboxes?
(textbox1.databinding.add("Text",datasource,"Column1"))
when i need data, i allways bind a textbox to the database and then take the data from that box, but that's not really satisfying:
textbox1.databinding.add("Text",datasource,"Column1")
dim myVariable as string =textbox1.text
and then i hide the textbox under a panel, so the user doesn't see it.
does somebody know a better way?
|
|
|
|
|
|
vb.net:
how do i allow the user to jump between two tabpages of a tabcontrol but not to jump to the third tabpage before the user didn't click a certain button?
|
|
|
|
|
Don't show the third tab page until it's acceptable for the user to click it, or handle the tab page changed event, and if it's changed to the one you don't want, change it back.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
i have created the small programme,which have check box,so i have put small logic there when the check box clicked,so i need to know how do i do the databind for textbox in coding,which take the data frm database.i need how to give the code for databind in textbox codings. pls help me.
Thank you
|
|
|
|
|
Your question is too high level. Why do you want to databind to a textbox, it can only hold one string, right ? Or do you have more than one textbox ? What's the database ? Did you put the data in there ? What is the data ? What are you trying to do exactly ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
First i thanks to you consider my problem.
I have mentioned there i have a database and i want retrive the data from database.My quection is in my login form if someone click the check box,that mean user's id and password automatically detecting from the database,so i have two text boxes one for id and other for password.So how can i bind the data in text box in coding level,not in design level.
Thanks
|
|
|
|
|
I'm not sure what you mean by 'bind'. I'd expect to run a stored proc that returns true or false, taking hte username and password. Then your UI layer never contains any passwords, it simply calls the data layer to check if the values present are valid or not.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
hellow to all ...
how can i call Events in vb.net ?
i wanna call the painting event of a picturebox every time i click a button , to redraw something ...
thx for anyhelp ...
|
|
|
|
|
You dim the picture box adding the 'withevents' keyword.
You create the event eg public event eventname
You add 'handles ButtonName_Click' to the event you created, this will tell vb that when you click that button, it must run this event.
There are 10 types of people in this world, those who understand binary and those who don't!
|
|
|
|
|
i have an enumeration (Yes/No) , and the according value are 1/0 when i store them in the database.
when i retrieve the data from BD and display it on a datagrid they appear 1s and 0s but i want them to appear Yes No ??
thank you all
Tamimi - Code
|
|
|
|
|
Your enums have those values ? If so, I'd think you could cast those numbers to an instance of the enum and call ToString on it.
However, for those two values, it's just as easy to write the code to convert them to strings.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
this my enum
Public Enum EnumYesNo
Yes = 1
No = 0
End Enum
so i will store 1 when i do objRow("approve") = EnumYesNo.Yes .
when i retrive the row i will get 1(displayed in the grid) for the column "approve", how can i change it to "Yes".
this is a win application
thank you
Tamimi - Code
|
|
|
|
|
One obvious way would be to add a column to your stored proc that contains the display string you want and bind to that value instead.
Any other solution would involve modifying the data row by row.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
thank you ... i was think about direct way to do that.;)
but i will add new colunm.....
Tamimi - Code
|
|
|
|
|
****This is my component coding****
Public Class DepartmentValidator
Inherits System.ComponentModel.Component
Private empid As String
Private pwd As String
Public Property EmployeeID() As String
Get
Return empid
End Get
Set(ByVal Employeeid As String)
empid = Employeeid
End Set
End Property
Public Property Password() As String
Get
Return pwd
End Get
Set(ByVal Password As String)
pwd = Password
End Set
End Property
Public Function Validate() As Boolean
Dim em As String
Dim pw As String
Dim conn As New OleDb.OleDbConnection("provider=SQLOLEDB;User ID=saassword=;Trusted_Connection=yes;Initial Catalog=employees;data source=localhost")
Try
conn.Open()
Catch ex As Exception
MsgBox("There have problem in connecting to database")
End Try
Dim selectemp As OleDb.OleDbCommand = New OleDb.OleDbCommand("select cempid,cpassword from employees where cEmpID=?", conn)
Dim dr As OleDb.OleDbDataReader
dr = selectemp.ExecuteReader()
Do While dr.Read = True
em = dr.GetString(0)
pw = dr.GetString(12)
If (em = empid And pw = pwd) Then
Return True
Else
Return False
End If
Loop
dr.Close()
*****This is user validation form coding***
Private Sub btnok_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnok.Click
Dim validator As DepartmentValidator
validator = New DepartmentValidator
validator.EmployeeID = txtempid.Text
validator.Password = txtpwd.Text
validator.Validate()
If validator.Validate = True Then
MsgBox("Valid User")
Else
MsgBox("Invalid user")
End If
when i'm run this and type employee id and password there display the error in my component codings. Error is like below
An unhandled exception of type 'System.InvalidOperationException' occurred in system.data.dll
Additional information: ExecuteReader requires an open and available Connection. The connection's current state is Closed.
Could someone help solve 4 this problem pls,if need my coding also ask frm me
Thank You
-- modified at 1:06 Wednesday 26th July, 2006
|
|
|
|
|
maybe Youre connection String isn't True
Check you're Connection string
MHf
|
|
|
|
|
hi
i have virtually no vb experience so i hope i can explain this clearly.
i have made a interface that i wont to copy a players name from a server browser listview "the all seeing eye"
i need a textbox to autofill with the players name from a listview once i start inputting a name.
getting the textbox to autofill from the name listview is not happining.
can anybody help me with this.
the reason i am undertaking this is to help us adminasta a game server which is being overrun with game hackers.
i wont to be able to copy a players name and paste in a guid search engine to determine if they have any hacking convictions listed against them.
cheers
toe
-- modified at 1:43 Friday 28th July, 2006
|
|
|
|
|
Textboxes do not support autofill, you will need to find or write a custom control to do this.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
vb2005 text and combobox's do autofill but gettin them to fill from another program is the problem.
in the controls properties down the bottom u have all the autocomplete properties
cheers
toe
|
|
|
|
|
bump
|
|
|
|
|
How can i enumerate tray icon? I want to get other program' tray icon
|
|
|
|
|
I need some help creating an MS-Word counter macro as I'm not well versed in Visual Basic. I am trying to find a repeating XML tag pattern in an MS-Word file as shown below:
<subunit>
any text . . .
</subunit>
What I need the macro to do is to attach a number to the tag and each time the tag is found, the number should increment by 1.
See my desired output:
<subunit_1>
any text . . .
</subunit_1>
<p>
<subunit_2>
any text . . .
</subunit_2>
<p>
<subunit_3>
any text . . .
</subunit_3>
Can such a macro be created in Word? I do have some experience editing macros in the VB editor but very limited.
I might add that I already have a macro that duplicates an XML tag each time I run the macro but without the incrementing. Should I try to edit this current macro to get my desired output?
Thanks
Harold
-- modified at 0:05 Wednesday 26th July, 2006
|
|
|
|