|
We have had a similar problem with LDAP queries and got Microsoft involved as a support call. Basically by using VB we see the errors. When we convert the code to C# the error disappears. There is definitely some difference in the emitted CLR code between the VB and C# compilers.
There isn't an official fix yet (maybe some time off) so I suggest trying the query in C# to see what if any difference this makes in your case - especially since you seem to have tried most avenues already.
...Steve
"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." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once
|
|
|
|
|
Thanks for your comments steve. Do you have any idea about the method of communication used by my VB application is SASL and this service is not configured in the LDAP server. Will this could be the reason not getting connected. Is there any other chance of changing the communication method to 128 which is simple authentication from VB? You can find the details of SASL in the log of my last mail.
Thanks for your help
Vivek
|
|
|
|
|
itvivek5340 wrote: Do you have any idea about the method of communication used by my VB application is SASL and this service is not configured in the LDAP server.
Sorry - no idea. Just know that the LDAP query works for us in C# but not VB. I didn't personally get involved with the diagnosis at my site. Maybe someone else on this board can give you those details.
...Steve
"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." (Translation: I'll show you the way, but not write the code for you.) I read that somewhere once
|
|
|
|
|
Hello!
I am trying to create a code which should create a new address entry in Windows' Address Book? Also same for the outlook Express...
Any Idea?
Thank a lot!
Bedri
|
|
|
|
|
|
I am using VB .NET 2005.
I have a tab control in my form and the tab control contains 4 tab pages. Each tab page has different controls in it.
If my selected (current) tab is 3rd tab and I set the focus to a child control in first tab page by using
ControlName.Focus()
The control does not fire any Enter/GotFocus event
Is there anyway to set the SelectedTab or SelectedIndex of the TabControl to the TabPage in which the Control to be focused exists.
Waiting for a quick reply.
Thank You.
-- modified at 12:14 Thursday 26th January, 2006
|
|
|
|
|
Here's a few quick tips...
You can change the tab selection like this.
myTabControl.SelectedTab = myTabPage
You can find out which TabPage a control belong's to by searching the TabPage.Controls collection.
Also, the control's Parent property "might" return a reference to the TabPage that owns it. You'll have to test that one out to be sure.
|
|
|
|
|
Thank you for your reply.
I have tried by setting the tag property of each control on the tab page to the index of its tab page (i.e. 0 for controls on first tab, 1 for second etc.) at design time.
Then I have dynamically associated the event handler for "Enter" event of each control on the tab page. Event handler looks like
TabControl1.SelectedIndex = DirectCast(sender, Control).Tag
But the control does not get focus when I call the .Focus() method
I don't want to explicitly call the TabControl1.SelectedIndex before setting Focus to any control. Is there anyway?
|
|
|
|
|
Calling Focus() won't change the tab selection. Plus a control won't gain Focus if it's not visible. You're going to have to show the tab page yourself.
Now, if you want to keep it generic, I suppose you can do something like this. Just pass the control you want to give focus to in this function. It's just that easy.
Private Sub SetControlFocus(ByVal ctrl As Control)
' Validate argument.
If (ctrl Is Nothing) Then Return
' If control belongs to a tab page, then show it.
If (TypeOf ctrl.Parent Is TabPage) Then
myTabControl.SelectedTab = DirectCast(ctrl.Parent, TabPage)
End If
' Give control focus.
ctrl.Focus()
End Sub
|
|
|
|
|
I don't know if this problem has already been addressed or not, so please forgive me.
We all know that if we have more than one application running we can toggle through them by press the key combination alt+tab and a little window will show up showing us the icons of every application running. We press alt+tab to move from icon to icon until we find the one we want and then we release the alt and tab keys and we go right to the application we selected.
When I'm running a VB project and I toggle from the running application to another I noticed the Icons I designed have for the VB project don't show up in the tab window. It is just the standard VB icon for a form. How do I set it so it shows my icon?
Thank you,
Quecumber256
|
|
|
|
|
Did you set the Icon property of your form to one of these icons?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Yes. I have it in the Sub Form_Load. Here is the code snippet.
frmCreateDoc.Icon = LoadPicture(App.Path & "\Create32.Ico")
It shows the icon of the form, but not on the alt+tab.
Thank,
Quecumber256
|
|
|
|
|
LoadPicture, or whatever you're using isn't going to work. You actually have to use the Icon class.
frmCreateDoc.Icon = New Icon(Path.Combine(App.Path, "Create32.ico"))
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
frmCreateDoc.Icon = New Icon(Path.Combine(App.Path, "Create32.ico"))
Sorry, this gave me a compiler error. Expected end of statement.
Am I missing some required component or resource?
Thanks,
Quecumber256
|
|
|
|
|
Imports System.Io at the top of your code.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Dave,
Received another compiler error. Method or data member not found.
Obviously I don't know exactly where this will go. Is it in the General Declarations are? The Sub Main as a defined as a public class?
Thanks again,
Quecumber256
|
|
|
|
|
I just assumed you would be putting the ...Icon= line in the same place at the one you posted. That line MUST go in some Sub or Function somewhere, usually inside the Form.Load event handler.
Damn! Sorry! The Icon class is in the System.Drawing namespace. Make sure you add a Reference to System.Drawing.dll.
Imports System.Io
Imports System.Drawing
Public Class Form1
Private Sub Form_Load(blah, blah) Handles MyBase.Load
Me.Icon = New Icon(Path.Combine(Application.StartupPath, "myIcon.ico"))
End Sub
End Class
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 20:48 Thursday 26th January, 2006
|
|
|
|
|
I am now completely lost. I added the reference to the System.Drawing.dll. When I try to do a full compile the VB doesn't recongnize either the .Io or .Drawing properties.
I think I'm going to have to have step by step instructions on how to use this.
Thanks for your help,
Quecumber256
|
|
|
|
|
Does your icon have a 32x32x256 color image in it?
After that, I have no idea what's wrong. I've never had the problem you're having.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Why not just set the forms Icon property in the designer?
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
My Blog[^]
|
|
|
|
|
Hi Ray,
I tried that. I even set the icon in the Form_Load event using code. The icon I designed for my application still does not show in the alt+tab window when toggleing through running applications.
Quecumber256
|
|
|
|
|
I tried it and it says its read only. Is there a way to change the style at runtime programmatically?
thanks,
sb
|
|
|
|
|
No, it's read only!
You can stack a couple of ComboBoxs on top of eachother if you want, set the Visible properties to False and just set the one you need to show at that time to True.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
That I can do. Thanks for the idea,
sb
|
|
|
|
|
I have an application that has a treeview setup. Depending on the node selected on the treeview a datagrid is loaded with appropriate data from SQL.
At this point the treeview shows with the node highlighted and the datagrid is displayed with the data.
I want to have the cursor positioned in row 0 column 1. I tried the following logic:
DataGrid.CurrentCell = New DataGridCell(1, 0)<br />
DataGrid.Focus()
I'm having no success finding the correct syntax.
Any suggestions?
Lost in the vast sea of .NET
<a href="http://www.komputing.com/Pricelist.html">Visit my website at www.komputing.com</a>
|
|
|
|