Results for "Author: william keith"
This code demonstrates a simple and easy way to handle the mouse wheel in VB by method of subclassing.
This code helps to remove some of the more annoying things about designing a GUI in VB. All of the classes here do so by subclassing controls. The classes included are as follows: - CAnchor: Mimics the behaviour of anchored controls in .NET, so that you aren't forever adding code to the Resize event of a form. - CMinMaxSize: Allows you to set the minimum and maximum sizes for a form. - CMouseEvents: Gives you access to the mouse events in Windows that VB does not expose - i.e. hover and leave events, and mouse wheel events. - CRTBLinks: Makes light work of automatic URL detection in the RichTextBox. - CScrollbar: Gives you access to the 'proper' API scrollbars as opposed to VB's ones. The project group includes a test project for you to see it all in action. NOTE: You may have to make the whole project group before it is usable as the test project depends on the library.
This code demonstrates two things: firstly, it shows you how to get a list of network adapters, and secondly, it shows you how to bind to one of them that the user selects and connect through it. This is useful for users who have a separate internet and LAN connection, or two LAN connections, or whatever else. To test it, just run the program, and listen on a port and adapter, then type your IP followed by a colon and the port you selected into your browser's address bar and the program will return the headers the browser sent to the browser. Enjoy!
Recently I found myself wanting more than what DrawText could offer: I wanted to be able to render rich text. Rather than write a function for this myself, I wondered whether I could accomplish this with a RichTextBox, and quite simply in fact. Unfortunately it doesn't render text transparently usually. Unless, that is, you set the WS_EX_TRANSPARENT style, at which point it does render transparently, giving you unlimited text drawing power! Note that the method used to get the RichTextBox to actually draw the text (that is sending it EM_FORMATRANGE) can also be used to measure the text with a slight modification (MSDN will tell you how).
This code demonstrates a simple and easy way to handle the mouse wheel in VB by method of subclassing.
This code demonstrates a simple and easy way to handle the mouse wheel in VB by method of subclassing.
This code demonstrates a simple and easy way to handle the mouse wheel in VB by method of subclassing.
This code demonstrates a simple and easy way to handle the mouse wheel in VB by method of subclassing.
This code demonstrates a simple and easy way to handle the mouse wheel in VB by method of subclassing.
This code helps to remove some of the more annoying things about designing a GUI in VB. All of the classes here do so by subclassing controls. The classes included are as follows: - CAnchor: Mimics the behaviour of anchored controls in .NET, so that you aren't forever adding code to the Resize event of a form. - CMinMaxSize: Allows you to set the minimum and maximum sizes for a form. - CMouseEvents: Gives you access to the mouse events in Windows that VB does not expose - i.e. hover and leave events, and mouse wheel events. - CRTBLinks: Makes light work of automatic URL detection in the RichTextBox. - CScrollbar: Gives you access to the 'proper' API scrollbars as opposed to VB's ones. The project group includes a test project for you to see it all in action. NOTE: You may have to make the whole project group before it is usable as the test project depends on the library.
This code demonstrates two things: firstly, it shows you how to get a list of network adapters, and secondly, it shows you how to bind to one of them that the user selects and connect through it. This is useful for users who have a separate internet and LAN connection, or two LAN connections, or whatever else. To test it, just run the program, and listen on a port and adapter, then type your IP followed by a colon and the port you selected into your browser's address bar and the program will return the headers the browser sent to the browser. Enjoy!
Recently I found myself wanting more than what DrawText could offer: I wanted to be able to render rich text. Rather than write a function for this myself, I wondered whether I could accomplish this with a RichTextBox, and quite simply in fact. Unfortunately it doesn't render text transparently usually. Unless, that is, you set the WS_EX_TRANSPARENT style, at which point it does render transparently, giving you unlimited text drawing power! Note that the method used to get the RichTextBox to actually draw the text (that is sending it EM_FORMATRANGE) can also be used to measure the text with a slight modification (MSDN will tell you how).
This code demonstrates a simple and easy way to handle the mouse wheel in VB by method of subclassing.
This code helps to remove some of the more annoying things about designing a GUI in VB. All of the classes here do so by subclassing controls. The classes included are as follows: - CAnchor: Mimics the behaviour of anchored controls in .NET, so that you aren't forever adding code to the Resize event of a form. - CMinMaxSize: Allows you to set the minimum and maximum sizes for a form. - CMouseEvents: Gives you access to the mouse events in Windows that VB does not expose - i.e. hover and leave events, and mouse wheel events. - CRTBLinks: Makes light work of automatic URL detection in the RichTextBox. - CScrollbar: Gives you access to the 'proper' API scrollbars as opposed to VB's ones. The project group includes a test project for you to see it all in action. NOTE: You may have to make the whole project group before it is usable as the test project depends on the library.
This code demonstrates two things: firstly, it shows you how to get a list of network adapters, and secondly, it shows you how to bind to one of them that the user selects and connect through it. This is useful for users who have a separate internet and LAN connection, or two LAN connections, or whatever else. To test it, just run the program, and listen on a port and adapter, then type your IP followed by a colon and the port you selected into your browser's address bar and the program will return the headers the browser sent to the browser. Enjoy!
Recently I found myself wanting more than what DrawText could offer: I wanted to be able to render rich text. Rather than write a function for this myself, I wondered whether I could accomplish this with a RichTextBox, and quite simply in fact. Unfortunately it doesn't render text transparently usually. Unless, that is, you set the WS_EX_TRANSPARENT style, at which point it does render transparently, giving you unlimited text drawing power! Note that the method used to get the RichTextBox to actually draw the text (that is sending it EM_FORMATRANGE) can also be used to measure the text with a slight modification (MSDN will tell you how).
This code demonstrates a simple and easy way to handle the mouse wheel in VB by method of subclassing.
This code helps to remove some of the more annoying things about designing a GUI in VB. All of the classes here do so by subclassing controls. The classes included are as follows: - CAnchor: Mimics the behaviour of anchored controls in .NET, so that you aren't forever adding code to the Resize event of a form. - CMinMaxSize: Allows you to set the minimum and maximum sizes for a form. - CMouseEvents: Gives you access to the mouse events in Windows that VB does not expose - i.e. hover and leave events, and mouse wheel events. - CRTBLinks: Makes light work of automatic URL detection in the RichTextBox. - CScrollbar: Gives you access to the 'proper' API scrollbars as opposed to VB's ones. The project group includes a test project for you to see it all in action. NOTE: You may have to make the whole project group before it is usable as the test project depends on the library.
This code demonstrates two things: firstly, it shows you how to get a list of network adapters, and secondly, it shows you how to bind to one of them that the user selects and connect through it. This is useful for users who have a separate internet and LAN connection, or two LAN connections, or whatever else. To test it, just run the program, and listen on a port and adapter, then type your IP followed by a colon and the port you selected into your browser's address bar and the program will return the headers the browser sent to the browser. Enjoy!
Recently I found myself wanting more than what DrawText could offer: I wanted to be able to render rich text. Rather than write a function for this myself, I wondered whether I could accomplish this with a RichTextBox, and quite simply in fact. Unfortunately it doesn't render text transparently usually. Unless, that is, you set the WS_EX_TRANSPARENT style, at which point it does render transparently, giving you unlimited text drawing power! Note that the method used to get the RichTextBox to actually draw the text (that is sending it EM_FORMATRANGE) can also be used to measure the text with a slight modification (MSDN will tell you how).