|
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
|
|
|
|
|
Thanks for the reply, but still have some problems
Made the changes you told me, but still doesn't work. Maybe it's the given username. I just give eg John. Is this correct or do you need to specify your domain as well?
Bis
|
|
|
|
|
Hi,
Try giving the domain name with the com extension. then you will get it
Sasidar
|
|
|
|
|
After some tests, i noticed that the code in the If condition never gets executed. So in other words, the property memberOf is not available.
What can i do to get it available?
Thanks in advance
Kris
|
|
|
|
|
Kris,
Can you post your code here so that let us have a look ?
Sasidar
|
|
|
|
|
Hello,
I've got a form that I create to show certain information about a specfied ClientID. I also load a combo box of all the Clients, so that the user can also pick up (and use) information that is currently associated with other clients.
When I load the combo box of all Clients, I also want to set the Combo box to show the specified client, for continuity. I can't seem to work out how to do this!
A brief overview of how I load the combo box is as follows:
<code> Dim strProc As String = "usp_ClientSubDetails_LoadControls"
Dim dsClients As New DataSet
Dim drClients As DataRow
Dim iRowCtr As Integer = 0
Dim iSelectionVal As Integer = 0
Dim iLoop As Integer ' to find the client in the combo box
'return dataset with client list in it
If Not fncConnectSelectDataset(strProc, CommandType.StoredProcedure, dsClients, sysSystemData.SchedulerDb) Then
strError = strProc
Return False
End If
'make sure there's records in the table
If dsClients.Tables(0).Rows.Count = 0 Then
strError = "No Rows Returned"
Return False
End If
For Each drClients In dsClients.Tables(0).Rows
'DataLoader is a class that has an ID property and a DisplayValue property
Me.cboClients.Items.Add(New DataLoader(drClients.Item(0), drClients.Item(1)))
Next
Me.cboClients.DisplayMember = "DisplayValue"
Me.cboClients.ValueMember = "ID"
</code> <font color="Black" face="Verdana">This gives me a combo box loaded with a bunch of DataLoader objects. By doing </font> CType(cboClients.SelectedItem,DataLoader).ID
<font color="Black" face="Verdana"> I can retrieve the ClientID... I just don't know how to set it, so that if I've told the Form to load details for ClientID 15, it also selects ClientID 15 from the combo box.<br />
<br />
Your help is gratefully appreciated.<br />
<br />
Regards,<br />
<br />
Tom<br />
</font>
|
|
|
|
|
try cboClients.Items.FindByText("TheText").Selected = True Or cboClients.Items.FindByValue("TheValue").Selected = True
oops! I think you asked for windows forms. I have answered for asp.net. Sorry.
Last modified: 14-June-2006 6:39:52 AM --
|
|
|
|
|
You're correct, it is Windows Forms.
I can do cboClients.FindValue, but I don't have the string!
|
|
|
|
|
Can't you use
Overloads Public Function FindStringExact(String) As Integer
|
|
|
|
|
I may well be being incredibly dense, but I don't know the string; I only know the ID of the Client. So I wouldn't have a String to pass the function, right?
Thanks for your help so far!
Tom
|
|
|
|
|
Maybe you could loop through each of the elements in the combobox and set the Item with the client id selected.
Something like this...
Pseudocode
for each item in combobox.items<br />
if item.value = clientid then<br />
item.selected = true<br />
end if
|
|
|
|
|
Thanks Dinuj... Your pseudocode got me there in the end....
Dim dl As DataLoader
For Each dl In cboClients.Items
If dl.ID = ClientID Then
cboClients.SelectedItem = dl
End If
Next Nice one! Give this man a cigar!!
Regards,
Tom
|
|
|
|
|
mincefish wrote: Nice one! Give this man a cigar!!
Glad to be of your help.
|
|
|
|
|
hi i new on this forums and one of beginner in visual basic programming
i need some help 4 my project:
1.what should i do to crop a part of image/picture in picture box
2.how make a color filter in picture?
3.what color in pixel(x,y) and mark it?
thanx a lot
ndox
yahikjsaklfjsdakldxznvc,xznvklsdjfksdcklsdjfklsdjfklsdjfkljsdlkfjsdlk
|
|
|
|
|
1 - use DrawImage on the graphics class to make a cropped copy. Or better yet, ditch the picture box and draw it yourself.
2 and 3 - read my image processing for dummies articles, they are on this site.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
what about automatically crop/copy,while we run the program there are some part of my picture
if u could give me some related program i really apreciate it
thanx
ndox
|
|
|
|