|
I would use the Tag property to set some unique key that you can use to reference the text box while looping through to know when you have got the right one.
|
|
|
|
|
i'm using a SQL Server 2000.
now want i want is to make one of the machine on my local network
Machine one: i've installed the SQL Server 2000 with these settings
1) Use Local System
2) MixMode (Use Windows Authentication and SQL Server Authentication)
USER ID = sa
Password = sa
From Machine tow which has the program: the connection string is:
<<< Me.SQLConnection_Search.ConnectionString = "packet size=4096;integrated security=SSPI; Persist Security Info=true; data source= "the name of the instance on Machine ONE"; user id=sa; password=sa; initial catalog=DBNEW; Server="Machine One Name">>>>>>>
when i connect --> "connect faild to MachineOne\Guest"
when i changed the SERVER to SERVER = "Machine One Name\User Account of the windows"
this message appear : "SQL Server does not exist or access is denied"
So what can i do.??????
Faris Madi
Nothing Comes Easy (N.C.E.)
|
|
|
|
|
I'm not sure what your doing but the way I connect to local database is:
Dim cn As SqlConnection = New SqlConnection("workstation id=yourcomputername;packet size=4096;integrated security=SSPI;data source=yourcomputername;persist security info=False;initial catalog=yourdatabasename")
|
|
|
|
|
Hi
I need to show the context menu (right click menu) of a file/folder. I have a dll (written in C) which takes the address and a location and displays the context menu of the specified file/folder in the specified location in the screen. The dll is sure using API calls. I would like to have the code in vb6. I'd be glad if someone could let me know what API's and how...
Thanks in advance
|
|
|
|
|
I am working on a project and need some help with how to code something.
What I am trying to accomplish is on my Form I have a Group Box, within that group box I have 6 Check Boxes. What I want to accomplish is that the user can select up to 2 of these checkboxes and when they select the 2nd one it makes the other 4 that are not checked disabled, however if they uncheck one of the 2 remaining boxes it should uncheck and enable the other check boxes.
Any help on how to accomplish this is greatly appreciated.
|
|
|
|
|
Write a event handler for the checkbox you wan't to handle and then set the Checked property to true/false in there.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
I'm having trouble setting up a stored procudure call. Using VB.NET and SQL Server 2000.
sp_GetInfo is procedure with 4 variables 1 input user and 3 outputs lname,fname, email. Below is the code generated by .NET when I added the stored Procedure. Can someone let me know is this correct and assist with being able to retrieve the info. I added the stored procedure directly because it would not allow me to user and sqldataadapter and then created a dataset.
Me.SqlSelectCommand2.CommandText = "[sp_GetInfo]"
Me.SqlSelectCommand2.CommandType = System.Data.CommandType.StoredProcedure
Me.SqlSelectCommand2.Connection = Me.SqlConnection2
Me.SqlSelectCommand2.Parameters.Add(New System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, False, CType(0, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
Me.SqlSelectCommand2.Parameters.Add(New System.Data.SqlClient.SqlParameter("@user_name", System.Data.SqlDbType.VarChar, 50))
Me.SqlSelectCommand2.Parameters.Add(New System.Data.SqlClient.SqlParameter("@last_name", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Output, False, CType(0, Byte), System.Data.DataRowVersion.Current, Nothing))
Me.SqlSelectCommand2.Parameters.Add(New System.Data.SqlClient.SqlParameter("@first_name", System.Data.SqlDbType.VarChar, 50, System.Data.ParameterDirection.Output, False, CType(0, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
Me.SqlSelectCommand2.Parameters.Add(New System.Data.SqlClient.SqlParameter("@email", System.Data.SqlDbType.VarChar, 100, System.Data.ParameterDirection.Output, False, CType(0, Byte), CType(0, Byte), "", System.Data.DataRowVersion.Current, Nothing))
CType(Me.MyData1, System.ComponentModel.ISupportInitialize).EndInit()
Mike
|
|
|
|
|
I am using Visual Studio 2005. I created and strong-named a control and installed that control in the GAC successfully. I now want to add that control to the toolbox but it is not showing up in the .Net components portion of the 'Choose Toolbox Items' dialog. There is no question that it is installed in the GAC. Does anyone know why a successfully installed GAC control would not show up in the 'Choose Toolbox Items' dialog?
Thank you.
|
|
|
|
|
Because you have to add it to the Toolbox yourself. The ToolbBox doesn't "auto-populate" itself out of the GAC. Right-click in the ToolBox, pick Add/Remove Items...
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
I think you misunderstood my question. I am trying to add the control to the toolbox, and I did right-click in the toolbox and picked 'Choose Toolbox Items' (VS Studio 2005's verbiage). So, I have basically done everything you've suggested, my problem is that when the 'Choose Toolbox Items' dialog opens, the assembly I have successfully installed in the GAC is not listed under .Net Framework Components. I'm trying to understand why it would not be listed, and what else besides installing the Assembly in the GAC I need to do to ensure the assembly shows up in that dialog so I can add the control to the toolbox.
|
|
|
|
|
Dear, I have a .msi file.
i want to run it from a vb6 exe, I mean I should call it from the code.
can anyone help me with this, what is the syntax for calling a .msi file.
thanks
|
|
|
|
|
You can launch it like any other process you launch using the Shell function.
Dim progID As Integer
progID = Shell("""fully qualified path to msi""", vbNormalFocus)
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Thanks in advance for any help guys. So the point of the following code is to install a CAB file onto a WM5 handheld. It has worked before, but is in no way consistent. It runs wceload.exe, the installer, fine, but upon returning to the point where it would update the forms again, it freezes. I think this has something to do with my threads, either the ones being created by CreateProcess or by WaitForSingleObject. It seems to me that only the thread that owns the forms and controls can change them, and I'm guessing that my current thread must not be the correct one. Both CreateProcess and WaitForSingleObject are imported correctly. The application freezes when it trys to update the form at Me.Refresh() . Anyway the code is below, any help would be greatly appreciated. Thank you.
EDIT: (Wow sorry that got so long guys)
<br />
...<br />
cExec = "wceload.exe"<br />
cParams = Chr(34) & cabPath & Chr(34) & " /delete 0"<br />
bResult = CreateProcess_Internal(cExec, cParams)<br />
Application.DoEvents()<br />
Me.Refresh()<br />
...<br />
<br />
<br />
Public Function CreateProcess_Internal(ByVal ExeName As String, ByVal CmdLine As String) As Boolean<br />
<br />
Dim result As Int32<br />
Dim si(128) As Byte<br />
Dim pi As New ProcessInfo<br />
<br />
<br />
result = CreateProcess(ExeName, CmdLine, _ <br />
IntPtr.Zero, IntPtr.Zero, 0, 0, IntPtr.Zero, _<br />
IntPtr.Zero, si, pi)<br />
If result = 0 Then Return False<br />
<br />
result = WaitForSingleObject(pi.hThread, WAITNORM)<br />
<br />
CloseHandle(pi.hThread)<br />
CloseHandle(pi.hProcess)<br />
pi = Nothing<br />
<br />
If result <> 0 Then Return False<br />
Return True<br />
<br />
End Function<br />
Sleep is for the WEAK!
-- modified at 9:14 Wednesday 14th June, 2006
|
|
|
|
|
hellow to all ..
i have 2 project in VB.NET now i wanna copy a form from project 1 to project 2 , and keep it 100% full functions , how can i do this ?
thxx for anyhelp ..
|
|
|
|
|
hi
if you don't use any clases or DLLs its should be doce
by copy the from from project1 from the solution explorer
and paste it into ptoject2 in the solution explorer
Tamimi - Code
|
|
|
|
|
right-click on your project add new existing item
................
|
|
|
|
|
i have image stored in the sql database .how can i display image in windows form in the picture box.please help. taher
|
|
|
|
|
http://www.akadia.com/services/dotnet_load_blob.html
|
|
|
|
|
SORRY may my way to wright in english annoying you , but its my best
I need a code for accessing every bit of image file with extinsion(Bmp)
to know what its spicifated RGB value is
Mido
|
|
|
|
|
Use the Bitmap.GetPixel(x,y) method, this will return the Color structure.
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
I need RGB values from file source itself by accessing its byts
without display it in picturebox
with an example please!!!
im using vb6
Mido
|
|
|
|
|
I don't know VB6 but I assume you can use GDI which has some functions to access pixel's RGB value.
Search google for examples
--------------------------------------------------------
My portfolio & development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
Thanks alot
|
|
|
|
|
Hello,
I'm trying to get the group in which a user is sitting. I searched and found an artikle here. Converted it from c# to VB.NET.
This is the code:
Private Function GetADUserGroups(ByVal userName As String) As String
Dim search As sys.DirectorySearcher = New sys.DirectorySearcher
search.Filter = String.Format("(cn=*)", userName)
search.PropertiesToLoad.Add("memberOf")
Dim groupsList As System.Text.StringBuilder = New System.Text.StringBuilder
groupsList.Append("test")
result = search.FindOne()
If Not result Is Nothing Then
Dim groupCount As Integer
groupCount = result.Properties.Count
MessageBox.Show(groupCount)
Dim counter As Integer
For counter = 0 To groupCount - 1 Step counter + 1
groupsList.Append(CType(result.Properties("memberOf").Item(counter), String)) groupsList.Append("|")
Next
End If
groupsList.Length -= 1 'remove the last "|" symbol
Return groupsList.ToString()
End Function
if i try to run it i get a System.NullReferenceException in the for loop.
does anyone know what the problem is?
any other ideas are welcome.
thanks in advance
Bis
|
|
|
|
|
Hi,
I would like to give some suggestions so that i will work for you, as i have changed the same in my testing environment and it is working . . .
Include the following line as the first line inside the function
Dim entry As New DirectoryEntry("LDAP://<domainname.com>")
Change the second line as follows
Dim search As DirectorySearcher = New DirectorySearcher(entry)
include a if condition inside the for loop and it should appear like this
<br />
For counter = 0 To groupCount - 1 Step counter + 1<br />
If result.Properties.Contains("memberOf") Then<br />
groupsList.Append(CType(result.Properties("memberOf").Item(counter), String)) <br />
groupsList.Append("|")<br />
End If <br />
<br />
Next<br />
<br />
i hope you would have declared result as search result<br />
<br />
Hope this will
|
|
|
|