Click here to Skip to main content
15,892,005 members
Home / Discussions / C#
   

C#

 
GeneralCreating OdbcDataAdapter object with Select statement that has spaces in the fileName Pin
chukkykzn18-Apr-05 22:58
chukkykzn18-Apr-05 22:58 
GeneralHigh CPU usage when using Toolbar Pin
MasudM18-Apr-05 22:24
MasudM18-Apr-05 22:24 
GeneralHelp -- TreeView, How to Sort only a Part of TreeView Nodes Pin
Umair Tariq18-Apr-05 21:18
Umair Tariq18-Apr-05 21:18 
GeneralRe: Help -- TreeView, How to Sort only a Part of TreeView Nodes Pin
CStiefeling19-Apr-05 8:30
CStiefeling19-Apr-05 8:30 
GeneralRe: Help -- TreeView, How to Sort only a Part of TreeView Nodes Pin
Umair Tariq19-Apr-05 20:41
Umair Tariq19-Apr-05 20:41 
GeneralRe: Help -- TreeView, How to Sort only a Part of TreeView Nodes Pin
CStiefeling20-Apr-05 11:59
CStiefeling20-Apr-05 11:59 
GeneralRe: Help -- TreeView, How to Sort only a Part of TreeView Nodes Pin
Umair Tariq20-Apr-05 20:00
Umair Tariq20-Apr-05 20:00 
GeneralDrawing area objects on top of Image Pin
Lyot_be18-Apr-05 20:56
Lyot_be18-Apr-05 20:56 
GeneralRe: Drawing area objects on top of Image Pin
MoustafaS19-Apr-05 4:36
MoustafaS19-Apr-05 4:36 
GeneralRe: Drawing area objects on top of Image Pin
Anonymous19-Apr-05 7:00
Anonymous19-Apr-05 7:00 
GeneralCheck shared folder permission Pin
Johny Ng18-Apr-05 20:12
Johny Ng18-Apr-05 20:12 
Generalcrystalreport Pin
itssuk18-Apr-05 20:06
itssuk18-Apr-05 20:06 
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 

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.