SwitchParent - App With The SetParent And SetWindowLong APIs
Feb 3, 2011
I have consumed a word doc in my app with the SetParent and SetWindowLong APIs. When I close the app I want to leave the word doc open. I have used the SetParent and used IntPtr.Zero(2nd parameter) which kinda works - it just does not have a document border. Would I use the SetWindowLong function - if so what would the parameters be? I have looked at the SetWindowLong function, just not sure about the second and last parameters. What would be the proper way to do this?
CODE:
View 7 Replies
ADVERTISEMENT
Feb 11, 2010
I cannot subclass a window form some reason (running as administrator) Is there something I missed here:
vb.net
Public Delegate Function WndProc( _
ByVal hWnd As IntPtr, _
[Code].....
View 2 Replies
Apr 9, 2010
I have been trying to open MS word within a form container. Tried the following code that I got from the vbforums, but ms word opens as a separate window than the actual form.
Public Shared Function SetParent(ByVal hWndChild As IntPtr, ByVal hWndNewParent As IntPtr) As Integer
End Function
[code].....
View 5 Replies
Sep 14, 2011
Ok so I've been struggling for a few hours now,
Private tHandle As HandleRef
Private tPlacement As xWinPlacement
Private Sub Mainfrm_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles
[code].....
View 4 Replies
Sep 21, 2011
I've recently gotten over the hurdle of a Borderless form that doesn't show in the Taskbar to not be hidden when the user clicks the Show Desktop button in windows by using the SetParent API to make the windows all children of the desktop, but now I can't change the Opacity of the form, it throws an exception:
[Code]...
View 11 Replies
Feb 14, 2011
How can I show a form as a child of a window that isn't in my program?I have a window handle to what should be the parent, but I don't see any managed method for SetParent() on a form. Is there one? It also seems that the form.Show() method only accepts managed objects implementing IWin32Window.f there isn't a managed method, what is the preferred method for declaring the API for maximum compatibility with future systems? Like this?:
<DllImport("user32.dll")> _
Private Shared Function SetParent(hWndChild As IntPtr, hWndNewParent As IntPtr) As IntPtr
End Function
[code].....
View 1 Replies
Feb 20, 2009
i am terrible when it comes to the programming area of APIs. Though APIs are well used in Visual Basic.NET so i must learn it.How do APIs work?How are they used?Can anyone either explain or supply me with a link about writing an API?
View 3 Replies
Mar 12, 2009
Is it possible to get information on the APIs in Vb.Net?
View 2 Replies
Mar 17, 2011
To programming in Python, I was wondering if there is a way to access VB .net APIs using Python.
View 1 Replies
Jul 27, 2009
Show the page where i can get all the APIs used in vb.net? Also i need a program to put my Vb.net program in the startup.
View 8 Replies
Nov 25, 2009
APIs for Printer Page number
View 2 Replies
Jul 13, 2011
I am currently working on an application to automate file download(s). My main application is running a query for downloads with embedded browser. When the results are returned they need to be downloaded and saved. This works fine. The last step of the process it to start download and the 'File Download' dialog pops up. I wanted to create another application that would monitor for the 'File Dialog' windows (knowing the main application Process ID I can ensure that I find only the dialogs generated by my application).
View 7 Replies
Jan 5, 2011
Long story short, code that used to work on my 32 bit computer doesn't work on my 64 bit computer. Does 64 bit require something like changing Integers -> IntPtrs?
View 11 Replies
Jan 26, 2012
I need an API for sendmessage and sendmessagetimeout for my VB .net application. I have searched quite a bit, and everything I find doesn't seem to work: either the message just doesnt seem to be sent, or the message appears to be sent with the msg parameter always 0, and the wparam setting as what I enter for the msg setting. Pinvoke's also always seems to throw an AccessViolationException for I have no idea what reason. I tried playing around with maybe just where I put the variable, but unsurprisingly, there is not a simple logical switch of the variables.I have tried pinvoke's:
<DllImport("user32.dll", SetLastError:=True)> _
Public Shared Function SendMessageTimeout(ByVal windowHandle As IntPtr, ByVal Msg As Integer, ByVal wParam As IntPtr, ByVal lParam As IntPtr, ByVal flags As
[code].....
View 1 Replies
Jun 3, 2009
What is the difference between the winreg and advapi32.dll APIs. I am trying to convert a VB code into Python. I have seen that the VB code has RegOpenKeyEx() from advapi32.dll. Now in Python, there is a topic on WinReg access and there this api RegOpenKeyEx() is mentioned. can I use this instead.
View 1 Replies
Dec 23, 2009
Finding the documentation on windows API's for use with visual basic? I used to use API guide until they stopped updating it in 2002. All I need is the api name as well as the list of parameters in order to use the API's functions.
View 2 Replies
Jun 6, 2012
Am writing a GPS application but I need APIs or Libraries I can easily use. It's supposed to work real time...
View 5 Replies
Mar 12, 2010
I am refactoring a large and complicated code base in .NET that makes heavy use of P/Invoke to Win32 APIs. The structure of the project is not the greatest and I am finding DllImport statements all over the place, very often duplicated for the same function, and also declared in a variety of ways:The import directives and methods are sometimes declared as public, sometimes private, sometimes as static and sometimes as instance methods. My worry is that refactoring may have unintended consequences but this might be unavoidable.
My instict is to organize a static/shared Win32 P/Invoke API class that lists all of these methods and associated constants in one file... EDIT There are over 70 imports to the user32 DLL.(The code base is made up of over 20 projects with a lot of windows message passing and cross-thread calls. It's also a VB.NET project upgraded from VB6 if that makes a difference.)
View 6 Replies
Mar 10, 2012
I'm having some problems with some API calls. I'm trying to return device driver information for a given device in device manager so I can access the available information and display it. I'm using a series of API calls which in turn populates a list with device driver objects associated with that device. The API calls fail. The problem is that I can't find any reference material online for these APIs so I can figure out what's wrong. [code]
View 1 Replies
Sep 19, 2009
can we unzip a zipped folder using microsoft APIs or namespaces perhaps System.IO.Compression. However, it seems to be cumbersome to use them. With a thrid party dll file it works perfectly fine, however i dont want to use it as we dont know what is actually happening inside. Can we have a piece of code which unzips a zipped folder.
View 3 Replies
Mar 18, 2009
Some win32 apis not working in vb 2008 .
In vb6 this code is working :
Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long
Private Sub Form_Load()
Call Beep(4322, 200)
End Sub
but when i try this in vb 2008 not working? not just beep of course, i tried more than 20 apis and maybe half of them worked. I dont know where is the problem. Should i do something special before calling apis in vb 2008?
View 8 Replies
Jul 11, 2011
Basically I'm going to try and develop a software that merges PDFs automatically using the PDFSharp API.What I want in the program is to basically that: Have the program to give and Input and Output directoryMerge all the documents in the directory or sub-directoryRename the merged PDF file according the the name of the directory/sub-directoryIf the folder has PDF files and a Sub-Directory I want to merge the PDF files in the folder and rename them as per the main folder, and rename the files in the sub-folder according to its name (i.e. seperate|)
It's the first time I'm using an API.The problem I have is how to use the directories and sub-directories as I need them.
View 2 Replies