Thank you! That is certainly encouraging. :-D I wish I had more time available to code, but I have to pay the bills and a full time job consumes a great deal of my time and energy. Maybe one day I'll be able to escape that need and spend more time on my hobbies. heheh
I wish that was my job! I do a little programming for work, but not much. There is a lot of strong programming competition globally, so it's difficult to find work. Of course, if you're good and driven you could produce your own software and market it. I can just never think of what to make that would be worth some real coin. lol
You're the only person I know who might be able to help me. I need to create a drag and drop type program. Kind of like Visio. I need to drop shapes (user controls?) from a panel or a form (which ever works) onto another form or a panel, which ever works. I will be dropping various shapes representing thing like compressors, pumps, heat exchangers, etc. They must be movable and double clickable so that the user can enter data specific to the operation. I am not asking you to write it for me, but can you give me tips on where to look? I have no idea where to start. I am unable to google this because I do not even know the right terminology. Can you help me?
+sum1sw Hey there! What framework are you using for your graphics and drawing? It sounds like you're shooting for custom objects and shapes and with such I'd use rectangles as a bounding box to define a surface area for the object in question, and with that you can detect "collision" with the mouse using mouse events. It might be tricky with small or oddly shaped graphics, but it should work. If you can detect when the mouse intersects the rectangle, you can then create events or subs to handle other actions and mouse states and whatnot. It may seem a little silly but I have a very simple GDI game project that does something very similar. The character graphic has a rectangle bounding box which allows me to move him around the screen and away from dragons that chase him. It's a very small project so it should be easy to see how I'm doing it. Let me know if you want it and I'll be happy to post a screenshot and download link for the source code.
+VB Toolbox Hi there and thank you so much for your reply. I have figured out a few things since I wrote the above. Just to clarify what I want, I have custom controls (several) on a panel (panel1) on a form and I want to drag and drop them onto another panel (panel2) which will likely be on the same form. There are no rectangles on the receiving/target panel (panel2), the control can be dropped anywhere. I did some reading and it turns out that I need to code three events. Every control on panel one needs and "On Mouse Down" event. It looks like something like this: Private Sub Button1_MouseDown(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseDown Dim c As Control = TryCast(sender, Control) c.DoDragDrop(c, DragDropEffects.Copy) End Sub Note that the above event determines the control with the MouseDown. If I specifically wanted to move a button, then the code will be Button1.DoDragDrop(Button1, DragDropEffects.Copy) Am I right so far? The next two events that need to be triggered are DragEnter and DragDrop. These should be on the receiving panel, panel2 Drag Enter has the following code Private Sub Panel2_DragEnter(sender As Object, e As System.Windows.Forms.DragEventArgs) Handles Panel2.DragEnter e.Effect = DragDropEffects.Copy End Sub Is this right? so far? The last event is the DragDrop. I was told that my problem is in the DragDrop but I did not understand how to fix it. Maybe you can help me. Here is what I have. Private Sub Panel2_DragDrop(sender As Object, e As System.Windows.Forms.DragEventArgs) Handles Panel2.DragDrop Dim c As Control = TryCast(e.Data.GetData(e.Data.GetFormats()(0)), Control) c.Location = Me.PointToClient(New Point(e.X, e.Y)) Me.Controls.Add(c) c.BringToFront() ' Without this, the control does not show. End Sub When I run my code, the control gets dragged from panel1 onto panel2. BUT BUT BUT, f disappears from Panel1. As if what I did was Move and not Copy. Can you help me?
Help me please anybody! How to create an inventory for the game in VISUAL BASIC . NET (the game in the genre of the quest)? So that when you press the PictureBox object - this object was placed in your inventory, and when you right-click on the object in the inventory it can be to move the cursor, and use this object (say the object - key) to the object of the "door" on the form. HELP ME PLEASE. Can anyone help or share source code example? Sorry for my bad english...
+daniel lin Make certain that you have service pack 1 installed. Also, open the Solution File (.sln) instead of the .vbproj. That loads all necessary projects.
Thumbs up! ^^ Look forward for more video from you. Thanks so much ! ^^ Anyway, i was hoping if i could get some feedback on this open source android app I have posted below? I am a beginner and hope to learn on how to improve it... Just search ' *pub:Path Ahead* ' in Google Play Store (P & A are case sensitive). greatly appreciate !
I've been away too long my friend! I can't wait to dive back in, thank you so much for continuing to share this amazing work! :D
Aardaerimus, this deverses more views (: You should sell that game it looks absolutely awesome and I'd purchase it, haha
Thank you! That is certainly encouraging. :-D I wish I had more time available to code, but I have to pay the bills and a full time job consumes a great deal of my time and energy. Maybe one day I'll be able to escape that need and spend more time on my hobbies. heheh
I wish that was my job! I do a little programming for work, but not much.
There is a lot of strong programming competition globally, so it's difficult to find work. Of course, if you're good and driven you could produce your own software and market it. I can just never think of what to make that would be worth some real coin. lol
YET AGAIN U ARE SO COOL! :)
Keep it up man. can i have a link where i can download the whole tutorials???
Hello! :-) Do you mean the source code or the tutorials themselves?? I don't actually have a single collection of all videos. Not a bad idea though.
Nice!
Hi can you demonstrate how to make the "Continue Game" function on your game please.
You're the only person I know who might be able to help me. I need to create a drag and drop type program. Kind of like Visio. I need to drop shapes (user controls?) from a panel or a form (which ever works) onto another form or a panel, which ever works.
I will be dropping various shapes representing thing like compressors, pumps, heat exchangers, etc. They must be movable and double clickable so that the user can enter data specific to the operation.
I am not asking you to write it for me, but can you give me tips on where to look? I have no idea where to start. I am unable to google this because I do not even know the right terminology.
Can you help me?
+sum1sw Hey there! What framework are you using for your graphics and drawing? It sounds like you're shooting for custom objects and shapes and with such I'd use rectangles as a bounding box to define a surface area for the object in question, and with that you can detect "collision" with the mouse using mouse events. It might be tricky with small or oddly shaped graphics, but it should work.
If you can detect when the mouse intersects the rectangle, you can then create events or subs to handle other actions and mouse states and whatnot.
It may seem a little silly but I have a very simple GDI game project that does something very similar. The character graphic has a rectangle bounding box which allows me to move him around the screen and away from dragons that chase him. It's a very small project so it should be easy to see how I'm doing it.
Let me know if you want it and I'll be happy to post a screenshot and download link for the source code.
+VB Toolbox Hi there and thank you so much for your reply. I have figured out a few things since I wrote the above. Just to clarify what I want, I have custom controls (several) on a panel (panel1) on a form and I want to drag and drop them onto another panel (panel2) which will likely be on the same form. There are no rectangles on the receiving/target panel (panel2), the control can be dropped anywhere.
I did some reading and it turns out that I need to code three events.
Every control on panel one needs and "On Mouse Down" event. It looks like something like this:
Private Sub Button1_MouseDown(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseDown
Dim c As Control = TryCast(sender, Control)
c.DoDragDrop(c, DragDropEffects.Copy)
End Sub
Note that the above event determines the control with the MouseDown.
If I specifically wanted to move a button, then the code will be
Button1.DoDragDrop(Button1, DragDropEffects.Copy)
Am I right so far?
The next two events that need to be triggered are DragEnter and DragDrop. These should be on the receiving panel, panel2
Drag Enter has the following code
Private Sub Panel2_DragEnter(sender As Object, e As System.Windows.Forms.DragEventArgs) Handles Panel2.DragEnter
e.Effect = DragDropEffects.Copy
End Sub
Is this right? so far?
The last event is the DragDrop. I was told that my problem is in the DragDrop but I did not understand how to fix it. Maybe you can help me. Here is what I have.
Private Sub Panel2_DragDrop(sender As Object, e As System.Windows.Forms.DragEventArgs) Handles Panel2.DragDrop
Dim c As Control = TryCast(e.Data.GetData(e.Data.GetFormats()(0)), Control)
c.Location = Me.PointToClient(New Point(e.X, e.Y))
Me.Controls.Add(c)
c.BringToFront() ' Without this, the control does not show.
End Sub
When I run my code, the control gets dragged from panel1 onto panel2. BUT BUT BUT, f disappears from Panel1. As if what I did was Move and not Copy. Can you help me?
Help me please anybody! How to create an inventory for the game in VISUAL BASIC . NET (the game in the genre of the quest)? So that when you press the PictureBox object - this object was placed in your inventory, and when you right-click on the object in the inventory it can be to move the cursor, and use this object (say the object - key) to the object of the "door" on the form. HELP ME PLEASE. Can anyone help or share source code example?
Sorry for my bad english...
howcome I cannot open .vbproj file with vb2010 express???? it says "this file type is not supported by the installation" pls help!
+daniel lin Make certain that you have service pack 1 installed. Also, open the Solution File (.sln) instead of the .vbproj. That loads all necessary projects.
u intro reminds me of kickboxer the movie for some reason
Woah you're making a game in VB? I tried that before but it lagged like hell.
You did it wrong! ;)
Hahah I was gonna call it "Medical Herb" but I decided to be 1/2 original and 1/2 silly. :-D
Thumbs up! ^^ Look forward for more video from you. Thanks so much ! ^^
Anyway, i was hoping if i could get some feedback on this open source android app I have posted below? I am a beginner and hope to learn on how to improve it...
Just search ' *pub:Path Ahead* ' in Google Play Store (P & A are case sensitive).
greatly appreciate !
lol the item is called "Heal Weed"