Click here to Skip to main content
15,885,146 members
Home / Discussions / C#
   

C#

 
Generalweird behavior...probably threading related Pin
vannich18-Apr-05 18:47
vannich18-Apr-05 18:47 
GeneralRe: weird behavior...probably threading related Pin
S. Senthil Kumar18-Apr-05 19:13
S. Senthil Kumar18-Apr-05 19:13 
GeneralRe: weird behavior...probably threading related Pin
vannich20-Apr-05 2:15
vannich20-Apr-05 2:15 
GeneralProblem in Threading Pin
Mohammed Aijaz Mohiuddin18-Apr-05 16:06
Mohammed Aijaz Mohiuddin18-Apr-05 16:06 
GeneralRe: Problem in Threading Pin
Dave Kreskowiak18-Apr-05 17:29
mveDave Kreskowiak18-Apr-05 17:29 
GeneralStrange Error: adding custom control from toolbar Pin
AnneThorne18-Apr-05 13:41
AnneThorne18-Apr-05 13:41 
GeneralRe: Strange Error: adding custom control from toolbar Pin
leppie18-Apr-05 22:41
leppie18-Apr-05 22:41 
GeneralRe: Strange Error: adding custom control from toolbar Pin
AnneThorne19-Apr-05 5:03
AnneThorne19-Apr-05 5:03 
Thank you so much for responding to my post. The code for my control does not include a hard coded path Frown | :( Here it is:


using System;<br />
using System.Collections;<br />
using System.ComponentModel;<br />
using System.Data;<br />
using System.Diagnostics;<br />
using System.Drawing;<br />
using System.IO;<br />
using System.Reflection;<br />
using System.Windows.Forms;<br />
using Syncfusion.Windows.Forms.HTMLUI;<br />
<br />
namespace MyCustomControl<br />
{<br />
<br />
	public class MyCustomControl: HTMLUIControl<br />
	{<br />
		static string filePath = null;<br />
<br />
		public MyCustomControl()<br />
		{<br />
			this.AutoScroll = true;<br />
			this.ShowTitle = false;<br />
			LoadFromFile("MyFile.htm");<br />
		}<br />
<br />
<br />
		private void LoadFromFile(string fileName)<br />
		{<br />
			string filePath = GetFilesLocation() + fileName;<br />
			this.LoadHTML(filePath);<br />
		}<br />
<br />
		static string GetFilesLocation()<br />
		{<br />
			if(filePath != null)<br />
				return filePath;<br />
<br />
			string path;<br />
			path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase );<br />
			int slashPos = path.LastIndexOf("\\",path.Length);<br />
			slashPos = path.LastIndexOf("\\",slashPos-1);<br />
			slashPos = path.LastIndexOf("\\",slashPos-1);<br />
			if(slashPos > 0)<br />
				path = path.Substring(0,slashPos);<br />
			path = path.Replace("file:\\", "");<br />
			filePath = path + "\\MyCustomControl\\";<br />
			return filePath;<br />
		}<br />
		<br />
		public override string Text<br />
		{<br />
			set<br />
			{<br />
				return;<br />
			}<br />
		}<br />
	}<br />
}


Thanks for any and all help on this matter,
Anne
GeneralRe: Strange Error: adding custom control from toolbar Pin
AnneThorne19-Apr-05 8:39
AnneThorne19-Apr-05 8:39 
Generalconnecting to webservice server Pin
Johny Ng18-Apr-05 12:16
Johny Ng18-Apr-05 12:16 
GeneralRe: connecting to webservice server Pin
S. Senthil Kumar18-Apr-05 19:16
S. Senthil Kumar18-Apr-05 19:16 
Generale-mail Client problems Pin
SherKar18-Apr-05 12:11
SherKar18-Apr-05 12:11 
QuestionBest way to structure data for a form?? Pin
OnlyTaz18-Apr-05 11:23
OnlyTaz18-Apr-05 11:23 
AnswerRe: Best way to structure data for a form?? Pin
Christian Graus18-Apr-05 17:06
protectorChristian Graus18-Apr-05 17:06 
GeneralRe: Best way to structure data for a form?? Pin
OnlyTaz18-Apr-05 18:11
OnlyTaz18-Apr-05 18:11 
GeneralRe: Best way to structure data for a form?? Pin
Christian Graus18-Apr-05 18:16
protectorChristian Graus18-Apr-05 18:16 
GeneralC# win service Pin
18-Apr-05 10:56
suss18-Apr-05 10:56 
GeneralRe: C# win service Pin
Dave Kreskowiak18-Apr-05 14:47
mveDave Kreskowiak18-Apr-05 14:47 
GeneralRe: C# win service Pin
Member 67625519-Apr-05 10:33
Member 67625519-Apr-05 10:33 
GeneralRe: C# win service Pin
Dave Kreskowiak19-Apr-05 15:22
mveDave Kreskowiak19-Apr-05 15:22 
GeneralRe: C# win service Pin
Member 67625520-Apr-05 5:57
Member 67625520-Apr-05 5:57 
GeneralPerformance Counter Instances help Pin
grif18-Apr-05 10:21
grif18-Apr-05 10:21 
GeneralDesigning Class Library with Namespaces Pin
Seraphin18-Apr-05 8:47
Seraphin18-Apr-05 8:47 
GeneralRe: Designing Class Library with Namespaces Pin
Alex Korchemniy18-Apr-05 9:08
Alex Korchemniy18-Apr-05 9:08 
GeneralImport of CSV via ODBC issue Pin
RB@Emphasys18-Apr-05 8:42
RB@Emphasys18-Apr-05 8:42 

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.