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?
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).
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?
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
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.
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?
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.
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.)
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]
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.
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?
I found that when group by multiple values does not work well with VB.NET, but it works well with C# ,here are my code, is there something wrong with my VB.NET Code? Here is my VB.NET code:
I have an application that requires data be entered, and after entering, a button is clicked to process that data. Clicking the button works just as it should--the data is processed properly. In constructing a test module, I provide a set of data values, followed by:
btnWhatever.PerformClick()
Nothing happens. I have used this syntax for years, and it has always worked flawlessly. I have triple checked everything else and isolated the problem to the failure of the PerformClick(). The PerformClick() is in a test subroutine that does nothing but fill textboxes and labels with default data, then calls the PerformClick() on the button to begin processing. Again, the button works fine, the data is entered as it should be, but the PerformClick() does not fire the click event.
I have a form that works on my local Machine I created into. I have Office 2007 on this machine. I created the Form with the Excel 12 Reference. I move the Entire conetence of the Project folder to my work computer. Which has Office 2003. Do I need to recreate the form with the Excel 11 reference. I could not get the form to work on work computer. IT has a com error. I am acessing the EXE for the debug folder w/in the Bin Folder.
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.
I'm using vb2008 with DB MSA2007 (save it to MSA2003) on Seven(7)System After I create my project I build it(make exe). then I took the file of project (application) and the DB from Debug Folder.
I tried to run this application with DB on another computer it's system is seven and MSA2007 and work very well. then I run it on pc it's system XP and MSA2003. it showed this error
Application Error THE APPLICATION FAILED TO INTIALIZE PROPERLY (0XC000135). Click on OK to terminate the application
I'm building a VB(2010) program to create the graphics for my laserprojector.The program works when I debug it in VB, but when I run the EXE program in the release directory, it doesn't work. The problem in the EXE program is theat I can't draw/view graphics in the picturebox..I coppied my whole program to a new VB project, but I'm having the same problem...In the original project, where the program works, there are no warnings or errors.
I created a windows form application using Visual Basic Express Edition 2008 but I did not know I could not use it on the web, which is what I wanted but being new to VB I just got a lot of headaches trying to figure this out. It works fine as a windows app but now just recently I installed Visual Web Developer 2005 to so I could create a web application from the windows app.
It is a simple windows application of a datagrid but now I want to run the same design application I made in Visual Basic to Visual Web Developer Express 2005. Is this possible? And, what do I need to do? I have all of the associated files in my project folder in Visual Basic Express folder.
how does look-up work in Visual Basic, I have done research on this but it does not explain. I have a Form1 called( Booking form) with 2 ComboBox's and 1 TextBox. each called (Destination_FromComboBox) and (Destination_ToComboBox) and (FareTextBox)and another form2 called (Fares Form) with 3 TextBox's each called TextBox1 (FromTextBox), TextBox2 (ToTextBox2), TextBox3(FareTextBox).So when I select (Booking Form) and Insert or select a Destination from (Destination_FromComboBox) and Insert or select a Destination To (Destination_ToComboBox) I want to read from (Fare Form/Fare Table) and give me the fare in FareTextBox on the Booking Form. Also on the booking I have 3 Radio Buttons
If the time is Between 05:00 & 23:59 then normal time should be used If the time is Between 00:00 & 02:00 then time & half should be used If the time is Between 02:00 & 05:00 then Double time should be used
I have watched loads of video's and looked through forums and other codes for the combination of the above, without success?
I have this great way to use VB6 I treated my project like a .exe file.Say I want to work on c:work directory.I just save as the .vbp file to c:work directory
All the other files (.frm,.bas,.cls) files are in a special directory called library ALL of my .vbp files, in c:work1, c:work2, c:work3 refer to that one same directory.How can I do that in vb.net?
Why this is important? Bugs always happen all the time. If I just run .exe file, when bug happen, I cannot do a thing. However, if I run the project file and run the program in debug mode, when bug happen I can figure out what happen.
I am a CS grad, but haven't had much to do with programming since my school days as I went the BA route.Anyways, there are a few things that I do manually on the computer and thought that I could probably save time by creating an application for them.But I'm not really sure how to start.I'd like to be able to keep a history of Completed eBay listing so that I know when the price point is good and when it is too high.I noticed that eBay has an RSS feed, so I think I can do it. Just a couple of quick questions:
1 - Can I instruct VB.net to open a web browser and read an RSS feed, or would I need to manually do this myself and then run the application?
2 - What is the best way to work with RSS feeds? Should I convert the data into XML first?
I am trying to get a percentage that just does not seem to work.I am using WMI to get the Total Physical memory of my system and then the Free Physical Memory. Then get the percentage.
2147483648 - Total Memory 838028 - Free memory
According to Task Manager my physical memory is 59%. This is the code I am using but I can not get 59% or 41% that is free.
I have a simple application:Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
#If DEBUG Then lblDebug.Text = "Debug" #Else lblDebug.Text = "Not in debug" #End If
Now when I run it in VS, it prints "debug" like it should, but if i run the .exe, it still prints "debug". What do i have to do to get this to work right?