C# :: Simple Map Editor In Winforms

Mar 20, 2014

I want to create a simple map editor in winforms. I would like for it to use a tile sheet from the user which they then can click on tiles from it and place it on the specified grid. Then export this as a binary file. Or perhaps it would be easier for the user to chose the grid size then have each grid space's number be able to be changed like 01,02,03 to represent an image. Then export this as a binary.

View 1 Replies


ADVERTISEMENT

C# :: Going Between Winforms?

Jun 30, 2014

today deals with using a two window option to view entered data. I have the GUI set up for my user entry, but am not sure how to get that information to save into a datagrid on another page. I have inputboxes for First Name, Last Name, and Phone Number; a combobox for an occupation; and lastly a radiobutton for Gender. I am trying to teach myself how to get this information to save to the other page so that when you click submit you automatically go to the next page to view your entered data.

View 14 Replies View Related

C# :: How To Convert Console App To Winforms Or Other GUI

May 8, 2014

I have written a long console app (over 1000 lines of code) and I want it to have a GUI. I was wondering if there was a way to quickly convert it to Winforms or other GUI?

I already know how to include Winforms to a console app. But when I compile it, the Winforms does not include the Console app component of the program. My Form.cs includes the Winforms and Program.cs is the console app part with >1000 lines of code that I wrote before. Compiling it, only the part in the Form.cs runs. The Program.cs part doesn't run. For example, I have many "Console.Writeline" and "Console.Readline" parts in the Program.cs, but they run after I add the "Form.cs" to the program

Although the Form.cs runs, the Form.cs [design] doesn't show up

View 6 Replies View Related

C# :: WinForms - Concatenation Of Label And Variable

Jan 15, 2013

I have a question, is it possible to Concatenate a variable to a label?

For example, i'm doing:

Random Rnd = new Random();
int num1 = Rnd.Next(1, 11);

And now i want to concatenate the random number to give test me if the label of that number has a char inside.

if ( lbl_s_num1.Text != "X")

View 12 Replies View Related

C# :: How To Update Text In WinForms Textbox

Oct 28, 2014

I am trying to create an application interface serial data reception using c #. I send the data from the serial adc microcontroller adc atmega 16 ... the data is 0 to 1023. In the textbox that I use as a data reception, data updates to the bottom if I use ReadLine coding.

examples:
1023
1023
1023
256
669

If I use ReadExisting, the data displayed by the textbox moves to the side. examples 102310231023256669

When the data changes from 0-1023 of serial communication, and clear the data will store in otomatiis in the textbox.

When there is reception of data with a value of 1023 and immediately there is a change to the value of 555 textbox value will not store the value of 1023, I want the value in 1023 immediately deleted automatically and change the value to 555 when a change in the value of the data ...

