473,386 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Visual basic 2005, table layout

I created a program where the user can click a button that will add a button into the table layout.
I was wondering if there was a way/code that can enable me to give the new button functions for when the user clicks on it?
Nov 16 '06 #1
11 2258
willakawill
1,646 1GB
I created a program where the user can click a button that will add a button into the table layout.
I was wondering if there was a way/code that can enable me to give the new button functions for when the user clicks on it?
Hi. What you can do is create the button plus code beforehand and set the buttons visible property to false. Then the user can, apparently, create a new button which is the already existing button which you make visible.

Hope this helps
Nov 16 '06 #2
I tried,but i just couldn't get it to work.

Would i be able to give my code to someone for them to fix it?
Nov 16 '06 #3
Killer42
8,435 Expert 8TB
I tried,but i just couldn't get it to work.

Would i be able to give my code to someone for them to fix it?
If you post it here, lots of people can have a look at it. Whether they can fix it, well, you never know until you try.

Personally, I'm confused about what you are referring to by the term "table layout". (I'm an old VB6 developer, and may just be out of touch).
Nov 16 '06 #4
willakawill
1,646 1GB
I tried,but i just couldn't get it to work.

Would i be able to give my code to someone for them to fix it?
Looks like you are working on a web page.
Please post the code.
Nov 16 '06 #5
I'm sorry but I solved my question, although i so have another. I also decided not to post the code in regards to the first question.

Q#1
My new question is
Is there a way to save data, what variables and labels are, along with what picture, a picturebox is currently on.

Q#2
Is there a way to disable the "X" button in a form's window?
Nov 17 '06 #6
Killer42
8,435 Expert 8TB
Q#1
My new question is
Is there a way to save data, what variables and labels are, along with what picture, a picturebox is currently on.
Could you try to explain in a little more detail what you want to achieve here? Maybe I'm just a bit slow, but I couldn't really follow the question.

Q#2
Is there a way to disable the "X" button in a form's window?
In VB6, you can do this by turning off the .ControlBox property of the form. I don't now what the equivalent would be in VB2005.
Nov 19 '06 #7
willakawill
1,646 1GB
I'm sorry but I solved my question, although i so have another. I also decided not to post the code in regards to the first question.

Q#1
My new question is
Is there a way to save data, what variables and labels are, along with what picture, a picturebox is currently on.

Q#2
Is there a way to disable the "X" button in a form's window?
Hi. Looks like you are committed to not posting any code or work that you have already done. Have you written any code?
Nov 20 '06 #8
sashi
1,754 Expert 1GB
I'm sorry but I solved my question, although i so have another. I also decided not to post the code in regards to the first question.

Q#1
My new question is
Is there a way to save data, what variables and labels are, along with what picture, a picturebox is currently on.

Q#2
Is there a way to disable the "X" button in a form's window?
Hi there,

In your earlier post you mentioned that you have created some kind of program that allows button to added into table layout upon clicking of another button. In your second post you have asked 2 questions respectively. Agree?

My question is, how was it possible for you to create such a "complex" program without even having an idea of what are variables & labels?

Very well, correct me if i was wrong, i feel variables & datatype related understanding are the basic for almost every programming language. Correct? Don't tell me that you are learning programming from the reverse way of it. Complex programs first and lastly comes the basic knowledge of programming. Which one? Am confused and wonder what was your approach in learning programming. Please explain. Waiting eagerly for your reply. Take care.
Nov 20 '06 #9
Killer42
8,435 Expert 8TB
Some people do prefer to get started by taking existing code and playing with it. Perhaps that's the case here.

Or perhaps the OP is a bit embarrassed to post their code for the world to see. This is often the case, especially in those relatively new to a language. I feel a bit that way myself at times, and I've been dabbling in VB for ten years or whatever
Nov 20 '06 #10
Sorry, i was on vacation.
I cant remember all the questions asked but
I'm simply using codes i know to create the game i am making, a basic rpg, where you click buttons for the majority the game.

for question 1,
I would like to save the progress of the user so that the next time they access the program they may start where they left off.

I know a good amount of code, even though there is so much more code for me to learn. Most of the time my problems could be solved with code i can use.

