42 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for Mr.M

Hi Guys. I'm trying to suspend a process by it name, but I found the sample that demontrate this using ProcessId. The problem is that I don't know the process ID of the process I want to suspend/resume. [Here is a sample I used.](https://social.msdn.microsoft.com/Forums/en-US/cdde6cef-3971-40a6-b4dd-02db963868ce/suspend-an-application?forum=vbgeneral)

Member Avatar for Mr.M
0
445
Member Avatar for Pobunjenik

So I'm building this pretty simple top trumps card game as part of an assignment. I have the game logic built, the swing GUI is in place and I plan to do all the calculation on the server app and have it update the client up with the game's state, …

Member Avatar for Pobunjenik
0
683
Member Avatar for Tycellent

Hey guys, I'm interested in learning about simple multithreading in C++ for Windows. Does anyone have any reccommended tutorials/links thats quite good?

Member Avatar for dinad578
0
410
Member Avatar for dhatsah

Quick question, the answer is eluding me on the internet. Which is unusual. When we reference and call a sub/function from a class is it automatically started on a new thread or will it join the main thread? Cheers in advance.

Member Avatar for Ancient Dragon
0
208
Member Avatar for diafol

Have a look at this thread... http://www.daniweb.com/web-development/databases/mysql/threads/466095/create-.mdf-file-from-mysql My machine shows seems to reformat this to plain text. So just plain page of text. Using Chrome/W7. Anybody else?

Member Avatar for diafol
0
305
Member Avatar for mesbahuk

I have a Java code block like following: public TcpConnection(TcpSocket socket, long alive_time, ITcpConnectionListener listener) { init(socket,alive_time,listener); start(); } For the conversion in C#, When I try to replace the `start()` method with `System.Threading.ThreadStart()`, it gives an error. How can I start a thread in C#?

Member Avatar for ddanbe
0
279
Member Avatar for LastMitch
Member Avatar for LastMitch
0
241
Member Avatar for PrimePackster

K! Any chance of having a option to not get notifications regarding a single thread updates????? "What are you eating/drinking right now?" have gone out of bound, that i keep getting the mail notifs...... Can i unfollow only that thread only........ Sofar the only option seems to be unsuscribe the …

Member Avatar for Dani
0
248
Member Avatar for thendrluca

hi all! :) well i wrote a sample code to test threads and i don't get what i want the problem is that the thread i created is starting directly after i create it? but he must start when my j is equal to 25 and then i joining the …

Member Avatar for thendrluca
0
172
Member Avatar for Skeldave

Hi, I am creating a simple game and I my game thread and my player2 thread seem to be executing twice each time the Thread.Sleep() expires. This is the output: Starting game: Player 2 thread Game thread Starting game: Player 2 thread Game thread Player 2 thread This is the …

Member Avatar for Skeldave
0
1K
Member Avatar for sbrohee

Dear all, I am certainly not an expert in C++ development but after some time, I had some code running and compiling for a bio-informatics tool. As always in Science, I changed my area of research of a while and when I came back to my tool, I had changed …

Member Avatar for sbrohee
0
2K
Member Avatar for ktsangop

Hello everyone. As the title suggests i need to implement a type of timer based function inside a UI Thread in MFC. Although CWinThread is a UI Thread and has a message pump it does not have a Timer function as CWnd::OnTimer Is there any way i can implement a …

Member Avatar for ktsangop
0
709
Member Avatar for khalidshakar

