132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for SpecialForce

I have the following code: [CODE] #include "stdafx.h" #include <windows.h> #include <GdiPlus.h> #pragma comment( lib, "gdiplus" ) int GetEncoderClsid(const WCHAR* format, CLSID* pClsid); void gdiscreen(); void gdiscreen() { using namespace Gdiplus; GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); { HDC scrdc, memdc; HBITMAP membit; scrdc = ::GetDC(0); int Height = …

Software Development c++
Member Avatar for SpecialForce
0
657
Member Avatar for plasticfood

[CODE] vowels = wordcount.vowelNum(); //counts the vowels consonants = wordcount.consNum(); //counts the consonants, this is not working properly. [/CODE] the consNum() method: [CODE] int length = word.length(); for(int i = 0; i < length; i++){ if(word.charAt(i) == 'a' || word.charAt(i) == 'u'|| word.charAt(i) == 'i'|| word.charAt(i) == 'e'|| word.charAt(i) == …

Software Development java
Member Avatar for plasticfood
0
102
Member Avatar for zakben1

Advice on vb graphics By john g in VB.NET Hi I have been searching the internet for some time but am none the wiser reguarding my problem. I am trying to build a drawing application The idea is to use mouse down, mouse move, mouse up events On mouse down …

Software Development vb.net
Member Avatar for zakben1
0
84
Member Avatar for Mr_PoP

TIMERS.h: [CODE]#include "includes.h" class servtime { public: int sec() { int sec; time_t rawtime; tm * timeinfo; time(&rawtime); timeinfo=localtime(&rawtime); sec=timeinfo->tm_sec; return sec; } int mint() { int min; time_t rawtime; tm * timeinfo; time(&rawtime); timeinfo=localtime(&rawtime); min=timeinfo->tm_min; return min; } int hour() { int hour; time_t rawtime; tm * timeinfo; time(&rawtime); …

Software Development c++
Member Avatar for Mr_PoP
0
355
Member Avatar for v_janssens

Hi there, Im a structural engineer (so excuse my limited knowledge of C++ and programming in general) and write analysis programs using microsoft visual studio. I've developed a few programs that run within VS but am wondering how I would go about making these stand alone apps/programs anyone could use …

Software Development c++ visual-studio
Member Avatar for v_janssens
0
3K
Member Avatar for vedro-compota

Hi friends) I have such error in my code- [QUOTE]Object reference not set to an instance of an object[/QUOTE] code - [CODE] int n1, n2; if (dataGridView1[2, 0].Value != "") [B]if (int.TryParse(dataGridView1[2, 0].Value.ToString(), out n1) == false)[/B]{}[/CODE] If I do not specify the value of the cell - this code …

Software Development
Member Avatar for vedro-compota
0
114
Member Avatar for The 7331 Geek

Hello everyone. I am working on a simple program called "Who's Connected?" where it runs a command (netstat -aon) and then displays the results in a multi-lined textbox. However, when I press the button that will run the command, it tells me that it can't convert the string to an …

Software Development display vb.net
Member Avatar for The 7331 Geek
0
3K
Member Avatar for AngelicOne

How to utilize a webcam to capture an image that will be store in database. The form has a button "take photo", and a form will open wherein the webcam is running and a button "capture" would be click to take a photo shot. How to do this?

Software Development webcam
Member Avatar for OnePostWonder
0
88
Member Avatar for AhmedGhazey

Hello I make java application that read String from text field and convert it to another String it may consider type of encoding . but i want process character by character when user still typing on the the text field. i.e. a-->s ah-->sd ahm-->sdf ahme-->sdfg ahmed-->sdfgh any one can help. …

Software Development gui java
Member Avatar for AhmedGhazey
0
89
Member Avatar for alexchen

I need to calculate the area of a triangle using this formula. What is wrong with my code? error C2063: 'p' : not a function [CODE]#include <stdio.h> void Area(int a, int b, int c) { int p = a * b * c; int area = (p(p - a)(p - …

Software Development c
Member Avatar for alexchen
0
115
Member Avatar for hannesvdc

Hi all, I want to make my own widgets in c++, but don't know where to start. I didn't find any examples, tutorials,... on google. I know there are some toolkits like qt, gtk+, wxwidgets, and i've used them already, but i want to make some myself. Qt says to …

Software Development c++ qt
Member Avatar for hannesvdc
0
1K
Member Avatar for vn412

