C++ :: Control Usb Ports?
Mar 5, 2013how to control usb ports in visual studio C++?
View 1 Replieshow to control usb ports in visual studio C++?
View 1 RepliesMy first time programming sth in Network. I have to use C to send a file to another PC, well COM port are useful but I didn't find how to refer to the address of my destination.
View 4 Replies View RelatedI'm learning C++. Is there some way to make program function on input from a port like usb port and can I send bits through the port? For example A usb cable connected to a circuit. I press a button and an AND gate on the circuit gets activated by a bit from the usb port and a fan in the room turns on.
View 1 Replies View Relatedhow to use this function:
ftStatus = myFtdiDevice.Read(readData, numBytesAvailable,ref numBytesRead);
to read byte from the serial port.This function is part of the DLL that came with the chip(FT2232D) I am using on my board.I want to use the function to read a byte from the serial port and then send the value to the Graphic user interface.Unfortunately I was unable to get the expected value on my GUI.If I send for instance 40,what I get on the GUI are letters instead of the number 40 or at times the GUI will not even respond.Below are my lines of code I used to read the byte from the serial port:
The following instructions are executed whenever the CHECKBOX is checked
private
void checkBox1_CheckedChanged(object sender, EventArgs e)
{
UInt32 numBytesRead = 0;
[Code].....
I want to put my socket programming example of how it can support multiple ports. I want to make the process more requests from distributing particles to create non-blocking structure
ports support ports defined variable.
Code:
#include "stdio.h"
#include "stdlib.h"
#include "unistd.h"
#include "errno.h"
#include "string.h"
#include "sys/socket.h"
[Code] .....
I have researched quite extensively, experimented, and still cannot seem to change the properties of a control on an active winform from a user control.
So I have a user control which populates each dynamically added tab page in a tab control.
I have a textbox in the user control which I would like to type in, capture the text_change event, and change the text of the label in the winform.
How do I bind a DATE column in a DataGridView Control to a DatePicker control (using C#)? I already have the DataGridView control bound to a database stored procedure which takes a DATE value as a parameter and selects joining table based on the results.
View 7 Replies View Relatedi've taken a couple courses in C Programming and all of the assignments were pretty basic. I've been looking into some of the awesome things that people have been doing with the Raspberry Pi and noticed that some of them are using the C language to control robotic arms and LEDs. I skim the code for some of these projects and notice they are using header files and code that i have never seen, nor are they in the books that i have. for example:
#include <fcntl.h>
#include <sys/mman.h>
I am using MFC (and a newbie here) and I want to retrieve values of my control array.
How can I possibly do that? This is my ControlArray
Code:
m_EditArray[0]=GetDlgItem(IDC_EDIT1);
m_EditArray[1]=GetDlgItem(IDC_EDIT2);
m_EditArray[2]=GetDlgItem(IDC_EDIT3);
m_EditArray[3]=GetDlgItem(IDC_EDIT4);
m_EditArray[4]=GetDlgItem(IDC_EDIT5);
m_EditArray[5]=GetDlgItem(IDC_EDIT6);
is there a way to tell WPF that I'm going to do a lengthy update on a control (TextBlock), and that it shouldn't redraw it until I tell it I'm done? I'm adding a large number of items to the Inlines property, and it has to redraw the entire control every time I add an item, which takes a very long time - about 1 second for every 100 items. I know some other frameworks allow freezing of certain controls, but I haven't been able to find anything in the documentation or on google. I've tried collapsing the TextBlock, and then making it visible again after the update, but it did not improve the performance at all.
View 6 Replies View RelatedI've to use SIGNALS to control threads. Here's my code without the use of signals as I'm no good at that
Code:
#include <pthread.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
}
[code]....
How do I add files to a tree control. I have all the directory and sub directorys ..need the files to
Heres the code
CFileFind fd ;
if ( path.Right ( 1 ) != "" )
path += "" ;
path += "*.*" ;
BOOL found ;
found = fd.FindFile ( path ) ;
[Code] .....
I am running some simulation, in which i need to control the iterator of a multimap, like
multimap<double, int> mapp;
......
int n=6;
for(int i=0; i<5; i++) {
for(auto it = mapp.begin()+i*n; it!=mapp.begin()+(i+1)*n; it++) {
......
However this way of controlling is not possible for multimap. Why and how the make it work? Do I need to overload the operator +?
is there any way to have the program control go some two paths at once? For example: if my program has two functions, one that does some simple calculation that requires nothing from outside it to set the variables and another that displays text for the user to read then enter something. Is there any way to have both run at the same time?
simpleFnc()
{int a = 1;
int b = 2 ;
int c = a+b ;
[code]....
There is no connection of simplefnc to anywhere else in the program so is there any way to get it to run at the same time the other function is running?
I want the function to display all accounts deposit list to work properly, what i mean is that the table coming has its contents here and there . I want to align them properly. program in comment.
View 11 Replies View Relatedhow I could use a Image control where I can upload an image to a folder(done that) and then take that image right after uploading it (in the same line of code) view it on the image control...
View 5 Replies View RelatedI have been trying to make a custom control(list box with more features). I know how to setup custom properties, but how do I make it so that the property can be edited in a separate window ?
I think I figured out how to show the form itself, and I don't know how to make the [...] button like :
There's not much Custom Control tutorials out there, and that's really the problem here.
i used a tab control to open form when user clicks on button of required form.. now the problem is that if form open once it can b again open using its button... how can i stop this re open problem?
View 10 Replies View RelatedI have implemented a copy control version of binary tree.. As I am a Beginner. I think i have made my mistake.
Code:
#include <iostream>
#include <string>
class TreeNode{
TreeNode(const std::string &val):value(val),count(new int(1)){}
TreeNode(const TreeNode& rhs):value(rhs.value),count(count),left(rhs.left),right(rhs.right){++*count; }
[Code] ......
Code:
/*Currency Conv Control Module*/
#include <stdio.h>
#include "currencyconv.h" /* defines constants, declares functions */
int main(void) {
float us_dollars;
float currency;
int user_input;
[Code] ....
This is $$ converter program I created that is split up over 3 files. It takes the users input in US Dollars and converts it to the currency selected. When executing the program I am encountering a small problem. It actually isn't converting anything and returns 0.00 dollars.
I would like for it to convert the amount entered into the currency selected. I would also like to add in the print statement the type of currency the user has selected.
I would like to make a program for final project, which can let me send any file to my computer at home, and i can access any files in my computer when i am not at home.sending and getting file will be with socket programming.
i would like to reach all folders in computer, not only the folder, where client program exist. how can i access other folders at remote computer by using my program?
I am having trouble understanding what I need to do to halt the flow of a program until a video file finishes playing. So far I have accomplished getting the video to play, but the program continues while the video is playing rendering the content of the program on top of the video making it not seen.
My goal is to make the video play, then once it has finished the rest of the program should run.
So far I have this in the start up area of my code:
//Initialize components for DirectShow to stream a video at start-up
CoInitialize(NULL);
//creates filter graph manager
[Code].....
After this code runs once, the program proceeds immediately into the loop where my update and render functions for the program runs. Preferably, I want to stop just the render function while allowing the update to continue to check if the user presses a key to skip the video. What do I need to add to the code to do this?
I'd like to make a control panel for different social media to control multiple account and have proxy support. I think i need to learn multithreading and socket programming right ?
View 1 Replies View RelatedI'm getting this strange problem with the webBrowser control that google can't find an answer for. When I click a button I get redirected to a page with just the letters 'e4' makes no sense to me?? is this a site problem or something to do with the webBrowser control?
View 9 Replies View Related(C#, visual studio 2010, Windows Forms Application)
Ive set up one form that has two labels at the top (Western, Eastern). Below that I have a tabcontrol that contains two tabs (Sales, Products)
I have added four user controls:
WesternSales
WesternProducts
EasternSales
EasternProducts
The idea is that when you click on one of the labels (Western or Eastern) you access the tabs relevant to that region.
So, If i click on the "Western" label and then the "Sales" tab, the program loads the WesternSales usercontrol into the Sales tab. Likewise, if I click on the Eastern label and then the Sales Tab, the program loads the EasternSales usercontrol into the Sales tab, etc.
I want to eliminate the need for multiple data adapters. How can I load data from our database into each of the respective usercontrols using one data adapter?
I wanted to remove previous tappages from tab control and add new tab pages on button click, but previous tab pages are not getting removed
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
[code]....
Update:i have added the below code on button click and i am able to create a new tabpages
this.Controls.Remove(tc);