Click here to Skip to main content
15,885,435 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
GeneralButton Control stoped working after installation of ASP.NET Framework 1.1 SP 1 Pin
Member 20320427-Sep-04 21:28
Member 20320427-Sep-04 21:28 
Questionis it timeout? Pin
zhebincong27-Sep-04 15:41
zhebincong27-Sep-04 15:41 
AnswerRe: is it timeout? Pin
zhebincong28-Sep-04 19:29
zhebincong28-Sep-04 19:29 
GeneralField updation in word document Pin
Anonymous27-Sep-04 11:01
Anonymous27-Sep-04 11:01 
GeneralTCP/IP Connection (over GPRS) - XDA and Desktop Pin
Viv K27-Sep-04 9:02
Viv K27-Sep-04 9:02 
GeneralWeekdays in the a custom language. Pin
Mattias Olgerfelt27-Sep-04 6:10
Mattias Olgerfelt27-Sep-04 6:10 
Generaldebugging VSIP package Pin
conman11027-Sep-04 2:55
conman11027-Sep-04 2:55 
GeneralIs this a bug in .NET Framework Pin
Volvere27-Sep-04 2:48
Volvere27-Sep-04 2:48 
Just started playing around with CreateParams property and found this bug. When CreateParams.Style = WS_POPUP OR WS_CHILD, the control's Location property doesn't update properly. But, it works fine when WS_CHILD is omitted. Look at and test the following codes.

The following is the DummyCtrl class:

Public Class DummyCtrl <br />
    Inherits System.Windows.Forms.Control <br />
<br />
    Protected Overrides ReadOnly Property CreateParams() As System.Windows.Forms.CreateParams <br />
        Get <br />
            Const WS_POPUP As Long = &H80000000 <br />
            Const WS_CHILD As Long = &H40000000 <br />
<br />
            Dim cp As CreateParams = MyBase.CreateParams <br />
            cp.Style = WS_POPUP 'Or WS_CHILD <br />
            cp.Parent = IntPtr.Zero <br />
            cp.Height = 200 <br />
            cp.Width = 200 <br />
            cp.X = 0 <br />
            cp.Y = 0 <br />
            Return cp <br />
        End Get <br />
    End Property <br />
End Class <br />


'Codes in a Form.
<br />
    Dim myloc As Point <br />
    Dim dummy As DummyCtrl <br />
<br />
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click <br />
<br />
        If dummy Is Nothing Then <br />
            dummy = New DummyCtrl <br />
<br />
            Me.Controls.Add(dummy) <br />
            dummy.Location = New Point(50, 50) <br />
            dummy.Visible = True <br />
            myloc = Me.PointToScreen(New Point(0, 0)) <br />
        End If <br />
<br />
    End Sub <br />
<br />
    Private Sub Form1_Move(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Move <br />
        If Not dummy Is Nothing Then <br />
<br />
            'calculate the distance moved <br />
            Dim newloc As Point = Me.PointToScreen(New Point(0, 0)) <br />
            Dim diff As Point = New Point(newloc.X - Me.myloc.X, newloc.Y - Me.myloc.Y) <br />
<br />
            Debug.WriteLine("Before " & Me.dummy.Location.X & " " & Me.dummy.Location.Y & " " & diff.X & " " & diff.Y) <br />
            dummy.Location = New Point(Me.dummy.Location.X + diff.X, Me.dummy.Location.Y + diff.Y) <br />
            Debug.WriteLine("After " & Me.dummy.Location.X & " " & Me.dummy.Location.Y & " " & diff.X & " " & diff.Y) <br />
<br />
            Me.myloc = newloc <br />
        End If <br />
    End Sub 


Include WS_CHILD by removing the comment, then the problem becomes clear when you move the Form.
GeneralProgress Bar that moves Pin
sampoo26-Sep-04 8:46
sampoo26-Sep-04 8:46 
GeneralRe: Progress Bar that moves Pin
kayhustle29-Sep-04 6:06
kayhustle29-Sep-04 6:06 
GeneralRe: Progress Bar that moves Pin
sampoo29-Sep-04 7:18
sampoo29-Sep-04 7:18 
GeneralWMI Listing running DLL's Pin
JDOnline25-Sep-04 22:57
JDOnline25-Sep-04 22:57 
GeneralRe: WMI Listing running DLL's Pin
bort19831-Oct-09 17:50
bort19831-Oct-09 17:50 
GeneralDatabase independent programming? (OLEDB or ODBC data Adaptor) Pin
Salil Khedkar23-Sep-04 21:33
Salil Khedkar23-Sep-04 21:33 
GeneralRe: Database independent programming? (OLEDB or ODBC data Adaptor) Pin
Colin Angus Mackay24-Sep-04 2:56
Colin Angus Mackay24-Sep-04 2:56 
GeneralRe: Database independent programming? (OLEDB or ODBC data Adaptor) Pin
Salil Khedkar27-Sep-04 23:40
Salil Khedkar27-Sep-04 23:40 
GeneralDo customers trust Web Services? (It runs on top of IIS, right?) Pin
Salil Khedkar23-Sep-04 21:19
Salil Khedkar23-Sep-04 21:19 
GeneralRe: Do customers trust Web Services? (It runs on top of IIS, right?) Pin
Daniel Turini23-Sep-04 22:09
Daniel Turini23-Sep-04 22:09 
GeneralRe: Do customers trust Web Services? (It runs on top of IIS, right?) Pin
Salil Khedkar24-Sep-04 3:11
Salil Khedkar24-Sep-04 3:11 
GeneralRe: Do customers trust Web Services? (It runs on top of IIS, right?) Pin
Daniel Turini24-Sep-04 3:15
Daniel Turini24-Sep-04 3:15 
GeneralRe: Do customers trust Web Services? (It runs on top of IIS, right?) Pin
Salil Khedkar27-Sep-04 23:35
Salil Khedkar27-Sep-04 23:35 
GeneralMachine won't act as Remoting Server Pin
Derek Lakin23-Sep-04 6:24
Derek Lakin23-Sep-04 6:24 
QuestionHow Guru's Pin
sreejith ss nair23-Sep-04 1:56
sreejith ss nair23-Sep-04 1:56 
GeneralAssembly Header Pin
sreejith ss nair23-Sep-04 1:52
sreejith ss nair23-Sep-04 1:52 
GeneralHTTP Simulation for WEb Services Pin
matef22-Sep-04 23:11
matef22-Sep-04 23:11 

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.