almost like i need a database of all the different codes and there uses,
Nov 27 '06 #11
Hi, New guy here... first post... anyway.
Starting out building an RPG is a very good step. It will expose you to TONES of VB concepts and applications. The things you are going to need are:
1: to logically lay out the game mechanics. This in needed so you will be able to develop the required programming structure.
2: a very good place to search for code, make sure you have the latest MSDN installed for the language you are programming in.
3: Build the structure first. Worry about story line and graphics later. Use sample graphics and text when necessary.

OK now for a few points to study on.
1: Yes you will need a database. With a database you will be able to set what each button does and which picture/graphic is shown. Keep in mind that your buttons can have there position, label/caption, size, etc set from variables stored with in your database. The basic code of your button will simply be a SQL quary to your database using variables set by the player during the game.
I.E. you have a graphic background, 2 buttons, 2 labels and a text box.
first button.caption is "Sell" 2nd is "Buy" the label.caption is " +Town XYZ + market has +41+ +apples+ which sell for +$0.40+ each. You currently have +2+ in your bag the market is willing to buy for +$0.10+ each"
The +sign shows you each variable that would have to come from your database for that statement. The text box let's you tell the game how many, and the button tells the game buy or sell and based on the qty on hand in the market the game resets the price on the apples. The buttons can then send you to the next screen or you may wish to have another button which states next screen. This button code would simply push to the database the "Name" of the screen you are on and ask for the contents of the next screen. The next screen information would contain something along the line of "Screen Name" "Background graphic" "Number of buttons" then what each button caption is, and on we go. Think / search on relational databases, MS Access should do just fine or you can use SQLServer Express (free from MS) or many other db servers out there.

2: Think / search on Artificial Intelligence programming, Big scarry name but simple enough in small doses which is exactly what you seem to need. See. Eliza or http://ai-depot.com/Intro.html for a decent introduction.

3: Think / search on Control arrays, Take a command button and copy it on the form then paste it and you will be ask if you want to create and array or not. Answer yes and you will now have a button named Command1(0) and a button named Command(1) this can be used to create and destroy command buttons, labels and other controls on the form. This is where it gets a lot more tricky so you will need to do a lot more studying and learning.

Hey that is what you are after isn't it?

Hope that helps a little, and another thing, when you are posting to a forum like this, be sure to include as much info about what you are actually doing as you can.
Sometimes you may run up against a wall because you went down the wrong hall? ;)

~Skulldragger
Nov 27 '06 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: delete table with Visual Basic 6 | last post by:
Dear developer, I have an error message when I try to delete or drop Microsoft Access XP table with ADOX in Visual Basic 6. I use the ADOX.Catalog and ADOX.table to create and delete or drop table...
1
by: Tetris | last post by:
I am preparing the MCAD Certification. I use the Visual Studio 2005. But I can't create Web application. There is only ASP.NET Web service project. Is it possible to develope ASP.NET web...
2
by: elnahrawi | last post by:
Download ebook http://books-download.com/?Book=1487-Visual+Basic+2005+Jumpstart Okay, all you VB6 developers--time's up. As of March 2005, Microsoft no longer supports this version of Visual...
4
by: sqlguy | last post by:
Why do we have to contact MS for a problem that has been with this compiler from at least the beta of VS 20005. I am so sick and tired of the 30 - 40 clicks it takes to dismiss VS when there is a...
2
by: Hunk Gym | last post by:
VB.Net of Visual Studio.Net 2003 VS Visual Basic 2005 Express Edition Good Day! Would be appreciate if there is solution for the following problem: - In VB.Net of Visual Studio.Net 2003,...
6
by: Carol | last post by:
Hi. When I try to run Visual Studio 2003 I get the message "MS development environment is not installed for the current user. Please run setup to install the application." Is there any way to...
97
by: Master Programmer | last post by:
An friend insider told me that VB is to be killled off within 18 months. I guess this makes sence now that C# is here. I believe it and am actualy surprised they ever even included it in VS 2003 in...
3
by: Edwin Smith | last post by:
I have a 2 form project in VS2005 that now hangs whenever I try to do anything with the second form. This seems to have started when I added some SQL tables from a Pervasive v.9 database using the...
11
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I have seen the terms Visual Basic 2005 and VB.NET. It seems that sometimes they seem to be referring to the same thing but sometimes they are not. I also run into terms like VB9 and VB10.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.