|
-
Apr 4th, 2004, 12:39 PM
#1
Serialization - random files
How do you read/write random access binary files in .Net?
Code snippets would be cool.
I don't live here any more.
-
Apr 4th, 2004, 02:37 PM
#2
You would have to use the Compatibility namespace and do it the same as in VB6 or write a custom serializer for that. Otherwise you'd just serialize a collection of objects and deserialize the whole collection back to use it.
-
Apr 5th, 2004, 03:49 AM
#3
Originally posted by Edneeis
use the Compatibility namespace and do it the same as in VB6
How would I code that? (the namespace part not the VB6 code)
I don't live here any more.
-
Apr 5th, 2004, 10:03 PM
#4
Run your VB6 code through the Upgrade Wizard.
-
Apr 5th, 2004, 11:06 PM
#5
try this, unsure if it would give you correct results, but it should work...
Try getting a list of all processes : Process.GetProcesses()
Loop through all of them and check their MainWindowHandle and MainWindowTitle property. I think when there is no window, the window handle would be zero. If it's not zero, then you can just get the title of the window using the other property I just mensioned.
edit:
hmmp, maybe not
tried this:
VB Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ListBox1.Items.Clear()
Dim p() As Process = Process.GetProcesses()
Dim i As Integer
For i = 0 To p.GetUpperBound(0)
If Not p(i).MainWindowHandle.ToInt32 = 0 Then
ListBox1.Items.Add(p(i).MainWindowTitle)
End If
Next
End Sub
and it seems like it doesnt get all the windows hehe....
Last edited by MrPolite; Apr 5th, 2004 at 11:11 PM.
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Apr 6th, 2004, 02:34 AM
#6
Great!
That's close enough to fool the boss!
I don't live here any more.
-
Apr 6th, 2004, 04:25 PM
#7
Originally posted by wossname
Great!
That's close enough to fool the boss!
aah poor boss I think that didnt' work for windows explorer windows and such
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Apr 7th, 2004, 02:40 AM
#8
Looks like we got our threads crossed!
I don't live here any more.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|