Hack Forums
[.NET] Easy Challenge - Move And Resize Borderless Form - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Easy Challenge - Move And Resize Borderless Form (/showthread.php?tid=4389523)

Pages: Pages 1 2 3


* - Cornflower Blue இڿڰۣ-ڰۣ— - Aug 12, 2014

(Aug 12, 2014 04:08 AM)Only3 Wrote:  well no1 handle meidum and u want hard even simple u cant handle 😏

Make the hardest white hat challenge you can.


* - Only3 - Aug 12, 2014

first pass this simple challenge then i will give meidum that if u pass it i will leave the vb section 🤝


* - Only3 - Aug 12, 2014

DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE


* - Only3 - Aug 12, 2014

DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE DELETE


* - Cornflower Blue இڿڰۣ-ڰۣ— - Aug 12, 2014

(Aug 12, 2014 04:15 AM)Only3 Wrote:  first pass this simple challenge then i will give meidum that if u pass it i will leave the vb section 🤝

I can't be bothered with your simple challenge threads, I have work to do, if is was something that I would have to think about, then I would have a go, otherwise what is the point making something that any body can do.

Take my example before, make a challenge where you have to display a GIF image in a console with color. That is a good hard challenge.


* - Only3 - Aug 12, 2014

yes its simple i say it in the title but still no1 do it i even when i gave start point
the challenge is not to c&p the public codes but to use ur brain to make it much simple
challenge should be done just with net code and not using any 3d party {lib, dll, app}


* - $lick - Aug 12, 2014

Thread has glitched, Commenting to fix it.


* - Cornflower Blue இڿڰۣ-ڰۣ— - Aug 12, 2014

(Aug 12, 2014 05:05 AM)Only3 Wrote:  yes its simple i say it in the title but still no1 do it i even when i gave start point
the challenge is not to c&p the public codes but to use ur brain to make it much simple
challenge should be done just with net code and not using any 3d party {lib, dll, app}

Listen, just make a harder challenge, atleast then it's a challenge.


* - SaketSaket - Aug 12, 2014

My attempt ;) You can use this code with option strict on too ;) ...

PHP Code

<?php 
Enum MouseState As Byte
    None 
= 0
    Over 
= 1
    Down 
= 2
End 
Enum

    Private 
_mousepos As Point = New Point(0, 0)
    Private 
_drag As Boolean = False

Protected Overrides Sub OnMouseDown(ByVal e As MouseEventArgs)
      
MyBase.OnMouseDown(e)
      If 
e.Button = Windows.Forms.MouseButtons.Left And New Rectangle(0, 0, Width - 1, 30).Contains(e.Location) Then
      _drag 
= True : _mousepos = e.Location
      End 
If
    
End Sub

    
Protected Overrides Sub OnMouseUp(ByVal e As MouseEventArgs)
      
MyBase.OnMouseUp(e)
      
_drag = False
    End Sub

    
Protected Overrides Sub OnMouseMove(ByVal e As MouseEventArgs)
      
MyBase.OnMouseMove(e)
      If 
_drag Then
      Parent
.Location = New Point(MousePosition.X - _mousepos.X, MousePosition.Y - _mousepos.Y)
      
End If
    
End Sub 

Regards
Saket

Edit : changed rectangle values.... as it was taken from my last theme...


* - Only3 - Aug 12, 2014

SaketSaket where is the resize code the move code is simple


* - SaketSaket - Aug 12, 2014

(Aug 12, 2014 05:42 AM)Only3 Wrote:  SaketSaket where is the resize code the move code is simple

ohh... only provided code for move... will have to code for my theme first then i will post here... ;)


* - Only3 - Aug 12, 2014

good luck try to find better way for move too


* - LordCoder - Aug 12, 2014

(Aug 12, 2014 05:05 AM)Only3 Wrote:  yes its simple i say it in the title but still no1 do it i even when i gave start point
the challenge is not to c&p the public codes but to use ur brain to make it much simple
challenge should be done just with net code and not using any 3d party {lib, dll, app}

Why reinvent the wheel when it's already done? It's useless to make a code that's already on Google. Point another challenge, there are thousands that aren't on Google.


* - Cornflower Blue இڿڰۣ-ڰۣ— - Aug 12, 2014

(Aug 12, 2014 06:50 AM)LordCoder Wrote:  Why reinvent the wheel when it's already done? It's useless to make a code that's already on Google. Point another challenge, there are thousands that aren't on Google.

He only does challenges where the answer can be found on Google, because Only3 can't code, he is just a copy/paste skid.


* - Only3 - Aug 12, 2014

(Aug 12, 2014 06:50 AM)LordCoder Wrote:  Why reinvent the wheel when it's already done? It's useless to make a code that's already on Google. Point another challenge, there are thousands that aren't on Google.

i post for u the Icon Changer challenge ! what u ask for 😏 still waiting 🤣