C# :: Access To Other Form Once User And Password Validation Granted Subform

Aug 24, 2014

What I want is just to make a validation of the users and passwords already set within my array and go to the other form. By the way this form I already made it my start up form on program.cs with the same command I am trying to back to MainForm.

void Button1Click(object sender, EventArgs e) {
string error = "denied";
string[,] usrpass = {{"User1", "pass1"}, {"User2", "pass2"}, {"User3", "pass3"}, {"User4", "pass4"},
{"User5", "pass5"}};

[Code] .....

View 6 Replies


ADVERTISEMENT

C# :: How To Access User Control Form One Of The Child Form

Apr 22, 2014

I hav created mdi parent form that contain one user control. I want to access that user control from one of the child form

View 4 Replies View Related

C Sharp :: Create Instance Of Form Into Non Form Class To Access Button / Label

Nov 23, 2014

I have a non form class. I want to update label/ check status of check box etc.. in non form class ( here resides functions that contains logic). How can i do that ?

View 4 Replies View Related

Visual C++ :: Access Username / Password Protected URL?

Oct 14, 2014

I mainly code plugins for Cinema 4D .... I used to code in COFFEE (a javascript like language, only for Cinema 4D) and python. But, recently, I started coding in C++.

I start my development on a Mac, using Xcode. But then, to generate Windows versions of my plugins, I take my source code to Visual Studio, perform the necessary adjustments, and create Win32 and Win64 code.

Lately, I was trying to devise a scheme to protect my plugins from being pirated. Yes, I know it is virtually impossible, but if I could make it harder for hackers to crack my plugins, it would be fine.
I made it work fine in python and in C++, but only in Xcode.

In Windows it is difficult. I only need to be able to access a username/password protected folder in my server and check if there is a file there. I don't even need to read the content of the file (but it would be nice to be able to do that too).

I started out using the cURL library but it is so complicated to make it work. I need 32 and 64 bit versions. Then I also have to include three .dll files in the folder of the application (that means that I would have to ask to the people who buy my plugins to copy three additional files to the main application folder... not a good thing )

So, any way to access a username/password protected folder on the net? (the username/password is generated in my code so, of course, I know what are the username/password to provide).

Also, I would need a way for the code to be completely self-contained, meaning that the users would not have to manually add any other files (libraries), besides the folder containing my plugin.

View 14 Replies View Related

C/C++ :: Float User Input Validation

Feb 4, 2014

How I could correctly validate user input when the user inputs a numeric value that will be float pay1, pay2, pay3, pay4. However, the if statement that I wrote crashes after I test the validation. I been told that scanf is dangerous, but strtol works best, but how to write a validation with strtol.

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>
#include <conio.h>
#define ARRAYSIZE 2
#define FORMAT "First Name Pago1 Pago2 Pago3 Pago4 Total Net"
#define FORMATHEADER "Last Name "

[Code] ....

View 3 Replies View Related

C++ :: How To Access A Method Form CPP File

May 21, 2013

How to access a method from a .h file in another .cpp file

Code:

// main.cpp

#include <iostream>
#include "inc/one.h"
using namespace std;
int main( ){

School Tadd;
Tadd.AddTeacher(1);
return 0;

[Code] ....

When I compile , i am getting the below error

In function main:
undefined reference to `School::AddTeacher(int)'
Build finished: 1 error

View 4 Replies View Related

C# :: How To Access Form Method From Another Class

Jan 7, 2015

Basically am trying to reference a method in a my Form1 class into another class. So far I have tried multiple different methods to try and access the method but have not managed it so far. Both classes use the same namespace. The part of my form class that I am using are as follows:

public class Form1 : Form
{
IContainer components = null;
private ButtonPanelThread p1, p3, p4;

[Code]....

View 4 Replies View Related

C :: Input Validation - User To Enter Six Doubles

Dec 20, 2014

I'm trying to validate my input. I require for the user to enter six doubles and if they don't then I want them to re-enter the information. Here is my code:

Code:
while (1>0) {
printf("Please enter arguments in the order: negative mass, positive mass, initial x-position, initial y-position, initial x-velocity, initial y-velocity:
");

if ( scanf("%lf %lf %lf %lf %lf %lf",&MassMinus,&MassPlus,&Pos[0][0],&Pos[0][1],&Vel[0][0],&Vel[0][1]) != 6) {
printf("Not all numbers were assigned!

[Code] .....

At the moment it just waits if you enter less than six numbers and if you enter any more than 6 it just ignores anything after the sixth number (so pretty much does nothing). Also if I entered 1 2 a b 3 4 instead of entering six numbers it would register that as 1 2 0 0 3 4 but I want it to make the user input the numbers again. I'm also aware that "while (1>0)" isn't good programming form but I'm not really sure what to use instead?

View 11 Replies View Related

C/C++ :: Date Validation Accepted By User In Variable

Apr 12, 2012

Some example to validate date accepted by user in variable as follows:

int day;
int month;
int year;

It must validate entered details are correct or not ans

It must check that date is more than System date or not

View 6 Replies View Related

C++ :: How To Hide Password Entered By User

Jul 28, 2014

I'm making a Project on a Travel Agency and I need to hide the password entered by the user! I am working on Xcode 5.1.1 -> Command Line Tools -> C++ on my MacBook Pro! Here is what I've tried --

string pass ="";
char ch;
cout << "Enter pass";
ch = getchar();
while(ch != 13){//character 13 is enter

[Code]...

But in the first case the display is -

//Assuming the password is Hello Hello ******

And in the second its giving me 3 errors -

1. Apple Mach-O Linker(Id) Error "_stdscr", referenced from:

2. Apple Mach-O Linker(Id) Error "_wgetch", referenced from:

3. Apple Mach-O Linker(Id) Error clang: error: linker command failed with exit code 1 (use -v to see invocation)

View 10 Replies View Related

C++ :: Using Variables To Access Objects In Windows Form

Dec 4, 2014

Alright, so I'm making a windows form with a few hundred buttons, and one button will change color based on data the program receives over a socket. This is what I have, and it kind of works, but I don't want to have to make another if statement for all 260 buttons.

void hitmiss(std::string u){
std::string^ ind = reccdata2();
if (u == "button6"){
if (ind == "1"){
this->button6->BackColor = System::Drawing::Color::Red;
this->textBox2->Text = L"hit";

[Code] .....

What I want to do is make it more like

void hitmiss(System::String^ u){
std::string^ ind = reccdata2();
if (ind == "1"){
this->u->BackColor = System::Drawing::Color::Red;
this->textBox2->Text = L"hit";

[Code] ....

But it returns the error that u is not a part of Form1.

View 3 Replies View Related

C/C++ :: User Input Validation - Finding GCD And LCM Of Multiple Numbers

Oct 23, 2014

I need validation on what the user inputs. Input should not be an alphabet, empty, and not negative number. This program is for finding the GCD and LCM of multiple numbers.

#include <stdio.h>
void bubble_sort(int numbers[], int len) {
int i, j;
int swapped;

[Code] .....

View 2 Replies View Related

C++ :: Write A Password Prompt That Gives A User Only Certain Attempts

Mar 6, 2015

I'm trying to write this c++ programe:

Write a password prompt that gives a user only a certain number of password entry attempts, so that the user cannot easily write a password cracker.

Using FOR Loop. I know this can be easily done using while loop. But I want to know how to do it with for loop aswell.

Here is what I have so far:

Code:
#include <iostream>
#include <string>
using namespace std;
int main ()

[Code] ....

I don't see where the problem is.. The program just executes and does nothing.

View 9 Replies View Related

C Sharp :: File Based User And Password System?

Feb 14, 2013

i can't seem to get my program to save the Set.savv file and encrypt it and decrypt it when user logs back on to there virtual file on a CD and writing it to the disk its self and closing the session

View 8 Replies View Related

C++ :: Input Validation - Prevent User From Entering Characters Or Symbols Instead Of Numbers?

Jul 19, 2013

How do I prevent user from entering characters or symbols instead of numbers?
int num;
cout<<"Enter a number."<<endl;
cin>>num;

Also, how do I prevent user from entering a number instead of a character?
char c;
cout<<"Enter a character."<<endl;
cin>>c;

View 9 Replies View Related

C Sharp :: Programmatically Start A Process And Enter Required User Name And Password?

Apr 21, 2013

Using C#, is it possible to programatically start an application and enter a required user name and password

View 2 Replies View Related

C :: Input From User As Char And Output In Hex Form

Sep 9, 2014

I'm trying to write a program that takes input from the user (thats a char) and outputs it to the monitor in hex form.The program is meant to continuously take input from the user then output to the monitor in hex form until an EOF is detected this triggers the program to close.The following code does this except that I get a lower case 'a' at the end of each output.I think the 'a' has to do with the enter key and if that is the case how can i tell the program to ignore this input from the user.

Example: input from user: ABC output to monitor: 41 42 43 a

Code:
#include <stdio.h>
int main(void) {
char myChar;
while(EOF != (myChar = getchar())) {
printf("%x ",myChar);
}
system("pause");
return 0;
}

View 5 Replies View Related

Visual C++ :: Allow User To Enter A Value As C String In Certain Form

Oct 14, 2013

My program was to allow the user to enter a value as a C string in the form: xxx,xxx,xxx,xxx,xxx.xx, where x can be any digit. Well, so far here is my attempt. I think the question is, would I have to implement a switch statement for the digits, the comma, and the decimal, so that when a user inputs, let say 52,000.00 the switch statements would read the 1st digit, checks for decimals/commas and if not, proceed to read 2nd digit, and repeat?

Code:
#include <iostream>
#include <string>
int main() {
using namespace std;
char buffer[256];
char tempBuff[256] = {'

[Code] ....

View 3 Replies View Related

C++ :: Create A Program That Will Let User Input Amount In Form?

Jan 4, 2014

Figure this out using [TURBO C]

Create a program that will let the user input an amount in the form (367). The Program should determine the no. of coins for each dominations : 50,25,10,5,1. (using Turbo C)

View 7 Replies View Related

C# :: Graphic User Interface - Dragging And Dropping Controls In Form

Mar 5, 2014

is there a difference when creating a graphic user interface dragging and dropping controls in the form and coding on source code, difference in a sense that the code will appear differently if the control is dragged then the code appears automatically on the source code as compared to typing it on source code?

View 2 Replies View Related

C# :: Persist Object To Track User Access?

Feb 19, 2014

I would like to track user actions within my windows desktop application, and write them to a database.

I also have a User class, that has a userID field pulled from the User table. I can write a login event (UserID, timestamp, action) with no problem, but as the user navigates around the app, how can I persist the user object so I always have access to their userID? I know I can just pass it as a parameter as they do different tasks, but that seems inefficient to me.

View 7 Replies View Related

C++ :: Create User Defined Class And Have Access In Separate Header File From Main

Mar 15, 2013

I am a beginner with C++, taking a class right now. The lab this week is to create a user defined class and have it accesses in a separate .h header file from the main.

I think I'm finding my way through it, but I'm getting a complie error that makes no sense to me:

1> Resistor.cpp
1>c:users omdocumentsschoolcomp 220week 2lablab 2.2lab 2.2
esistor.h(11): error C2146: syntax error : missing ';' before identifier 'resistor'
1>c:users omdocumentsschoolcomp 220week 2lablab 2.2lab 2.2

[Code] .....

Here is the first portion of the .h file:

#include <iostream>
#include <iomanip>
#include <Windows.h>
#include <math.h>
#include <string>

class CResistor{
double res1, res2, res3, percentage, Nominal, Tolerance;

[Code] ....

View 16 Replies View Related

C++ :: Hangman Definition Game - Extract Word Randomly Form File And User Guess The Word

Jun 25, 2014

Basically I have a text file called words. I'm supposed to extract a word randomly form the file and have the user guess the word. If they guess the word correctly in x number of tries they will receive the definition.

I'm having trouble receiving that random word and I'm getting the definitions from the file.

Here's my code:

#include <iostream>
#include <fstream>
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
using namespace std;

[Code] ....

This is what is in the words.txt file
apple#the usually round, red or yellow, edible fruit of a small tree
boat#a vessel for transport by water
horse#a solid-hoofed plant-eating domesticated mammal with a flowing mane and tail, used for riding
television#a system for transmitting visual images and sound that are reproduced on screens
soup#a liquid dish, typically made by boiling meat, fish, or vegetables, etc.
bottle#a container, typically made of glass or plastic and with a narrow neck
barber#a person who cuts hair
toast#sliced bread browned on both sides by exposure to radiant heat
radar#a system for detecting the presence, direction, distance, and speed of aircraft, ships, and other objects
red#of a color at the end of the spectrum next to orange and opposite violet

View 3 Replies View Related

C# :: Login Then Close Form And Open Main Form

Aug 25, 2014

This is more of a Application Design question, Let's say I have Form1(Login), this is opened from Program.cs, when the user enters details, the Event Handler makes a instance of a class, adds the data and stores the instance within Program.cs class.

So the best thing to do here, is to close the Form1(Login) and open Form2(Main) via Program.cs so that I can send the List<Login> object with my Login instance objects to said form. This form will remain open throughout the applications use as it's like the main GUI for all the programs functions.

When I close this form, I may want to save some information before the application is terminated, so I may as well store the Login instances in Program.cs anyway.

Main stepping stone: Multiple (usually around 3 max) users can login this system if need be, which will mean closing Form2(Main) and then opening Form1(Login) so that once Form1 is closed it can recreate the From2(Main) form and pass the new List<Login> to that form.

What's the best way to do this, at the moment i'm creating the Form2 instance like so:

//....
//Detect the Login form being closed
loginForm.Closed += new EventHandler(OnLoginClosed);
//...
//Open the main form when the login is closed
private void OnLoginClosed(object sender, EventArgs e)

[Code] .....

This seems like it will work and do the job, but is there a better and cleaner way? The List<Login> will be passed to Forms which are created via Form2(Main) as this information will be needed. It's just that ive been told not to use Forms for too much data containment.

View 2 Replies View Related

C# :: Change Form Control Properties From User Control

May 24, 2014

I have researched quite extensively, experimented, and still cannot seem to change the properties of a control on an active winform from a user control.

So I have a user control which populates each dynamically added tab page in a tab control.

I have a textbox in the user control which I would like to type in, capture the text_change event, and change the text of the label in the winform.

View 14 Replies View Related

C# :: Modifying User Controls While Modifying Main Form?

Jul 10, 2014

I am trying to modify a user control while modifying the main form. For example i have my main form open in one visual c# window and my user controls in another. However it seems that in order for my code changes in my user control to have any effect on the main form i need to close all my c# windows and then re-open them and even then that sometimes doesn't work am i doing anything wrong or is this supposed to happen??

Also yes i am saving and clicking build solution on my user controls.

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved