C Sharp :: How To Code Array In Windows Form Using Listview In Visual Studio 2008
Oct 5, 2013
This is my problem in my subject programming but i dont how to use Array in windows form ... If i run my code i want my Data in listview would not be disappear if i close the form ...?
View 1 Replies
ADVERTISEMENT
Aug 19, 2014
I want to write my own application which would fetch some data from a web site. I need to parse the HTML code of the web site and get the data.
About the application:A form (main form) that will contain data arranged in rows. Some of the data comes from a web site and some of it comes from a database.The data that comes from the web site needs to be updated every few seconds so I need to keep fetching the data from the web site.The main form will contain a button "add" which when clicked will add a new row. New data can be added to this row by the user.
I am not sure what to use for this. I have been writing the application as a Windows Form Application (Visual C#) but I do not know whether this is the best choice. Should it be a windows form application or web application? Should I use something else?
View 6 Replies
View Related
Jul 3, 2013
looking for a simple LED type control for Visual Studio 2008. I just need a control that I can add to the toolbox where I can pass a parameter to define the colour. This is an MFC based application. how to add a new control to the toolbox. I have been programming in 'C' for many years but find some of the IDE's confusing as to how to do things (as above)
View 4 Replies
View Related
Jun 10, 2013
I've been trying to make a little quiz application that takes questions from a file and them presents question by question on a static pannel, a few buttons that have the possible answers on them written as the questions go, and on the bottom a little place where we can see whats our score.when we finish the quiz, the score gets writen in a data.dat file and thats that.
View 14 Replies
View Related
Feb 10, 2014
We have a C++ 5.0 app that does something like this:
Creates the excel dispatch, exports the data, etc...
...
then calls these functions:
xlsApp.SetDisplayAlerts(TRUE);
xlsApp.SetVisible(TRUE);
xlsApp.SetUserControl(TRUE);
This has always worked to display the excel spreadsheet in the foreground, most recently on Windows Server 2003.
Now, testing on Windows Server 2008, the excel spreadsheet is created, but in the background. How to force it to the foreground?
View 2 Replies
View Related
May 10, 2012
I am using a windows application to start other processes. I am looking for a way to keep the form itself as the topmost program until it is closed, allowing the other programs enough load time.
View 1 Replies
View Related
Nov 3, 2012
I'm animating a human hand made in blender, so I allredy the hand, but I don't know how can I load this .obj to a windows form aplication that I'm working on. I need to load this .obj and animated .....
View 4 Replies
View Related
Jun 1, 2012
I have to display google maps in a windows form. I managed to display the map in the form like this link: [URL] ...
But i have to display only the frame with the map in the form..not the whole page.
View 3 Replies
View Related
Aug 6, 2012
In my class I'm trying to display the elapsed time as my label on a windows form. I've been reading up on all the different articles online and have tried these three methods all with the same result:
1. Using the System.Timers class
2. Built in Timer sub-class
3. Defining directly inside of my class the StartTime, etc. variables.
All of these still result in the following error:
Cross-thread operation not valid: Control 'User_Interface' accessed from a thread other than the thread it was created on.
Currently, my windows form is being called by another class, but I'm not sure if this is the cause of the problem.
This is a sample of the code that I'm currently using to show the elapsed time:
private void OnTimedEvent (object source, ElapsedEventArgs c)
{
TimeSpan time;
currentTime = DateTime.Now;
[Code].....
View 5 Replies
View Related
Apr 9, 2013
I have a Windows form application which has database and will store user details. my problem is while executing program form is not displaying .
View 1 Replies
View Related
Nov 8, 2012
i want to open image in windows from application but it's not showing the image. here is my code/////
using (OpenFileDialog dlg = new OpenFileDialog())
{
dlg.InitialDirectory = "c:";
dlg.Title = "Open Image";
[Code].....
View 1 Replies
View Related
Mar 26, 2013
Whenever i run this on Visual Studio, it keeps exiting with code 0
Code:
#include "stdafx.h"
#include "stdio.h" // NULL defined here
#include "stdlib.h" // malloc function here
#include <string.h> //for handling strings
#include <ctype.h>
char reg_num[21]; //used in get_new_value
[Code] .....
View 5 Replies
View Related
Sep 28, 2012
I wrote this code behind a button
"
colordialog.showdialog();
File.WriteAllText("dlg.txt",this.BackColor.Name);
"
And I wrote this code in Form Load as well
"
this.BackColor = Color.FromName(File.ReadAllText("dlg.txt"));
"
but I got an error and I dont know what is this.... "Control does not support transparent background colors"
View 2 Replies
View Related
Jul 6, 2012
I am busy with a project, it is going to consist out of 3 different windows which is logic enough for this whole code to be interactive.
It must be able to pull data into a windows form, displaying it into a textbox, and when you click on the textbox it needs to open up another window where you will have a windows form that will display data as the code loops through the questions in the database.
I am not sure how to push the data that has been selected on the database to the next window..
Here is my code for the first window:
;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form {
//SqlConnection myConnection = new SqlConnection("Data Source=(local);Initial Catalog=KnowledgeEssentials;Integrated Security=SSPI");
//int intType = 0;
public Form1()
[code].....
With the second window the data in the table needs to be displayed and each row from the table needs to have a checkbox next to them, so that if the check box is checked, the relevant information of the checked row will show up in the 3rd window... so MY question is, HOW do I pull that data from that specific database and let it show in the listcheckbox?
View 1 Replies
View Related
Jan 23, 2013
this is my C# code
System.IO.Directory.SetCurrentDirectory
("C:/Users/fahime/Documents/Visual Studio 2010/WebSites/MyWebSite/UserFiles/ProblemAnswers/");
Process.Start("cmd.exe", @"/k ""C:Program Files (x86)Microsoft Visual Studio 10.0VCvcvarsall.bat"" x86");
[Code] .....
I want to compile my cpp code file with visual studio cmd
View 3 Replies
View Related
Feb 1, 2013
How to show only current date not time in webforms in visual studio as for date and time code is
Label1.Text = DateTime.Now.ToString();
What for only date not time
View 3 Replies
View Related
Oct 10, 2012
I am trying to print a barcode form HClabel printer through my application running on Windows server 2008. The printer is a ntwork printer connected to a Windows 7 Machine.
The code to access the printer and proceed with printing is in VC++. The code has been working fine since years and it still works when I try to print from Windows XP machine(Connect and print on the same printer connected to WIndows 7 machine mentioned above).
The error code I receive when tried to print from windows server 2008 is 2 which says File not found. But when i access the machine from windows server 2008, it is accessible.
Below is the code I use:
if( m_hPrinter != NULL )
EndWriter();
m_hPrinter = ::CreateFile(lpPrinterName,GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL );
if( m_hPrinter == INVALID_HANDLE_VALUE )
[Code] .....
what might be causing this to fail-only on the new operating system I use(Windows server 2008)
View 4 Replies
View Related
May 16, 2013
I am wanting to separate the logic from the visual, but I'm having problems when calling the method that controls the actions of the progress bar timer.
Code:
ifndef PROGRESS_BAR
define PROGRESS_BAR
class Progress_bar{
public:
void set_Progress(ToolStripStatusLabel^ label,Timer^ time){
[Code] ....
The way that I'm calling this method on Form1.h
void set_Progress(toolStripStatusLabel1 ,timer1);
Errors:
Error1error C2182: 'set_Progress' : illegal use of type 'void'h:cry_devprogrammingc++school_mediaschool_mediaForm1.h277
Error2error C2078: too many initializersh:cry_devprogrammingc++school_mediaschool_mediaForm1.h277
Error3error C2440: 'initializing' : cannot convert from 'System::Windows::Forms::Timer ^' to 'int'h:cry_devprogrammingc++school_mediaschool_mediaForm1.h277
View 3 Replies
View Related
Sep 30, 2014
I have created a windows form project in visual studio so that I can use a windows form to interact with the game class that I'm creating, but I'm running into some problems.
For one thing, I would like to be able to call Image::FromFile() one time only during initialization, and store the result in a member variable (called mBGImage). From what I can tell, the variable needs to be of type String^ (this caret symbol is new to me, but I understand it is the "managed code" version of the standard pointer, which would look like String*).
When I try to compile the following code (located in my header file) I get the error :
"error C3265: cannot declare a managed 'mBGImage' in an unmanaged 'BSG::BSGame'".
How can I store the result of Image::FromFile() permanently in my class?
When I try to declare a global variable of type "Image^", I get "error C3145: global or static variable may not have managed type System:rawing::Image ^"
#include "stdafx.h"
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections;
using namespace System::Windows::Forms;
[Code] ......
View 2 Replies
View Related
Sep 30, 2013
I am a newbie to C++ and VS ++. I have created a windows form application by dragging and dropping button, label..etc. i wish label text to be appeared as return value from a function. The function returns ' const char* '.how this returned string pointer can be used to display label text.?
View 9 Replies
View Related
Jun 10, 2013
As a starter project I want convert a Neural net app from "AI Techniques for Game Programming (2002 Buckland)" to a Visual C++ CLI Forms application. I have created the interface and now I have to rewrite the in/output routines, amongst other things.
First question I have has to do with variable initialization used by Buckland. Code looks like this:
Excerpt from header file (CNeuralNet.h):
//-------------------------------------------------------------------
//define neuron struct
//-------------------------------------------------------------------
struct SNeuron
{
//the number of inputs into the neuron
int m_NumInputs;
//the weights for each input
vector<double>m_vecWeight;
[code]....
Question I have: what is the the function of ": m_NumInputs(NumInputs+1)" after the method declaration? Buckland does this in many places in his code. In this case it's a struct, but he does it with classes too.
View 3 Replies
View Related
Feb 25, 2015
I'm Getting exceptions on Windows 7 and Windows 8 on different parts of the Code? Why this can be happening, why the difference in behavior?
View 6 Replies
View Related
Sep 24, 2012
I have a C++ code that reads the database password from the registry and decrypts it using CryptUnprotectData. We have to deploy this application on a Windows 7 machine.
When I compile my code on Windows XP and run it on the test Windows 7 machine, it works absolutely fine. When I compile the same code on my laptop having Windows 7 and run it on the test Windows 7 machine, CryptUnprotectData fails with GetLastError() return '87'. If I run this application on my own laptop with Windows 7 on it, it again works fine probably because my laptop has a lot of things installed including Visual Studio and all the service packs etc.
I believe I have missed out installing some dependency on the test Windows 7 machine but I am unable to figure out what is that. What is it that's making the Windows XP compiled code running fine on the test machine and not the code that's compiled on Windows 7.
Here is the call to CryptUnprotectData in the code:
if (CryptUnprotectData(
&cipherText,
NULL,
NULL, // Optional entropy
NULL, // Reserved
NULL, // Optional PromptStruct
CRYPTPROTECT_UI_FORBIDDEN,
&plainText))
[code]....
View 10 Replies
View Related
Dec 10, 2014
I tried to make the program read from a file text the first name or last name but o cant seem to get it. i tried alot of different ways. how can i get the array of structure code to read form a file?
#include <iostream>
#include <fstream>
#include <string>
#include <cstdlib>
using namespace std;
const int NUM_STUDENTS = 17;
const int NUM_QUIZZES = 10;
const int NUM_EXAMS = 5;
[Code] .....
View 14 Replies
View Related
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
Jan 15, 2013
i'm making a hotel reservation system for our final project in database management.. i'm having difficulty on how can i attach an image in a listview, if i insert a room category, the roomstatus will automatically insert a value of 1 on the table, and in the listview the data 1 in the column of status must be view as an image that indicates that the room is available...
View 4 Replies
View Related