|
Great! You've narrows it down to the new DataGridView. That just increased the number of things you can customize to a few hundred. I'll ask you again...
HOW DO YOU WANT TO CUSTOMIZE THE GRID??
"allow me to click one grid" doesn't make any sense what-so-ever.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
tnx anyway...
|
|
|
|
|
For what? You haven't asked a question anyone can answer. Quite literaly, your asking "how can I customize my car?". I'm asking you what you want to customize. Paint job? Engine? Exhaust? Body work? Interior? Sound system?
The quality of answer you get is directly related to the quality of the question.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all.. i want to download the info from the employee time clock via modem and vb6.. how can i do this??
|
|
|
|
|
kherrerab wrote: i want to download the info from the employee time clock via modem
What do you mean? Can you explain more clearly?
|
|
|
|
|
Google for examples that talk to the serial port. Beyond that, your just sending and receiving data on that port, the modem is just like any other serial device. Try "VB6 Serial Comm".
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How do I use the BrowseInfo structure to say point at "C:\MyDir" ?
typedef struct _browseinfo {
HWND hwndOwner;
LPCITEMIDLIST pidlRoot;
LPSTR pszDisplayName;
LPCSTR lpszTitle;
UINT ulFlags;
BFFCALLBACK lpfn;
LPARAM lParam;
int iImage;
} BROWSEINFO
Apparently its the pidlRoot I need to set but I couldnt figure out how to do it so that it points to where I want it to.
Any sample code I found just had it set to 0.
Thanks,
sb
|
|
|
|
|
Hi all, i dont know if it is posible to use objects declared on a webservice from my app, I declared a class on my webservice (Customer) with a few properties (id, name) and 2 methods (Add, delete).
In my app i can declare an object of type webreference.customer, and i can use its properties, but what i want is to use its methods as well, but methods dont appear on the dropdownlist after object. i only see the properties: object.id and object.name i dont see object.add or object.delete
Someone told me that wasnt posible, since the webservice class only exposes its propeties but not the methods
Any way to use classes declared on a webservice just as if they where declared on my app??
Thank you
Alexei
|
|
|
|
|
I need a Component that has a tree on one side and when we select any node of the tree view, besides it, a page frame gets displayed. its like everytime i click on another node, a new frame window sows up besides. just like having a number of frames put one on top of each other. its like a tab control where you click another tab and another frame can be seen. but i need it so that when i click a node of a tree view, the frame must change. I Think its called a Page Frame in some other language. PLz Help. Thanx!!
Devraj Raut!!!
|
|
|
|
|
|
Hello Everyone,
I am wondering if it is possible to use F9, F10, F11, & F12 as a shortcut key in my web application. I know that IE reserves some of them, but the client would find it useful if we could apply them for the application purpose rather than using Alt+Character.
Has anyone accomplished this without using a 3rd party add-in product?
Thanks for the thoughts-in advance.
SD
|
|
|
|
|
Hi,
I'm trying to create a user interface using VB6 by querying data from MS Access 97.
The case is: For ID number 1, I have 5 transactions to be retrieve and displayed in a listview in VB.
'Sample Access table that I have
ID | Transaction | date
1 | test1 | Jan 01, 2006
1 | test2 | Jan 03, 2006
1 | test3 | Jan 04, 2006
1 | test4 | Jan 06, 2006
1 | test5 | Jan 07, 2006
2 | test7 | Jan 02, 2006
3 | test8 | Jan 03, 2006
4 | test9 | Jan 09, 2006
How can I retrieve the data, for ID number 1, all at once?
Thank you very much.
|
|
|
|
|
wliong wrote: The case is: For ID number 1, I have 5 transactions to be retrieve and displayed in a listview in VB.
http://www.freevbcode.com/ShowCode.Asp?ID=2607[^]
wliong wrote: How can I retrieve the data, for ID number 1, all at once?
SELECT [TableName].ID FROM [TableName] WHERE [TableName].ID = 1
|
|
|
|
|
As part of a new acceptance test checklist for our QA we want to add a check item to insuder that a release candidate has been compiled in release mode ad not in debug mode.
This raises an interesting question: Given a binary file (exe, dll, etc) is there a way to prove the build mode of the file?
Thanks!
--
E
|
|
|
|
|
I'm guessing we're talking about .NET assemblies (EXEs, DLLs) here.
The easiest method would be to have the .NET assembly check itself if it's in debug mode.
#If DEBUG
MessageBox.Show("I'm in debug mode!")
#End If
You can have your app check whether or not other .NET assemblies are in debug mode by doing this.
Dim myAssembly As System.Reflection.Assembly
Try
myAssembly = System.Reflection.Assembly.LoadFrom(".\MyAssembly.dll")
If (myAssembly.GetCustomAttributes(GetType(DebuggableAttribute), False).Length > 0) Then
MessageBox.Show("This is a debug version.")
Else
MessageBox.Show("This is a release version.")
End If
Catch
End Try
|
|
|
|
|
Hi,
I am new to .NET and having trouble writing the code to take values from all the text boxes in one Form and displaying it in Crystal Reports. Right now the report is connected to Access DB and I have dragged all the fields onto the report. Obviously when I run the report now it takes all the data from the DB and dumps it in the report. To make it display just the desired text boxes this is the code I have written but it does not work.
Any help would be appreciated.
Private Sub CrystalReportViewer1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load <br />
<br />
Dim rptdata As New dbAccess <br />
Dim rptval As New Change <br />
<br />
Dim LogNumber1 As Integer <br />
Dim Daterequested1 As String <br />
Dim TargetDate1 As String <br />
Dim Time1 As String <br />
Dim RequestedBy1 As String <br />
Dim ProjectName1 As String <br />
Dim ChangeDescription1 As String <br />
Dim Users1 As String <br />
Dim Department1 As String <br />
<br />
LogNumber1 = rptval.LogNumber <br />
Daterequested1 = rptval.DateRequested <br />
TargetDate1 = rptval.TargetDate <br />
Time1 = rptval.Time <br />
RequestedBy1 = rptval.RequestedBy <br />
ProjectName1 = rptval.ProjectName <br />
ChangeDescription1 = rptval.ChangeDescription <br />
Users1 = rptval.Users <br />
Department1 = rptval.Department <br />
<br />
CrystalReportViewer1.ReportSource = New Chgmgt <br />
<br />
End Sub
|
|
|
|
|
Hi all,
In VB6, is it possible to use a User Defined Type as the return parameter of a method class? I've been trying it and it seems that I can't and also I can't define the Type in the class as Public.
Thanks in advance,
Marc Soleda.
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
marcdev wrote: In VB6, is it possible to use a User Defined Type as the return parameter of a method class?
No. I know it sucks, but that's just the way it works. You should have it return a class object instead.
marcdev wrote: I can't define the Type in the class as Public
That's true too. Public Types are expected to be defined in Modules. Although, I do believe you can define private Types in a class.
|
|
|
|
|
... I'll have to reconsider it seriously and migrate to VB.Net ...
Thanks,
Marc.
... she said you are the perfect stranger she said baby let's keep it like this... Dire Straits
|
|
|
|
|
Good afternoon,
What I did :
I browsed the directories für *.doc, *.pdf and *.txt files. The result I stored in
3 tables Table1, Table2 and Table3. With a query (DocResult), including this 3 tables, I got the result with 3 field ID, DocPath and Document.
Sample:
ID.....DocPath............................Document
125...C:\Document\Lesson.............DOTNET Tutorial.pdf
126...C:\Document\Lesson\Samples.DOTNET Samples.doc
........same directory.....................SQL samples.pdf
127...C:\Help\MIDI\Korg.................01WHowTo.txt
........same directory.....................KorkSamples.pdf
........same directory.....................Kork Basics.doc
and so on..
What I want:
I want to read each record and display the path and documents in a treeview like it is stored on my harddisk.
My code fragment :
dim ConString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\DocBase.mdb"
Dim rs As Object = CreateObject("ADODB.Recordset") 'Create recordset object.
Dim SQL As String = "...SQL String"
Dim Nd As New TreeNode()
Dim newNode As TreeNode
Nd = trv_TempMediaFiles.Nodes.Add("Root", VolumeName) 'Create Root node
rs.open(SQL, ConString, 3, 3) 'Open conection & execute SQL.
rs.movefirst() 'Move to first record.
For I = 0 To rs.recordCount - 1 'S1# loop through all records.
.....
.....
.....
rs.movenext() 'Move to next record.
Next I
rs.Close() 'Close recordset.
rs = Nothing 'Set to default value.
Since 2 weeks I tried to get the correct treenode structure but without success .
Is there anybody who can provide the missing code. My main problem is I am a newbie.
So I can discuss it only on a low level with you.
Thanks in advance Theo
|
|
|
|
|
|
Dear Joshua,
thank very much for your answer.
I read the sample code. But for my understanding it solves my problem only partly. To split the path in into folders I did already.
The problem I have is,
e.g when the last node LESSON in dir "C:\Document\Lesson" ist created and I want to create the next node SAMPLES in the directory "C:\Document\Lesson\Samples" i have to verify whether the path "C:\Document\Lesson" is already existing.
How can I do that ?
One method I heard about is to use a HASHTABLE. I tried this, but I could not understand the relation between HASHTABLE and Treenode. Beginner !
Regards Theo
|
|
|
|
|
You need to do a recursive search through the tree. There's no other way to search a tree with an unknown level of depth.
The TreeView.Nodes collection is your starting point; the root(s) of the tree. You can loop through this Nodes collection using a ForEach statement.
You can get a node's child nodes by calling TreeNode.Nodes. It's a collection too, which you can ForEach through. In fact, this is where recursion will come in happy. You should loop through the child nodes in the same code that loops through the parents.
|
|
|
|
|
I found the solution. This code suppose to work
VB.NET / Framework 2.0
This code is not my mental extract but it works. Only same little modifications I made
If the code doesn't work please let me know.
Public Class FillTreeView
Public Sub initilizeFillTreeView()
Dim i As Integer
Dim arrNames(8) As String
Dim node As TreeNode
arrNames(0) = "C:\Musik\Phil Collins\Live"
arrNames(1) = "C:\Musik\Phil Collins\Live\Lamp Lies down"
arrNames(2) = "C:\Dokumentation\Musik\Phil Collins"
arrNames(3) = "C:\Phil Collins\Dokumentation\Musik"
node = Form1.TreeView1.Nodes.Add(0, "Root")
For i = 0 To 3
addNode(node, arrNames(i))
Next
End Sub
Public Sub addNode(ByVal node As TreeNode, ByVal name As String)
Dim curNode As TreeNode
Dim subString() As String = name.Split("\")
Dim curName As String = subString(0)
Dim nextName As String = ""
Dim i As Integer
subString.Length > 1 Then
For i = 1 To subString.Length - 1
nextName &= subString(i) & "\"
Next
nextName = nextName.TrimEnd("\")
End If
Dim exsist As TreeNode = New TreeNode("")
For Each curNode In node.Nodes
If curNode.Text = curName Then
exsist = curNode
End If
Next
If exsist.Text <> "" Then
addNode(exsist, nextName)
Else
Dim newNode As TreeNode = New TreeNode(curName)
node.Nodes.Add(newNode)
If nextName <> Nothing Then
addNode(newNode, nextName)
End If
End If
End Sub
End Class
|
|
|
|
|
I have a script that is suppose to add Multiple computers in Active Directory by pointing to a .txt file. My script runs without any problems, but in never actually adds the computer objects. Any ideas or does anyone know of a better way of doing this?
addpcstoOU.vbs
' The script will take a text file with names and create computer accounts in your OU.
' To run the script open a command line and type cscript addpctoOU.vbs < workstations.txt
' where workstations.txt hold the names of the computer accounts you wish to add.
' This text file must contain one computer account name per line.
' In order to get the computer account in the correct OU you must edit the line
' Set objContainer = GetObject("LDAP://OU=workstations,OU=AIT,OU=ASET,OU=ITS,OU=UP,OU=PSUOUs," & _
' to reflect
' Set objContainer = GetObject("LDAP://OU=yourworkstationOU,OU=yourOU,OU=UP,OU=PSUOUs," & _
' To delegate the ability to add the machine to the network you must edit the line
' strComputerUser = "access\admin_mcc171"
' for questions send email to windiscuss@psu.edu
dim objFile, arrInfo, p
set objFile = WScript.StdIn
Do While Not objFile.AtEndofStream
call addpctoou(objFile.ReadLine())
Loop
set objFile=nothing
sub addpctoou(strComputer)
On Error Resume Next
' Edit this line to delegate the ability to install the machine into the OU
strComputerUser = "access\dlt_techs"
Const ADS_UF_PASSWD_NOTREQD = &h0020
Const ADS_UF_WORKSTATION_TRUST_ACCOUNT = &h1000
Const ADS_ACETYPE_ACCESS_ALLOWED = &h0
Const ADS_ACETYPE_ACCESS_ALLOWED_OBJECT = &h5
Const ADS_FLAG_OBJECT_TYPE_PRESENT = &h1
Const ADS_RIGHT_GENERIC_READ = &h80000000
Const ADS_RIGHT_DS_SELF = &h8
Const ADS_RIGHT_DS_WRITE_PROP = &h20
Const ADS_RIGHT_DS_CONTROL_ACCESS = &h100
Const ALLOWED_TO_AUTHENTICATE = _
"{68B1D179-0D15-4d4f-AB71-46152E79A7BC}"
Const RECEIVE_AS = "{AB721A56-1E2f-11D0-9819-00AA0040529B}"
Const SEND_AS = "{AB721A54-1E2f-11D0-9819-00AA0040529B}"
Const USER_CHANGE_PASSWORD = _
"{AB721A53-1E2f-11D0-9819-00AA0040529b}"
Const USER_FORCE_CHANGE_PASSWORD = _
"{00299570-246D-11D0-A768-00AA006E0529}"
Const USER_ACCOUNT_RESTRICTIONS = _
"{4C164200-20C0-11D0-A768-00AA006E0529}"
Const VALIDATED_DNS_HOST_NAME = _
"{72E39547-7B18-11D1-ADEF-00C04FD8D5CD}"
Const VALIDATED_SPN = "{F3A64788-5306-11D1-A9C5-0000F80367C1}"
Set objRootDSE = GetObject("LDAP://rootDSE")
' Edit this line to reflect your OU in the ACCESS Domain
Set objContainer = GetObject("LDAP://OU=Altoona,OU=Campuses,OU=DLT Public,DC=dlt,dc=access,dc=psu,dc=edu")
Set objComputer = objContainer.Create _
("Computer", "cn=" & strComputer)
objComputer.Put "sAMAccountName", strComputer & "$"
objComputer.Put "userAccountControl", _
ADS_UF_PASSWD_NOTREQD Or ADS_UF_WORKSTATION_TRUST_ACCOUNT
objComputer.SetInfo
Set objSecurityDescriptor = objComputer.Get("ntSecurityDescriptor")
Set objDACL = objSecurityDescriptor.DiscretionaryAcl
Set objACE1 = CreateObject("AccessControlEntry")
objACE1.Trustee = strComputerUser
objACE1.AccessMask = ADS_RIGHT_GENERIC_READ
objACE1.AceFlags = 0
objACE1.AceType = ADS_ACETYPE_ACCESS_ALLOWED
Set objACE2 = CreateObject("AccessControlEntry")
objACE2.Trustee = strComputerUser
objACE2.AccessMask = ADS_RIGHT_DS_CONTROL_ACCESS
objACE2.AceFlags = 0
objACE2.AceType = ADS_ACETYPE_ACCESS_ALLOWED_OBJECT
objACE2.Flags = ADS_FLAG_OBJECT_TYPE_PRESENT
objACE2.ObjectType = ALLOWED_TO_AUTHENTICATE
Set objACE3 = CreateObject("AccessControlEntry")
objACE3.Trustee = strComputerUser
objACE3.AccessMask = ADS_RIGHT_DS_CONTROL_ACCESS
objACE3.AceFlags = 0
objACE3.AceType = ADS_ACETYPE_ACCESS_ALLOWED_OBJECT
objACE3.Flags = ADS_FLAG_OBJECT_TYPE_PRESENT
objACE3.ObjectType = RECEIVE_AS
Set objACE4 = CreateObject("AccessControlEntry")
objACE4.Trustee = strComputerUser
objACE4.AccessMask = ADS_RIGHT_DS_CONTROL_ACCESS
objACE4.AceFlags = 0
objACE4.AceType = ADS_ACETYPE_ACCESS_ALLOWED_OBJECT
objACE4.Flags = ADS_FLAG_OBJECT_TYPE_PRESENT
objACE4.ObjectType = SEND_AS
Set objACE5 = CreateObject("AccessControlEntry")
objACE5.Trustee = strComputerUser
objACE5.AccessMask = ADS_RIGHT_DS_CONTROL_ACCESS
objACE5.AceFlags = 0
objACE5.AceType = ADS_ACETYPE_ACCESS_ALLOWED_OBJECT
objACE5.Flags = ADS_FLAG_OBJECT_TYPE_PRESENT
objACE5.ObjectType = USER_CHANGE_PASSWORD
Set objACE6 = CreateObject("AccessControlEntry")
objACE6.Trustee = strComputerUser
objACE6.AccessMask = ADS_RIGHT_DS_CONTROL_ACCESS
objACE6.AceFlags = 0
objACE6.AceType = ADS_ACETYPE_ACCESS_ALLOWED_OBJECT
objACE6.Flags = ADS_FLAG_OBJECT_TYPE_PRESENT
objACE6.ObjectType = USER_FORCE_CHANGE_PASSWORD
Set objACE7 = CreateObject("AccessControlEntry")
objACE7.Trustee = strComputerUser
objACE7.AccessMask = ADS_RIGHT_DS_WRITE_PROP
objACE7.AceFlags = 0
objACE7.AceType = ADS_ACETYPE_ACCESS_ALLOWED_OBJECT
objACE7.Flags = ADS_FLAG_OBJECT_TYPE_PRESENT
objACE7.ObjectType = USER_ACCOUNT_RESTRICTIONS
Set objACE8 = CreateObject("AccessControlEntry")
objACE8.Trustee = strComputerUser
objACE8.AccessMask = ADS_RIGHT_DS_SELF
objACE8.AceFlags = 0
objACE8.AceType = ADS_ACETYPE_ACCESS_ALLOWED_OBJECT
objACE8.Flags = ADS_FLAG_OBJECT_TYPE_PRESENT
objACE8.ObjectType = VALIDATED_DNS_HOST_NAME
Set objACE9 = CreateObject("AccessControlEntry")
objACE9.Trustee = strComputerUser
objACE9.AccessMask = ADS_RIGHT_DS_SELF
objACE9.AceFlags = 0
objACE9.AceType = ADS_ACETYPE_ACCESS_ALLOWED_OBJECT
objACE9.Flags = ADS_FLAG_OBJECT_TYPE_PRESENT
objACE9.ObjectType = VALIDATED_SPN
objDACL.AddAce objACE1
objDACL.AddAce objACE2
objDACL.AddAce objACE3
objDACL.AddAce objACE4
objDACL.AddAce objACE5
objDACL.AddAce objACE6
objDACL.AddAce objACE7
objDACL.AddAce objACE8
objDACL.AddAce objACE9
objSecurityDescriptor.DiscretionaryAcl = objDACL
objComputer.Put "ntSecurityDescriptor", objSecurityDescriptor
objComputer.SetInfo
end sub
|
|
|
|