|
If you mean like the Windowskey + E for Explorer, you would need to trap keystrokes at the system level. Check out code for keyloggers.
He was a snowflake, like other "unique" snowflakes, falling down, getting stepped on, and pushed aside to disappear.
|
|
|
|
|
I hope to have my program run at startup so that when you press a key combination it will eject the CD tray then by pressing it again it will close the cd tray.
|
|
|
|
|
Does anyone have any idea how I can go about sorting a collection class.
The elements of the class are:
Public PointData As Double
Public RateData As Double
Public TimeData As Double
The requirement is to sort on one of the following:
PointData (asc) + RateData (Desc) or
PointData (Desc)
Any help would be very much appreciated!!
The code of the class collection is:
Public Class CPRTData
Public PointData As Double
Public RateData As Double
Public TimeData As Double
' Private data for the write-once ID property.
Private mstrID As String
' The first time the ID property is set, the static
' Boolean is also set. Subsequent calls return !ERROR! in the ID.
Public Property ID() As String
Get
ID = mstrID
End Get
Set(ByVal Value As String)
Static blnAlreadySet As Boolean
If Not blnAlreadySet Then
blnAlreadySet = True
mstrID = Value
Else
mstrID = "!ERROR!"
End If
End Set
End Property
End Class
Public Class CPRTDataItems
Implements System.Collections.IEnumerable
'local variable to hold collection
Private mCol As Collection
Public Function Add() As String
'create a new object
Dim objNewMember As CPRTData
Dim sKey As String = ""
sKey = "R" & Format(mCol.Count + 1, "0000")
objNewMember = New CPRTData
objNewMember.ID = sKey
'set the properties passed into the method
mCol.Add(objNewMember, sKey)
'return the object created
Add = objNewMember.ID
objNewMember = Nothing
End Function
Public Function GetEnumerator() As System.Collections.IEnumerator _
Implements System.Collections.IEnumerable.GetEnumerator
GetEnumerator = mCol.GetEnumerator
End Function
Public Sub Clear()
Dim iLoopVar As Integer
For iLoopVar = mCol.Count To 1 Step -1
Remove(iLoopVar)
Next
End Sub
Public Function Count() As Integer
Count = mCol.Count()
End Function
Default Public ReadOnly Property Item(ByVal Index As Object) As CPRTData
Get
Item = mCol.Item(Index)
End Get
End Property
Public Sub Remove(ByRef vntIndexKey As Object)
'used when removing an element from the collection
'vntIndexKey contains either the Index or Key, which is why
'it is declared as a Variant(Object)
'Syntax: x.Remove(xyz)
mCol.Remove(vntIndexKey)
End Sub
Private Sub Class_Kickstart()
'creates the collection when this class is created
mCol = New Collection
End Sub
Public Sub New()
MyBase.New()
Class_Kickstart()
End Sub
Private Sub Class_Shutdown()
'destroys collection when this class is terminated
mCol = Nothing
End Sub
Protected Overrides Sub Finalize()
Class_Shutdown()
MyBase.Finalize()
End Sub
End Class
David Loring
!! Keep Music Live !!
|
|
|
|
|
|
I will have a read. Thanks Ben
David Loring
!! Keep Music Live !!
|
|
|
|
|
I have searched for this and most of the things that I find give examples of ICMP. Is there any way one can just use the ping command and use the ping.reply or ping.results? Also do I have to load a class or module to get this to work?
Thanks
TECABA
SYSTEM ADMINISTRATOR
NORTHROP GRUMMAN
SUNNY FLORIDA
|
|
|
|
|
in 2005 look at my.Computer.Network.Ping
|
|
|
|
|
I have seen this for 2005 but, I only have vb.net 2003. Any way I can import this to my current version?
TECABA
SYSTEM ADMINISTRATOR
NORTHROP GRUMMAN
SUNNY FLORIDA
|
|
|
|
|
you will need to search for ASPEXEC.dll or because I can't find it on the web any longer, give me your email address and I'll send that dll that will allow you to do what you want. you just create an object and it will do a dos ping but reply the result.
ex:
Set Executor = CreateObject("ASPExec.Execute")
Executor.Application = "ping"
Executor.Parameters = "http://www.codeproject.com"
strResult = Executor.ExecuteDosApp
|
|
|
|
|
My email address is teddy.batarao.ctr@hurlburt.af.mil
Thanks for all the help!
TECABA
SYSTEM ADMINISTRATOR
NORTHROP GRUMMAN
SUNNY FLORIDA
|
|
|
|
|
I am using this ->
value='<%# DataBinder.Eval(Container,"DataItem.total")%>'
its working if there is already digits after decimal but if no digit is there it displays number as a simple integer I wish to display .00 with the number that doesn't have digits after decimal.
How to do it?
With Thanks & Regards
Amit Sk Sharma
|
|
|
|
|
<%# DataBinder.Eval(Container,"DataItem.total", ".00")%>
|
|
|
|
|
Eval("MyFieldName", "{0:f2}")
will use a format string to force two decimal points, even if there are more or less than that in the actual number.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I m doing a windows application using vb.net 2005 and Microsoft Access Database.I have created a datagrid and load it by records from database.But I can't update my database when I am changing the value of a cell in the datagrid.Can anyone plz help me so that I can update my database with the changed value of the cells in datagrid?
Sukanya
|
|
|
|
|
try <datagridid_updatecmd> procedure to implement it
With Thanks & Regards
Amit Sk Sharma
|
|
|
|
|
hi any one can tell how to use menu bars in asp.net,
using html menubars i did it in asp.net,
But i am not satisfy with that,
anyone can tell,easy way for that,
Magesh
|
|
|
|
|
can go to www.millionic.com
Jwalant Soneji (BE IT)
Mobile: +91 9969059127
http://jnsoneji.spaces.live.com
http://jnsoneji.blogspot.com
|
|
|
|
|
Hi i am new member of this code project,plz explain me how to submit my articles and codes.........,
Magesh
|
|
|
|
|
Simply go over the articles menu at www.codeproject.com and the select submmit an article.
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
Tha nk u.........,
Magesh
|
|
|
|
|
i have 4 radio button, for example,
radiobutton 1 is A1
radiobutton 2 is A2
radiobutton 3 is B1
radiobutton 4 is B2
While i run the application, by default, it only allow me to checked either one of four radiobutton.
i want my application group it into two group, A1 and A2 in one group and B1 and B2 in another group. So, while i Click A1, A2 will be unchecked and while i click A2, A1 will be unchecked as well, and B1 and B2 is remain the same. So , this criteria also same as B1 and B2, while i click either B1 and B2, it is no effect A1 and A2, how to gorup it ar? without put it into group box, anybody can help me ?
Best regards,
Chee ken
|
|
|
|
|
cheeken2u wrote: without put it into group box
Why not??
|
|
|
|
|
You suppose to use group box to group radio buttons. If you don't want to that you can still imitate the radiobuttons as grouped in your code. Please see the example below. I have controled two radio buttons out of a group box. If one's state changes, I change the other radio button's states also.
<br />
Private Sub RadioButton1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged<br />
Select Case RadioButton1.Checked<br />
Case True<br />
RadioButton2.Checked = False<br />
Case False<br />
RadioButton2.Checked = True<br />
End Select<br />
End Sub<br />
<br />
<br />
Private Sub RadioButton2_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged<br />
Select Case RadioButton2.Checked<br />
Case True<br />
RadioButton1.Checked = False<br />
Case False<br />
RadioButton1.Checked = True<br />
End Select<br />
End Sub<br />
<br />
<br />
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
Hi Chee Ken,
If you don't want to use GroupBox controls to group your radio buttons, because you don't want the border and title of that control, you can use Panel controls, which are practically the same, but have no visible borders and no title text. Otherwise they work pretty much the same way.
Good luck,
Johan
My advice is free, and you may get what you paid for.
|
|
|
|
|
anyone can help me how to get number of weeks in a month... using vb.net, and what week did i select an specific date?....
ex : sample pickdate "
02/14/2007 (using a datetimepicker)
output: 2nd week of Febuary...
pls help thanks
start a new beginning in every ending; thats what life for......
|
|
|
|