Click here to Skip to main content
15,915,611 members
Home / Discussions / C#
   

C#

 
GeneralRe: Reflection and System.Windows.Forms.Form Pin
Heath Stewart5-Aug-04 8:37
protectorHeath Stewart5-Aug-04 8:37 
GeneralRe: Reflection and System.Windows.Forms.Form Pin
Wizard_015-Aug-04 13:47
Wizard_015-Aug-04 13:47 
GeneralRe: Reflection and System.Windows.Forms.Form Pin
Heath Stewart6-Aug-04 1:33
protectorHeath Stewart6-Aug-04 1:33 
GeneralSetting the System Cursor Pin
betterc5-Aug-04 8:16
betterc5-Aug-04 8:16 
GeneralRe: Setting the System Cursor Pin
Heath Stewart5-Aug-04 8:33
protectorHeath Stewart5-Aug-04 8:33 
GeneralRe: Setting the System Cursor Pin
Tom Larsen5-Aug-04 12:06
Tom Larsen5-Aug-04 12:06 
GeneralRe: Setting the System Cursor Pin
betterc5-Aug-04 12:47
betterc5-Aug-04 12:47 
GeneralStrange Thread problem Pin
Guinness4Strength5-Aug-04 7:43
Guinness4Strength5-Aug-04 7:43 
I have a background thead in an Audio program I wrote that scrolls text like a banner. When the text is scrolling I cannot see any TootTips in any other programs. If I stop the Background thread the ToolTips show up again.
Here is the pertinant code:
//delegate
private delegate void ScrollThreadDelegate();

...
...

//setup scroll thread in FormLoad Event handler
ScrollThread = new Thread(new ThreadStart(ScrollThreadFunction));
ScrollThread.IsBackground=true;
ScrollThread.Start();
ScrollThread.Suspend();
...
...
//Background Thread
private void ScrollThreadFunction()
{
	while(RunScrollThread)
	{
		if(lbSongInfo.InvokeRequired)
		{
			this.lbSongInfo.Invoke(new ScrollThreadDelegate(this.ShowScrollText));
		}
		Thread.Sleep(50);
	}
}

//delegate funtion
private void ShowScrollText()
{
	if(lbSongInfo.Location==SongInfoEnd)
		lbSongInfo.Location=SongInfoStart;
	Point CurPos = new Point(lbSongInfo.Location.X,lbSongInfo.Location.Y);
	CurPos.Offset(-1,0);
	lbSongInfo.Location=CurPos;
}


private void InitSongInfoLabel()
{
	try
	{
		try
		{
			ScrollThread.Suspend();
		}
		catch(Exception){}
		//measure string
		//get song name & dimmensions
		string strName = CurTrackItem.SubItems[1].Text;
		int strWidth = (int)grfx.MeasureString(strName, lbSongInfo.Font).Width + 5; 
					
		//set lbSongInfo location, size & Text
		SongInfoStart=SongInfoEnd=new Point(0,0);

		SongInfoStart.Offset(pnSongInfo.Width,0);
		SongInfoEnd.Offset(strWidth*-1,0);

		lbSongInfo.Location=SongInfoStart;
		lbSongInfo.Width=strWidth;
		lbSongInfo.Height=pnSongInfo.Height;
		lbSongInfo.Text=strName;
		lbSongInfo.TextAlign = ContentAlignment.MiddleCenter;
	}
	catch(Exception Err)
	{
		MessageBox.Show("InitSongInfoLabel Exception : "+Err.Message);
	}
	finally
	{
		ScrollThread.Resume();
	}
}


Can anyone see what might cause this issue?
GeneralRe: Strange Thread problem Pin
leppie5-Aug-04 13:31
leppie5-Aug-04 13:31 
GeneralRe: Strange Thread problem Pin
Guinness4Strength5-Aug-04 15:14
Guinness4Strength5-Aug-04 15:14 
GeneralRe: Strange Thread problem Pin
leppie5-Aug-04 19:18
leppie5-Aug-04 19:18 
GeneralRe: Strange Thread problem Pin
Guinness4Strength6-Aug-04 3:03
Guinness4Strength6-Aug-04 3:03 
GeneralBizarre remoting problem Pin
Judah Gabriel Himango5-Aug-04 7:25
sponsorJudah Gabriel Himango5-Aug-04 7:25 
GeneralRe: Bizarre remoting problem Pin
Heath Stewart5-Aug-04 8:44
protectorHeath Stewart5-Aug-04 8:44 
GeneralRe: Bizarre remoting problem Pin
Judah Gabriel Himango5-Aug-04 10:10
sponsorJudah Gabriel Himango5-Aug-04 10:10 
GeneralRe: Bizarre remoting problem Pin
Heath Stewart5-Aug-04 10:39
protectorHeath Stewart5-Aug-04 10:39 
GeneralRe: Bizarre remoting problem Pin
Judah Gabriel Himango5-Aug-04 10:54
sponsorJudah Gabriel Himango5-Aug-04 10:54 
GeneralRe: Bizarre remoting problem Pin
Tom Larsen5-Aug-04 12:17
Tom Larsen5-Aug-04 12:17 
GeneralRe: Bizarre remoting problem Pin
scadaguy6-Aug-04 6:30
scadaguy6-Aug-04 6:30 
GeneralConverting .rc files to .resx Pin
BrcKcc5-Aug-04 7:20
BrcKcc5-Aug-04 7:20 
QuestionHow to pass array or VARIANT from ATL COM to .NET. Pin
al_1_@hotmail.com5-Aug-04 6:58
al_1_@hotmail.com5-Aug-04 6:58 
AnswerRe: How to pass array or VARIANT from ATL COM to .NET. Pin
Heath Stewart5-Aug-04 8:41
protectorHeath Stewart5-Aug-04 8:41 
GeneralEmpty collections in web services Pin
Diego F.5-Aug-04 6:46
Diego F.5-Aug-04 6:46 
GeneralRe: Empty collections in web services Pin
leppie5-Aug-04 20:09
leppie5-Aug-04 20:09 
GeneralRe: Empty collections in web services Pin
Diego F.6-Aug-04 7:31
Diego F.6-Aug-04 7:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.