|
You should choose variable names that make your code readable. If you have a textbox in a cell, it will have a text changed event.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Yes variable is textbox but have some event - CellValueChange, CellBeginEdit, CurrentCellChange etc but noone of this work
|
|
|
|
|
Better u can use "Infragistics" "UltraWinGrid" control to solve this problem. There is a "CellChange" event, this event fire when u start typing the first letter itself.
|
|
|
|
|
OK where is found UltraWinGrid or Infragistics
|
|
|
|
|
|
Trying asking this question on their forums.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Hi All
I had used Collection object to much in vb6 and VFP (They are the same), and recently I tried to the collection in VB.Net which I noticed that in VB.Net it differ totally from vb6.
- I am used to use GetKey() to handle things and search.
- There is no GetKey() now.
- I search and Found HashTable which has Keys in it but they are populated as array.
- Finally, I got what I want by using "Scripting.Dictionary"
Cannot I use the old Collection object (the one in vb6) in VB.Net?
TIA
Samir R. Ibrahim
|
|
|
|
|
Samir Ibrahim wrote: Cannot I use the old Collection object (the one in vb6) in VB.Net?
No, you can't.
Which collection you use depends on how you want to work with the collection and what you're storing in it.
If you've already found the Dictionary collection (which is a Key/Value pair store), what's the problem??
|
|
|
|
|
Dave Kreskowiak wrote: No, you can't.
I begin to wonder that you hate me.
All your replies to me, "No","No, You can't", "No, Not At All", and if you are in good mode you say "It is possible"
Just kidding
Samir R. Ibrahim
|
|
|
|
|
Hello,
Here is a verry easy example of my problem :
Code :
Dim d As Object = Nothing
If d Is Nothing Then
MsgBox("1")
End If
If d = Nothing Then
MsgBox("2")
End If
If 0 = Nothing Then
MsgBox("3")
End If
Show 1,2 and 3.
what is the difference between "is" and "=" ?
Nothing = 0 ?
Thanks.
|
|
|
|
|
You use 'Is' when checking for equality on reference types and '=' when checking for equality on value types.
Not entirely sure why 'Is' and '=' works with Object but I'm guessing it's because Object could be either a reference type or a value type.
|
|
|
|
|
I don't see any difference in the first two. 3rd one will always evaluate as TRUE and compiler may change the code like
If True Then
MsgBox("3")
End If
|
|
|
|
|
The "=" and "<>" operators test whether the operands refer to identical objects; the "Is" and "IsNot" operators test whether the operands refer to the same object. Note that many types objects do not support direct equality testing with the "=" and "<>" operators. I would advise against using "=" or "<>" with objects other than those with explicit support for such semantics (e.g. strings).
|
|
|
|
|
"=" represents the string values
"is" represents the object type values
|
|
|
|
|
I'm attempting to convert the following VB6 code. The code is going to position 675 in a binary file and reading in a numeric value. The returned numeric value is a pointer to a place in the same file where to start reading in data (gRecord is a UDT setup with fixed length strings and integer values). The numeric value will vary from file to file to determine where the data is stored.
VB6 Code:
Dim intFile As Integer
intFile = FreeFile
Open txtWinIGPath.Text & strFilename For Binary As #intFile
'First record location. Offset-1 of first record is stored at location 675
Get #intFile, 675, lngPos
Debug.Print lngPos (in this particular file its 702)
lngPos = lngPos + 1
Do While Not EOF(intFile)
Get #intFile, lngPos, gRecord
I'm reading in the file with this code. I'm reading 11 bytes just to see the data. I'm not getting any value near 758 (even with doing conversions).
.Net code:
Using fs As New FileStream(strFilePath, FileMode.Open, FileAccess.Read), br As New BinaryReader(fs)
fs.Seek(674, SeekOrigin.Begin)
ReDim byt(10)
byt = br.ReadBytes(10)
Here is the raw data displayed through UltraEdit (included 1 line up and down of data).
Can someone explain what I am doing wrong here?
|
|
|
|
|
Hi,
Try seeking on the BinaryReader BaseStream instead of the FileStream. I haven't tested it but I think that's the way to go.
Alan.
|
|
|
|
|
Thanks for the reply,
The only seek I can find on the binary reader is the "br.BaseStream.Seek", which I assume is doing the fs.seek.
So confused on this one - lol.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Yes, it will be the FileStream, but it may be wrapped so that the BinaryReader buffer is invalidated when you seek. A direct seek on fs would not do that.
I'm not absolutely certain about this so do test it.
Alan
[EDIT] tested it myself in c#. There was no difference between seeking the basestream or the filestream and both methods moved the reader to the expected position in the stream.
modified on Monday, February 16, 2009 2:15 PM
|
|
|
|
|
I worked on some other projs and came back to this with fresh eyes. Here is what the VB6 binary reader is doing behind the scenes when reading integer values from binary. It's reading in 2 bytes (in this case UE displayed as BE and 02) and then reversing the values to get the decimal value.
02 BE = 702.
Incase anyone else is doing manual parsing of a binary file.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Hello everyone,
Firstly i would like to thank those who have helped me with my earlier doubts thanks guys its because of u guys that dummies like me can even learn .NET application development....
Well this time i have come across to an issue regarding the famous office assistant that used to be present in the office release earlier Office XP....... What i would like to do is to get that assistant and include it in my own desktop application so that what ever help or tooltip the control will have or i would like to show can be displayed with the help of that assistant.....
Please guys help me out with this as i have gooled for this but failed!!
Thanks in advance
|
|
|
|
|
Google for "MS Agent", and you'll come across some samples. Kind of hard to find if you don't know the term "agent".
Most common agent is Merlin, some wizard-kinda-guy. It can do most the things that the Office-assistant does, including speech. The paperclip is for Office only, since it is associated with the product and copyrighted.
There's even a nice article[^] here on CP. Enjoy
I are troll
|
|
|
|
|
Heres a guy who REALLY hates his users
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thank you so much Eddy that really help me..... and i have created my application as well....... but during the course of the development of this application i have came across with another issue... i hope u don't mind me asking this but allowing the MS Agent to be visible and audible you need the *.acs file and TTS engine be installed in your machine, what i would like to do is to get those files automatically installed on the client's machine at the time of deployment and i would really appreciate if u please guide me the way to do this.......... moreover i would also like to do some other installation of other applications automatically along with my own application so how can i accomplish that..........
Your help will be highly appreciated....
thanks in advance....
|
|
|
|
|
There's an "msagent.exe" that installs all the required components, you can include this with most setup-packages. Check out the Microsoft Agent Home[^] site.
There's a link on the right, called "Licensing"[^] that contains instructions for licensing and installing.
You might also be interested in the Microsoft Agent Ring[^], a ring of websites that use Agent-technology.
Is your application available for download?
I are troll
|
|
|
|
|
I'm currently writing a program where I add a day to the current date and perform some analysis. The problem is I need to omit weekends. The current logic I am using is adddays(1), but this is giving me weekends.
Is there a simple way to just add weekdays to the current date?
Thanks.
George
|
|
|
|