Hi, I m usng Ms-Access 2007 with vb.net. My problem is that I have a table with column name strval which has following values: 2,3,43,5,6 etc in each row. Now I want to search for that row which contains e.g 2 in cloumn strval . i use SELECT * FROM …

Software Development vb.net
Member Avatar for zinnqu
0
80
Member Avatar for SpecialForce

Hello, I am trying to create a program to read text from clipboard. It works great, but when I copy a file the program crashes. I am trying to make it to ignore any files and only output text. My code so far is the following: [CODE]#include "stdafx.h" #include <iostream> …

Software Development c++
Member Avatar for Ancient Dragon
0
153
Member Avatar for SpecialForce

Hello, I am trying to upload a file via ftp using the library curl. Of course I looked [URL="http://curl.haxx.se/libcurl/c/example.html"]here[/URL] but the exemples don't say how to do this using usarname and password. Aslo the code is in C and if I compile it in C++ I am getting: [CODE]error C2664: …

Software Development c++
Member Avatar for SpecialForce
0
2K
Member Avatar for terabyte

I coded a simple program that pretends two users input random characters and the program tells you which user wrote what [CODE]#include <stdio.h> int main(void) { int x; char user; char ch; puts("type a character"); for(x = 0;x < 9; x++) { if(x%2 == 1) { user = 'x'; } …

Software Development c
Member Avatar for terabyte
0
105
Member Avatar for headedtomexico

this was probably a bad idea to begin with since i've never messed with multithreading or the sapi... but i got the sapi working on its own, but when I put it in its own thread it wont speak anymore. I've tried over and over and over.... i'm not sure …

Software Development c++ multithreading
Member Avatar for donaldw
0
435
Member Avatar for nalasimbha

Hello, I have a dll that I wrote and a driver program to call that dll. Both the programs were written in VC++ 2008 express edition. The program takes in 2 strings as a command line argument and passes it to the dll which prints the 2 strings in the …

Software Development c++
Member Avatar for Narue
0
308
Member Avatar for MrCapuchino

Hello, I have a Text file containing the english dictionary, it is 237,000 words long and in each line of the text file there is a word. What I want to do is obtain a word from the textfile randomly. I don't think reading the text file to end and …

Software Development file-system
Member Avatar for MrCapuchino
0
2K
Member Avatar for Mr_PoP

[CODE] time_t rawtime; struct tm * timeinfo; char sec [80]; char min [80]; char hour [80]; char year[80]; char month[80]; char day[80]; time ( &rawtime ); timeinfo = localtime ( &rawtime ); string timetest; timetest= strftime (sec,80,"%S",timeinfo); timetest= strftime (min,80,"%M",timeinfo); timetest= strftime (hour,80,"%H",timeinfo); timetest= strftime (year,80,"%Y",timeinfo); timetest= strftime (month,80,"%m",timeinfo); timetest= …

Software Development c++
Member Avatar for Mr_PoP
0
89
Member Avatar for darkseid

hi. i'm trying to convert a value from an array to a value from another array based on the index ex: string[] abc = {"a", "b", "c"}; string[] xyz = {"1", "2", "3"}; so let's say a have a text "aabbcc" .. and where the items from string abc are …

Software Development
Member Avatar for darkseid
0
149
Member Avatar for ronnieaka

the answer to this i found on the web was this: The AWT event dispatcher thread is not a daemon thread. You must explicitly call System.exit to terminate the JVM. and what i understand of it is that the thread which is terminated when we close a JFrame or Applet …

Software Development java java-swing
Member Avatar for JamesCherrill
0
565
Member Avatar for scottdurica

Hi all, Im trying to create and write to a file to create a "list" type document that I can convert to .pdf and print out later on. Below is an example of what I'm doing. [I]out[/I] is my file and list in a string array that holds the answers …

Software Development file-system java pdf
Member Avatar for scottdurica
0
207
Member Avatar for p0l4rb34r

I have posted in some other forums and im sorry for people who have already seen something like this from me, but i was hoping if i could get some different views and opinions. I have probably very bsic computer knowledge and no programming knowledge, however, i have recently took …

Software Development c
Member Avatar for asterix15
0
175
Member Avatar for PM312

i am using font style [B]Bookman Old Style [/B]and size 12 for my Project but the default font type is Ms Sans Serif and size is 8. Can default size be set to Bookman Old Style and font size 12. Thanks

Software Development visual-basic
Member Avatar for PM312
0
134
Member Avatar for Rass Saee

