Click here to Skip to main content
15,900,110 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VB.Net Tutorials (Real Ones) Pin
Ray Cassick7-Feb-03 7:13
Ray Cassick7-Feb-03 7:13 
GeneralList of running applications in .Net Pin
Wayne Phipps5-Feb-03 8:32
Wayne Phipps5-Feb-03 8:32 
GeneralRe: List of running applications in .Net Pin
Wayne Phipps6-Feb-03 7:51
Wayne Phipps6-Feb-03 7:51 
GeneralVB.NET source code resource Pin
Gerry D5-Feb-03 8:19
Gerry D5-Feb-03 8:19 
QuestionI know it can be done ... but how ??? Pin
syedhassan45-Feb-03 7:35
syedhassan45-Feb-03 7:35 
AnswerI got it ... :) Pin
syedhassan45-Feb-03 8:01
syedhassan45-Feb-03 8:01 
Generalcomplicated question re editing datagrid Pin
mcm5-Feb-03 6:31
mcm5-Feb-03 6:31 
GeneralSwap values of two textboxes using drag and drop Pin
Ed Suyer5-Feb-03 5:13
Ed Suyer5-Feb-03 5:13 
I'm very new to .net .... any help is much appreciated!

I'm using vb.net and visual studio.net to build a form. This form has two textboxes (textbox1 and textbox2). I'm trying to drag and drop the value of textbox2 into textbox1. Further, after the drop, I went textbox2 to retain the value of textbox1. A swap. See illustration below:


Figure 1 - The initial state of both textboxes
Textbox1 Textbox2
15          37


Figure 2 - The state of the textboxes after the drag and drop
Textbox1 Textbox2
37 <----- 15



So far, I've gotten this to work:
Textbox1 Textbox2
37 <----- 0


I've debugged what I've done so far, and checked the call stack. What's happing so far is:
1. The mousedown event occurs on textbox2. This even triggers the drag and drop event of textbox1
2. In the textbox1.drag_and_drop(), I've added some code to set textbox1.text = <new value="">
3. Control is returned back to textbox2.mousedown() where I set textbox2.text = 0

I've tried overloading the procedure textbox1.drag_and_drop() to include a 3rd, byRef, argument oldValue as String, that I set to the original value of textbox1.text. However this doesn't compile because textbox1.drag_and_drop() HANDLES dragdrop.

My question is this: What's the easiest way of getting this done? If I'm going down the right road, how do I overload the dragdrop event so that I can implement this 3rd argument? If I overload the event, do I need to recreate all the code associated with dragdrop?
GeneralReal HDD serial number Pin
Xanty5-Feb-03 1:06
Xanty5-Feb-03 1:06 
GeneralRe: Real HDD serial number Pin
Jerome Conus5-Feb-03 3:01
Jerome Conus5-Feb-03 3:01 
GeneralRe: Real HDD serial number Pin
Xanty5-Feb-03 4:10
Xanty5-Feb-03 4:10 
GeneralRe: Real HDD serial number Pin
Jerome Conus5-Feb-03 4:42
Jerome Conus5-Feb-03 4:42 
GeneralRe: Real HDD serial number Pin
Xanty5-Feb-03 4:54
Xanty5-Feb-03 4:54 
GeneralSetting printer options in client machine Pin
5-Feb-03 0:25
suss5-Feb-03 0:25 
GeneralVB COM Book Pin
Davy Mitchell4-Feb-03 21:13
Davy Mitchell4-Feb-03 21:13 
GeneralPlease Help: Addin for Visual Studio.NET Pin
Member 2134384-Feb-03 18:48
Member 2134384-Feb-03 18:48 
General.inc files in vb.net Pin
bijju_home4-Feb-03 7:16
bijju_home4-Feb-03 7:16 
GeneralRe: .inc files in vb.net Pin
Gerry D4-Feb-03 7:28
Gerry D4-Feb-03 7:28 
GeneralRe: .inc files in vb.net Pin
bijju_home4-Feb-03 18:54
bijju_home4-Feb-03 18:54 
GeneralRe: .inc files in vb.net Pin
Gerry D5-Feb-03 8:05
Gerry D5-Feb-03 8:05 
GeneralRe: .inc files in vb.net Pin
Ray Cassick4-Feb-03 9:39
Ray Cassick4-Feb-03 9:39 
GeneralRe: .inc files in vb.net Pin
Daniel Turini5-Feb-03 1:31
Daniel Turini5-Feb-03 1:31 
Generalcalling other dlls Pin
bijju_home4-Feb-03 7:15
bijju_home4-Feb-03 7:15 
GeneralRe: calling other dlls Pin
Ian Darling4-Feb-03 22:50
Ian Darling4-Feb-03 22:50 
GeneralForm Code and DataBinding Pin
Mike Murphy4-Feb-03 7:15
Mike Murphy4-Feb-03 7:15 

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.