|
It declares some constants, types, and methods from the windows api "rasapi32"
RAS was to do with interacting with a modem (can't remember what it actually stands for .. Remote Access S.... maybe)
RasEnumConnections - I would guess this enumerates all the currently open connections
RasHangUp - I would imagine this hangs up a given connection.
www.pinvoke.net for more info.
|
|
|
|
|
hello
iam new to .net
i am working with treeview
iwant to generate a binary structure in treeview in the form one parent and two children and so on..............
code for the first node .......
treeview1.nodes.add(xxx)
and for the children.....
treeview1.nodes(0).nodes.add(xxx)
treeview1.nodes(0).nodes.add(xxx)
and for the next....
treeview1.nodes(0).nodes(0).nodes.add(xxx)
treeview1.nodes(0).nodes(0).nodes.add(xxx)
and so on..............
is there any chance of looping them then how
plz any one can helpme?.....
mamatha
-- modified at 6:48 Wednesday 4th January, 2006
|
|
|
|
|
HI,
I AM CREATING A PARENT NODE THEN CHILD FROM DATABASE.
FOR THAT I HAVE USED 2 DATASET AND 2 SQL STATEMENTS.
'***************Adding Root Node**********************
TreeView1.Nodes.Add("PARENT")
'*********************End*****************************
'***************Adding Child Node*********************
For i = 0 To ds1.Tables(0).Rows.Count - 1
Dim ndNodes As TreeNodeCollection, ndNode As TreeNode
ndNodes = Me.TreeView1.Nodes
For Each ndNode In ndNodes
ndNode.Nodes.Add("" & ds1.Tables(0).Rows(i)(0) & " " & ds1.Tables(0).Rows(i)(1) & "")
Next
'******************End*****************************
'***************Adding Sub Child Node**************
Dim temp1 As String = ds1.Tables(0).Rows(i)(0)
Dim sql2 As String = "SELECT a,b,c FROM xyz"
adpt2 = New OleDbDataAdapter(sql2, conn)
adpt2.Fill(ds2, "TPSAT")
For j = 0 To ds2.Tables(0).Rows.Count - 1
Dim ndNodes1 As TreeNodeCollection
ndNodes1 = Me.TreeView1.Nodes(0).Nodes
ndNode = Me.TreeView1.Nodes(0).LastNode
ndNode.Nodes.Add("" & ds2.Tables(0).Rows(j)(0) & " " & ds2.Tables(0).Rows(j)(1) & "")
'***************************************end*****************************************************************
Paritosh
|
|
|
|
|
hi,
thanks for the faster reply
but it is not exactly what i want
i want the tree to be in a binary format
1
.
....2..
.*****....4..
.*****....5..
.
....3..
******....6..
******....7..
and so on
and iam taking only one table ok
thanks in advance
-- modified at 7:41 Wednesday 4th January, 2006
|
|
|
|
|
First a disclaimer: to understand recursion you must first understand recursion
You want to add X number of nodes, each with 2 children and you want this to go for Y depth?
We will:
Call X - topLevelNodeCount
Call Y - treeDepth
Simply drop a tree view on the form named "treeView" and pase this code in your form
<code><pre>int topLevelNodeCount = 3;
int treeDepth = 5;
protected override void OnLoad(EventArgs e)
{
for(int i = 0;i<topLevelNodeCount;i++)
{
TreeNode newNode = new TreeNode("Top" + i);
this.treeView.Nodes.Add(newNode);
this.AddBinaryNode(newNode,1);
}
base.OnLoad (e);
}
private void AddBinaryNode(TreeNode parent, int depth)
{
// add 1
parent.Nodes.Add(parent.Text + "_Child1");
// add 2
parent.Nodes.Add(parent.Text + "_Child2");
if(depth < treeDepth)
{
int newDepth = depth+1;
AddBinaryNode(parent.Nodes[0],newDepth);
AddBinaryNode(parent.Nodes[1],newDepth);
}
}</pre></code>
-- modified at 8:49 Wednesday 4th January, 2006
|
|
|
|
|
HI,
THANK U VERY MUCH
THIS IS WHAT EXACTLY I WANT
ONCE AGAIN THANK U
-- modified at 0:18 Thursday 5th January, 2006
|
|
|
|
|
|
hi,
iam again
i have modify the code and igot the result but how ican get the nodes which are remaining that is if the binary tree is not balanced and we have some nodes balance after the "treedepth"
***********************************0
******************************1*********2
***************************3*****4****5****6
************************7*****8
in this way
how to add 7 and 8 here
and my modified code is(in the load i have added one "top1" node)
===============================function========================================
Private Sub AddBinaryNode(ByVal parent1, ByVal startlevel, ByVal i, ByVal treelevel, ByVal balancenodes)
da1 = New SqlDataAdapter("select trackid,username,parentid from users", CON)
da1.Fill(ds1, "users")
Dim count As Integer = ds1.Tables(0).Rows.Count - 1
'-------- add 1-------
parent1.Nodes.Add(ds1.Tables(0).Rows(i)(0))
'-------- add 2-------
MsgBox(parent1.text)
MsgBox(i)
Dim fnl As Integer = i
j = i + 1
MsgBox(j)
parent1.Nodes.Add(ds1.Tables(0).Rows(j)(0))
i = (i * 2) + 1
Dim newlevel As Int16
If (startlevel < treelevel) Then
newlevel = startlevel + 1
AddBinaryNode(parent1.Nodes(0), newlevel, i, treelevel, balancenodes)
AddBinaryNode(parent1.Nodes(1), newlevel, i + 2, treelevel, balancenodes)
End If
End Sub
======================end function================
-- modified at 0:28 Friday 6th January, 2006
|
|
|
|
|
Is there any way to find the creator/author name of a folder using vb.net?
Please guide me with sample codings.
Thanks in advance.
|
|
|
|
|
hi kavitha,
I am a beginer to vb.net. so sample code for you. i get it from internet.
Dim filename as string="c:\test\test.doc"
Dim dso As DSOFile.OleDocumentProperties
dso = New DSOFile.OleDocumentProperties
dso.Open(filename.Trim, True, DSOFile.dsoFileOpenOptions.dsoOptionOpenReadOnlyIfNoWriteAccess)
Console.WriteLine(dso.SummaryProperties.Author)
Console.WriteLine(dso.SummaryProperties.ByteCount)
Console.WriteLine(dso.SummaryProperties.CharacterCount)
Console.WriteLine(dso.SummaryProperties.CharacterCountWithSpaces)
Console.WriteLine(dso.SummaryProperties.Comments)
Console.WriteLine(dso.SummaryProperties.Company)
Console.WriteLine(dso.SummaryProperties.DateCreated)
Console.WriteLine(dso.SummaryProperties.DateLastSaved)
Console.WriteLine(dso.SummaryProperties.LastSavedBy)
Console.WriteLine(dso.SummaryProperties.LineCount)
Console.WriteLine(dso.SummaryProperties.PageCount)
Console.WriteLine(dso.SummaryProperties.ParagraphCount)
Console.WriteLine(dso.SummaryProperties.RevisionNumber)
Console.WriteLine(dso.SummaryProperties.Subject)
Console.WriteLine(dso.SummaryProperties.Title)
Console.WriteLine(dso.SummaryProperties.WordCount)
thz
kamal.
|
|
|
|
|
hi Experts,
This is uttam.I've 2 devlope an application where in i need to copy an image from a web page then pase it to excel sheet. So can any body suggest me how can i do that.
I wish 2 use clipboard to keep copied picture for pasteing in excel sheet.
Hope u r getting my problem.Pls help me.It's urgent.every help will be appriciated.
Thanks n Regards
Uttam
try to be the best... whereever you go,
|
|
|
|
|
Hi all,
Im looking for an organizational chart/organogram that I can use to draw a company structure, BUT i must be able to populate it programmatically. So if I have a structured document/string in XML format etc the component then draws it.
I've looked at smartdraw and the chart generator by enlightened software but they dont seem to do the trick
Do you know of any component that offers this sort of functionality?
Thanks
Q
Quintes
|
|
|
|
|
Oh yeah, it must be a COM component, for use in VB 6.
Quintes
|
|
|
|
|
Hi ,
I have a VB active X control which has a few buttons on it. I have added the Tab order for these buttons.
I am using this ActiveX on a VC++ dialog. It is a simple dialog application.
and the Active X control is the only control on the VC++ dialog.
When I launch the application the focus does not go to the First button on the VB ActiveX.
I have found that the User control(Active X) gets the focus and not the First control on the User Control.
Can anyone help me out with this(Do I need to set any property??)
Gayathri
|
|
|
|
|
Can anyone help me with linking this Jet database file(Access) on a FTP
Server(changes to be made on the database on server) to my VB Application using ADO. It would be nice if someone just
gives me a sample code for this.
Can also this be done using a .udl file?
Please help...
Roshan
|
|
|
|
|
Won't work over FTP.
You can only use an Access database if you have a server component, like a web service, interacting with the database for your application, or your application must be able to get to the .MDB file through a file share, UNC path, or other mapped drive.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Happy New Year!!!!
I wanted to know how to make my web based ASP.Net application an intranet application.I know i can use authentication/authorization to do it.But I donot want a login page or something along those lines.I just donot want any one who's not a member of the intranet to view the site.I also want to know how i can accomplish the same thing in ASP.Would appreciate if someone can help me out in this.
Thanks,
Aanchal.
|
|
|
|
|
Do you even understand the definition of an Intranet? It doesn't sound like it.
An intranet is just a private network, internal to a company or other entity. A website that is visible only inside the company running it is running on an Intranet. So an employee in the company just opens a web browser and types its internal, company address to get to it.
So, if your site isn't visible to anyone on the Internet, but is visible to people inside the company, your done. There is no special coding to "convert" your app to an "intranet".
Intranet[^] on Wikipedia
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hey all, im attempting to make my pocketpc into a remote control for my desktop pc through the network.
what i want to do is have a windows service that listens for connections through a tcplistener and recieves commands then executes some code according to what the command is. i would like the server to stay connected to the client the whole time so that it can recieve more than one command.
the problem is that i really don't know enough about tcplistener or the way that sockets works in vb.net to be able to do this.
why can't it be as easy as winsock was in visual basic 6!!
could someone please enlighten me on this matter and possibly post some source code so that i have something to go by?
my email is curseddagger@hotmail.com if you want to talk to me on msn about it.
thank you in advance
Regards
James
|
|
|
|
|
Perhaps Winsock.NET[^] might do you some good. If not, Google for "VB.NET sockets tutorial".
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i didn't know that there was a winsock in .NET, thankyou.
i have spent many hours trying to find a descent tutorial for .net sockets and cannot come up with one.
i really would like to learn how to use sockets so if you know of a good tutorial, please point me to it
|
|
|
|
|
I haven't had the need to search for one. But since sockets is such a LARGE topic, there's not going to be any one tutorial that covers all applications for sockets, and possibly not yours.
I would suggest picking up a book on sockets, such as Network programming in .NET : C# & Visual Basic .NET[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
That winsock control was absolutely fantastic but how do i use it with Pocket PC? when i add the control to my toolbox in a smartdevice application it shows up as disabled and i cannot add if to my form.
your help is much appreciated
|
|
|
|
|
No idea. I don't really do any Pocket PC development.
It's entirely possible that the library won't work with the .NET Compact Framework because the CF doesn't support the full set of classes, and doesn't support all the methods and properties of the classes it does support.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
My company, has a network domain name for the LAN,
Just named "abc-asia".
How can I get this domain name in VB.NET?
I found no method in Environment object.
Please help, and Thanks.
|
|
|
|