The following program compiles (using MS Visual Studio 2010) with no errors or warnings and runs without any error, why? Thanks in advance for explanation. [CODE]#include <stdio.h> int f[3] = { 1,2,3 }; int g[4] = { 12,45,55,65 }; int main(int argc, char *argv[]) { printf("%d\n", f[5]); return 0; } …

Software Development c visual-studio
Member Avatar for asterix15
0
100
Member Avatar for meensatwork

Hello, Is it possible to use ctypes for this? I tried a sample code from net but it is not working. [CODE]from ctypes import cdll myDll = ctypes.LoadLibrary('C++dll.dll') mydll.testString()[/CODE] Can u tell me how to load a C++ dll and call the functions from python?

Software Development c++ python
Member Avatar for TrustyTony
0
1K
Member Avatar for joinerc

Hello All, I've been learning C++ recently and my question pertains to inheritance. What I have is code like this: [CODE=cpp] class shape { public: virtual void print_type()=0; double delta() //acts the same on all shapes }; class sphere : public shape { public: void print_type() { cout << "this …

Software Development c++
Member Avatar for joinerc
0
140
Member Avatar for bbman

Help random numbers rand() returns same numbers I am trying to make a blackjack program which uses srand() with time as seed to determine random number of card between 1-10. Two problems, one is that the first three returned numbers are always similar and one digit or so more than …

Software Development c++
Member Avatar for Narue
0
167
Member Avatar for oooooops

I have been trying to learn Django (and Python). I have a form that can have up to [I]n[/I] elements. Each of those elements has 3 parts to it (a TextField, a TagField and a Checkbox). The form init looks like this [CODE] def __init__(self, *args, **kwargs): notesAndTags = kwargs.pop('notesAndTags') …

Software Development display python python-django
Member Avatar for richieking
0
468
Member Avatar for martin11ph

Hi, I have a WebBrowser control that accesses an IP cam on the same network on form load. The camera has a login interface that I don't want to be seen. Is it possible to autocomplete the form once it pops up? Attached is a screen shot.

Software Development visual-basic
Member Avatar for martin11ph
0
131
Member Avatar for Firsum

This is a simple game that I am bringing to a close. It is called Slash and Smash. The goal is to defeat the last opponent, who is a champion of the arena. In the game player can use potions for health and energy,go to sleep, heal up, eat and …

Software Development c++ gaming
Member Avatar for jember
0
370
Member Avatar for vedro-compota

Hi everyone! please tell me - 1) how to make dataGridView cells available to change the values? 2) and how to read the value from cell to a variable? Thanks for your answers)))

Software Development
Member Avatar for vedro-compota
0
142
Member Avatar for WDrago

Hi All, I'm doing some serial I/O in VB.NET for a project at work. I'm new to VB.NET so I'm not sure if I'm doing this correctly. I need to determine what ports are free and which ones are in use. Presently, I try to open the port and if …

Software Development vb.net
Member Avatar for WDrago
0
2K
Member Avatar for sairakhalid

I need to know the syntax of how i can read a string from a file without using char array or char variable. i want to declare a variable of string type but its giving error . I have include <cstring>,<ctype> libraries. int main() { string s1; ifstream fin fin.open("myfile.txt"); …

Software Development c++
Member Avatar for mraza1_ch
0
282
Member Avatar for PCSAWICK829

Hello! So this is pathetically easy as programs go in the C language (i hope). I am working on a variation of the Hello World program (as I am just starting to learn C, solo). I am using the C All-in-One for dummies book, and I got a little ways …

Software Development c
Member Avatar for anirudh33
0
255
Member Avatar for abelingaw

Is it possible to print a report in VB using only Data Environment. I mean setting the textboxes only to datasource and datafields in the record I really dont want to use codes (RS, things like that) cause you see, I'm kind of a rushing so i don't have much …

Software Development listview visual-basic
Member Avatar for AndreRet
0
357
Member Avatar for ctyszkiewicz

Hello Outline of the problem: Files: 1. a.cpp, a.h, atest.cpp 2. b.cpp, b.h - file a.cpp is compiled to liba.so - file b.cpp is compiled to libb.so - function af01 defined in a.cpp calls the function bf01 defined in b.cpp - file atest.cpp is compiled to executable program, which calls …

Software Development c++
Member Avatar for ctyszkiewicz
0
151
Member Avatar for BobTheLob

Hey guys, it's been quite a while since i've been on here :P I'm fiddling around with the Go language. However, I'd much rather have a build script that'll compile the program for me than typing in the lines of code necessary every time: [CODE] 6g hello.go 6l hello.6 ./6.out …

Software Development golang os-x shell-scripting unix
Member Avatar for griswolf
0
98
Member Avatar for vedro-compota

Hi guys) I have a class .... something like that - [CODE] public class CITY { public int U; }[/CODE] Please - tell me how to make the variables of the first five minutes U=1, and the second five minutes U=0, the third five minutes again U =1 etc. Thanks …

