Single step thru the load. Most of the time you are referencing something that hasn't been loaded.
How would I do this?
I am still learning, I thought the debugger should tell me where the error is.
Single step thru the load. Most of the time you are referencing something that hasn't been loaded.
How would I do this?
I am still learning, I thought the debugger should tell me where the error is.
In my VB.NET program i have greated, i am getting the above error with the following description
An error occurred creating the form. See Exception.InnerException for details. The error is: Object variable or With block variable not set.
The debugger doesnt point me towards any actual code to fix, so i am stumped.
How would I go about debugging this error?
Thanks.
(PS, I am learning VB.NET at the moment, the program i am making is an example from a book)
I have this code that won't display the iframe properly. When I use it, the iframe spans accross the page, but won't span down, fitting the entire page.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd[/URL]">
<html xmlns="[URL]http://www.w3.org/1999/xhtml[/URL]">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>WinBetaSecrets- Connecting the Beta Community</title>
<style type="text/css">
<!--
body {
background-image: url([URL]http://www.winvistasecrets.com/network/templates/ja_sargas/images/body-bg.jpg[/URL]);
background-repeat: no-repeat;
}
.style3 { color: #FFFFFF;
font-size: 18px;
font-weight: bold;
}
-->
</style></head>
<body>
<div align="center"><a href="<A href="http://www.winvistasecrets.com/network"><img">http://www.winvistasecrets.com/network"><img src="[URL]http://www.winvistasecrets.com/network/templates/ja_sargas/images/logo.png[/URL]" alt="logo" width="584" height="109" border="0" /></a></div>
<p align="left"> </p>
<div style="height:100%; width:100%;">
<iframe src="[URL]http://thevistageeks.com/forums/index.php?act=idx[/URL]" height="100%" width="100%" frameborder="0" scrolling="yes">
</iframe>
</div>
</body>
</html>
does it give an error or does it just hang indefinately? does it crash when you drop the control or when you try to use it?
Matt
Not when I use it..I tick the box, press OK or Apply and it crashes.
You can certainly drag on a web browser in VB6.0. Look in the extended/full control list.. I'll walk you through because I don't remember exactly myself..
Right click your toolbox and hit components, or go to project > components; then browse through the list until you reach "Microsoft Internet Controls", check the box, and you'll have a new component in the toolbox called WebBrowser. Use it like this: WebBrowser1.Navigate("AN_URL")
Matt
Yah, When I do this it crashes.
Crashes no matter what school computer I do it on :(
Is it possible for an app to write to the hard drive? Instead of using normal memory?
Then delete what was stored on exit.
As I said...
There was web access long before .NET, so don't use technology that is limiting you.
Yes, but in the .NET framework you can just drag an internet browser in...
However, is it possible to compile in the 1.1 framework?
Ok, I got it working using the While statement.
private void button1_Click(object sender, EventArgs e)
{
if (this.richTextBox1.Text == "")
{
richTextBox1.Text = "1";
}
this.toolStripStatusLabel1.Text = "Running";
this.richTextBox2.Text = "";
while (this.toolStripStatusLabel1.Text == "Running")
{
String str1 = richTextBox1.Text;
String str2 = ("0");
String str3 = ("10^");
str1 = str1 + str2;
this.richTextBox1.Text = str1;
this.richTextBox2.Text = str3 + Convert.ToString(str1.Length - 1);
}
}
Problem is, as most of you can tell from reading the code...Is it crashes! Is there anyway to slow the process down? So it goes fast, but just fast enough so my computer can handle it?
Sorry, I am actualy doing a windows form.
That other post was for another project....Sorry about confussion.
This program was just for me to get the idea of strings, ect, All I want is the repeat function so I don't have to keep clicking the button.
All my program works now, except for this repeat.
help appreaciated.
I promise I'll get a book :p
Install the .NET framework 2, there is no reason not to have it installed and it's easy enough.
The school will not install it...I reckon, and I probably don't have permissions.
Although they will have to install it next year (VCE program has been updated, so they get the latest software, probably visual studio 2005, as 2007 won't be out by then) I want it now :p
Although, I will try and install it myself, or ask the head of ICT
Thank you heaps!!!
Now...When I tried adding a break and contine it didn't work...Said there wasn't an enclosing loop....
private void button1_Click(object sender, EventArgs e)
{
if (this.richTextBox1.Text == "")
{
richTextBox1.Text = "1";
}
this.toolStripStatusLabel1.Text = "Running";
//this.richTextBox1.Text = "";
this.richTextBox2.Text = "";
if (this.toolStripStatusLabel1.Text == "Running")
{
String str1 = richTextBox1.Text;
String str2 = ("0");
String str3 = ("10^");
//str1 += str2;
//System.Text.StringBuilder.Append(str1);
str1 = str1 + str2;
this.richTextBox1.Text = str1;
this.richTextBox2.Text = str3 + Convert.ToString(str1.Length - 1);
}
else
{
break;
}
continue;
}
I was trying to remake it in VB 6.0 at school....But that doesn't allow you to add a web browser.
I need a web browser in it.
Hello everyone,
I'm new to this...Last night I made a program in Visual Studio 2005, and when I brought it to school today to run, it wouldn't because they don't have .NET 2.0 installed...
Is there a way I can compile my program with the .NET 2.0 framework inside it? (Don't care about size)
Or what can I do? Apart from install the framework?
You mean something like this:
[IMG]http://img147.imageshack.us/img147/645/spagvt9.th.gif[/IMG]
Just append the text box.
Thats excactly what I want to do.
How would I do it? How do I append to a text box (I heard I needed to append, but can't work out how to append anything)
use +=
str1="1"; str2="0"; str1+=str2; //str1 is now "10" str1+=str2; //str1 is now "100" str1+=str2; //str1 is now "1000"
This code doesn't do anything different to mine.....
I want all of this code under a button...So when I press the button a second time, it adds another zero onto what is already there.
Here is my code, under the button so far...
private void button1_Click(object sender, EventArgs e)
{
this.toolStripStatusLabel1.Text = "Running";
this.richTextBox1.Text = "";
this.richTextBox2.Text = "";
if (this.toolStripStatusLabel1.Text == "Running")
{
String str1 = ("1");
String str2 = ("0");
String str3 = ("10^");
//str1 += str2;
//System.Text.StringBuilder.Append(str1);
str1 = str1 + str2;
this.richTextBox1.Text = str1;
this.richTextBox2.Text = str3 + Convert.ToString(str1.Length -1);
}
else
{
}
}
I want to make it, so when I click the button, it shows a 10, Then I click the button again, it shows 100, then again, 1000.
All help apreaciated.
Brendan.
I don't really get what you are trying to do.
the way you have it, textbox 1 should have "10" in it and
textbox two should have "10^1" in it.What are you wanting to have in the two boxes?
Yes, That is what is happening...
I want to, when I click the start button for it to have 1 then add 0's on the end until the stop button is pressed, then in the other text box it shows the index form of that number.
I just need to continuously add str2
Hello everyone,
I am very new to programming, and I recently tried to develop a C++ application, but came accross alot of problems, and was advised to try C#.
Now, I have basicly used the same code...A bit different, And everything is working, except one thing.
String str1 = ("1");
String str2 = ("0");
String str3 = ("10^");
str1 = str1 + str2;
this.richTextBox1.Text = str1;
this.richTextBox2.Text = str3 + Convert.ToString(str1.Length -1);
I want, to have str1 + str2, then have that add on str2, then that add on str2, ect, forever.
Now, when I was working with integers, the old value would override so if I had
X = 10
Y = 10
X*Y=Y
Making Y 100
Then did X*Y again, the answer would be 1,000, ect. But this doesn't work with strings.
Can someone help me here?
Well, After heaps of trying to get this to work, I decided to rebuild this in C#
I have almost got everything working, even got strings working, I just can't get it to keep adding 0's.
So I'll post a topic in the C# section.
Thanks for everyones help.
I know a person who is a programmer for a living, and there telling me to do C#, but thats another story :P
Anyway, I don't think these faults are in my code...I made a new project, and tested it, a blank form came up, then included <string> and got the same errors.
You've gotta horrendous coding style developing there. Yikes!
My advice would be to stop before you get worse. Ha ha. Why don't you look into the .net framework if you are interested in writing GUIs or pick up java?
Haha, I have basicly been coding since Saturday :P
I plan on doing it properly soon, I just want to get this finished :P
Why should I pick up Java? I thought that was bad for having a GUI.
I kinda meant the other 95% of your code which isn't standard C++.
Most of my code, I worked out myself, and got some help from the chat room, some of it from tutorials,
Anyway, I zipped my whole project folder up, so you can have a look.
http://ravinginsanity.com/googolplex.zip
Thanks for the help :cheesy:
I was using a combination of
http://www.cprogramming.com/tutorial/string.html
and
http://www.cprogramming.com/tutorial/lesson9.html
Also, some help from the chat room.
If you want, tonight I'll upload my whole project somewhere, so people can have a look?
About.h is just another form, which has/will have information about the program.
#pragma once
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
namespace Googolplex {
/// <summary>
/// Summary for About
///
/// WARNING: If you change the name of this class, you will need to change the
/// 'Resource File Name' property for the managed resource compiler tool
/// associated with all .resx files this class depends on. Otherwise,
/// the designers will not be able to interact properly with localized
/// resources associated with this form.
/// </summary>
public ref class About : public System::Windows::Forms::Form
{
public:
About(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
protected:
/// <summary>
/// Clean up any resources being used.
/// </summary>
~About()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::Label^ label1;
private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::TextBox^ textBox1;
protected:
private:
/// <summary>
/// Required designer variable.
/// </summary>
System::ComponentModel::Container ^components;
#pragma region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
void InitializeComponent(void)
{
this->label1 = (gcnew System::Windows::Forms::Label());
this->label2 = (gcnew System::Windows::Forms::Label());
this->textBox1 = (gcnew System::Windows::Forms::TextBox());
this->SuspendLayout();
//
// label1
//
this->label1->AutoSize = true;
this->label1->Font = (gcnew System::Drawing::Font(L"Microsoft Sans Serif", 20, System::Drawing::FontStyle::Regular, System::Drawing::GraphicsUnit::Point,
static_cast<System::Byte>(0)));
this->label1->Location = System::Drawing::Point(12, 9);
this->label1->Name = L"label1";
this->label1->Size = System::Drawing::Size(201, 31);
this->label1->TabIndex = 0;
this->label1->Text = L"Raving Insanity";
this->label1->TextAlign = System::Drawing::ContentAlignment::TopCenter;
// …
C and C++ are case sensitive.
STD
is notstd
.
Same error...
Error 1 error C2871: 'std' : a namespace with this name does not exist c:\documents and settings\brendan\my documents\visual studio 2005\projects\play\googolplex\googolplex\Form1.h 12
Are you
using namespace std
?
Error 1 error C2871: 'STD' : a namespace with this name does not exist c:\documents and settings\brendan\my documents\visual studio 2005\projects\play\googolplex\googolplex\Form1.h 12
The Microsoft Platform SDK?
Also, what is the crt folder? under include?
I believe that my header files are out of data...And causing me errors.
Can someone please upload the standard Visual C++ 2005 header files?
#include"About.h"
//#include "string.h"
#pragmaonce
unsigned int X = 10;
unsigned _int64 Y = 10;
//String str1(1);
//String str2(0);
//String s = (1);
//s.append("0");
//int X = String::Length - 1
//using namespace STD;
//string my_string;
//String::
namespace Googolplex {
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
/// <summary>
/// Summary for Form1
///
/// WARNING: If you change the name of this class, you will need to change the
/// 'Resource File Name' property for the managed resource compiler tool
/// associated with all .resx files this class depends on. Otherwise,
/// the designers will not be able to interact properly with localized
/// resources associated with this form.
/// </summary>
public ref class Form1 : public System::Windows::Forms::Form
{
public:
Form1(void)
{
InitializeComponent();
//
//TODO: Add the constructor code here
//
}
protected:
/// <summary>
/// Clean up any resources being used.
/// </summary>
~Form1()
{
if (components)
{
delete components;
}
}
private: System::Windows::Forms::MenuStrip^ menuStrip1;
protected:
private: System::Windows::Forms::ToolStripMenuItem^ fileToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^ helpToolStripMenuItem;
private: System::Windows::Forms::StatusStrip^ statusStrip1;
private: System::Windows::Forms::ToolStripStatusLabel^ toolStripStatusLabel1;
private: System::Windows::Forms::Label^ label1;
private: System::Windows::Forms::Label^ label2;
private: System::Windows::Forms::Label^ label3;
private: System::Windows::Forms::Label^ label4;
private: System::Windows::Forms::Button^ button1;
private: System::Windows::Forms::Button^ button2;
private: System::Windows::Forms::ToolStripMenuItem^ exportNumberToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^ quitToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^ aboutToolStripMenuItem;
private: System::Windows::Forms::TabControl^ tabControl1;
private: System::Windows::Forms::TabPage^ tabPage1;
private: System::Windows::Forms::RichTextBox^ richTextBox1;
private: System::Windows::Forms::TabPage^ tabPage2;
private: System::Windows::Forms::ToolStripSeparator^ toolStripSeparator1;
private: System::Windows::Forms::RichTextBox^ richTextBox2;
private: System::Windows::Forms::SaveFileDialog^ saveFileDialog1;
private: System::Windows::Forms::ToolStripMenuItem^ realNumberToolStripMenuItem;
private: System::Windows::Forms::ToolStripMenuItem^ indexFormToolStripMenuItem;
private: System::Windows::Forms::SaveFileDialog^ saveFileDialog2;
private:
private:
/// <summary>
/// Required designer variable.
/// </summary>
System::ComponentModel::Container ^components;
#pragmaregion …
@Wreef
Did you include <string>?
When ever I include string I get 100's of errors :(
Well, I finaly got it working with 64bit int
unsigned int X = 10;
unsigned _int64 Y = 10;
Anyway, I need bigger, I found out the only way to do this would be strings, this will also be easier when I later go to put it in index form, as I can just count the string.
Problem, I don't know one thing about strings!
I am using Visual Studio, so C++ .net and I can't get anything to do with strings working.
string s; //Gives an error
s.append ("0") //Gives an error
Infact, anything to do with strings gives me errors, must be doing something wrong.
Can someone please help?
At the moment I'm using
unsigned int X = 10;
unsigned _int64 Y = 10
And
if ( this->toolStripStatusLabel1->Text == "Running" ) {
Y = X * Y;
this->richTextBox1->Text = Convert::ToString(Y);
Like I said, it works, but no more than a 18 didget number...Need strings.
Can someone help me replace the int's with strings? Explain how?
I understand some of that code...But I always get errors when I try implimenting it.
I've made a big mess of my code, so I have started a new project, and I'm up to the same thing as I was before, I need to get the basics of this working.
In theory, would I be able to, somehow, store 10 in a variable, * by 10, override the variable with my new answer, then repeat. While at the same time my textbox is refreshing every second?
Also, another question, I seen things like "this->" leading to heaps of different things, what does this mean? I tried finding it on google, but there wasn't much help, I guess because the word "This" can be used for alot of things :p
Thanks everyone.
I'll try to go out and get a good book this weekend, probably one like C++ for dummies or something.
I got the compiler covered though, I can get a legal copy of Visual Studio Professional cheap, through my Dads work (A university).
Anything else I should know?
I have been Beta testing Vista since December last year, fully, I did try a longhorn build before then, but nothing special.
Since December I have tried about 6 builds, and believe me, Vista has come along way in this short time frame.
When I got the December CTP, I was thinking that Vista would never be ready for the public, it was terribly slow, although it has most of the features there, it crashed all the time, ect.
Now, I can use the latest build stabily as an OS, easily, with minor problems.
I believe that when Vista comes out next year, it will be ready for the public.
I believe there is a limit of 12 or 13 per key.
Not 100% sure though.
Hello Everyone,
I was just wondering if people could tell me what they think is the best way to learn C++, and link to some tutorials maybe? Recomend a book, ect.
Maybe I havn't found any good tutorials....But the ones I have seen aren't very good.
Help Apreaciated.
Brendan.
this->richTextBox1->Text = "CurrentNumber";
int CurrentNumber = 10;
CurrentNumber = CurrentNumber * 10;
Just a thought from a n00b, I know this doesn't work, it just makes the text CurrentNumber show up...However is there a way I could make that work? So it shows the variable?
This might not work...Seems simple though.
--------------------------------------------------------------------------------------------------
Edit:
How would I impliment what you showed me, to display in a text box? Is there a way I can control where the output goes?
Slightly mincing the order...
I applaud that attitude, it is all too infrequent.
Haha, Yeah, Well unlike alot of people I know, I love to learn!
Perhaps consider adding zeros to a string.
Is there a tutorial anywhere where I can learn how to do this?
It sounds like you know some API stuff before the language proper. This make it a little more confusing trying to gauge what recommendation(s) may be at your level [API stuff is generallyl out of mine.] Perhaps you could post a minimal snippet of compileable code to help others help you.
Well, I am using Visual C++, So its not that hard, but I know what I'm doing with the forms. Infact, I think I know how to input it into the rich text box.
Would it be possible for me to do X x 10, and make it so when ever that calculation is done, the answer is stored as X, and X's original value is 10?
And then count the amout of 0's in X and store it in Y?
I don't really know, as I said, just learning. Although strings sounded interesting.
Now, I don't think there is point in posting the code, because I havn't done much yet, just small things like when the button is pressed, text changes, ect (I can do that easy :p )
Hello Everyone,
This is my first post, I am very new to C++, infact only touched it once before today, so I need some help.
I am trying to genorate a big number, This number isn't actualy possible to genorate (Googolplex) but I want to program to keep multiplying itself by 10, until the stop button is pressed.
I have a rich text box set up, where I want the outputted number to go in real time.
Then, I have another rich text box (On another tab) Where, I want the index form of the number to be shown.
First problem, is the max number able to be genorated in C++ 2,147,483,647?? I read this in a tutorial...
Second, How can I output everything done in real time to a rich text box? Then, I guess I need to count the zero's and put 10^amout on zero's in the other box.
I don't want to be spoonfed, I need to learn how to use C++ so any tips/helps would be great, a point in the right direction, ect.
Thanks for your time,
Brendan.