|
You might be want to create windows service application.[^] Let me know is this match what you need or not.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Thanks for the reply. I tried a service app but got a message saying it had to be installed and I didn't want to take that route. May I didn't try for long enough.
|
|
|
|
|
L.s.
I have written a program vb.net and i have compiled it in to an .exe
Part of this .exe is a module with one argument.
I want to run this .exe from the DOS prompt.
Actually, I want that certain module to be executed giving it an value for it's argument.
I hope someone can help me,
I really need an solution.
Best regards,
Steven
Steven de Vries
|
|
|
|
|
Steven de Vries wrote:
I want to run this .exe from the DOS prompt.
What type of application that you create in vb.net? Do you create console application. If so, try read this lab.[^] Let me know if it is match what you need or not.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
I have a DataSet set up as an XML file and a DataGrid bound to that DataSet that displays all of the columns in the XML database except for three, one of those being the primary key. I want the user to be able to double click on a row in the DataGrid and have it display the entire record on another form. But I'm having trouble getting the data since the primary key isn't in the dataGrid. I tried using the CurrentRow index but it doesn't necessarily match the same row number of the DataSet, especially if it's been sorted. So how can I link the row selected in the DataGrid to the matching row in the DataSet?
I'm a newbie at DataGrids and DataSets so I've been searching for the answer to this for a few days. I found out this morning that the ASP.NET DataGrid has a property called DataKeys. Does the VB.NET DataGrid have something similar?
C code. C code run. Run code run!
|
|
|
|
|
Is there no way to do this in VB.NET? Basically all I'm looking for is a way to determine the primary key of the row that the user double clicked on in the DataGrid.
Thanks in advance!
C code. C code run. Run code run!
|
|
|
|
|
You have to use the BindingContext to determine the current dataviewrow. From there you can get the datarow and pull out the Primary Key. Ex:
Private Sub DataGrid1_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles DataGrid1.DoubleClick
Dim dvRow as DataRowView = Me.BindingContext(DataGrid1.DataSource, DataGrid1.DataMember).Current
Dim dRow as DataRow = dvRow.Row
MsgBox("dRow Primary Key: " & dRow.item("Key"))
End Sub
From what I've read, this may not work if you're using a filter to display your data.
C code. C code run. Run code run!
|
|
|
|
|
hi everyone
i need an urget urgent urgent help
well what i need help in is, that i want to develop a call card solution , let me exaplin simply, my customer will buy a card, then dial a number, this number asks him to insert the pin code, the authentication is done, then the system will give him a tone and he will dial is number!
ofcourse using .NET
well thats its!
so is there anyone can lead me to anything to start with, any link or code or tutorial and wwillllll be realllyyyy thankfulllll
Kind Regards
Mahmoud Manasrah
|
|
|
|
|
In my opinion, I guest that this is homework that you got from school. Most of our member help to the member that face the real problem in project and give the answer for the peiece of the problem in the project.
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
I'm not sure how to find freespace on a diskette. I've searched MSDN, but only found examples of VB6 and scripting examples.
I'm trying to find a VB.NET solution. Does anyone have any sample code where they look up how much space a file will take and then check how much space is available on the target drive the file is going to be transfered to?
Any help is appreciated.
Lost in the vast sea of .NET
|
|
|
|
|
Hello Kai!
Does anyone have any sample code where they look up how much space a file will take and then check how much space is available on the target drive the file is going to be transfered to?
I'm afraid my suggestion requires the .NET Framework 2.0 but with the new classes the solution is quite easy. Use the DriveInfo.AvailableFreeSpace [^] property to determine how much space is available to you. If it's at least the size of your file (to get that information you can use the FileInfo.Length [^] property) you call FileCopy [^].
Imports System.IO
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Dim MyDrive As DriveInfo = New DriveInfo("A")
Dim MyFile As FileInfo = New FileInfo("C:\boot.ini")
If MyDrive.AvailableFreeSpace >= MyFile.Length Then
FileCopy(MyFile.FullName, _
MyDrive.RootDirectory.ToString() + MyFile.Name)
End If
End Sub
End Class
If you're using the .NET Framework 1.1 it seems you will have to use the WMI (see Finding the Amount of Disk Space Available (Visual Basic)[^]).
Best regards
Dennis
|
|
|
|
|
Hi Dennis,
I'm going to keep this message, and reference it later when 2.0 is readily used. For now I used the following information that I found on freevbcode.com:
http://www.freevbcode.com/ShowCode.asp?ID=5588&NoBox=True
I created a class library using this code sample, and any programs I have that need this info can reference the class for info.
I will use the information you gave me to update the class library when our shop has gone to 2.0.
Thanks for the information
KreativeKai
Lost in the vast sea of .NET
|
|
|
|
|
I have an edit box called Login. How do I set the focus on Login at THE END of the string currently in Login? calling Login.SetFocus sets the cursor at the beginning of the string. I want it at the end.
Thank you,
Red Sunday
-----------------
http://www.zachcalvert.com
|
|
|
|
|
Try:
<br />
TextBox1.SelectionStart= TextBox1.Text.Length<br />
TextBox1.Focus()<br />
|
|
|
|
|
Try this code:
With txtLogin
.SelStart = 0
.SelLength = Len(.Text)
.SetFocus
End With
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Hi
First I'm sorry because I wrote
the code for C# and not for VB.NET! ;P
I think the code you wrote for answering Red's problem,
that will also select the whole text of the textbox,
is not what Red was looking to.
The correction to your code (If my guess in the problem
is correct) is this:
<br />
With txtLogin<br />
.SelLength = 0<br />
.SelStart = len(.Text)<br />
.SetFocus<br />
End with<br /> code>
|
|
|
|
|
Oh, thank you very much for your information. Because I did not look the question carefully that make me confuse. Thank you very much that you correct my mistake
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|
|
Hi there guys...
Have a "fun" new project to work on. What is required is the ability to download a file from a specified webserver (jpg) to my local machine....
Unfortunately, this needs to be done in a UIless dll, so I can't (AFAIK) use the InetTransferCtrl. To add some complexity, we are not able to expose the images directory as a virtual dir, so I have to use SA File up on the server to actually transfer the file.
So what I need is a way of invoking an ASP page on the server, and recieving the file at the client. Am looing at the WinHTTP stuff, and seems to fit the bill - believe I can invoke the page, but have no idea how to get the image out the other side.
Any ideas?
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
How do I return an array of strings from a function? Just like the way String.Split does?
|
|
|
|
|
Try returning the array as Variant (in VB6) or Object (in VB.NET)
|
|
|
|
|
I can't do that. My development environment is such that Option Strict is On. I have to explicitly convert my array to a array of strings. Any other way?
|
|
|
|
|
Hi Beowulf!
How do I return an array of strings from a function? Just like the way String.Split does?
Take a close look at the VB.NET declaration of Split [^]. It's got brackets after its type. All you have to do in the function is to create an array of the appropriate type and size and finally use a reference to it as the function's return value. For example:
Option Explicit On
Option Strict On
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
For Each str As String In TestFunction()
MessageBox.Show(str)
Next
End Sub
Private Function TestFunction() As String()
Dim ReturnArray(1) As String
ReturnArray(0) = "TestString"
ReturnArray(1) = "Another String"
TestFunction = ReturnArray
End Function
End Class
Best regards
Dennis
|
|
|
|
|
How do I lasso in VB.NET (f.ex. like when you are in desktop and push the left mouse button down and move you get a box etc.)?
I have a form where is usercontrols. I want to lasso some controls. I have tried to do that with label.. no luck.. if you set the backcolor transparent and bring the label to front it doesn't show the underlying controls.. it shows only the form behind the label..
I've also tried to draw rectangle to form. When I do that the rectangle is beneath the controls so the line “snaps” when it goes through the control. Can I somehow draw the rectangle over the controls?
I hope You understood what I was trying to say.. Any help will be highly appreciated..
Thank You,
Arttut02
|
|
|
|
|
I just give you an idea what to do:
Create a control named LINE.
This control should look like a line with properties like x1,x2,y1,y2
place four of these controls on your form (on the top of all other controls) whith the visible property of false.
now on mousedown event, make them visible and in mouse up evnt make them again invisible.
in mousemove event, try to set them in the way to form a rectangle.(top, left, right and bottom sides)
This will work. I dunno if you have got my concept or not.
If not, lemme know.
|
|
|
|
|
Hi, I have a small access file that contain two table. What i want is create a simple webpage to display all record from this access file on the webpage and share it in the network. Does anybody have an idea to do that?
A thousand mile of journey, begin with the first step.
APO-CEDC
Save Children Norway-Cambodia Office
|
|
|
|