ShowCursor very limited
I was hoping that calling ShowCursor 0 would hide the cursor always, and ShowCursor 1 would show it always. Unfortunately this does not work. What I end up with is it hiding the cursor in ONLY my...
View Article[RESOLVED] exist any api function for clean the keyboard buffer?
i did 1 funtion fore read any data from keyboard and works fine. but sometimes, before we ask\read something, it can be something in keyboard buffer that we don't need. so is there any function for...
View ArticleMouse Move and Click with Windows API Function SendInput
Dear folks, I need your help on this. I need to move the mouse pointer to a give x,y coordinate, and then perform a click. I've found several samples of how to use Windows Api "SendInput" function in...
View ArticleExecution of exported dll function in remote process
Hi all I have a standard win32 dll ( not an ActiveX dll ) named Test.dll which exports a simple function called MyExportSub ... This is actually a Sub not a Function that simply displays a MsgBox for...
View Articleconsole trouble
Hey all, I am writing a simple program that's supposed to open a file, maximize the file, take a screenshot, and save the picture to the desktop. It's opening and maximizing the file but when the...
View Articleweather app using feeds from yahoo!
Hey check it out, I made this app that tracks the weather using live feeds from yahoo. Maybe it can inspire you to make the next great app? Oh yeah, I made this video using code from a book called in...
View ArticleSendInput - Function to type ASCII characters - where's the flaw?
Dear friends, I need to fill a "File Open" dialog box with a string (file path and name). Since my language has plenty of characters on the extended ASCII - for instance, a file can be named...
View Article[RESOLVED] What API call do I use to force a refresh of the whole screen?
When I do this using these API calls the TextOut, GetDesktopWindow, GetWindowDC, and ReleaseDC: Code: dim MyWnd as long dim MyDC as long MyWnd=getdesktopwindow MyDC=getwindowdc(MyWnd) TextOut...
View ArticleWhat is the proper way to pass null in this case?
According to MSDN docs on InvalidateRect API (found here http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx ) it says: Quote: lpRect [in] A pointer to a RECT structure that contains the client...
View ArticleStrange SendMessage API Lag/Delay Issue
Hello I am trying to automate a few non standard systems by using common API's such as SendMessage & PostMessage. I can use these API's as I intended, however there are issues where the code seems...
View ArticleSelectedValueChanged event for DYNAMICALLY created combobox
hi,i am doing some programming using vb 2010, I want to create a simple SelectedValueChanged event for DYNAMICALLY created combobox but i just don't know how to do it. here is the sample code : Dim...
View ArticleLocalAlloc verus GlobalAlloc?
According to MSDN, there isn't much difference between these memory allocation API calls. But from the names, I assume LocalAlloc only allocates memory available to the calling program, while...
View ArticleWhat is a NULL in WinAPI?
Often in API functions there are arguments that can be filled with a data type (like RECT, for graphics areas) or can be passed a NULL to use a default (such as the whole screen, for graphics areas)....
View ArticleHow do I assign an array to a DIB?
I know that to create a DIB I use CreateDIBSection I know that to create a DC for the DIB I use CreateCompatibleDC Then to select the DIB for use in the DC I use SelectObject At this point I can copy...
View ArticleQUERRYESCSUPPORT with ExtEscape
Hi, I am trying to determine if a printer is postscript in Excel via VBA. I go the idea from KB C article here: HTML Code: http://support.microsoft.com/kb/264036 My declare is as follows: Code: Private...
View ArticleIs FlushFileBuffer absolutely needed?
If I open a file with CreateFile, write to it with WriteFile, and then close it with CloseHandle, doesn't this automatically cause the data to get written to the file? Or is there some possibility that...
View ArticleConditional Compilation for Declare Statements
I have several User Defined Types (UDT) of different DEVMODE structures that I would like to declare a variable with conditionally based on passing a variable argument to a function. My test code looks...
View ArticleDetermine the handle to Parent window of the printer configuration property...
I need to obtain the handle to the parent window of the printer-configuration property sheet in Excel. I think I have to use FindWindow, Code: Declare Function FindWindow Lib "user32" Alias...
View ArticleHow do I use SendMessage and GetMessage?
I want to be able to send data from one program to another with SendMessage and GetMessage (in the user message range from &h0400 to &h7fff). The problem is on the receiving end, GetMessage...
View ArticleHow do I use OleCreatePictureIndirect?
I've heard that it can create an StdPicture or IPictureDisp object, when given the handle to a Bitmap. Unfortunately I don't have the slightest clue how to use this API call. It sounds like it could be...
View Article