|
Not sure, I am also not sure where is the right place to ask this. Visual Studio forum perhaps ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
ya,you're right I'm gonna ask it on visual studio forum
|
|
|
|
|
fateme_developer wrote: is there any way to see undocheckouts in a file history
i dont think so. only checkedin and labled you will get from History list
|
|
|
|
|
Hi
I want to get printer information using PJL(Printer job description language) in c#.
can anybody tell me how to send PJL command to USB connected printer in C#?
Thanks.
|
|
|
|
|
|
Hi Bert delaVega
Thanks for reply
Actually this code is to connect LAN printer not for USB connected printer.
If you have any Idea about USB connected printer, Please help me.
Thanks.
|
|
|
|
|
need help..
how to convert this code to c#?
----- dim strTemp() as string - vb code...
can anyone help.. im just new to c#... thank you..
start a new beginning in every ending; thats what life for......
|
|
|
|
|
Its just simple.
string[] strTemp;
If you want to assign a NULL value at initialization level, then
string[] strTemp = null;
|
|
|
|
|
This is one of the problems with VB - those parentheses mean it's an array. You should be able to figure out from there... if not... you need to go back and read your C# book again.
|
|
|
|
|
Hello,
CF 3.5 VS 2008
I have a timer control that is being used to do some work. Code below. The timer interval is set for 1 second. However, when the timer is running the UI freezes for a short period.
I understand that the timer control is uses the UI thread, but I didn't think the amount of work was too much to make the UI freeze for short periods.
I couldn't see any server timers for the compact framework.
Any suggestions would be most helpful.
<br />
private void GetSignalStrength()<br />
{<br />
try<br />
{<br />
if (currentAdapter.NearbyAccessPoints.Count > 0)<br />
{ <br />
foreach (AccessPoint ap in currentAdapter.NearbyAccessPoints)<br />
{<br />
if (ap.Name == currentAdapter.AssociatedAccessPoint)<br />
{<br />
this.DisplaySignalStrength(ap.SignalStrength.ToString());<br />
break;<br />
}<br />
}<br />
}<br />
}<br />
catch (Exception ex)<br />
{<br />
MessageBox.Show(ex.Message);<br />
}<br />
}<br />
<br />
private void DisplaySignalStrength(string strength)<br />
{<br />
this.pbExcellent.BackColor = Color.Transparent;<br />
this.pbVeryGood.BackColor = Color.Transparent;<br />
this.pbGood.BackColor = Color.Transparent;<br />
this.pbLow.BackColor = Color.Transparent;<br />
this.pbVeryLow.BackColor = Color.Transparent;<br />
<br />
switch (strength)<br />
{<br />
case "Excellent":<br />
this.pbExcellent.BackColor = Color.Green;<br />
this.pbVeryGood.BackColor = Color.Green;<br />
this.pbGood.BackColor = Color.Green;<br />
this.pbLow.BackColor = Color.Green;<br />
this.pbVeryLow.BackColor = Color.Green;<br />
break;<br />
case "Very Good":<br />
this.pbVeryGood.BackColor = Color.Green;<br />
this.pbGood.BackColor = Color.Green;<br />
this.pbLow.BackColor = Color.Green;<br />
this.pbVeryLow.BackColor = Color.Green;<br />
break;<br />
case "Good":<br />
this.pbGood.BackColor = Color.Green;<br />
this.pbLow.BackColor = Color.Green;<br />
this.pbVeryLow.BackColor = Color.Green;<br />
break;<br />
case "Low":<br />
this.pbLow.BackColor = Color.Green;<br />
this.pbVeryLow.BackColor = Color.Green;<br />
break;<br />
case "Very Low":<br />
this.pbVeryLow.BackColor = Color.Green;<br />
break;<br />
default:<br />
break;<br />
}<br />
}<br />
<br />
private void tmrPollAP_Tick(object sender, EventArgs e)<br />
{<br />
this.GetSignalStrength(); <br />
}<br />
|
|
|
|
|
Use threading...
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
Indeed. Start a new thread to run the timer on and when the OnTick event is triggered, I believe you can use this.Involk(); to involk a delegate method to be handled in the main thread?
Not sure but, its a suggestion.
Andy
|
|
|
|
|
Hello,
I didn't really want to use threading. As I would have to invoke all the picture boxes to be updated. As the picture boxes are created on the UI thread.
However, I am experimenting with the code below. Any suggestions would be most helpfull.
Thanks,
<br />
Thread th;<br />
public void StartPolling()<br />
{<br />
this.GetWirelessAdapters();
th = new Thread(ThreadPollStrength);<br />
th.IsBackground = true;<br />
th.Start();<br />
}<br />
<br />
private void ThreadPollStrength()<br />
{<br />
this.GetSignalStrength();
Thread.Sleep(1000); <br />
}<br />
|
|
|
|
|
Just read how invoking control in UI because the control an a UI runs in separated thread
delegate void UpdatePictureBoxCallBack(PictureBox pb, Color color);
private void UpdatePictureBox(PictureBox pb, Color color)
{
if (pb.InvokeRequired){
pb.Invoke(new UpdatePictureBoxCallBack(UpdatePictureBox), new object[] {pb, color});
}else{
pb.BackgroundColor=color;
}
}
call this method for each condition and picture box on your timer ticks event as you submit early
i hope this usefull
dhaim
program is hobby that make some money as side effect
|
|
|
|
|
Hey Guys, I have an interesting bug.
I have read articles on this site and others, helping me to code an update for my application.. A seperate application that runs and checks for updates, if there are updates downloads them.
It works by a base64 settings file, with little information, connects to a server and opens a Files.txt which has a list of files to download.
It then loops through these files an downloads them.
It works like a charm when i use http://localhost for a server. Loops through all of the file. The issue is when i change the address to my live webserver.. or any other then localhost, it downloads the first file and then freezes =[. Im still relatively new to all this so i was wondering if someone could please take a look at my code an point me in the right direction?
You can see the code at: http://pastebin.com/f7f70d01d[^]
Or you can download the project at: http://reconnetworks.net/AbydosUpdater.rar
You will notice that it is the line 121:
strResponse = wcDownload.OpenRead(FileURL);
That it freezes on. Please could someone help me.. I would be forever great full. I have been trying to fix this for nearly 2 weeks now but cant figure it out. It works fine on localhost but once online it doesnt work.. downloads first file and stalls.
Please help. Thanks for your time in reading.
Andy
|
|
|
|
|
Just how big are the files? You sure you are not just waiting for the request to complete?
|
|
|
|
|
The files are only small empty classes in a dll file for testing and text files.. As i said it downloads the first file and then freezes.
If you run it from in the debug folder (You can delete the exe and then recompile if you prefer.. I know i like to be safe) You can see it just downloads the first file and stops.
You can see that as soon as the download of the first file finishes.. the foreach loop finishes causing the "Finished" Messagebox. But i have previously tested.. the array of files has 2 files. a Document.rtf and Document2.rtf to download..and it knows this. But after first file it stops. I have no idea why. Could any of you please help?
|
|
|
|
|
hi all,
I am confusing the component and user control.What is the different between them?And if i would like to create a chart object(which include itself onpaint method), which is the best choice to do it, with component or user control?
any suggestion or related source will be appreciate.
Thanks in advance
regards
cocoonwls
|
|
|
|
|
A user control is reusable UI. A component is a dll, which could well have no UI at all.
A chart is obviously a user control.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi Christian Graus,
Thank for your answer I got it.
|
|
|
|
|
Christian Graus wrote: A component is a dll
Why does it have to be a .dll? Any small building block of a program could be deemed to be a component of the greater whole.
|
|
|
|
|
Well, it becomes semantic at that point. Is a single paint tool in my app a component ? Are all the classes that make my paint tools a component ? What makes them so ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I've always thought of a component in a mathematical sense (i.e components of fourier series etc).
Perhaps the computer science definition is different.
|
|
|
|
|
Christian gave you a good answer.
An easy example is a TextBox and a TimerextBox needs to be visible (have a UI) so if you were creating your own you would make it a UserControl and if you drag it onto a form it will display on the form.
A Timer never needs to be seen (no UI) so if you were creating your own you would make it a Component and if you drag it onto a form it will display its icon in the greyed area below your form in the designer.
Dave
|
|
|
|
|
Hi there friends.
I'm using VS2008. when I use text Box in my form CTRL+A isn't working.
How can we enable CTRL+A on text Box in C# form ?
Freshman
|
|
|
|