Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
H

helelark123

@helelark123
About
Posts
188
Topics
42
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Character Movement
    H helelark123

    Imports system.Reflection Public Class Form1 Private arrLeft(5) As Bitmap, arrRight(5) As Bitmap Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load arrLeft(0) = My.Resources.L1 : arrLeft(1) = My.Resources.L2 : arrLeft(2) = My.Resources.L3 arrLeft(3) = My.Resources.L4 : arrLeft(4) = My.Resources.L5 : arrLeft(5) = My.Resources.L6 arrRight(0) = My.Resources.R1 : arrRight(1) = My.Resources.R2 : arrRight(2) = My.Resources.R3 arrRight(3) = My.Resources.R4 : arrRight(4) = My.Resources.R5 : arrRight(5) = My.Resources.R6 End Sub Private Sub Form1_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown Static ind As Integer, LastDir As String Static counter As Integer Select Case e.KeyCode Case Keys.Left If LastDir = Keys.Right Then ind = 0 : counter = 0 If counter Mod 5 = 0 Then PictureBox1.Image = arrLeft(ind Mod 6) Application.DoEvents() PictureBox1.Left -= 10 ind += 1 End If LastDir = Keys.Left Case Keys.Right If LastDir = Keys.Left Then ind = 0 : counter = 0 If counter Mod 5 = 0 Then PictureBox1.Image = arrRight(ind Mod 6) Application.DoEvents() PictureBox1.Left += 10 ind += 1 End If LastDir = Keys.Right End Select counter = counter Mod 21 + 1 End Sub End Class

    Shay Noy

    Visual Basic help question

  • Character Movement
    H helelark123

    I don't understand your reply. Have you understand my post? Thank you

    Shay Noy

    Visual Basic help question

  • Character Movement
    H helelark123

    Hello, I am programming in vb2005 I have some pictures of a character that if you change them you got a movement of him. I write a small function that move the character when clicking on right arrow. THe images are in PNG format so it is good for the transparency. Then problem is when I put the characted on a image backkground I get jump of the picture. How can I fix the problem? Thank you

    Shay Noy

    Visual Basic help question

  • Sort column in datatable
    H helelark123

    Thank you

    Shay Noy

    Visual Basic question

  • Sort column in datatable
    H helelark123

    Like this: <-90 'Smaller than -90 <-50 'Smaller than -50 and that mean that it is bigger that <-90 -10 -5 +2

    Shay Noy

    Visual Basic question

  • Sort column in datatable
    H helelark123

    Hello, I am programming in VB2005 I have a DataColumn with numbers and '<' sign as following: -10 -5 <-90 <-50 +2 How can I sort this column? Should I add another hided column and sort it? Is there another way to do this?

    Shay Noy

    Visual Basic question

  • Natural order sorting in vb
    H helelark123

    As you see, the sorting take in consideration the word lenght, so to get a "Natural" sorting you can formatting all the worlds to have the same lenght by concatenating 0 before each word. For example, if you have 1 2 11 111 A AA B so format them as following: 001 002 011 111 00A 0AA 00B and now sort. Hope it helps

    Shay Noy

    Visual Basic algorithms tutorial question

  • Combobox SelectedIndexChanged event
    H helelark123

    Hello, I am programming in VB2005 I am populating combobox on load event as following: Dim dt As DataTable = ... ComboBox1.DataSource = dt ComboBox1.DisplayMember = "MODEL" ComboBox1.ValueMember = "MODEL" The problem is the ComboBox1_SelectedIndexChanged event fired. I would like to prevent the event to fire at load. I know that I can use flag or addhandler after populating to solve this problem but I would like to know if there is any combobox property or method that prevent this event to fire when populating the combobox by databinding? Thank you.

    Shay Noy

    Visual Basic help question

  • Data base connection
    H helelark123

    http://www.connectionstrings.com/[^] Is should help you for connecting to database

    Shay Noy

    Visual Basic csharp database tutorial learning

  • event
    H helelark123

    Thank you both Dave and Christian. I understood my mistake

    Shay Noy

    Visual Basic help csharp tutorial question

  • event
    H helelark123

    Clicking on the control for the move events doesn't fire too. The enter event doens't work too I set breakpoints and the events fired. What is wrong?

    Shay Noy

    Visual Basic help csharp tutorial question

  • event
    H helelark123

    if I understood you right, see an example but it doesn't work: Put Picturebox on your form6 (for example) Public Class Form6 Private WithEvents ChartObj As New ChartClass Private Sub Form6_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load AddHandler PictureBox1.MouseMove, AddressOf ChartObj.ChartClass_MouseMove AddHandler PictureBox1.MouseLeave, AddressOf ChartObj.ChartClass_MouseLeave End Sub End Class Public Class ChartClass Inherits PictureBox Public Sub ChartClass_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Cursor = Cursors.Default End Sub Public Sub ChartClass_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Cursor = Cursors.WaitCursor End Sub End Class My question is why the cursor is not changing?

    Shay Noy

    Visual Basic help csharp tutorial question

  • event
    H helelark123

    Hello, I am working with VB.NET 2005. 1) I have class Chart that inherits from PictureBox 2) I have form that contains PictureBox1 The "connection" between them is as following: PictureBox1.Image = Chart.GetBitmap Now I have problems with events. I would like to mousemove on the Picturebox and get some info and this info is is my Chart object How to do? I tried this but I got error message:"End of statement expected" 'Form1 (Main Form) Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) _ Handles PictureBox1.MouseMove RaiseEvent Chart.Chart_MouseMove() End Sub ----------------------------------------------- 'Class Chart that inherits from PictureBox Public Sub Chart_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) 'Some infos End Sub Phease help

    Shay Noy

    Visual Basic help csharp tutorial question

  • interaction between two datagridview
    H helelark123

    Can you please be more explicit. Thank you

    Shay Noy

    Visual Basic help

  • interaction between two datagridview
    H helelark123

    Hello, I have 2 datagridviews, DGV1 and DGV2. I need to make "dynamic interaction" between them, what I mean is the following: when I am clicking on specific row in DGV1 I need to highlight correspondant row in DGV2. Until here everything works fine. But in addition, I need the vice-versa:when I am clicking on specific row in DGV2 I need to highlight correspondant row in DGV1. I am using DGV1_CellEnter and DGV2_CellEnter events The problem is that I got error that each one call to the other (loop). I can solve the problem by inserting flag but I would like to know if there is a better and elegant way. Thank you

    Shay Noy

    Visual Basic help

  • PictureBox
    H helelark123

    Thank you for the tip

    Shay Noy

    Visual Basic graphics help question

  • PictureBox
    H helelark123

    What do you mean when you say drop?

    Shay Noy

    Visual Basic graphics help question

  • PictureBox
    H helelark123

    Thank you, so you suggest to use controls.add, don't you

    Shay Noy

    Visual Basic graphics help question

  • PictureBox
    H helelark123

    This is a bit dumb. What you need to do, is either change your picturebox to be a ClassA,

    My ClassA inherits from PictureBox object. Now my form1 is creating a new instance of class A and this new instance will "return" a PictureBox that I would like to display on my form1. So I though to do the following form1.PictureBox1=NewInstanceOfClassA to display the result of new instance of ClassA to my form1.

    ...or you need to just create a picturebox and add it to the Controls collection of the form.

    WHay to add it if already exists in my form1, I only want to overwrite it with my new instance of class A Thank you

    Shay Noy

    Visual Basic graphics help question

  • PictureBox
    H helelark123

    In the first code PictureBox alrady exists so I do not have to add it. In the second code PictureBox doesn't exist so I am adding it at run-time. So what now?

    Shay Noy

    Visual Basic graphics help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups