Search results for query: *

  • Users: NKN
  • Content: Threads
  • Order by date
  1. N

    Question How can i paint on the controls when the mouse is clicked on them?

    How can i paint on the controls when the mouse is clicked on them? I tried creating a handler for Ctrl.paint but it didn't work. I want the image to be drawn over the control instead of under, like bringing it to the front.. Private Sub AllCtrls() Dim ExceptedCtrl = {StartLabel}...
  2. N

    Question How to add a .gif image from ressources using GDI+?

    I want to load a .gif image with no background at the pointer's location on the form every time the user clicks on the form. I tried using a picturebox but when two of this same image overlap the background of the picturebox covers the image behind.. How can i do this using GDI+ ? Dim PB As...
  3. N

    Retrieving high scores from an Xml file

    This is the Xml file where the high scores are saved: <?xml version="1.0" encoding="utf-8" standalone="yes"?> <Root> <User Name="Player1"> <HighScore>626</HighScore> </User> <User Name="Player2"> <HighScore>352</HighScore> </User> </Root> And this is the code to retrieve the...
  4. N

    How can I select a random control?

    I have a number of pictureboxes in my form, Some of them are named "Picturebox_Enemy1"; "Picturebox_Enemy2"... "Picturebox_EnemyN". I want to select a random picturebox containing in its name "Enemy". how can i do that?
  5. N

    Question Two Forms application is closing

    I have two forms and a button on the first form. What i want is when i click the button the second form to show and the first one to close. But this isn't working with: Form2.show() Me.close All the application is closing with the code above.
  6. N

    Question Adding an event to a picturebox

    For Each pb As PictureBox In Me.Controls.OfType(Of PictureBox)().Except(New PictureBox() {PictureBox1, PictureBox2}) If PictureBox1.Bounds.IntersectsWith(pb.Bounds) Then MsgBox("ok") End If How can i add an event to the picturebox that intersects with...
Back
Top