Jump to content
Son zamanlarda artan kullanıcı hesap hırsızlıkları sebebiyle tüm kullanıcılara şifre sıfırlama maili gönderilmiştir. Lütfen güveli şifreler seçiniz. Mevcut e-mail adresinize erişemiyorsanız, en aşağıdaki destek linkinden bize ulaşınız. ×

Form Içinde Guı Elemanlarını Taşımak


SimpsoN_Bart
 Share

Recommended Posts

[b]Bu küçük fonksiyonla form içinde istediğiniz guı elemanını istediğiniz yere taşıyıp hareket ettirebilirsiniz. Eğlencesine :)[/b]
[b]
[/b]
[b][codebox]Global Const $SC_MOVE = 0xF010
Global Const $WM_SYSCOMMAND = 0x0112
Global Const $HTCAPTION = 2

Local $GUI = GUICreate("Test", 300, 200)
Local $LABEL = GUICtrlCreateLabel("Götür beni gittiğin yere", 100, 75, 105, 20)
GUICtrlSetBkColor(-1, 0x00FF00)
GUISetState()

While 1
$msg = GUIGetMsg()
Switch $msg
Case -3
Exit
Case -7
_CONTROL_MOVE($LABEL)
EndSwitch
WEnd

Func _CONTROL_MOVE($CTRL_ID = "")
Local $GGCI = GUIGetCursorInfo()
If @error Then Return False
Local $tasi = $GGCI[4]
If $GGCI[4] = $CTRL_ID Then $tasi = $CTRL_ID
GUICtrlSendMsg($tasi, 0x0112, BitOR(0xF010, 2), 0)
EndFunc ;==>_CONTROL_MOVE[/codebox]
[/b]

Edited by SimpsoN_Bart
Link to comment
Share on other sites

gerçekten çok kullanışlı bi fonksiyomuş ;)

bir öğeyle sınırlandırmadan tüm öğeleri taşınabilir yapabilirsin.

Func _CONTROL_MOVE($CTRL_ID = "")
Local $GGCI = GUIGetCursorInfo()
If @error Then Return False
Local $tasi = $GGCI[4]
If $GGCI[4] = $CTRL_ID Then $tasi = $CTRL_ID
GUICtrlSendMsg($tasi, 0x0112, BitOR(0xF010, 2), 0)
EndFunc ;==>_CONTROL_MOVE

Link to comment
Share on other sites

[b]Ben çok kullanışlı mı dedim :D yazdıklarımı bi daha oku küçük bir fonksiyon eğlencesine, bende fark ettim radiobutonda denedim olmamıştı. Labelde olunca diğerler aklıma gelmedi düzelttğin için saol :)
[/b]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...