|
i am facing an error: "can not create activex control."
while creating a activex directory user home folder.
the code is as below:
Dim oContainer As ActiveDs.IADsContainer
Dim oUser As ActiveDs.IADsUser
Dim strFirstName As String
Dim strLastName As String
Dim strSAMAcctName As String
Dim strPassword As String
'Dim oGroup As DictionaryEntry
strFirstName = "First" 'Trim(Me.txtFirstName.Text)
strLastName = "Last" 'Trim(Me.txtLastName.Text)
strPassword = "password"
strSAMAcctName = LCase(Left(strFirstName, 1) & strLastName)
oContainer = GetObject("LDAP://dc=abc,dc=com")
oUser = oContainer.Create("user", "cn=" & strFirstName & " " & strLastName)
oUser.Put("displayName", strFirstName & " " & strLastName)
oUser.Put("FirstName", strFirstName)
oUser.Put("LastName", strLastName)
oUser.Put("sAMAccountName", strSAMAcctName)
oUser.Put("userPrincipalName", strSAMAcctName & "@abc.COM")
oUser.EmailAddress = strSAMAcctName & "@abc.com"
'oUser.homedrive = "U:"
oUser.HomeDirectory = "\\192.168.87.154\Home-drive\" & strSAMAcctName
Try
oUser.SetInfo()
Catch
MsgBox("User Already Exists", MsgBoxStyle.Critical, "UserExists!")
End Try
Try
If oUser.AccountDisabled = True Then
oUser.AccountDisabled = False
oUser.SetInfo()
End If
Catch ex As Exception
MsgBox("Error trying to enable account", MsgBoxStyle.Critical, "Enable Account Failed")
'Me.txtResults.Visible = True
End Try
Try
oUser.SetPassword(strPassword)
oUser.Put("pwdLastSet", 0)
oUser.SetInfo()
Catch ex As Exception
MsgBox("Error trying to enable account", MsgBoxStyle.Critical, "Enable Account Failed")
End Try
Jayesh Talsaniya
|
|
|
|
|
So, on which line does this thing blow up?
|
|
|
|
|
i am facing an error: "can not create activex control."
while creating a activex directory user home folder.
the code is as below:
Dim oContainer As ActiveDs.IADsContainer
Dim oUser As ActiveDs.IADsUser
Dim strFirstName As String
Dim strLastName As String
Dim strSAMAcctName As String
Dim strPassword As String
'Dim oGroup As DictionaryEntry
strFirstName = "First" 'Trim(Me.txtFirstName.Text)
strLastName = "Last" 'Trim(Me.txtLastName.Text)
strPassword = "password"
strSAMAcctName = LCase(Left(strFirstName, 1) & strLastName)
oContainer = GetObject("LDAP://dc=abc,dc=com")
oUser = oContainer.Create("user", "cn=" & strFirstName & " " & strLastName)
oUser.Put("displayName", strFirstName & " " & strLastName)
oUser.Put("FirstName", strFirstName)
oUser.Put("LastName", strLastName)
oUser.Put("sAMAccountName", strSAMAcctName)
oUser.Put("userPrincipalName", strSAMAcctName & "@abc.COM")
oUser.EmailAddress = strSAMAcctName & "@abc.com"
'oUser.homedrive = "U:"
oUser.HomeDirectory = "\\192.168.87.154\Home-drive\" & strSAMAcctName
Try
oUser.SetInfo()
Catch
MsgBox("User Already Exists", MsgBoxStyle.Critical, "UserExists!")
End Try
Try
If oUser.AccountDisabled = True Then
oUser.AccountDisabled = False
oUser.SetInfo()
End If
Catch ex As Exception
MsgBox("Error trying to enable account", MsgBoxStyle.Critical, "Enable Account Failed")
'Me.txtResults.Visible = True
End Try
Try
oUser.SetPassword(strPassword)
oUser.Put("pwdLastSet", 0)
oUser.SetInfo()
Catch ex As Exception
MsgBox("Error trying to enable account", MsgBoxStyle.Critical, "Enable Account Failed")
End Try
Jayesh Talsaniya
|
|
|
|
|
hi all,
Anyone know how to edit the listview in specify of column?
I just know this code only
ListView1.LabelEdit = True
this code is for the first of the column in listview which can be edit only but for the another column are can not to be edit!
so, anyone know this?
Please help!
|
|
|
|
|
The standard control doesn't alolow for this. You can find examples on how to make your own version that extends the functionality of the standard control with a simple Google search[^] for "listview edit columns".
|
|
|
|
|
Hi! All,
Among two, One of My VB6.0 application dwonloading CSV files from a source and aother VB6.0 application is reading CSV file line to line & updating the database. My problem is that when download is still going on, the reader application starts reading this uncomplete dowload file and soon it reaches end of the file, as reading is faster than the dowload. Can any one tell me any method to check whether the complete download has been done or not?
Thanks and Regards,
Virendra
|
|
|
|
|
Well you can:
(1) Use some sort of IPC (Inter-Process-Communication: a simple approach maybe using custom window messages).
(2) Make the downloading application locking the file: the reading one will wait until reading access is granted
(3) ... (don't limit you imagination...)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
hi..
Before downloading the File, Delete the File Name if Present (using
Kill).
Down Load the File Name with Different "Temp" Name and After Complete
down Load Re-Name the File to actual Name(Using "FileCopy") .
While Reading, Check if the File Name is Present or Not. Put In a "Do
Loop" using "DoEvents", till u find the File, If it is still
DownLoading, File Will not be present. After down load completion, File will be
found and you can Start reading.
Here u have to take care to Come out of
"Do-Loop" after Few Iterations(by keeping a Counter), otherwise if
DownLoad takes more time or Down Load is not successfull, then ur Program
may go into EndLess Loop.
Regards
Desperate
|
|
|
|
|
Desperate is right. Download the file to a temporary filename first, then rename it to what your other app is expecting. Either that, or combine the two applications into one so your code knows exactly when the file is done downloading. This, of course, depends on your code actually handing the download instead of relying on the functionality of something like IE to do it for you.
|
|
|
|
|
Hi...........
I want to do streaming of video file in VB.NET.
All video files are on Server & when client ask for any video, that video get played on client side.
How I do this.
Thanks in advance.
|
|
|
|
|
Add a link to the video file to your web page and let the client load it's own media player to play it?
|
|
|
|
|
hello, i am a final year MCA student. Now i am going to do a mini project. i have selected my mini project title. that is videoEx streamer. that process of transmitting a multimedia files at the real time,and than to prevent the downloading of multimedia files,and power is switched off when loading of multimedia files,when power is come at the time resume the loading of multimedia files where it stop.
i need your help, please give a idea about VideoEx streamer.
G.KUMARESAN MCA
|
|
|
|
|
hello, i am a final year MCA student. Now i am going to do a mini project. i have selected my mini project title. that is videoEx streamer. that process of transmitting a multimedia files at the real time,and than to prevent the downloading of multimedia files,and power is switched off when loading of multimedia files,when power is come at the time resume the loading of multimedia files where it stop.
i need your help, please give a idea about VideoEx streamer(NEAD A SAMPLE SOURCE IN ASP.NET AND WRITTEN LANGUAGE IS CSHARP.NER).
my email :
1. kumaresang_123@yahoo.com
2. info.kmrsng@gmail.com
G.KUMARESAN MCA
|
|
|
|
|
hello, i am a final year MCA student. Now i am going to do a mini project. i have selected my mini project title. that is videoEx streamer. that process of transmitting a multimedia files at the real time,and than to prevent the downloading of multimedia files,and power is switched off when loading of multimedia files,when power is come at the time resume the loading of multimedia files where it stop.
i need your help, please give a idea about VideoEx streamer(NEAD A SAMPLE SOURCE CODE IN ASP.NET AND WRITTEN LANGUAGE IS CSHARP.NET ).
my email :
1. kumaresang_123@yahoo.com
2. info.kmrsng@gmail.com
G.KUMARESAN MCA
|
|
|
|
|
I'm scraping a web page that requires the proper cookies, viewstate, and URL QueryString to be set as part of the POST. I replicated these values and get a successful response while the Microsoft Fiddler tool is running. When I run my code while Fiddler is NOT running, the GetResponse method of my HttpWebRequest object generates a System.Net.WebException (403 Forbidden.)
Does anyone know what Fiddler might be doing (explicitly or implicitly) that would cause my request to work with the same exact code that fails when it isn't running?
Thanks in advance!
|
|
|
|
|
Wow... I'm hearing crickets! Should I have posted in Web Dev instead? I know I didn't post code, but I felt it would be more of a distraction since the code does actually run successfully as long as Fiddler is acting as the proxy.
I'm hoping someone out there has experienced something like this and can give me a high-level overview of what was wrong. If I need to provide more info, I'll gladly oblige.
|
|
|
|
|
Instead of hoping someone who uses Fiddler comes along here, you might want to try on the discussion boards for Fiddler[^], where it's much everyone who uses Fiddler!
|
|
|
|
|
Say i wanted to create a custom listbox with multiline functionality, how would i go about it. I'm totally new to developing custom controls and i would like to know how to work with collections etc. For instance, would i have to create seperate classes for each item or, what exactly would i have to do to incorporate a collection.
Posted by The ANZAC
|
|
|
|
|
|
perhaps i didn't phrase it correctly, i would like to understand how to make something like this from scratch, I understand that inheriting is an option to add functionality to an existing control. What i want is to make an entirely new control. This control needs to support multiple layers of objects like a treenodecollection, yet i would like to add additional properties to each node that would be used by the other controls.
Do i need to create a seperate control that inherits treenode and add the additional properties.
If I do do this, how do i make the collection editor add this instead of the default treenode.
Posted by The ANZAC
|
|
|
|
|
Wow. You're asking a huge question. There is no one source for learning how to make custom controls from scratch, just like there is no one source for learning how to make Windows Forms apps.
What's usually forgotten on people new to programming, or with little experience, is that the UI portion of an app or control makes up less than half the total code. The primary function of either of these code bases is data management.
Just about everyone who plays them doesn't realize that games are some of the most specialized, high-performance database applications you'll find.
The questions becomes how are you going to manage the data that the control is going to render? Are there any controls that you can use as a base that approximate what you want to do? If so, then a large chunk of your work is done. Why reinvent the wheel?
I don't have any articles or websites that tell everything about making custom controls. These are topics that can take up entire books. What you need to be doing is research. Picking up the books on VB.NET/C#/Whatever and going through them. Finding different custom controls and seeing how they work. Pick them apart and study them. Did you know that the Form class is nothing but an implementation of Control? Hmmm...
That's how I figured it out...
|
|
|
|
|
Yeh i figured as much. I may as well just tell you what i intend to do once i get more experience. The other day i was trying to figure out how to build those chm help files and figure out why it why it was so annoying to find ou how to do it and why the hell it all had to be external, so i set about making a control that has a treeview, header and content that would act like a chm help file but could just be added to a help form.
It will work off the treenodes because these can have many nested child items and layers, the only thing i need to add to the treenode itself is another collection to deal with sub Header's and contont on that particular page. Once each item can have sub headers and content in a collection, I will be able to have nested layers of help content. The two problems i'm having is building in the collection in the treenode and setting the treeview to use the custom treenode. I've added the collection Property and the like but that's as far as i've gone.
I realised it was going to be hard from the start but i will perservere, I start with something easier and work up.
At the moment i'm trying to change the menubar to be consistently glass looking on highlight etc.
Posted by The ANZAC
|
|
|
|
|
This is something that the control wouldn't normally store any data for. Well, at least not beyond an index of topics for the tree. You could do this by typing all your documentation up and storing it in a well-designed XML document. Load the tree information from the XML file for the treeview, then justhandle the click events and display the content loaded from the XML file(s) in a RTB or WebBrowser control.
The problem you're going to run into is creating another tool to actually write the documentation in, almost like a content management tool you'd find for web sites. So, you might want to look into existing tools to write your documentation and look into the file formats for the help files they output. Then write your control to handle those particular formats.
|
|
|
|
|
Ok Thanks a heap for all your help. BTW do you think an inbuilt help such as this is a good idea?
Posted by The ANZAC
|
|
|
|
|
It's up to you. If the current generation of tools and content capability just doesn't meet your needs, there's nothing wrong with inventing your own. Then the question becomes "Is it worth the time to develop it?"
|
|
|
|