Software Development
Member Avatar for Mitja Bonca
0
138
Member Avatar for matrixcool

Hi guys, I'm trying to write a recursive method that checks if the first elements of an array of integers are sorted in ascending order but it didn't work for me !! [CODE] public static Boolean isSorted(int [] a, int n){} [/CODE] I tried to copy elements from array a …

Software Development java
Member Avatar for JamesCherrill
0
190
Member Avatar for arvin2006

hi everyone. i have problem with SQL UPDATE command, with Add and Save Record, Delete Record and Search record, it works well, I have this code: for SAVE Command button squery = "": squery = "SELECT * FROM tblEmp WHERE EmpID=" & txtEmpID.Text & "" Call ExecuteCommand With rs .Open …

Software Development sql visual-basic
Member Avatar for danmae
0
145
Member Avatar for VichuTheWizard

Hi, I am currently doing a project on remote object communication between Flex 4.1 SDK and Java using Flerry API.I need a Java program that can capture the user keystrokes while the user enter's text in the action-script text-area. i.e I need Java program that captures the keystrokes as user …

Software Development api html-css java
Member Avatar for VichuTheWizard
0
197
Member Avatar for GeekInTraining

Hi, me an my friend are creating a program that requires locating files, which requires knowing the file path. We came across functions to find the user name of the current person logged into windows, and to find all the logical drives on the target computer. We need help passing …

Software Development c++ microsoft-windows
Member Avatar for Ancient Dragon
0
235
Member Avatar for shiny27

Hi, I'm having trouble with the following code and any help is greatly appreciated. [CODE]/*########################################################################## ### The problem should prompt the operator to enter the number of competitors, followed by the scores awarded to each by the 5 judges. Scores can range from 0.0 to 6.0 in increments of 0.1. …

Software Development c++
Member Avatar for WaltP
0
103
Member Avatar for Peter_morley

When I initialize my grid array I have no problem initializing it changing my row values like so grid[0][0] = 0; grid[1][0] = 0; grid[2][0] = 0; grid[3][0] = 0; ...but when I do this "grid[0][1] = 0;" or "grid[0][2] = 0;" and all the way up to 8 the …

Software Development c++
Member Avatar for Peter_morley
0
221
Member Avatar for frodo_man

Hello, I am looking for a good .NET licensing system, which would be extremely easy to use and integrate (automatic integration into the program). 1. It should have online payment system: the user can buy a license online and the server can generate the key and send it to the …

Software Development mac-software
Member Avatar for andyman2
0
125
Member Avatar for newbie14

Dear All, I have a java application which link to db on another computer on the local lan. The problem I have install jdk_1.6_21 without any problem. Then I have paste mysql-connector-java-5.1.14-bin.jar in /usr/java/jdk1.6.0_21/jre/lib/ext. When I compile my program has no problem when I try to run I get this …

Software Development java sql
Member Avatar for newbie14
0
254
Member Avatar for Mr_PoP

[CODE] int tm_sec; int tm_min; int tm_hour; int tm_mday; int tm_mon; int tm_year; int tm_wday; int tm_yday; int tm_isdst;[/CODE] but how can i call it , i mean like if i wanna cout << tm_sec ; how can i do that!! :confused:

Software Development c++
Member Avatar for Mr_PoP
0
93
Member Avatar for prvnkmr194

Hello I am not the master of c# ..........i need little in creating class file for database handling I know how to connect database and different operation handling, but like to create a class file so that it be easy to connect database My problem is that I cant able …

Software Development
Member Avatar for prvnkmr194
0
184
Member Avatar for alexchen

I am trying to print a rectangle using this symbol *. When I print it, it draws an L. What is wrong with my code? [CODE]#include <stdio.h> void rect(int base, int height) { int x = 0,y = 0; while(x < height) { x++; if(x == 1 || x == …

Software Development c
Member Avatar for alexchen
0
173

The End.