The following is the complete source code:

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace serial {
public partial class Form1 : Form {

[Code] .....

View 6 Replies View Related

C Sharp :: No Definition For Fill (WinForms)

Feb 13, 2013

I'm working on a personal project, where I have a database (SQLite) and a dataGridView. Now This is what I have:

 public Form1() {
            DataSet ds = new DataSet();
            SqlConnection connection = new SqlConnection(@"Data Source=testingsql2.s3db");
            SqlDataAdapter SQLda = new SqlDataAdapter("Select * from User", connection);
            SqlCommandBuilder SQLcb = new SqlCommandBuilder(SQLda);
            dataGridView1.Fill(ds, "User"); //Error here
            dataGridView1.DataSource = ds;
            dataGridView1.DataMember = "User";
        }

I've marked where I get the error.

And the Error description:
Error    1    'System.Windows.Forms.DataGridView' does not contain a definition for 'Fill' and no extension method 
'Fill' accepting a first argument of type 'System.Windows.Forms.DataGridView' could be found 
(are you missing a using directive or an assembly reference?)

View 2 Replies View Related

C Sharp :: UI Type Editor In WPF?

Jun 13, 2012

I'm working on WPF project and There is this problem with property grid control. Here I saw the similar problem solved in windowsform project. how I can accomplish this behavior on WPF.

View 1 Replies View Related

C# :: Add Line Numbers To A Text Editor

Jun 7, 2012

I'm trying to add line numbers to a text editor I'm building but not having much luck. I'm trying to find a way around building something massive with a picture box next to my textbox etc. I'm tried adding VS Basic to my references and searching for the linenum_rtf.cs but I can't seem to find it under existing items.

View 4 Replies View Related

C++ :: Text Editor Printing Algorithms?

Mar 26, 2013

They should apply for: backspace, return, regular char input, vertical scrolling. There is only one buffer, and it is not allowed to side scroll past max col, instead it must scroll down, appending the line cur_y + 1.

View 4 Replies View Related

C/C++ :: How To Write Plugins For Text Editor

Nov 21, 2013

I want to add plugins like line numbering, syntax highlighting,code coloring,text alignment in a text editor. How i start including them?

View 1 Replies View Related

Visual C++ :: Making A Text Editor

Oct 24, 2013

when making a text editor do you have to create a parser for it or are parsers just used in compilers and interpreters?

View 6 Replies View Related

C++ :: Find And Replace Function For Text Editor

Jan 3, 2013

I'm building a find and replace function for my text editor I'm building the function without support from the algorithm header.

The function is written like: doc.find_replace("Word_to_be_replaced", "The_word_that_is_replacing"); I find this very easy to understand replace this, with this.

find_replace will both have char * as their arguments.

The problem I'm having right now if I replace a bigger word for a smaller word how do I delete the extra characters from memory.

So if I replace "Goodbye" with "Hello" how do I delete the last two characters? So I don't print garbage code.

View 1 Replies View Related

C/C++ :: Linked List To Simulate Text Editor

Mar 10, 2015

I am trying to make a text editor in C++ that uses Linked Lists as the main driving force. I need to make a program that can add a line of text at a certain point, delete a certain line of text, print the entire text, and quit and save the text to the original text file inputted from the shell script. My problems are with the cpp file, and the linked list files. My remove function is not what I need it to be I know that. I also know that there are some problems with my cpp file myEditor. My code is below.

#include <sstream>
#include "linkylist.h"
#include <iostream>
#include <fstream>
#include <string>
#include <cstdlib>
using namespace std;
int main(int argc, char *argv[]) {
//node* head = new node;

[Code] ....

View 6 Replies View Related

C++ :: Game Editor - How To Make A Rectangle Selection Tool

Dec 20, 2014

I'm working with a game editor program, where the player can create their own maps. Right know I'm working with collisions, and since it's unpredictable where the player place the objects like trees, houses and cars...etc have I an idea with making a rectangle selection tool. Where the player can drag a collision box around the object, so the sprite stops when it hits the box. The problem is that I dont know how to make a tool like that. so my question is how do I create a tool like that (see picture under for more information)?

btw I'm using the SDL framework

here is a picture that illustrate the tool I want to create: [URL] ....

View 4 Replies View Related

Visual C++ :: Resource Editor Failed To Initialize ActiveX

Feb 27, 2014

I'm working on a project which consists of several ocx loaded by one exe. The platform is WinCE. Now I'm on a process to create a new ocx. I do have a copy of those ocx projects in Win32 platform. These Win32 versions were only used to register ocx in local system and then put those on to application dialog by 'Insert ActiveX'.

Now the problem is those Win32 projects are so outdated, and unable to build. Getting too many linking errors to be solved.

I have build the new ocx and link that with exe manually by editing .rc file and all. But still no luck. New ocx is getting registered in WinCE device but failing to start application.

View 6 Replies View Related

Visual C++ :: Doubly Linked List And Basic Text Editor

Sep 23, 2014

I'm supposed to make a basic text editor using a doubly linked list, I have pretty much written most of it but keep coming across several problems. In certain places,all marked in the code, I get the error "expected a declaration" ive looked online and nothing ive found works. And secondly I also get the error" declaration has no storage class or type specifier" but i havent been able to find anything that works either.

Code:
#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <assert.h>
#include <string>

[Code] ....

View 6 Replies View Related

C++ :: Simple AI That Follows Player

Apr 10, 2014

I'm having some problems with implementing an AI. It should be just a simple AI that follows player. Here is the code that I got so far:

(float)DirectionX = Circle->GetX() - AI->GetX();
(float)DirectionY = Circle->GetY() - AI->GetY();

(float)Hyp = sqrt(DirectionX * DirectionX + DirectionY * DirectionY);

DirectionX /= Hyp;
DirectionY /= Hyp;

x += DirectionX * 3;
y += DirectionY * 3;

This is what I got so far. It creates a vector in a direction I want to move, then just normalizes the vector. Simple as that. But I'm having 2 problems..

AI moves towards player only when Im at like the end of screen and the AI is on the other side, I must keep a certain distance for it to be able to move towards me. Basically, its not constantly moving towards the player. I also tried it with trig, using atan2 for angle and sin / cos for speed. Also didn't work, same result.

The other problem is when I want to add i.e 5 more AIs. For each new AI it creates, it makes a new update.. So, to kinda clear it up. If I'm in middle of the screen and an AI is spawned above me, it will move towards me. But when after that one, 2nd AI spawns beneath me, both 1st and 2nd AI move up. Basically, previous AIs take the update from last one that is created. For updating I'm using lists, objects and iters.

View 3 Replies View Related

C++ :: How To Play Simple MP3 Through Mic

Jul 21, 2014

How do I play a simple mp3 through my mic. I plan on using this to just play annoying sounds through skype and games(on windows 7 btw).

View 6 Replies View Related

C++ :: How To Make A Simple Program EXE

Feb 12, 2014

I would like to know how can I make a simple program .exe so that I don't have to open it through code blocks every time.

View 2 Replies View Related

C++ :: Simple Calculation Going To 0 Every Time

Aug 8, 2013

I tried to write a simple program to calculate monthly yield, APR, and principle in various directions. Anyway, here's some code to get the APR from the principle and monthly yield. When I run it though, it spits 0 at me every time! What the problem is; the other functions work just fine and the code line for the APR calculation is just what it ought to be - I see neither a math nor tech problem here.

Here is the offending function:

Code:
void calculateAPR() {
int principle, monthlyYield, apr;
cout<<"
Please input the principle:";
cin>>principle;
cin.ignore();

[code]....

View 4 Replies View Related

C :: Simple Increment Operation

Jan 27, 2013

Code:

int i=5,j;
j=++i + ++i + ++i;
printf("%d",j); //22
i=5;
j=i++ + i++ + i++;
printf("%d",j); //19 Shall not it give 21 and 18 respectively?????

View 4 Replies View Related

C :: Simple Version Of Find

Oct 28, 2013

Just wondering about how to write extremely simple version of 'find' in C: It just lists the path names of the files in the specified directories and all subdirectories.For example,

Code:

$find_version .
./foo
./bar
./baz
./baz/other

[Code]....

View 6 Replies View Related

C :: Simple File Parser

Oct 5, 2013

I am writing a simple file parser for use in another project (for config file). The trickiest thing seems to be skipping unwanted characters (comments, spaces). It works partly, but after the second line of an inputed file processes only the first three characters.

Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define TEXT_FILE "data.txt"
[code]....

NOTE: Currently I am just trying to process and remove unwanted data, the actual processing of extracted data should be much simpler.

View 6 Replies View Related

C :: Simple Reading In A File

Feb 28, 2013

So im just trying to read in an pgm file and store it in an array,

Code:

int** imageArray;
//allocate the image array
imageArray = (int**) malloc(row * sizeof(int*));
for(i = 0; i < row; i++)
imageArray[i] = (int*) malloc(col * sizeof(int));

[Code]....

It stores about 1/3 of the file into the array, and then starts printing 6815940 6819608 followed by a bunch of 0's.

View 10 Replies View Related

C :: Simple Loop Program?

Feb 27, 2014

3. Write a program that reads a sequence of positive integers and prints out their sum, except that if the same number occurs several times consecutively, ignore all but the first. Assume an input of 0 marks the end of the input. For example, if the input is 3 8 5 5 4 9 1 1 1 1 8 0 then you should print 38 (i.e., ignore one of the 5's and three of the 1's).

View 5 Replies View Related

C :: Simple Use Of Malloc And Realloc

Jan 27, 2013

i want to improve my knowledge about the dyn allocation of char pointers... with this code i wanted to type a string and insert the string in a array created dynamically:

Code:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
char c;
char *test=NULL;
unsigned int len;
}

[code]....

why there are these 3 initial character '' ')' ':' that i didn't have typed...

View 4 Replies View Related







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