C Sharp :: Open Image In Paint Mode After That How To Apply Graphics

Aug 21, 2012

How to open a image in paint mode after that how to apply graphics to that opened image in paint mode.I am attached a image i want to draw a center line in that image..

Attached Images point1.jpg (12.9 KB)

View 1 Replies


ADVERTISEMENT

C Sharp :: Saving Picturebox Image With Graphics In It

Aug 23, 2013

What i'm trying to do is load an image from my database create some graphics to it. probably just some lines and marks and save it back to my database. here's so far what I got.
 
for creating graphics:  
 } private void pictureBox3_MouseDown(object sender, MouseEventArgs e) {
            draw = true;
        } private void pictureBox3_MouseMove(object sender, MouseEventArgs e)  {
            if (draw)  {
                Graphics g = Graphics.FromImage(pictureBox3.Image);
 
[Code] ....

but the saving part doesnt work :( I think it only saves the image loaded to the picturebox but not the graphics created to it. how to merge it? i've tried to google it and found some sort of same cases but fails to make it work, something like converting it to bitmap.

View 2 Replies View Related

C++ :: How To Make Colorful Text In Graphics Mode

Sep 14, 2013

I needed to know if there is any possible way to make a colorful text in graphics mode

Like each letter will have different colors using setcolor(random(20));

View 1 Replies View Related

C++ :: Create A GUI With Open Graphics Libraries

Aug 26, 2013

I'm trying to create a GUI with Open graphics Libraries.I have made a basic GUI that exits the program or shows the instructions if a option/Polygon is marked (A bigger one is behind them)But what I'm trying to do now is the following:

0. Start the direct access on the desktop
1. Screen: Press any key to continue
2. Select one option
2.1 Option one: Go to the circuit selection menu
2.1 Option two: View the instructions (Cleared)
2.1 Option three: Exit the game (Cleared)
3. Select a circuit
4. Go to the car selection menu
5. Select a car and start the race
6. Pause menu if Spacebar has been pressed

From the pause menu:

6.1. Go to the main menu
6.2. Restart the race
6.3. Exit

I know that it is OpenGL, but what i'm looking for is C++.How I could do that? What I have cleared is with IF but I'm looking for better alternatives.

View 1 Replies View Related

C :: Produce Image Using GD Graphics Library?

Mar 20, 2013

I am trying to produce a image using GD graphics library. I can succesfully display my image, however I cant display this image along with a printf function too?

Code:
#include <stdio.h>
#include <gd.h>
int display_picture()
{
gdImagePtr gdImage = gdImageCreate( 50, 50 );
FILE *jpgFile = NULL;

[Code] ....

The picture displays but not hello.

View 5 Replies View Related

Visual C++ :: Open QuickTime VR Image Into MFC Dialog - Heap Corruption?

May 17, 2013

I need to write a piece of code that opens a QuickTime VR image into an MFC Dialog. I drew a Dialog and put an "Apple QuickTime Control 2.0" into it. Then I created a Control variable in my Dialog class, called QtControl. In the OnInitDialog I set the file to open, calling the put_FileName of the control.

I tested it by:

- opening a dialog --> worked
- closing it --> worked
- opening again --> crashed. The error was:

"Windows has triggered a breakpoint in TestOcx.exe.

This may be due to a corruption of the heap, which indicates a bug in TestOcx.exe or any of the DLLs it has loaded.

This may also be due to the user pressing F12 while TestOcx.exe has focus.

The output window may have more diagnostic information."

I tried many things and googled a lot, but the only way that I found to avoid this crash was hardcoding a valid URL in the QtControl resources at compile time. In other words, if I write a valid absolute path to a .mov into the URL property of the QtControl from Visual Studio and compile it, then it works. Obviously, I can't do this because the absolute Path is valid only on my PC.

View 14 Replies View Related

C Sharp :: Could Not Open Connection To SQL Server

Feb 19, 2013

I'm getting this error.

SQLite error
near "16": syntax error

On the code:

private void btnUpdate_Click(object sender, EventArgs e)
{
for (int i = 0; i < dataGridView1.Rows.Count; i++)
{

[Code]....

With breapoints etc it does show the values it has to insert into my database. But it just doesn't and gives me the Near "16" syntax error.

View 50 Replies View Related

C Sharp :: Save Word File And Open It Using Net Framework

Apr 17, 2013

i have created application using gembox i create a word file and save data on it but i want after saving it itis opened to me using microsoft word directly

it is the code

DocumentModel document1 = new DocumentModel();  
Section section1 = new Section(document1);
document1.Sections.Add(section1);  

[Code]....

View 1 Replies View Related

C Sharp :: Open New Cmd From Console Application And Write Text

Oct 23, 2012

I want to open one new CMD from console application, write text into the new CMD and then coming back to the control on the old cmd. (like interactively working on the both)

look into the below code

Process P1 = Process.Start(@"C:WINDOWSsystem32cmd.exe");
P1.StartInfo.RedirectStandardInput = true;
P1.StartInfo.RedirectStandardOutput = true;
P1.StartInfo.UseShellExecute = false;
StreamWriter wr = P1.StandardInput;
wr.WriteLine("First line in New Cmd");
Console.WriteLine("First line in Old Cmd");
wr.WriteLine("Second line in New Cmd");
Console.WriteLine("Second line in Old Cmd");

it is giving the exception "StandardIn has not been redirected"

View 1 Replies View Related

C Sharp :: How To Insert Image In Listview

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

C Sharp :: How To Insert Image In MS Access Through C#

Nov 7, 2012

I am facing the problem of adding the image in MS Access Database. I know that OLE Object datatype is used to insert the image in MS Access database.

I have already converted the image in Byte form but unable to add that Byte [] to OLE data type.

Is Byte compatible with OLE Object Datatype?

View 1 Replies View Related

C Sharp :: Open Excel File / Refresh Query And Save

Oct 3, 2012

I am trying to open an Excel file, refresh the query behind it and then save and close the file in C#.

I have the following but I am getting errors on the

 Application excel = new Application()

section:

            Application excel = new Application();
            Workbook theWorkbook = excelFile.Workbooks._Open(txtLocation.Text, 0, false, 5, System.
Reflection.Missing.Value, System.Reflection.Missing.Value, false, System.

[Code] .....

I have added the Microsoft.Office.Interop.Excel reference, but still have the issue?

View 1 Replies View Related

C Sharp :: How To Save Webpage As Image With Web Application

Jun 25, 2012

Is it possible to save web page as image with web application? if yes then how?.I searched and searched and searched but all examples i found were for windows application and i'm facing lot of trouble while converting it for web application.

View 1 Replies View Related

C Sharp :: Replace Or Delete Image That Has Been Used By Another Process Previously

Apr 6, 2012

I'm using web cam to save,update the image in base directory folder.I can save the image but, while attempting to update the image..I caught an error!!

C#.Net:
The process cannot access the file 'C:..~..inDebugcustomer_photos10.jpg' because it is being used by another process.

View 2 Replies View Related

C Sharp :: Displaying Image In Windows Form Application

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

C Sharp :: How To Access Raw Image Data In Resource File

Nov 14, 2012

I have a .png file that my console app reads and puts into a structure that is saved as a file. The png is always the same so I thought I could just add it as a resource image to a resource file so it would be included in my program and not as a separate file. When I did that, the png shows up as a "SystemDrawingBitmap". If I examine this resource in a watch I see "Base" and "Static" members. Expanding those properties does not give me anything useful such as a pointer to the raw png data and its length in bytes.

If worse comes to worse, I can always make a hex dump of the png contents and then put the hex code into a CS file using static initialization.

Surely there is some way I can access the raw data internally and read the bytes into a byte array using C#

View 2 Replies View Related

C# :: How To Paint Particular Dates In DatePicker WPF

Oct 7, 2014

I want that my DatePicker look like this:

The idea is for example if you a owner of Travel Agency and have website, when client want to go direct on your adrress in city that he or she can see on website that every weekend agency dont work(red color in calendar), other days they work(green) except of period 10.11-20.11 when they have vacation(numbers in calendar from 10.11-20.11 will be in yellow color).

I want to implement painting particular days in calendar by some logic.I suppose that I need to create my own class and inherit DatePicker from WPF, but what to override to get this if the inheritance DatePicker is the solution?

Attached image(s)

View 1 Replies View Related

Visual C++ :: How To Paint On A Tabcontrol

Nov 24, 2012

How to paint on a tabcontrol? I tried to take the window handle or the tab handle but none of them works.

Code:
#include <windows.h>
#include <commctrl.h>
#include <iostream>
using namespace std;
#include <gdiplus.h>
using namespace Gdiplus;
VOID OnPaint(HDC hdc)
{
Graphics graphics(hdc);

[Code]...

View 10 Replies View Related

Visual C++ :: Canvas Like MS Paint?

Jun 13, 2013

Whenever we open MS Paint we see selected white background on which do the paint.

So, I would like to know what we call it and how we can create the same canvas using Visual C++.

View 4 Replies View Related

C/C++ :: Apply Arrays In Files?

May 13, 2014

I am Trying to make my program read 10 integers from a user-named file using arrays, but I encountered logic error because the calculations turns out to be wrong. my question is, Am I supposed to use arrays with files? if so, What is wrong? it runs fine but only the calculation is WAY OFF!

#include <iostream>
#include <fstream>
#include <string>
using namespace std;
const int SIZE = 10;
void input(const int a[], int size);
int getTotal(const int a[], int size);

[Code] ....

View 14 Replies View Related

C# :: External Window Paint / Draw Hook?

Jan 13, 2014

Is there any way that I can call a function/receive an event whenever an external window (not any of my forms) repaints/draws?

If you create a GDI+ graphics object and give it the HWND of another window that refreshes a lot like a web browser, anything with animated graphics, your draws and the windows draws are out of sync which creates an intense flicker effect.

Googling this issue only brings up results for handling when my own form repaints...

My idea is that I could just redraw my GDI stuff whenever the form redraws, this is indeed possible?

View 9 Replies View Related

C++ :: How To Calculate And Apply All Char Combinations

Jan 12, 2015

how to write a password cracking program that will try all possible char combinations for just two chars (without duplicating any combination guesses). Obviously, there would only be 4 possible truth table combinations for two boolean values, but how would a person calculate the number of all possible combinations for two values with 70 different possible chars?

#include <iostream>
#include <string>
#include <cstdlib>
#include <ctime>
using namespace std;
static const char alphanum[] =
"0123456789"
"!@#$%^&*"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz";
/*

Boolean Truth Table for two values:

p q
-----
T T
T F
F T
F F

Note that there are 70 chars in all specified above.

It will require much more than a simple truth table to try every possible char combination (especially if the password to be cracked is 2 or more chars). Using this guy's code: [URL] ..... as a starting point, I'm writing a program that will crack a password with a length of just 2 chars.

*/
int stringLength = 2;
char genRandom() {
return alphanum[rand() % stringLength];
}
int main() {
std::string password = "Sp";
srand(time(0));
std::string Str;

[code]....

View 19 Replies View Related

C :: How To Apply Mutex Lock On Shared Memory

Jul 11, 2014

I was trying to put mutex lock on shared memory but my code is not working. What I want is that if some process is putting something on shared memory segment, other process should not be able to access that segment. For testing , I create a server program which put data in shared memory and client program which access the data.

To test it, I put break point after:

pthread_mutex_lock(&(init_lock));

But I see that client program was able to access shared memory.

Below is code:

Server: Code: pthread_mutex_t init_lock = PTHREAD_MUTEX_INITIALIZER;
main()
{
char c;

[Code].....

View 1 Replies View Related

C++ :: Calculate Number Of Tickets And Apply Discount

Sep 8, 2013

I am trying to do a simple calculation. I just started C++ and learning about decisions. My program should calculate number of tickets and apply discount based on the number of tickets purchased. It will only execute one of the decisions.

#include <iostream>
using namespace std;
int main() {
double qty; // qty of tickets
double discount; // % of discount.

[Code] ....

View 7 Replies View Related

C# :: How To Apply XAML File In Windows Form

Dec 7, 2014

I need to apply theme file in windows form but I can't. When I use the code below I get error because there is no System.Windows.Application

StreamResourceInfo sri = System.Windows.Application.GetResourceStream(
new Uri("App.xaml", UriKind.Relative));
var resources = (System.Windows.ResourceDictionary)Load(sri.Stream); ;
var app = new System.Windows.Application();
app.Resources.MergedDictionaries.Add(resources);

View 2 Replies View Related

C++ :: Apply Gabor Filter For Fingerprint Enhancement?

Feb 21, 2012

I am trying to apply gabor filter to a fingerprint for fingerprint enhancement using c.

My image size is 280x340.Gabor filter equation is :

F(x,y) = exp(-0.5*[x^2/sigma_x^2 + y^2/sigma_y^2]) * cos(2*PI*f*x);

I am able to execute this equation.But my problem is i am calculating the equation for 280x340 times and it is taking time(4 sec 2.93GHz 3GB ram).

how to reduce the executation time ?

What I know exp function is taking time. So is there any equivalent of exp which will take less time to execute ?

View 6 Replies View Related







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