
Nazgulled
Avatar/Signature-
Posts
120 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by Nazgulled
-
Skinned form with black flicker while resizing! (solution attached)
Nazgulled replied to Nazgulled's topic in Windows Forms
Could you be a little more specific on that? And/or provide a little example/sample? What exactly do you mean by "regions" and how would that avoid using layered windows? -
Skinned form with black flicker while resizing! (solution attached)
Nazgulled replied to Nazgulled's topic in Windows Forms
You may be right... :) But how does that help us/me fix the problem? Whenever I get the chance (dunno when cause I'm full of university work and exams) I'll try a couple of things and post the results but if anyone has any more suggestions... -
Skinned form with black flicker while resizing! (solution attached)
Nazgulled replied to Nazgulled's topic in Windows Forms
@PlausiblyDamp Vista 32bits with ATi card (mobility) @marble_eater Yes, it's supposed to support irregular shapes that's why the transparency key is there... but I don't think the transparency key has anything to do with layered windows... -
Skinned form with black flicker while resizing! (solution attached)
Nazgulled replied to Nazgulled's topic in Windows Forms
Using your code or mine? I think I tried with my version but it was the same, maybe yours will be better if I use it on the OnPaint event? -
Skinned form with black flicker while resizing! (solution attached)
Nazgulled replied to Nazgulled's topic in Windows Forms
I'll try that when I get the chance, question though... Why don't you call "base.OnPaintBackground(e);" at all? Either in the beginning or end of the method? EDIT: Just tried your code and I'm not sure it helped, at least my eye can't notice much of a difference... And it presented a new problem. The example I gave is a perfectly squared form, however, I tried with non-square example and with your code a black background would appear on the transparent parts... -
Hi, I'm trying to create some skinned forms (just the border and caption) with a different approach than you usually see but I'm having some issues with form flickering while I re size the form. I don't know how else to explain the problem, so here's a video I created of the problem: http://screencast.com/t/iDv7mPEi0XY Also, here's a VS2008 test solution with the whole code that repaints the form borders: http://stuff.nazgulled.net/misc/TestForm.zip Hope someone can help me getting rid of the flicker...
-
[C#] IComponentChangeService, ISelectionService & IDesignerHost
Nazgulled replied to Nazgulled's topic in Windows Forms
What does everyone think? -
[C#] IComponentChangeService, ISelectionService & IDesignerHost
Nazgulled replied to Nazgulled's topic in Windows Forms
Well, that's quite hard to do as the code is pretty big and separated in classes, I don't even know where to start showing a sample... However, someone suggested me to override the ISite interface in the User Control code and something like this: [csharp]public partial class PageStrip : UserControl { public override ISite Site { get { return base.Site; } set { base.Site = value; if (base.Site == null) return; Global.ICCS = (IComponentChangeService)GetService(typeof(IComponentChangeService)); Global.ISS = (ISelectionService)GetService(typeof(ISelectionService)); Global.IDH = (IDesignerHost)GetService(typeof(IDesignerHost)); } } }[/csharp] Is working for now... -
@PlausiblyDamp Thanks, but that is called every time you open the form. Meaning if you close the tab with the form and reopen it (or close the solution and reopen), it will be called every time. @marble_eater Thank you so much, it worked, at least seems to be working... I just don't know the different between ControlDesigner and ParentControlDesigner, but I'm using Parent for now. So, my code is now like this: [csharp]private PageStrip pageStrip; public override void Initialize(IComponent component) { base.Initialize(component); // Record instance of the control we are designing pageStrip = (PageStrip)component; // Hook up events Global.ISS.SelectionChanged += new EventHandler(OnSelectionChanged); Global.ICCS.ComponentRemoving += new ComponentEventHandler(OnComponentRemoving); } public override void InitializeNewComponent(IDictionary defaultValues) { base.InitializeNewComponent(defaultValues); // Global.AddNewPageStrip(pageStrip); Global.AddNewPageStrip(pageStrip); }[/csharp] And one thing that I never knew when overriding methods is about the "base.SOMETHING" methods. Look at "base.InitializeNewComponent(defaultValues);" and "base.Initialize(component);". Should my code be above or below these lines? And why? I've always placed the code below those code lines but I'm not sure if this is the right way. If you can provide me more insight on this, I wouldn't mind to know more :)
-
[C#] IComponentChangeService, ISelectionService & IDesignerHost
Nazgulled replied to Nazgulled's topic in Windows Forms
Anyone? -
I'm doing this custom user control, I'm also working with designers and I need to use the Interfaces described in the topic subject. But I have a little situation. If any of those interfaces are not initialized somewhere in the code (ie: IComponentChangeService ICCS = (IComponentChangeService)GetService(typeof(IComponentChangeService))), I get an exception. But, I'm using these interfaces in lots of places in the code and in different classes, one of them doesn't even allow me to use the "GetService" method, it says it is not available in this context. So, I'm looking for a way, to initialize these 3 interfaces just once and be able to use them everywhere I want. But I'm not being successful, how can I accomplish that?
-
Hi there, I'm doing this custom user control but I'm having a little issue. This UC has a ToolStrip added to it and I'm working with control designers which allowed me to create the following: http://stuff.nazgulled.net/images/pagestrip-action-preview.jpg When you click on "Insert New Page", a method will be called which will create a new button that will be added to the ToolStrip and a Panel will also be added to the UC which will be associated with the the ToolStrip button. So, if we had a bunch of "Pages", whenever you click a button, the Panel associated will turn visible while the others not visible. So far so good? Now, what I want... Let's say that this UC is almost coded. I compile to a dll file and then I can use it wherever I want. To use it, I just add the dll file to the project and then, drag the UC (which is called PageStrip by the way) from the ToolBox to a form. Now, there's a functionality that I want to be here... When you drag the UC to the form, there won't be any buttons or panels (let's call it "pages" from now on), you'll have to add them manually (like explained in the paragraph above). What I want is a couple of "pages" to be added automatically when the UC is added to the form. Just the way the TabControl works. When you add a TabControl to a form, you'll have 2 tabs already added. How can I achieve the same thing? How can I call twice the same method that is called on "Insert New Page" one time only, and that is, when the UC is added to the form. I have no clue on how to do that. My first and only try was overriding the OnPaint event of the UC and call the method there, then, I would assigned the "true" value to a variable so this would only be called once. However, this would only work while the project was opened. If I closed the project and reopened it, the variable that controlled if a "page" was already added would be "false", the default value. There must be someway to accomplish this without having to workaround like I did using the OnPaint event. Any hints? I hope this detailed post is enough to explain my problem and not to confuse you.
-
Hi, I have the following code I got from divil (Introduction to Designers): [csharp]using System; using System.Collections; using System.ComponentModel; using System.Drawing; using System.Data; using System.Windows.Forms; using System.ComponentModel.Design; using System.Windows.Forms.Design; namespace CSharpTest { [Designer(typeof(MyControlDesigner))] public class UserControl1 : UserControl { public Button button1 = new Button(); public void TestMethod() { } } internal class MyControlDesigner : ControlDesigner { public override DesignerVerbCollection Verbs { get { DesignerVerbCollection v = new DesignerVerbCollection(); v.Add(new DesignerVerb("Sample Verb", new EventHandler(SampleVerbHandler))); return v; } } private void SampleVerbHandler(object sender, System.EventArgs e) { // CODE GOES HERE } } }[/csharp] This codes places a task link in my subclassed usercontrol that I have placed on a form: http://stuff.nazgulled.net/images/designerverb.jpg I need to know how can I acces the controls/methods in the UserControl1 class inside the SampleVerbHandler(). Is this possible, how?
-
[C#] Subclassing ToolStrip + Overriding OnPaint Event
Nazgulled replied to Nazgulled's topic in Windows Forms
Nevermind! The problem was on e.ClipRectangle.Height/e.ClipRectangle.Width and I just replaced it by base.Height/base.Width and I also changed to the OnBackgroundPaint as it makes more sense. -
[C#] Subclassing ToolStrip + Overriding OnPaint Event
Nazgulled replied to Nazgulled's topic in Windows Forms
Can't nobody help me out? -
I have subclassed the ToolStrip and ToolStripProfessionalRenderer to make a toolbar work much like of Thunderbird's (version 2) options dialog. I have that goal accomplished but I have a little issue... I also tried to override the OnPaint event of ToolStrip so I could 2 little lines just below the ToolStrip, but for some reason, it's producing unexpected results. The first 2 buttons in the ToolStrip also have parts of those lines painted above them and I can't see why that's happening. The strange thing is, it only happens on the first 2 buttons (I tried to delete them and re add them, but it didn't work). Below, there's a screenshot and the code: http://stuff.nazgulled.net/images/firenotesoptions.jpg using System; using System.Collections.Generic; using System.Text; using System.Drawing; using System.Windows.Forms; namespace FireNotes { internal class MyToolStrip : ToolStrip { protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); Pen cDarkDark = new Pen(SystemColors.ControlDarkDark); Pen cLightLight = new Pen(SystemColors.ControlLightLight); e.Graphics.DrawLine(cDarkDark, 0, e.ClipRectangle.Height - 2, e.ClipRectangle.Width + 1, e.ClipRectangle.Height - 2); e.Graphics.DrawLine(cLightLight, 0, e.ClipRectangle.Height - 1, e.ClipRectangle.Width + 1, e.ClipRectangle.Height - 1); } protected override void OnItemClicked(ToolStripItemClickedEventArgs e) { SwapSelectedButton((ToolStripButton)e.ClickedItem); base.OnItemClicked(e); } private void SwapSelectedButton(ToolStripButton tsbSelected) { ToolStripButton tsbThis; foreach (ToolStripItem tsItem in base.Items) { tsbThis = tsItem as ToolStripButton; if (tsbThis != tsbSelected) { tsbThis.Checked = false; } else { tsbThis.Checked = true; } } } } internal class MyToolStripProfessionalRenderer : ToolStripProfessionalRenderer { protected override void OnRenderButtonBackground(ToolStripItemRenderEventArgs e) { ToolStripButton tsbItem = e.Item as ToolStripButton; Rectangle rect = new Rectangle(0, 0, 70, 43); if (tsbItem.Checked || (tsbItem.Selected && tsbItem.Checked)) { tsbItem.ForeColor = Color.White; e.Graphics.DrawImage(Properties.Resources.TSButton_State2, rect); } else if (tsbItem.Selected) { tsbItem.ForeColor = Color.White; e.Graphics.DrawImage(Properties.Resources.TSButton_State1, rect); } } } }
-
How do I save font properties from a TextBox? I have this application where I store the application settings in a xml file and I'm looking for a way to save the most important settings about fonts. The application as a textbox to wrote some text and the users can configure the font as they like and I need to save that so when the application runs again, I restore the users selection. Examples in C# are preferred but VB.NET will do too... PS: I don't want to use a richtextbox, that's out of the question for now.
-
[VB.NET] Cross-Process Data Extraction: How?
Nazgulled replied to Nazgulled's topic in Interoperation / Office Integration
Here it is... The variable bText is supposed to get the tooltip from each systray icon (doesn't do anything with it, but while debugging I checked and there was only an empty string). Also bInfo values should have some values in each structure element but they are all the same through the button loop and almost all zeros. Hope you find a way to sort it out, I must be doing something wrong... TrayTest.zip -
[VB.NET] Cross-Process Data Extraction: How?
Nazgulled replied to Nazgulled's topic in Interoperation / Office Integration
And the rest of the code is the following. The program compiles and runs but it doesn't work as expected. Program.vb [VBNET]Imports System.Runtime.InteropServices Imports TrayTest.Common Module Program Public Const WM_USER As Short = &H400S Public Const TB_GETBUTTON As Integer = (WM_USER + 23) Public Const TB_BUTTONCOUNT As Integer = (WM_USER + 24) Public Const TB_COMMANDTOINDEX As Integer = (WM_USER + 25) Public Const TB_GETBUTTONTEXTA As Integer = (WM_USER + 45) Public Sub Main() Dim hWndTray As IntPtr = GetToolbarWindowHandle() GetToolbarButtons(hWndTray) End Sub Private Function GetToolbarWindowHandle() As IntPtr Dim hWnd As IntPtr hWnd = User32.FindWindow("Shell_TrayWnd", Nothing) hWnd = User32.FindWindowEx(hWnd, Nothing, "TrayNotifyWnd", Nothing) hWnd = User32.FindWindowEx(hWnd, Nothing, "SysPager", Nothing) hWnd = User32.FindWindowEx(hWnd, Nothing, "ToolbarWindow32", Nothing) Return hWnd End Function Private Sub GetToolbarButtons(ByVal hWndTray As IntPtr) Dim bInfo As TBBUTTON Dim xpBuffer As Integer Dim bText As String Dim tbCount As Integer Dim lret As Integer ' Get button count tbCount = User32.SendMessage(hWndTray, TB_BUTTONCOUNT, 0, 0) If tbCount <= 0 Then Exit Sub ' Need a buffer? Ask Dr Memory! xpBuffer = drMemoryAlloc(CInt(hWndTray), 4096) For tbIndex As Integer = 0 To tbCount - 1 ' TB_GETBUTTON User32.SendMessage(hWndTray, TB_GETBUTTON, tbIndex, xpBuffer) drMemoryRead(xpBuffer, VarPtr(bInfo), Len(bInfo)) lret = User32.SendMessage(hWndTray, TB_GETBUTTONTEXTA, bInfo.idCommand, xpBuffer) If lret > 0 Then bText = New String(Chr(0), lret + 1) drMemoryRead(xpBuffer, VarPtr(bText), lret) Else bText = "" End If Next drMemoryFree(xpBuffer) End Sub Private Function VarPtr(ByVal o As Object) As Integer Dim GC As GCHandle = GCHandle.Alloc(o, GCHandleType.Pinned) Dim vAddress As IntPtr = GC.AddrOfPinnedObject GC.Free() Return Marshal.ReadInt32(vAddress) End Function End Module[/VBNET] User32.vb [VBNET]Imports System.Runtime.InteropServices Namespace Common #Region " Strcuture Declarations " <StructLayout(LayoutKind.Sequential)> _ Friend Structure TBBUTTON Public iBitmap As Integer Public idCommand As Integer Public fsState As Byte Public fsStyle As Byte Public bReserved1 As Byte Public bReserved2 As Byte Public dwData As Integer Public iString As Integer End Structure #End Region #Region " API Declarations " Friend Class User32 <DllImport("user32.dll")> _ Public Shared Function SendMessage( _ ByVal hWnd As IntPtr, _ ByVal msg As Integer, _ ByVal wParam As Integer, _ ByVal lParam As Integer) As Integer End Function <DllImport("user32.dll", CharSet:=CharSet.Auto)> _ Public Shared Function FindWindow( _ ByVal lpClassName As String, _ ByVal lpWindowName As String) As IntPtr End Function <DllImport("user32.dll", CharSet:=CharSet.Unicode)> _ Public Shared Function FindWindowEx( _ ByVal hwndParent As IntPtr, _ ByVal hwndChildAfter As IntPtr, _ ByVal lpszClass As String, _ ByVal lpszWindow As String) As IntPtr End Function End Class #End Region End Namespace[/VBNET] What code program do and what's supposed to do: First, it will find the systray (notification area) window handler, count all the toolbar buttons (icons in the systray) and then get the text (tooltip) from each button and store it in bText. The tooltip value isn't saved, the code just loops through every button, get's the text and does nothing with it. This is what the code is supposed to do. Everything works except the part to get the tooltip text from the button. I don't understand why but bInfo is always "empty" (zeros in most values). Any suggestions? -
[VB.NET] Cross-Process Data Extraction: How?
Nazgulled replied to Nazgulled's topic in Interoperation / Office Integration
This is the code from DrMemory converted to VB.NET: DrMemory.vb [VBNET]'======================================================================= ' ' drMemory - Cross-Process Memory Buffer support ' ' © 2003 "Dr Memory" ==> Jim White ' MathImagics ' Uki, NSW, Australia ' Puttenham, Surrey, UK ' ' This module contains functions that provide both WinNT and Win9x ' style cross-process memory buffer allocation, read and write ' functions. ' ' These functions are typically required when trying to use ' SendMessage to exchange data with windows in another process. ' ' '======================================================================= ' Usage guide: ' ' 1. Allocate buffer(s) in the target process ' ' xpWindow& = <<target control window handle>> ' xpBuffer& = drMemoryAlloc(xpWindow, nBytes) ' ' 2. Prepare the data to be passed to the control ' and copy it into the buffer ' ' drMemoryWrite xpBuffer, myBuffer, nBytes ' ' 3. SendMessage xpWindow, MSG_CODE, wParam, ByVal xpBuffer ' ============== ' ' 4. Extract return data ' ' drMemoryRead xpBuffer, myBuffer, nBytes ' ' (repeat 3/4 as necessary) ' ' 5. Release the buffer ' ' drMemoryFree xpBuffer ' '======================================================================= Imports System.Runtime.InteropServices Module DrMemory Private PlatformKnown As Boolean ' have we identified the platform? Private NTflag As Boolean ' if so, are we NT family (NT, 2K,XP) or non-NT (9x)? Private fpHandle As Integer ' the foreign-process instance handle. When we want ' memory on NT platforms, this is returned to us by ' OpenProcess, and we pass it in to VirtualAllocEx. ' We must preserve it, as we need it for read/write ' operations, and to release the memory when we've ' finished with it. ' For this reason, on NT/2K/XP platforms this module should only be used to ' interface with ONE TARGET PROCESS at a time. In the future I'll rewrite ' this as a class, which can handle multiple-targets, automatic allocation ' de-allocation, etc ' Private WIN As OperatingSystem = Environment.OSVersion '================== Win95/98 Process Memory functions Private Declare Function CreateFileMapping Lib "kernel32" (ByVal hFile As Integer, ByVal lpFileMappigAttributes As Integer, ByVal flProtect As Integer, ByVal dwMaximumSizeHigh As Integer, ByVal dwMaximumSizeLow As Integer, ByVal lpName As String) As Integer Private Declare Function MapViewOfFile Lib "kernel32" (ByVal hFileMappingObject As Integer, ByVal dwDesiredAccess As Integer, ByVal dwFileOffsetHigh As Integer, ByVal dwFileOffsetLow As Integer, ByVal dwNumberOfBytesToMap As Integer) As Integer Private Declare Function UnmapViewOfFile Lib "kernel32" (ByRef lpBaseAddress As Integer) As Integer Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Integer) As Integer '================== WinNT/2000 Process Memory functions Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcId As Integer) As Integer Private Declare Function VirtualAllocEx Lib "kernel32" (ByVal hProcess As Integer, ByVal lpAddress As Integer, ByVal dwSize As Integer, ByVal flAllocationType As Integer, ByVal flProtect As Integer) As Integer Private Declare Function VirtualFreeEx Lib "kernel32" (ByVal hProcess As Integer, ByVal lpAddress As Integer, ByVal dwSize As Integer, ByVal dwFreeType As Integer) As Integer Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByVal lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByVal lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Integer '================== Common Platform Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Integer, ByRef lpdwProcessId As Integer) As Integer Private Declare Sub CopyMemory Lib "kernel32" (ByVal lpDest As Integer, ByVal lpSource As Integer, ByVal cBytes As Integer) Private Declare Function lstrlenA Lib "kernel32" (ByVal lpsz As Integer) As Integer Private Declare Function lstrlenW Lib "kernel32" (ByVal lpString As Integer) As Integer Private Declare Function GetClassName Lib "user32" (ByVal hwnd As Integer, ByVal lpClassName As String, ByVal nMaxCount As Integer) As Integer Public Declare Function GetParent Lib "user32" (ByVal hwnd As Integer) As Integer ' ---------- Const PAGE_READWRITE As Short = &H4S Const MEM_RESERVE As Integer = &H2000 Const MEM_RELEASE As Integer = &H8000 Const MEM_COMMIT As Integer = &H1000 Const PROCESS_VM_OPERATION As Short = &H8S Const PROCESS_VM_READ As Short = &H10S Const PROCESS_VM_WRITE As Short = &H20S Const STANDARD_RIGHTS_REQUIRED As Integer = &HF0000 Const SECTION_QUERY As Short = &H1S Const SECTION_MAP_WRITE As Short = &H2S Const SECTION_MAP_READ As Short = &H4S Const SECTION_MAP_EXECUTE As Short = &H8S Const SECTION_EXTEND_SIZE As Short = &H10S Const SECTION_ALL_ACCESS As Boolean = CBool(STANDARD_RIGHTS_REQUIRED Or SECTION_QUERY Or SECTION_MAP_WRITE Or SECTION_MAP_READ Or SECTION_MAP_EXECUTE Or SECTION_EXTEND_SIZE) Const FILE_MAP_ALL_ACCESS As Boolean = SECTION_ALL_ACCESS Public Function drMemoryAlloc(ByVal xpWindow As Integer, ByVal nBytes As Integer) As Integer ' ' Returns pointer to a share-able buffer (size nBytes) in target process ' that owns xpWindow ' Dim xpThread As Integer ' target control's thread id Dim xpID As Integer ' process id If WindowsNT() Then xpThread = GetWindowThreadProcessId(xpWindow, xpID) drMemoryAlloc = VirtualAllocNT(xpID, nBytes) Else drMemoryAlloc = VirtualAlloc9X(nBytes) End If End Function Public Sub drMemoryFree(ByVal mPointer As Integer) If WindowsNT() Then VirtualFreeNT(mPointer) Else VirtualFree9X(mPointer) End If End Sub Public Sub drMemoryRead(ByVal xpBuffer As Integer, ByVal myBuffer As Integer, ByVal nBytes As Integer) If WindowsNT() Then ReadProcessMemory(fpHandle, xpBuffer, myBuffer, nBytes, 0) Else CopyMemory(myBuffer, xpBuffer, nBytes) End If End Sub Public Sub drMemoryWrite(ByVal xpBuffer As Integer, ByVal myBuffer As Integer, ByVal nBytes As Integer) If WindowsNT() Then WriteProcessMemory(fpHandle, xpBuffer, myBuffer, nBytes, 0) Else CopyMemory(xpBuffer, myBuffer, nBytes) End If End Sub Public Function WindowsNT() As Boolean ' return TRUE if NT-like platform (NT, 2000, XP, etc) If Not PlatformKnown Then GetWindowsVersion() WindowsNT = NTflag End Function Public Function WindowsXP() As Boolean ' return TRUE only if XP If Not PlatformKnown Then GetWindowsVersion() WindowsXP = NTflag And (WIN.Version.MinorRevision <> 0) End Function Public Sub GetWindowsVersion() If WIN.Platform = PlatformID.Win32NT Then NTflag = True PlatformKnown = True ElseIf WIN.Platform = PlatformID.Win32Windows Then PlatformKnown = True End If End Sub '============================================ ' The NT/2000 Allocate and Release functions '============================================ Private Function VirtualAllocNT(ByVal fpID As Integer, ByVal memSize As Integer) As Integer fpHandle = OpenProcess(PROCESS_VM_OPERATION Or PROCESS_VM_READ Or PROCESS_VM_WRITE, CInt(False), fpID) VirtualAllocNT = VirtualAllocEx(fpHandle, 0, memSize, MEM_RESERVE Or MEM_COMMIT, PAGE_READWRITE) End Function Private Sub VirtualFreeNT(ByVal MemAddress As Integer) Call VirtualFreeEx(fpHandle, MemAddress, 0, MEM_RELEASE) CloseHandle(fpHandle) End Sub '============================================ ' The 95/98 Allocate and Release functions '============================================ Private Function VirtualAlloc9X(ByVal memSize As Integer) As Integer fpHandle = CreateFileMapping(&HFFFFFFFF, 0, PAGE_READWRITE, 0, memSize, vbNullString) VirtualAlloc9X = MapViewOfFile(fpHandle, CInt(FILE_MAP_ALL_ACCESS), 0, 0, 0) End Function Private Sub VirtualFree9X(ByVal lpMem As Integer) UnmapViewOfFile(lpMem) CloseHandle(fpHandle) End Sub Public Function dmWindowClass(ByVal hWindow As Integer) As String Dim className As String Dim cLen As Integer className = New String(Chr(0), 64) cLen = GetClassName(hWindow, className, 63) If cLen > 0 Then className = Left(className, cLen) dmWindowClass = className End Function End Module[/VBNET] -
[VB.NET] Cross-Process Data Extraction: How?
Nazgulled replied to Nazgulled's topic in Interoperation / Office Integration
No I haven't, cause I don't know exactly how to look for what I want... I know that the above code will work, cause the example used is almost what I want to do... I'll try to convert it again and post the results here... -
I came across this: http://www.xtremevbtalk.com/showthread.php?t=114019 And it's almost exactly what I want, the problem is, it's Legacy VB and I need it for VB.NET... Is there a module with these memory functions in VB.NET? I tried to convert them but I got no luck and when I fixed an error, another one popped up... Can anyone help me?