
IcingDeath
Avatar/Signature-
Posts
32 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by IcingDeath
-
!!! U still need to use raiseevent with addhandler.... The difference is in the declaration of the object... Public Class MyClass Public Event SomeEvent() Public Sub MySub RaiseEvent SomeEvent() End Sub End Class AddHandler Style Private Sub Form1_Load(Blah) Dim MC as new MyClass addhandler MC.SomeEvent,addressof EventHandler end sub Private Sub EventHandler 'Blah End Sub With events style Dim WithEvents MC as new MyClass Private Sub EventHandler Handles MC.SomeEvent End Sub
-
Thats true but with the addhandler keyword you can managed controls created on run-time better... Plus if an object goes out of scope for the function that created it but there is still a referrence to it, the event will still fire. like if a function in a class creates an object by declaring it only in the scope of that function and then passes it to another class if addhandler was used in order to add an event handler in the first class, when the event fires the handler will be used. What is interesting is what happens if an event has multiple handlers? With what sequence will the handlers be called?
-
Plus, after my recent expirience with MS Video Encoder (the thing that encodes a video stream and sends it to a Windows Media Server), I learned that encoding actually drains out a lot of cpu power ( It had my P4 3.2 multithreaded server using up half of its CPU power just to encode a 640x480 stram) so I cant imagine how you would be able to encode say 20 fps of at least 800x600 without paralyzing the server machine. By the way, i think VNC is the one that intercepts the video stream from the graphics card because it wont work without one, while remote desktop always works! I think I am done :) I wrote an essay lol
-
Oh and how about the technique (I think its called vector graphics) where instead of describing an image one pixel at a time (thus consuming a lot of bandwidth) you describe an image as a series of shapes (like this is a square filled with red color etc.).
-
I once made a program where I could connect to it at first with Telnet and later on with my own client. Among other things that program could capture the remote screen and send it over to the client. What I noticed is that firstly, each 'frame' was quite big in size if I wanted not to distort it by adding better compression (I think I was using jpeg @ 100% quality) and secondly that when I had the other machine running a game it would sometimes send me the same screen two or three times without changes (as if the screen had a buffer that changed on a big interval, and the capture api took the picture from there rather than the actual screen contents). I think that u should use some sort of change detection thing for your app. Have you noticed that in remote desktop, the client receives only parts of the screen that change (aka invalidated). There must be some API call (or global hook) to get the screen refresh event (and rectangle coordinates of the area that is being painted at the moment).
-
if this is not what u want then just be more specific...
-
Oh and if you are planning to load your nodes from a database then: You should use the following Table ID Int Primary Key ParentID Int <- If 0 then this is a top level node Whatever Other Fields If u want to have a node load all its children u use this SQL Statement: "Select * From Table Where ParentID = " & MyID & ";"
-
This is easy... Public Class Node Private mNodes as NodeCollection Public Readonly Property Nodes as NodeCollection Get return mNodes End Get End Property End Class Public Class NodeCollection ' ' 'Code to accomodate your nodes '(like Add,Remove,Clear,Count,GetEnumerator,Item(Index) etc.) End Class
-
so what you are saying is that remote desktop (aka terminal services) is not actually developped by MS?
-
cant you do smthng like this: Class Square Public Event Done(Sender as Square) Dim T as System.Threading.Thread ' ' ' ' ' 'Your properties and whatever else ' ' Public Sub CalculateSquare() T=New System.Threading.Thread(Addressof CalcSquare) T.Start end sub Private CalcSquare() ' Do your Stuff Raiseevent Done(Me) End Sub End Class
-
I checked out what you want to do... I overrided ToolBar.OnPaint (or something like that) and tried it out without anything in that sub... nothing bad happened (buttons where visible). The weird thing is that when i typed mybase.onpaint the list that comes out after the dot (.) did not have that method in it but the compiler did not complain about it either (like underlining it or not building the project)
-
help :eek: !! Whats the best practice for icons in .net? Like I was expecting it would support antialliased XP icons but it doesnt! Is there a best practice in order to force the listview to get them without distorting them? (It puts a black shade around them... looks terrible). I converted the icons to bitmaps and they look better but the main problem is that they dont really support transparency since the imagelist messes them up. I converted them using print screen (wow! lol) so i got em as windows drawed them on explorer file list.
-
I caught key strokes with that function when i was making a little app for Mu online. It does work. You need a loop like this Do If GetAsyncKeyState(YourKey)=KeyUp then Do your stuff end if Loop Probably in a separate thread. You will also need the proper constants (in Win32Api.txt). I think they start with VK_ (Virtual keys).
-
I think i read an article on that somewhere... You are actually trying to make some sort of SQL server thing. Why dont u use microsoft's SQL server? As far as the record locking is concerned i think that field is a decent way to do it, maybe storing there who is currently viewing the info so when a user gets readonly permission, he can know who is blocking him (i would do it this way in our office so they wouldnt come bugging me about the record being read only).
-
Thats if you want to have related tables and stuff. It took me about 2 hours to have a datagrid display a virtual table (thats a table I made off data that the program loads into a collection of classes like PhoneBook.Entry(i).Name) I think the datagrid is a cool way to display a list of items while granting the user permission to edit them (constraining the datatype of each column is really usefull as opposed to other controls like listview etc). I dont have too much experience with the datagrid but it suited my needs. Maybe if in the future i intend to use it in some other way i may come here crying about how stupid it really is, but who knows eh?
-
'Declarations part of Form Dim MyThread as System.Threading.Thread Sub Timer1_Tick MyThread=New System.Threading.Thread(Addressof TableCheck) MyThread.Start end sub Sub TableCheck() '<- Notice that u are not allowed to pass any parameters 'Do the check of the table here end sub Try to read some general info about threads in order to find what they are exactly. After you understand them, you will be able to manipulate them to fit your needs. Imagine a thread as running a separate 'subprogram' from withing your program (thats not too accurate but it helps to visualize it). Like if u have Notepad and Paint open at the same time and paint is busy, notepad will not be affected. Thats because they are running on different threads. The same idea applies here(in an abstract kind of way)
-
Good job! By the way system time is as easy as this: Now Oh and the sub would prolly look better if it was a function...
-
RAR files prolly look like this: Start marker Data End Marker Your RAR file prolly looks like this Start marker Data End Marker 00000000000000 <- Its filed with 90 MB of zeros :P
-
no problem ;)
-
By slowing performance what do u mean? Like if the application freezes for a couple of seconds? If thats a problem for u, u can have a timer start a seperate thread every 10 minutes.
-
I was always wondering how microsoft's remote desktop does it... Does it send compressed frames coupled with some change detection mechanism or what?
-
Ethical issues? Declare Function GetAsyncKeyState Lib "user32.dll" ( _ ByVal vKey As Long) As Integer
-
Web Browser ActiveX control as a File Browser
IcingDeath replied to IcingDeath's topic in Windows Forms
Come on u guys! There must be some info on this topic! Its rather interesting I might add and can prove very usefull if there are ways of manipulating the nested object in the Browser Control. I figured I could use the .Document property but then what? Damn late binding!!!! -
Just paste that sub somewhere in your form. In form_load paste the usage thing. When u hit 'play' observe a little window on the bottom right of the Visual Studio window. If the output tab is not selected click on it and see whats there. It should say 1.5 at the bottom which is the output of the sub. You output things there using debug.writeline. Its nothing special I am just being friendly since you are a rookie and all.
-
how do I add data with the bottom input row in a datagrid?
IcingDeath replied to kilobyte's topic in Windows Forms
Funny thing is that some time ago i was searching for how to remove that append row in the end. Oh and if u are displaying the results of a querry that cannot be updated directly from its source, the datagrid will hide the append row. This applies to any other collection of records that cannot be updated for some reason. Dont ask me which querries cannot be updated because i dont like to grant direct access to the database for validation purposes etc. so i dont bind controls directly to the source.