Click here to Skip to main content
15,905,508 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: seperate string Pin
macmac3828-Sep-04 3:48
macmac3828-Sep-04 3:48 
GeneralRe: seperate string Pin
macmac3828-Sep-04 4:01
macmac3828-Sep-04 4:01 
GeneralRe: seperate string Pin
Jim Matthews28-Sep-04 6:14
Jim Matthews28-Sep-04 6:14 
GeneralRe: seperate string Pin
Nick Seng28-Sep-04 16:11
Nick Seng28-Sep-04 16:11 
GeneralRe: seperate string Pin
macmac3828-Sep-04 23:12
macmac3828-Sep-04 23:12 
GeneralRe: seperate string Pin
Nick Seng28-Sep-04 23:39
Nick Seng28-Sep-04 23:39 
GeneralRe: seperate string Pin
macmac3829-Sep-04 0:03
macmac3829-Sep-04 0:03 
Generaldrag drop file. urgent!! Pin
ekoprasetio28-Sep-04 1:58
ekoprasetio28-Sep-04 1:58 
Hi All,

I need help here. I'm trying to drag a file to my application from windows explorer, then get the file pointer, then I simulate it as if I drag the file to another application, let's say Moto Application. I expect the result to be as the same as I drag the file to Moto Application.

However, the Moto Application somehow doesn't get the file pointer right. Please somebody help me...

Here's my code
<br />
Public Class Form1<br />
  Inherits System.Windows.Forms.Form<br />
  Implements IMessageFilter<br />
<br />
  Public Declare Function DragQueryFile Lib "shell32.dll" Alias "DragQueryFileA" (ByVal HDROP As IntPtr, ByVal UINT As Integer, ByVal lpStr As String, ByVal ch As Integer) As IntPtr<br />
  Public Declare Sub DragAcceptFiles Lib "shell32.dll" Alias "DragAcceptFiles" (ByVal hwnd As IntPtr, ByVal fAccept As Integer)<br />
  Private Declare Sub DragFinish Lib "Shell32.dll" (ByVal hdrop As IntPtr)<br />
  Public Declare Function SendMessageAsInt Lib "user32" Alias "SendMessageA" (ByVal hwnd As IntPtr, ByVal wMsg As Integer, ByVal wParam As IntPtr, ByVal lParam As Integer) As Long<br />
  Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr<br />
  Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As IntPtr, ByVal hWnd2 As IntPtr, ByVal lpsz1 As String, ByVal lpsz2 As String) As IntPtr<br />
  Public Declare Function GetWindow Lib "user32" Alias "GetWindow" (ByVal hwnd As IntPtr, ByVal wCmd As Long) As IntPtr<br />
<br />
  Public Const WM_DROPFILES = &H233<br />
  Public Const GW_CHILD = 5<br />
<br />
  Public Function PreFilterMessage(ByRef m As System.Windows.Forms.Message) As Boolean Implements IMessageFilter.PreFilterMessage<br />
<br />
    If m.Msg = WM_DROPFILES Then<br />
      HandleDroppedFiles(m.WParam)<br />
      Return True<br />
    End If<br />
    Return False<br />
  End Function<br />
<br />
  Public Sub HandleDroppedFiles(ByVal filepoint As IntPtr)<br />
    Dim hndl As IntPtr<br />
    Dim childhndl As IntPtr<br />
    Dim sendstat As Integer<br />
    hndl = FindWindow(vbNullString, "Motorola Sync v1.7")<br />
    If hndl.ToInt32 <> 0 Then<br />
      childhndl = GetWindow(hndl, GW_CHILD)<br />
      childhndl = FindWindowEx(hndl, childhndl, "SysListView32", "List1")<br />
<br />
      SendMessageAsInt(childhndl, WM_DROPFILES, filepoint, 0)<br />
    End If<br />
  End Sub<br />

GeneralSystem.Drawing.Color-&gt;System.UInt32 Pin
El'Cachubrey28-Sep-04 1:10
El'Cachubrey28-Sep-04 1:10 
GeneralRe: System.Drawing.Color-&gt;System.UInt32 Pin
Scott McMaster28-Sep-04 15:32
Scott McMaster28-Sep-04 15:32 
GeneralBind Crystal Report with dataset Pin
nitin_ion28-Sep-04 0:54
nitin_ion28-Sep-04 0:54 
GeneralRe: Bind Crystal Report with dataset Pin
Jim Matthews28-Sep-04 3:12
Jim Matthews28-Sep-04 3:12 
GeneralOutlookBar in VB.NET Pin
Jorge Ernesto27-Sep-04 22:26
Jorge Ernesto27-Sep-04 22:26 
GeneralRe: OutlookBar in VB.NET Pin
Dave Kreskowiak28-Sep-04 2:38
mveDave Kreskowiak28-Sep-04 2:38 
GeneralPositioning of ImageBoxes Pin
tommy_tanaka27-Sep-04 21:57
tommy_tanaka27-Sep-04 21:57 
GeneralRe: Positioning of ImageBoxes Pin
Dave Kreskowiak28-Sep-04 3:59
mveDave Kreskowiak28-Sep-04 3:59 
GeneralRe: Positioning of ImageBoxes Pin
tommy_tanaka28-Sep-04 4:18
tommy_tanaka28-Sep-04 4:18 
GeneralRe: Positioning of ImageBoxes Pin
Dave Kreskowiak28-Sep-04 5:38
mveDave Kreskowiak28-Sep-04 5:38 
GeneralRe: Positioning of ImageBoxes Pin
tommy_tanaka29-Sep-04 3:48
tommy_tanaka29-Sep-04 3:48 
GeneralPermissions to a file Pin
njppp27-Sep-04 21:19
njppp27-Sep-04 21:19 
GeneralRe: Permissions to a file Pin
Dave Kreskowiak28-Sep-04 3:34
mveDave Kreskowiak28-Sep-04 3:34 
GeneralWeb Hosting Pin
Desi Bravo27-Sep-04 19:14
Desi Bravo27-Sep-04 19:14 
GeneralCalling base class functions from a derived one Pin
Verolix27-Sep-04 15:51
Verolix27-Sep-04 15:51 
GeneralRe: Calling base class functions from a derived one Pin
Christian Graus27-Sep-04 16:12
protectorChristian Graus27-Sep-04 16:12 
GeneralRe: Calling base class functions from a derived one Pin
Dave Kreskowiak28-Sep-04 3:28
mveDave Kreskowiak28-Sep-04 3:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.