jennyek2000
Programmer
Hi
I have never used the Windows API before and am a mere beginner at VB.NET.
What I need to know is how to open a file of any type using a windows API call (or is there a better way?). I know how to use the VB.NET openfiledialog and plan to use this in my application. I also found this function definition on a tutorial on the web:
Declare Function OpenFile Lib "kernel32" Alias "OpenFile" (ByVal lpFileName As String, lpReOpenBuff As OFSTRUCT, ByVal wStyle As Long) As Long
I put this in the general declarations section, but for a start it says that OFSTRUCT is not declared. How do I do this? Also how do I use this function to open a file?
If anyone can help me I would be very happy as my first work project needs to be done by next week! I am panicking :-(
Jenny
I have never used the Windows API before and am a mere beginner at VB.NET.
What I need to know is how to open a file of any type using a windows API call (or is there a better way?). I know how to use the VB.NET openfiledialog and plan to use this in my application. I also found this function definition on a tutorial on the web:
Declare Function OpenFile Lib "kernel32" Alias "OpenFile" (ByVal lpFileName As String, lpReOpenBuff As OFSTRUCT, ByVal wStyle As Long) As Long
I put this in the general declarations section, but for a start it says that OFSTRUCT is not declared. How do I do this? Also how do I use this function to open a file?
If anyone can help me I would be very happy as my first work project needs to be done by next week! I am panicking :-(
Jenny