|
He's using VB6, not VB.NET.
|
|
|
|
|
Yep, that info was his modification after the reply.
|
|
|
|
|
Ah! I'm comming in late to the game.
|
|
|
|
|
Don't worry, lot's of effective play-time left
|
|
|
|
|
You shouldn't try to set the regional settings off the pc instead set the thread's culture setting to US language (as Mike suggested).
To do this you need to add the code to the application startupevent or before the initializecomponent methode of your main form otherwise parts off your program will not have the right setting.
System.Threading.Thread.CurrentThread.CurrentCulture = New Globalization.CultureInfo("language goes here")
System.Threading.Thread.CurrentThread.CurrentUICulture = New Globalization.CultureInfo("language goes here")
the "language goes here" part is most likely to be "en-US" for you but I'm not sure about that.
|
|
|
|
|
Hi Tom
Thank You, I need help for VB 6.0.
Thanks
|
|
|
|
|
I don't program in vb6.0 so I can't help you with that.
I don't think you can do something like setting the threads culture in vb6.0 so you'll probably have to manipulate the computer regionals settings, but don't know how you would do that.
|
|
|
|
|
Changing the system settings to do this is extrodinarily bad practice.
If you're looking to localize your application, have a look at this[^]. VB6 is very limited when it comes to localization. I would suggest moving up to VB.NET if at all possible.
|
|
|
|
|
I'm performing a sweep of my network by checking the AD and pinging machine listed. I'll be doing a lot more with this later, but for now I'm trying to see if a PC is disabled in the AD so I wont waste time pinging it. I've done a bit of work with writing scripts to query the AD, but VB is different enough to confuse me in a few places.
This is what I have so far. I have the spot marked where I need help.
Private Sub Sweep()
Dim dlgres As String
dlgres = MessageBox.Show("Do you wish to continue?", _
"Continue?", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If dlgres = DialogResult.Yes Then
lbComputers.Items.Clear()
Dim DirEntry As New DirectoryEntry("LDAP://" & tbDomain.Text)
Dim DirSearch As New DirectorySearcher(DirEntry)
Dim strPcName As String
Dim strPcOutput As String
Dim strPcStatus As String
Dim intcounter As Integer
DirSearch.Filter = "(objectClass=computer)"
intcounter = 0
For Each sr As SearchResult In DirSearch.FindAll
intcounter += 1
strPcName = sr.GetDirectoryEntry.Name.ToString.Substring(3)
*********************************************************************************
This is where I want to see if a PC is Disabled. I can add the If routine later.
strPcStatus = (Code to determine if disabled)
(maybe some form of sr.GetDirectoryEntry.something...?)
**********************************************************************************
(If Not Disabled)
Try
If My.Computer.Network.Ping(strPcName, 100) Then
'If You Can Ping The PC
strPcOutput = String.Concat(strPcName, " <--- Active")
lbComputers.Items.Add(strPcOutput)
'MessageBox.Show(strPcOutput)
Else
'If You Can't Ping The PC
strPcOutput = String.Concat(strPcName, " <--- Not Active")
lbComputers.Items.Add(strPcOutput)
'MessageBox.Show(strPcOutput)
End If
Catch
'If You Can't Resolve The IP To Ping The PC
strPcOutput = String.Concat(strPcName, " <--- Cannot Resolve")
lbComputers.Items.Add(strPcOutput)
End Try
pbProgress.Value = ((intcounter / intNumPCs) * 100)
Next
lbComputers.SelectedIndex = 0
intNumPCs = lbComputers.Items.Count
lblNumPCs.Text = "# of PC's in AD = " & intNumPCs
End If
End Sub
I'm sure it's simple.
|
|
|
|
|
Well, I don't have any code to show you, but you need to check the "User-Account-Control" property of the Computer account to see if a flag is set. This means doing some math to see if a certain bit is set, specifically, the AccountDisabled bit is &h00000010, or in decimal, 2. If the UAC value you get back is, say, 511, you can do this to find out if the AccountDisabled bit is set:
Dim disabled As Integer = uacValue And &H00000010
If disabled = 2 Then
' The account is disabled
End If
|
|
|
|
|
Hi All,
I need code or way so I can insert any text or number into textbox and convert it to barcode format. any help plz
Regards
|
|
|
|
|
Search the forums, there are lots of posts like this and fonts that will do the job
Searching[^] will help you come up with a lot of answers, code39 is the most popular from a quick search of the forums[^]
|
|
|
|
|
Yes, this question comes up all the time and the same answer of "have the decency of doing a search" generally bubbles up.
It probably took more time to create the post and using the search button. Sigh.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
thanks I do this already, but no answer found.
regards
|
|
|
|
|
|
Then you didn't really do a search. Seriously, this has been so over-documented that you can't help but to find answers.
Google results for "VB.NET number to barcode"[^].
|
|
|
|
|
Glad we could 'service' you and thanks for the "wonderful" score Mr. Wonderful. snicker...snicker
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
This is where this question belonged, but you cross posted to the ASP.NET forum. Please don't crosspost.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
this forum founded to service us, so I don't think so it is a problem when posting this question here or in ASP.Net especially when I'm searching for a right answer, anyway it is vb.net code!.
Thanks
|
|
|
|
|
If it is vb.net code, then post in the vb.net section. This forum is here to *HELP* you, not service you. It is here as a bonus, not a requirement. Your solution has been posted, stop antagonizing people at this point.
|
|
|
|
|
So leave this question and save your time, anyway I get the answer. thanks for all helping me not [service me] !.
|
|
|
|
|
-=adds Mr. Wonderful to his "special boneheads to ignore in the future" list=-
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
don't say bad words, this is just misunderstanding, I just simply post question and I need to answer. for all people that reply to me I just Messed some lines when reading quickly their replies and maybe this lead to this misunderstanding, So please Don't bothers and let us just finish this Question.
Regards for All .
|
|
|
|
|
Which only goes to show that you really have no idea about the etiquette of these forums. You need to learn what is regarded as polite by the people who answer here, if you want us to do your work for you.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
http://www.idautomation.com/formscontrols/free/FormsControlManualFreeVersion.html
|
|
|
|