|
The one thing you have not shown us is the actual code that reads the password string.
|
|
|
|
|
Here's the code that Dave has given to me (I changed it a little bit):
Imports System.DirectoryServices.AccountManagement
Module Module1
Sub Main(ByVal args() As String)
Dim isWithAD As Boolean
Try
Dim pc As PrincipalContext = New PrincipalContext(ContextType.Domain, "xx.xx.xx.xx")
Using (pc)
isWithAD = pc.ValidateCredentials(args(0), args(1))
End Using
Console.WriteLine(IIf(isWithAD = True, "Success", "Failed"))
Catch ex As Exception
Console.WriteLine("Error [" + ex.ToString + "] - " + ex.InnerException.ToString)
End Try
End Sub
End Module
The syntax is: CLDAP <username> <password>.
Ex:
CLDAP john_smith 12345
CLDAP "john_smith" "12345"
CLDAP 'john_smith' '12345'
All examples are valid and return a true value. Caret character can be accepted if it is placed in the beginning or in the middle of the password. But, if a caret character is placed at the end of the password, that's where the problem starts 
|
|
|
|
|
You just need to put the password in double quotes:
cldap userid "passwd^"
|
|
|
|
|
Normally, you would never type a password on the command line.
You would prompt for it from the application after it's launched. The application can then accept the password without exposing it, replacing characters on screen with some other character or none at all.
|
|
|
|
|
Hi,
I can find the headertext with
Dim lvg As New LVGROUP()
lvg.cbSize = CUInt(Marshal.SizeOf(lvg))
lvg.mask = LVGF_STATE Or LVGF_GROUPID Or LVGF_HEADER Or LVGF_FOOTER
Dim nRetHeader2 As Integer = SendMessage(m.HWnd, LVM_GETGROUPINFO, nItem, lvg)
Dim sHeadText As String = Marshal.PtrToStringUni(lvg.pszHeader)
Dim sFootTxt As String = Marshal.PtrToStringUni(lvg.pszFooter)
however the foottext is always empty.
same for pszDescriptionTop and pszDescriptionBottom
I set the footer with some code I found on the net
Private Shared Sub SetGrpFooter(ByVal lstvwgrp As ListViewGroup, ByVal footer As String)
If Environment.OSVersion.Version.Major < 6 Then Return
If lstvwgrp Is Nothing OrElse lstvwgrp.ListView Is Nothing Then Return
If lstvwgrp.ListView.InvokeRequired Then
lstvwgrp.ListView.Invoke(New CallbackSetGroupString(AddressOf SetGrpFooter), lstvwgrp, footer)
Else
Dim GrpId As System.Nullable(Of Integer) = GetGroupID(lstvwgrp)
Dim group As New LVGROUP
group.CbSize = Marshal.SizeOf(group)
If (footer = String.Empty) Then
group.PszFooter = Nothing
Else
group.PszFooter = footer
End If
'lstvwgrp.HeaderAlignment = HorizontalAlignment.Center
'group.pszDescriptionBottom = "bottom" & Chr(0)
'group.pszDescriptionTop = "top"
<pre>
group.mask = ListViewGroupMask.Footer + ListViewGroupMask.DescriptionBottom + ListViewGroupMask.DescriptionTop
Dim ip As IntPtr = Marshal.AllocHGlobal(group.cbSize)
Marshal.StructureToPtr(group, ip, False)
If GrpId IsNot Nothing Then
group.IGroupId = GrpId.Value
SendMessage(lstvwgrp.ListView.Handle, LVM_SETGROUPINFO, GrpId.Value, ip)
Else
group.iGroupId = GrpId
SendMessage(lstvwgrp.ListView.Handle, LVM_SETGROUPINFO, GrpId.Value, ip)
End If
End If
End Sub</pre>
I also can't find the rectangles of where I have to draw the texts
What do I do wrong?
Jan
|
|
|
|
|
Where are the programmers geniusses from before?
|
|
|
|
|
JR212 wrote: Where are the programmers geniusses from before? Same place they always are. What is your problem?
|
|
|
|
|
Still the same as described in this topic. I need to find out what the footertext is in a listviewgroup in a .dotnet4 program throu user32.dll sendmessage.
Header is no problem but footer alway return 'nothing'
Jan
modified 18-Jun-21 5:30am.
|
|
|
|
|
|
Hi
Sorry but your first link is for the listviewfooter and not listviewGROUPfouter. I gues I need ListView_GetGroupInfo macro (commctrl.h) - Win32 apps | Microsoft Docs but I cant get that to work.
Your question why not use the default control. I do (partely)! I need to work with ownerdraw and the Listview control in dotnet doesn't have support for the groupfooter or the description(top nor bottom). If using dot core 5.0 I can but I need to work with 4.7 or less.
I'm been looking for weeks and can't find a working example for the groupfooter. I can if it is normaldraw so I have a code to set the footer but not to get/retrieve it.
Jan
|
|
|
|
|
|
your absolutly 100% right. But I can't get it to work
modified 24-Jun-21 2:19am.
|
|
|
|
|
JR212 wrote: But I can get it to work Well I am afraid that no one here has any chance of guessing what that means.
|
|
|
|
|
Hi
I've created my own listview with lots of extra options. like colored headers.
Thats where I have a small proplem.
What code has the icon at the right of the header for collapse/expand. I've tryed with this enum
Enum HeaderIconOpenCloseType
'open
arrow1 = 8679
triangle1 = 8711
V1 = 8744
small_v1 = 8964
'closed
arrow0 = 8681
triangle0 = 8710
V0 = 8743
small_v0 = 8963
End Enum
But none of them are exactly the same as the icon the base listview uses.
Small_V commes closes to the real one
Jan
|
|
|
|
|
how to code for clear button and cslculate button
|
|
|
|
|
Start by writing down what you want the buttons to do. Then write the code to do that.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
I use
...
.ListItems(RM).SubItems(D) = ""
.ListItems(RM).ListSubItems(D).ReportIcon = 1
...
the column are just set to center.
modified 21-May-21 8:58am.
|
|
|
|
|
What is your question?
And please don't shout.
|
|
|
|
|
Sorry me.
i need to center icon in a column of listview.
part of code
...
.ListItems(RM).ListSubItems(D).ReportIcon = 1
...
note:
the columns are just set to center align.
|
|
|
|
|
Sal Sal wrote: the columns are just set to center align.
It only means that the subitem will be centered in the column. But image is by default left justified.
If you'd like to change this behavior then you should implement something like owner or custom draw.
|
|
|
|
|
Back in 2014 I responded to a similar question with Quote: AFAIK there is no way to move the icon around unless you create your own custom control - not a pleasant task in VB6. As VB6 hasn't been updated in decades, since going out of support, then nothing will have changed since then.
So create your own custom control is the way forward if you stick with VB6.
|
|
|
|
|
Good morning, there's one implement I want in my project which is an autotyper. Similar to the way KeyPass AutoTyper works, but less advanced disregarding sequences.
I'm trying to code an autotyper which when I press the start button it will simply just await for a text field(like SendKeys.Send), and it will send each character in the string to a text field in order and will stop the autotyper automatically once the entire string was sent.
I tried various methods including using for each character in a string sendkeys, but it always doesn't work properly. For an example, I run the project and go to the Auto Type Form, which is an external form using autotypeform.show, it also has topmost on it so when i go to a browser it's still visible, once you the click start button it starts the autotyper timer in main form, once i go to a text field(google.com search bar for an example) it will sendkeys but not the entire string or it will occasionally skip a character. Can someone please help?
modified 18-May-21 10:00am.
|
|
|
|
|
Don't post the same question multiple times. You already posted this here[^].
|
|
|
|
|
i have some code with c as colour at (x,y) that have vale: ARBG, i compare it to find black colour but i problem like picture. Who can help me fix it?
Private Shared Function IsBlackColor(ByVal c As Color) As Boolean
If (c.R + c.G + c.B) <> 255 * 3 Then
Return True
End If
Return False
End Function
modified 23-Apr-21 9:58am.
|
|
|
|
|
Nobody can help you, because you haven't described the problem you're having.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|