Solved

Option Strict On requires all variable declarations to have an 'As' clause.

Posted on 2006-06-30
2
665 Views
Last Modified: 2008-02-01
I got Option Strict On requires all variable declarations to have an 'As' clause. on the following line of code, when I turn on the option on strict.

Private Const WM_KEYDOWN = &H100

How to add AS into it?

What is WM_KEYDOWN's type?

I got the code clock from http://www.syncfusion.com/FAQ/WindowsForms/FAQ_c44c.aspx#q898q. It added a confirmation popup to the datagrid if user wants to delete a row from it. Here is its only function.

   Public Overrides Function PreProcessMessage(ByRef msg As System.Windows.Forms.Message) As Boolean
        Dim keyCode As Keys = CType((msg.WParam.ToInt32 And Keys.KeyCode), Keys)
        If msg.Msg = WM_KEYDOWN And keyCode = Keys.Delete Then
            If MessageBox.Show("Delete This Row?", "Confirm Delete", MessageBoxButtons.YesNo) = DialogResult.No Then
                Return True
            End If
        End If
        Return MyBase.PreProcessMessage(msg)
    End Function

Thanks!
0
Comment
Question by:ommer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 75 total points
ID: 17020781
Private Const WM_KEYDOWN as Long = &H100
0
 
LVL 70

Assisted Solution

by:Éric Moreau
Éric Moreau earned 50 total points
ID: 17020787
Hi ommer,

int should be great

Cheers!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question