|
I mean first visible character when scrolling the control contents left and right.
|
|
|
|
|
Unfortunately, no methods exist for what you want to do. I can't really come up with a way to do it either.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi guys,
In my office a job is assigned to me to admin our web site from a windows C# application. The task involves, uploading only those files into web FTP folder (relative folders) which are last modified. Instead of web utility if anybody can help me to upload files/folders from a windows root directory into Windows FTP directory (created in Internet Information Service), I will be greatful.
Parameters provided to me:-
1. Web site name (you can consider it as Windows FTP directory in IIS)
2. admin Username
3. Password
The scene...
I have to receive a folder name in window application like...
d:\websites\message\
suppose [message] is my root folder in windows directory.... which is same as the root folder [message] in a website [www.clientmessage.com]
Awaiting for help.
thanks
Sharad
SHARAD KAPIL
|
|
|
|
|
Hi,
I have a strange problem (also difficult to explain but here goes) - basically I have a program that scans a email account (which receives faxes as tiff images as attatchments) when the program finds a new email it gets the tif saves it to a mySql database and also saves each individual image to the database. But sometimes one of the seperate images is corrupt i.e. I can see it in the database (blob editor - image) but i cant work with it at all - I can save it using mySql front but if i try and open the image it says drawing failed. If I try and use it in my code -
byte[] MyData = (byte[])dataread["fileData"];
System.IO.MemoryStream mem = new System.IO.MemoryStream(MyData);
mem.Flush();
System.Drawing.Image i = System.Drawing.Image.FromStream(mem);
i.Save(mem,System.Drawing.Imaging.ImageFormat.Gif);
it will give a gdi exception(a generic exception has occured) when i try create a image from the memoryStream
another strange thing is that whenever I get an image like this the length of the byte array is always 74240.
Also when I view the image in the tiff I can see no problems with it.
Any ideas/help would be greatly appreciated. Thanks.
Gavirj
|
|
|
|
|
|
Have a look at this:
http://www.forum-3dcenter.org/vbulletin/attachment.php?attachmentid=18784&stc=1
The text of the GroupBox that is in the other GroupBox is screwed up.
Definitely a bug that only occurs if you install .NET 1.1 ServicePack1!
Is there a possibility to report bugs to Microsoft?
Best Regards
-------------------------------------------
The light at the end of the tunnel has been switched off temporarily due to budget problems...
|
|
|
|
|
I've found this problem too.
I've contacted Microsoft about it because I could not find anywhere on any Microsoft website where I could report the bug, so I emailed them and they got back to me today.
Apparently, to report a bug I have to write a letter, yes a letter, not an email or an online form (as you would expect from a company that deals in modern technology) but a snail mail letter.
If you want to do so you will need to do the following, write a letter addressed to:
Attn: <Product Name> Development Group
Microsoft Corporation
One Microsoft Way
Redmond, WA 98052
And in the letter tell them what you've got installed and your OS and all the other jib that they'll need to consistently reproduce the problem.
I'm going to try writing to them but I don't know how long it'll take me to do so (I'm lazy, you see).
|
|
|
|
|
-hi there guyz, does anyone knows about PC/SC using C# 'cause im having hard
time in coding it specially in SCard Get ATR and SCard Transmit.. any idea?! tnx for helping me..
|
|
|
|
|
I'd like to write a metronome application in C#.
What Timer class would you recommend for accurate time-keeping.
I also plan on using DirectSound to play the WAV files representing the ticks. Does this impose a significant overhead?
If you know of code for a metronome app in C#, I'd appreciate it. This would only be for personal reference. I will not copy the code and use it in my app.
|
|
|
|
|
NietzscheDisciple wrote:
What Timer class would you recommend for accurate time-keeping.
Just the normal one will be fine.
NietzscheDisciple wrote:
I also plan on using DirectSound to play the WAV files representing the ticks. Does this impose a significant overhead?
What on earth for ? Why rely on Direct Sound to play a simple sound file - it's overkill. And DirectSound is used in games that are doing a lot more than firing a timer, I doubt it will bring your app to it's knees if you use it
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Thanks for the reply, Christian.
I've done some DirectSound programming and it's pretty neat. My apprehension was that the SecondaryBuffer wouldn't clear "cleanly enough" for this application. Esp. if the metronome was going at 180 bpm+.
|
|
|
|
|
|
hey - does anyone know where I can find a class library (ideally in C# but any .Net classes will do) which allow me to edit tags on MP3s and Oggs. I need ID3.v2 support for the mp3 tags.
Thanks in advance!
|
|
|
|
|
When I needed id3v2 support, pretty much the first hit google gave me got it. ogg is another matter.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Hi,
I have a listbox with three values on it and a button on my form. When I pressed the button the listbox have to select the next item after 2 seconds. Then select the next one after 2 seconds... And so on... Here is my unworking below code:
Anyhelp would be greatly appreciated...
Thank you indeed...
Cem Louis
<br />
using System;<br />
using System.Drawing;<br />
using System.Collections;<br />
using System.ComponentModel;<br />
using System.Windows.Forms;<br />
using System.Data;<br />
using System.Timers;<br />
using System.Threading;<br />
<br />
namespace WindowsApplication14<br />
{<br />
public class Form1 : System.Windows.Forms.Form<br />
{<br />
private System.Windows.Forms.ListBox listBox1;<br />
private System.Windows.Forms.Button button1;<br />
private System.Timers.Timer timerClock = new System.Timers.Timer();<br />
private System.ComponentModel.Container components = null;<br />
<br />
public Form1()<br />
{<br />
InitializeComponent();<br />
<br />
}<br />
<br />
public void InitializeTimer()<br />
{<br />
this.timerClock.Elapsed += new ElapsedEventHandler(OnTimer);<br />
this.timerClock.Interval = 2000;<br />
this.timerClock.Enabled = true;<br />
}<br />
<br />
protected override void Dispose( bool disposing )<br />
{<br />
if( disposing )<br />
{<br />
if (components != null) <br />
{<br />
components.Dispose();<br />
}<br />
}<br />
base.Dispose( disposing );<br />
}<br />
<br />
#region Windows Form Designer generated code<br />
private void InitializeComponent()<br />
{<br />
this.listBox1 = new System.Windows.Forms.ListBox();<br />
this.button1 = new System.Windows.Forms.Button();<br />
this.SuspendLayout();<br />
this.listBox1.Location = new System.Drawing.Point(8, 8);<br />
this.listBox1.Name = "listBox1";<br />
this.listBox1.Size = new System.Drawing.Size(120, 95);<br />
this.listBox1.TabIndex = 0;<br />
this.button1.Location = new System.Drawing.Point(8, 112);<br />
this.button1.Name = "button1";<br />
this.button1.Size = new System.Drawing.Size(120, 23);<br />
this.button1.TabIndex = 1;<br />
this.button1.Text = "Run";<br />
this.button1.Click += new System.EventHandler(this.button1_Click);<br />
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);<br />
this.ClientSize = new System.Drawing.Size(136, 142);<br />
this.Controls.Add(this.button1);<br />
this.Controls.Add(this.listBox1);<br />
this.Name = "Form1";<br />
this.Text = "Form1";<br />
this.Load += new System.EventHandler(this.Form1_Load);<br />
this.ResumeLayout(false);<br />
<br />
}<br />
#endregion<br />
<br />
[STAThread]<br />
static void Main() <br />
{<br />
Application.Run(new Form1());<br />
}<br />
<br />
private void Form1_Load(object sender, System.EventArgs e)<br />
{<br />
listBox1.Items.Add("Arthur");<br />
listBox1.Items.Add("Alex");<br />
listBox1.Items.Add("Amie");<br />
listBox1.Update();<br />
}<br />
<br />
private void OnTimer(object source, ElapsedEventArgs e)<br />
{<br />
this.nextvalue();<br />
}<br />
<br />
private void button1_Click(object sender, System.EventArgs e)<br />
{<br />
this.nextvalue();<br />
}<br />
<br />
private void nextvalue()<br />
{<br />
for(int i = 0;i<listBox1.Items.Count;i++)<br />
{<br />
listBox1.SetSelected(listBox1.Items.Count-i,true);<br />
}<br />
|
|
|
|
|
I am no guru, but it looks like the problem may be in nextvalue(). Perhaps it was a cut & paste error, but the "for" statement is incomplete. The other problem could be the statement "listBox1.Items.Count-i"; if i is 0, the command would error because the count is always 1 larger than the indexing. How I would attempt to rotate through the items would be:
int i = listBox1.SelectedIndex + 1;
if ( i == listBox1.Items.Count ) i = 0;
listBox1.SetSelected( i, true );
Hope this helps!
|
|
|
|
|
Hi Smith,
Not working
|
|
|
|
|
Two things:
1) Make sure the nextvalue() has the code I included earlier:
private void nextvalue()
{
int i = listBox1.SelectedIndex + 1;
if ( i == listBox1.Items.Count ) i = 0;
listBox1.SetSelected( i, true );
}
2) The timer event that is being used could be incorrect. When I add a timer to my test project, then click on the Events button (the "lightning bolt") in the Properties grid, the only event displayed is the Tick event. Double-click on the Tick title and it will auto-magically add the event to the code. Put the "nextvalue()" call in that subroutine, then try running it.
Hope this helps!
|
|
|
|
|
Have you been able to get the timer working? I apologize for overlooking the possibility that you were probably trying to learn about handlers, more so than getting the timer to work.
As fate would have it, I have had to work with timers and handlers in the past week. So, I took another look at the original code posted. I made three changes and was able to get the program to work:
1) Modify nextvalue()
private void nextValue()<br />
{<br />
int i = listBox1.SelectedIndex + 1;<br />
if ( i == listBox1.Items.Count ) i = 0;<br />
listBox1.SetSelected( i, true );<br />
}
2) Add a call to InitializeTimer() in the form constructor:
This is a public method, so another program could have been calling it. But since I cannot tell, I added a call in the form constructor:
InitializeTimer();
3) Modify the handler definition and code:
The definition of the handler is still in InitializeTimer(). I was only able to find a handler for "Tick", not "Elapsed".
this.timerClock.Tick += new EventHandler(timerClock_Tick);
The neat thing about adding the handler is that Visual Studio will do most of the work for you. After typing "+=" you will be prompted to "Press TAB to insert" the remaining of the command. You will immediately be prompted a second time to "Press TAB to generate handler". After generating the handler, add the call to nextvalue() within that event handler.
private void timerClock_Tick(object sender, EventArgs e)<br />
{<br />
nextValue();<br />
}
Hope this helps!
|
|
|
|
|
I have a process that can take over ten minutes to complete. So, I added an update dialog box with an axAnimation (axMSComCtl2) control. I update a label as the little wheels spin in the AVI. Works great (using an explicit path in the Open method)! Here's the current code that works:
string sAppPath = Path.GetDirectoryName(Application.ExecutablePath);
string sAviFile = sAppPath + "\\PleaseWait.avi";
axPleaseWait.Open( sAviFile );
axPleaseWait.Play(0, 0, 0);
The problem is the file distribution. I have been asked by the powers that be to embed the AVI file in the project. I have found two ways to embed an AVI file: 1) right-click on the project, select "Add existing item", then browse to and select the AVI file (found by trial & error); 2) create a resource file, add the AVI, and then add the .resource file to the project (found in the MSDN). But I have yet to figure out how to get either of these methods to work!
The problem with the first method is that I have no way to get a path to the AVI file listed in the Solution Explorer. I thought about writing it to a temp file, but I have not figured out how to read in the AVI file. (I think this would be the most straight foward method to use).
The problem with the second method is that the resource file will not let me explicitly state that this is an AVI file. So, I selected Bitmap. I don't even know if the AVI has been added to the .resource correctly. Likewise, I have not figured out how to get the AVI file back out of the .resource file.
Any help would be greatly appreciated. Thanks!
|
|
|
|
|
I am trying to get the CPU usage percent of a given process (in this example, iTunes). This example always prints "iTunes is using 0.0000% CPU":
Console.Out.WriteLine("iTunes is using {0:0.0000%} CPU",
new PerformanceCounter("Process", "% Processor Time", "iTunes").NextValue());
What am I doing wrong? The Performance program under Administrative Tools in Windows XP correctly displays the CPU usage of iTunes using these exact arguments to the constructor of PerformanceCounter. In a different section of code, using _Total as the instance name properly retrieves the total CPU usage of the system.
(the emoticons are quote followed by P that got parsed by this forum)
|
|
|
|
|
|
The % was just a typo in the post.
Every now and then, the CPU usage will also be reported as 100%.
|
|
|
|
|
Hi every one,
I am new in .NET and this is my first time entering the message board. You might find my questions are pretty dummy. OK, here is my first question:
Why the tab control in .NET Campact Framwork looks upside down? How can I change it.
Thank in advance for your help,
Willa Wei
BTW, if you find I am at a wrong place, please tell me where I can ask question like that. Thanks.
|
|
|
|
|
Willa Wei wrote:
Why the tab control in .NET Campact Framwork looks upside down? How can I change it.
It's 'upside down' because that's how the handheld UI works, just like the start button is at the top instead of the bottom. It's NEVER a good idea to deviate from UI standards that users are accustomed to without VERY good reasons.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|