| | |
Forum God

Group: Moderators Last Login: Yesterday @ 1:42:32 PM Posts: 1,073, Visits: 9,408 |
| | The code I posted above would do it. The specific thing you need to do is set the MousePointer property of the picturebox to the desired pointer. In this case vbCrosshair or 2. I prefer to do this in either the load event or the properies list but the MouseMove event works too. Private Sub Form_Load() Picture1.MousePointer = vbCrosshair End Sub
|
|
| | |

Forum God
       
Group: Forum Members Last Login: 12/4/2011 11:46:01 PM Posts: 545, Visits: 2,544 |
| | I stumbled upon a VB quirk and thought I'd share it. In my last post I used MousePointer = 2 that can be replaced with textual constant of MousePointer = vbCrossHair. However, if you inadvertently make this typo... MousePointer = vbCross VB interprets it as: MousePointer = vbSizeNESW
________________________________________________________________ "So much to learn. So little time to do it. Wise men know it's later than one thinks"! Mark's Syntax.Zip Pause Sub I don't answer programming questions via PMs. That's what the forum is for! |
|
| | |
Forum God

Group: Moderators Last Login: Yesterday @ 1:42:32 PM Posts: 1,073, Visits: 9,408 |
| | No real suprise. vbCross is a FillStyle constant with a value of 6. The same value as vbSizeNESW. |
|
| | |

Forum God
       
Group: Forum Members Last Login: 12/4/2011 11:46:01 PM Posts: 545, Visits: 2,544 |
| Mark (9/1/2010)
The code I posted above would do it. The specific thing you need to do is set the MousePointer property of the picturebox to the desired pointer. In this case vbCrosshair or 2. I prefer to do this in either the load event or the properies list but the MouseMove event works too Actually Mark, I think you putting it in the Form_Load is a better choice than mine. It's one less event that VB has to fire. The MouseMove fires repeatedly and now he has one less Sub to deal with.
________________________________________________________________ "So much to learn. So little time to do it. Wise men know it's later than one thinks"! Mark's Syntax.Zip Pause Sub I don't answer programming questions via PMs. That's what the forum is for! |
|
| | |

Forum God
       
Group: Forum Members Last Login: 12/4/2011 11:46:01 PM Posts: 545, Visits: 2,544 |
| Mark (9/1/2010) No real suprise. vbCross is a FillStyle constant with a value of 6. The same value as vbSizeNESW.Ah, thanks for the explanation.
________________________________________________________________ "So much to learn. So little time to do it. Wise men know it's later than one thinks"! Mark's Syntax.Zip Pause Sub I don't answer programming questions via PMs. That's what the forum is for! |
|
| | |

Forum God
       
Group: Forum Members Last Login: 12/4/2011 11:46:01 PM Posts: 545, Visits: 2,544 |
| La Vesey, I received yet another email from you and I'm sure other participants of this topic have also. Please stop doing that and please stop pasting the same statements repeatedly in this thread. I don't believe that I need to post your last email to me because I'm guessing everyone else received the same thing. Now that that's out of the way here's a simple question.. Have you run any of the code that's been posted in this thread?....And I do mean Any???
________________________________________________________________ "So much to learn. So little time to do it. Wise men know it's later than one thinks"! Mark's Syntax.Zip Pause Sub I don't answer programming questions via PMs. That's what the forum is for! |
|
| | |
Junior Member
       
Group: Forum Members Last Login: 1/25/2011 12:54:56 PM Posts: 12, Visits: 49 |
| Text Input Box
Background statement:
the code sub below will be part of Mark's code in post 29547, of 8-26-10, which is VB 6, so it must work with that code without conflicts.
Z is a numeric variable which will be changed several times during each session.
Private Sub Command1_Click()
Dim z as Integer
z = Text1.Text
Form1.Print "Your new z value is = " z
End Sub
The one Question is:
Does the size and position of this text input box need to be set up first (and if so need sample code.)
La Vesey |
|
| | |

Forum God
       
Group: Forum Members Last Login: 12/4/2011 11:46:01 PM Posts: 545, Visits: 2,544 |
| | No, and your code would be better written like this. The Val() function returns only the numerical portion of a string but it also instructs VB to explicitly treat the return value as numeric. Option Explicit
Private Sub Command1_Click() Dim intZ As Integer intZ = Val(Text1.Text) Form1.Print "Your new intZ value is = "; intZ End Sub
________________________________________________________________ "So much to learn. So little time to do it. Wise men know it's later than one thinks"! Mark's Syntax.Zip Pause Sub I don't answer programming questions via PMs. That's what the forum is for! |
|
| | |
Forum Newbie
       
Group: Forum Members Last Login: 10/12/2011 10:48:21 AM Posts: 3, Visits: 5 |
| i want to practice also how to create something special of vb.net
|
|
| | |

Forum God
       
Group: Forum Members Last Login: 12/4/2011 11:46:01 PM Posts: 545, Visits: 2,544 |
| silverfunk (10/12/2011) i want to practice also how to create something special of vb.netThen I suggest that you start by posting in the NET section of the forum.
________________________________________________________________ "So much to learn. So little time to do it. Wise men know it's later than one thinks"! Mark's Syntax.Zip Pause Sub I don't answer programming questions via PMs. That's what the forum is for! |
|
|