Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Visual studio c++ help
New Posts  All Forums:Forum Nav:

Visual studio c++ help

post #1 of 2
Thread Starter 
I'm trying to create an application just for myself to use at home. I have the ui down but can't figure out some of the functionality.

Basically I want the program to start with several textboxes lined up, and when I click a button it should create another set of textboxes under the first set, and move the button down to line up with the second set of boxes.

Another thing I can't figure out is how make textboxes work while using a tab control container. I want the textboxes to appear on any tabs the user creates, but the textboxes remain empty until the user inputs any data.

If someone could point me in the right direction I'd be grateful.
The Aztec Cyclone
(13 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 @ 3.7Ghz EVGA X58 SLI LE MSI GTX460 1GB Cyclone SLI 3x2GB Corsair Dominator-GT DDR3 1600 
Hard DriveOSKeyboardPower
G.Skill 120GB SSD, WD 7200rpm 640GB, Samsung 54... Windows 7 Ultimate x64 Logitech G11 Corsair CMPSU-750TX 750W 
CaseMouse
Cooler Master HAF 932 Logitech G500 
  hide details  
Reply
The Aztec Cyclone
(13 items)
 
  
CPUMotherboardGraphicsRAM
Core i7 920 @ 3.7Ghz EVGA X58 SLI LE MSI GTX460 1GB Cyclone SLI 3x2GB Corsair Dominator-GT DDR3 1600 
Hard DriveOSKeyboardPower
G.Skill 120GB SSD, WD 7200rpm 640GB, Samsung 54... Windows 7 Ultimate x64 Logitech G11 Corsair CMPSU-750TX 750W 
CaseMouse
Cooler Master HAF 932 Logitech G500 
  hide details  
Reply
post #2 of 2
Quote:
Originally Posted by Daggerfist View Post

I'm trying to create an application just for myself to use at home. I have the ui down but can't figure out some of the functionality.

Basically I want the program to start with several textboxes lined up, and when I click a button it should create another set of textboxes under the first set, and move the button down to line up with the second set of boxes.

Another thing I can't figure out is how make textboxes work while using a tab control container. I want the textboxes to appear on any tabs the user creates, but the textboxes remain empty until the user inputs any data.

If someone could point me in the right direction I'd be grateful.

 

You definitely have some weird requirements.

 

I am going to directly state that I am in Visual C# mode right now, but a lot of the VStudio 2010 is identical.

 

First:)  The Tab Pages are unique individual objects.  There are ways to force them to appear, but is much easier to just copy and paste your textboxes as new textboxes (don't forget to rename them.)  You can batch copy like you would with files (CtrL + Click for multiple) it retains the spacing and alignment.

 

If you are getting confused with the naming convention, I abandon Hungarian / Pascal and just do something like this.

 

Tab1:

tbxTabOneInput1

tbxTabOneInput2

tbxTabOneInput3

tbxTabOneInput4

 

Tab2:

tbxTabTwoInput1

tbxTabTwoInput2

tbxTabTwoInput3

tbxTabTwoInput4

 

 

Second:)

When you click a button, you are executing an Event, so you will need an event handler for this button click. To quickly create one, just double click the button in the Design View, it should take you to the Code View with a method stub already carved out.

 

To insert an object onto the canvas you will have to put in the object via code, and give it a position, this is akin to creating an object and then drawing it (Java is notorious for this stuff.)  There is no moving per-se, and the previous method is arduous and complicated  You CAN however create the illusion of movement.  In order to do this, you must put an extra button and extra four textboxes on the Design View.

 

You then set their default property to Hidden, you can do this in your main method by executing tbxInput.Hide(); or perhaps in properties  You then have the option to use the .Show(); method IF that button is clicked, it will then make the boxes and button appear where you placed them in design view.  Now, you also have to remember to hide the original textboxes and the original button in the same event handler!

 

I think that might help you get some progress.  Good luck!


Edited by RagingCain - 5/9/12 at 6:56pm
Snowdevil
(16 items)
 
ASUS G750JM
(9 items)
 
 
CPUMotherboardGraphicsGraphics
[i7 4790K @ 4.4 GHz (1.186v)] [Asus Sabertooth Z97 Mark S] [nVidia Geforce GTX 1080] [nVidia Geforce GTX 1080] 
RAMHard DriveCoolingOS
[G.Skill 32GB DDR3 2133 MHz] [Crucial MX100 256GB] [Phanteks PH-TC12DX] [Win 10.1 Pro] 
MonitorMonitorKeyboardPower
[LG 29UM65 (2560x1080)] [QNIX Evo II LED (2560x1440)] [WASD v2 Tenkeyless] [NZXT Hale90 v2 ] 
CaseMouseMouse PadAudio
[ThermalTake GT10 Snow Edition] [Razer Mamba - Chroma] [Razer Kabuto] [Razer Man O' War] 
CPUMotherboardGraphicsRAM
i7 4770HQ Intel HM87 Express Chipset Geforce GTX 860M 8GB DDR3L 1600 MHz 
Hard DriveOptical DriveCoolingOS
Samsung SSD EVO DVD-RW Stock Windows 8.1 
Monitor
1920x1080 TN 
  hide details  
Reply
Snowdevil
(16 items)
 
ASUS G750JM
(9 items)
 
 
CPUMotherboardGraphicsGraphics
[i7 4790K @ 4.4 GHz (1.186v)] [Asus Sabertooth Z97 Mark S] [nVidia Geforce GTX 1080] [nVidia Geforce GTX 1080] 
RAMHard DriveCoolingOS
[G.Skill 32GB DDR3 2133 MHz] [Crucial MX100 256GB] [Phanteks PH-TC12DX] [Win 10.1 Pro] 
MonitorMonitorKeyboardPower
[LG 29UM65 (2560x1080)] [QNIX Evo II LED (2560x1440)] [WASD v2 Tenkeyless] [NZXT Hale90 v2 ] 
CaseMouseMouse PadAudio
[ThermalTake GT10 Snow Edition] [Razer Mamba - Chroma] [Razer Kabuto] [Razer Man O' War] 
CPUMotherboardGraphicsRAM
i7 4770HQ Intel HM87 Express Chipset Geforce GTX 860M 8GB DDR3L 1600 MHz 
Hard DriveOptical DriveCoolingOS
Samsung SSD EVO DVD-RW Stock Windows 8.1 
Monitor
1920x1080 TN 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Visual studio c++ help