package vc_client1; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.net.Socket; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.DataLine; import javax.sound.sampled.Mixer; import javax.sound.sampled.SourceDataLine; import javax.sound.sampled.TargetDataLine; public class voiceReceiver { public Thread playThread; boolean stopCapture = false; static ByteArrayOutputStream byteArrayOutputStream; AudioFormat audioFormat; static TargetDataLine targetDataLine; AudioInputStream audioInputStream; BufferedOutputStream out = …

Member Avatar for khalidshakar
0
303
Member Avatar for rahul.ch

public class Thread7 implements Runnable { public static void main(String r[]) { Thread t = new Thread(new Thread7()); t.start(); public void run() { System.out.println("C"); System.out.println("D"); } System.out.println("A"); try { t.join(); System.out.println("B"); } catch(Exception e){} } } Query1: On compiling this program I get "illegal start of expression" error pointing to …

Member Avatar for delta_frost
0
270
Member Avatar for Yorkiebar14

Hey, I was wondering if someone would be able to tell me how I can let a user fill out a form and it would create a page with that information for other people to see (Sort of like a forum). I currently have no code for this but I …

Member Avatar for phorce
0
321
Member Avatar for borchu

Hello guys, I start to learn&code some basic small client/server console applications in java -especially in android- and also I try to learn Threads, in fact, I managed to connect 2 different machine by uploading different projects to these machines, for example one project only consists of client and the …

Member Avatar for borchu
0
3K
Member Avatar for Viped

Hi, could some one look over my code I by myself dont get where the flaw is. It should paint 1 cube at a time but now it runs all the code through and paints all at once. package net.viped; import java.awt.Color; import java.awt.Graphics; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import javax.swing.JFrame; …

Member Avatar for JamesCherrill
0
946
Member Avatar for memomk

hey i heard that there is something called qt signals you can use it to change the GUI out side the main thread coz when i try to change it i get an error that i cant change the gui out of the main thread but i need it to …

Member Avatar for memomk
0
8K
Member Avatar for JasonWung

Hi, Can anyone give me some examples with threads with win forms. I have one form which make post request to a server. When i start form and hit "start" button my form read one .txt file. I want to make when start .. read 50 rows then stop and …

Member Avatar for JasonWung
0
116
Member Avatar for codeorder

Having a bit of an issue with my file.scanner and that issue is that I cannot figure out how to run multi.threading when searching the files within a folder(8,000+ files). [CODE]Imports System.IO Module x Function xGetFolderFilesCount(ByVal selFolder As String) As Integer If Directory.Exists(selFolder) Then Return Directory.GetFiles(selFolder).Length Else Return 0 End …

Member Avatar for codeorder
0
458
Member Avatar for mallikaalokam

[CODE]import java.io.*; import java.util.*; import java.lang.*; class Login extends Thread { public void run() { BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); Scanner s=new Scanner(System.in); while(true) { System.out.println("Enter username:"); String h=br.readLine(); System.out.println("Enter password:"); String d=s.nextLine(); } } } class Display extends Thread { public void run() { while(true) { System.out.println("ur username is:"+" "+h); …

Member Avatar for DavidKroukamp
0
140
Member Avatar for warlord902

I have a kind of doubt, suppose I have a class like this: [CODE] public class AA{ public static createUser(String a, int b){ User usr=new User(a,b); BB.storeUser(usr); } } [/CODE] Now, if multiple threads call this createUser() method of this class at the same time, will it cause any kind …

Member Avatar for warlord902
0
187
Member Avatar for _neo_

Hi folk. Can I use join() method in implementation of run(), like this: [CODE] public class MyThread extends Thread { @Override public void run() { int timeout = 30000; // here is some heavy work join(timeout); } } [/CODE] Is above thread terminated after timeout milliseconds if task takes longer …

Member Avatar for _neo_
0
292
Member Avatar for fusionking

I'm creating a C# program that has a sizable textbox that prints out data every 5 seconds. Whatever data that is displayed is (supposed to be) cleared and replaced with new data every 5 seconds. I've created a thread so that the window opens (main thread) and the data is …

Member Avatar for fusionking
0
672
Member Avatar for mrar85

Write a program that launches 100 threads. [COLOR="Red"]Each thread adds 1 to a variable sum that initially zero. You need to pass sum by reference to each thread. In order to pass it by reference, define an integer wrapper object to hold sum[/COLOR]. Run the program with and without synchronization …

Member Avatar for mrar85
0
2K
Member Avatar for Pravinrasal

I want display 2nd cycle after sleeping 1st cycle time 1 second after that display 2nd ,3rd and so on.... I bold my thread code in above program.... [CODE] public class MainDrawCycle extends JPanel implements ActionListener ,Runnable { JButton button; JLabel lblclkValue,lbldispValue,lblTitle; JTextField textField; JScrollPane pane; JPanel panel; JFrame frame; …

Member Avatar for JamesCherrill
0
436
Member Avatar for MeSam0804

hi, I wanted to get the directories in a specific path and I wrote that by threading programming but when I call [CODE]waithandle.waitall(mywaithandles)[/CODE] , I get the unhandled exception of type 'System.ArgumentNullException' occurred in mscorlib.dll Additional information: Value cannot be null. error. Can anyone help me what to do ? …

Member Avatar for MeSam0804
0
312
Member Avatar for ihatehippies

I made a simple ThreadManager class that receives tasks and spawns threads to complete the tasks. Currently it keeps all the threads alive until I explicitly set threadmgr.waiting=False and all of the tasks are complete. I'm trying to eliminate the need for the former. What I would prefer is that …

Member Avatar for ihatehippies
0
172
Member Avatar for Ravenn

hi:) i'm writing a windows form program that controls 4 stepper motors, using visual studio express 2010, c++ i'm using a for loop that has to cycle for up to 1200 times. it works well enough but it's kinda slow and, when it's connected to my hardware and given more …

Member Avatar for jonsca
0
247
Member Avatar for Kanoisa

Hi all, I'm currently thinking about how to make a thread safe queue. Specified as such: [LIST] [*]Single reader [*]Multiple writers [*]Dynamically sized [*]Suitable for both a reader sleeping on a queue or as a polled queue [/LIST] So what I'm looking at so far (pseudo)code wise is the following …

Member Avatar for Kanoisa
0
627

The End.