Hi, I’m new to PHP so please bear with me. I’m trying to send user input from a HTML form to a MySQL database. The database has one table with four fields (varchar(15), varchar(15), varchar(10), longtext). The HTML form looks like:
<html> <body>
<form name="index" action="Z.php" method="get">...
Hi, I'm new to Web development so please bear with me. I'm developing a web site using Visual Studio.Net. I've two problems. First, I'm able to build the web site, but when I run it in Explorer I get the error "HTTP 401.3 - Access denied by ACL on resource Internet Information Services - You are...
Hi, How do I assign the characters entered into a text box to a c-style character array? I have to do this because the library I'm using contains many functions whose parameters are c-style character arrays. I wish to say something like:
char* x = new char[20]...
I am building a class (static) library using C++ to access a database in Visual.Net. I have declared:
using namespace System;
using namespace System::Data;
below #pragma once.
I get the compiler errors:
error C2039: 'Data' : is not a member of 'System'
error C2871: 'Data' : a namespace with this...
I have two Windows Forms, say, FormA and FormB. FormA, the form that loads first in Application::Run(gcnew FormA());, has button A which when clicked takes me to FormB. Similarly, FormB has button B which when clicked should take me back to FormA. The click event for A is shown below:
#include...
I have a Windows Forms Application project with multiple forms. How can I jump from one form to another without having to create the form, that is, how can I pass a reference to Form_A to another form, say, Form_T? In other words inside Form_T instead of saying:
Form_A ^ x = gcnew...
I have placed a textbox and other controls on a form. I have the event handler:
private void textbox_KeyPress(object sender, KeyPressEventArgs e)
{
//code to ensure text entered are numbers;
}
How can I test whether a key on the keyboard is actually pressed. If the user presses no key within...
I have the following event handlers for a button and a text box:
private: System::Void button_Click(System::Object^ sender, System::EventArgs^ e)
{ function(0);
}
private: System::Void textBox_Validating(System::Object^ sender, System::ComponentModel::CancelEventArgs^ e)
{...
Sorry, I am using C++ syntax, but it should be the same for C#. How can I call one event from within another? For example, say I have the two events, one for a button and one for a textbox.
private: System::Void Button_Click(System::Object^ sender, System::EventArgs^ e)
private: System::Void...
Hi,
I am writing a C++ console application. I would like a C-style string, say, char* message = “Beware danger!!” to blink (flash, go on and off) so as to attract the user’s attention. How might I do that? I would be grateful for all help.
Hi,
Please bear with me, I am new to Visual C++.Net. I have included two projects to a blank solution, one a static class library (named Vending Machine Library), the other a Windows Forms Application (named Vending Machine Controls). In the property pages of the Forms Application, in General...
I’m new to C#, so please bear with me. I’ve created a Windows application and inserted code, found in a book, for creating a simple word processor. I’ve placed a ToolStrip, RichTextBox (Dock property set to Fill) and a FontDialogBox on a form. Further, I’ve created six buttons on ToolStrip and...
I get the following compiler warning:
Warning C4996: 'kbhit' was declared deprecated
‘kbhit’ was used in the following code:
int s = 0;
time_t now, expire;
cout << "Enter integer: ";
expire = time(NULL) + 8; //wait for 8 seconds
now = time(NULL);
while (!_kbhit() && now <...
I have created a template storage class which contains the following function:
template<class X>
void Queue<X>::insert(X& q)
{ X* p = new X(q);
.
.
}
By invoking the copy constructor in the class plugged in for X the storage class stores an exact copy of the object passed as an...
Location Matrix::randomAdjacentLocation(Location& location)
{ int row = location.getRow();
int col = location.getCol();
.
.
}
Above ‘location’ represents an occupied point in a two-dimensional matrix. How can I use row, col and rand() to generate a (random) point that...
Hi,
Can I pass the address of a copy of a local object to a pointer? Say function someFunc(), of a container class L returns a copy of a local object of type X. X is derived from the ABSTRACT class Y.
X L::someFunc()
{ X local...
Hi,
I created a general list, having as a data member a pointer to the first node, and then linking all other nodes to the first node. My simulation program requires the list to be shuffled. I wonder if anyone can suggest (or even provide the code) how I might rearrange the contents of the...
Hi,
I wish to place objects of class B and class C into one queue. The queue, say class Queue, is a class template. Further, B and C are derived from class A. Can I say something like:
Queue<A> qobject;
B bob;
C cat...
I am new to Visual Studio.Net so please bear with me. I am trying to create my first window using Visual C++. I followed the instructions set out in a book but when I tried to compile the program I got the following error message:
error VCD0041. IIS must be installed on this machine in...
I am writing a program, console not Windows application, where a password has to be entered and then confirmed. I do not want the user's password to be displayed while it is being entered. In other words when the user enters the character, say, R I wish X to be shown on the screen. How can I go...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.