|
Hi,
I have a panel on which there are some custom objects drawn(For example say ten squares). Know I am about to show a tooltip for each square individually when mouse gets over them. What should I do? Is there any API to show a tooltip in the given X and Y coordinates? Should I create my custom tooltip (for example showing a form with yellow background as a tooltip)?
Any commnets would be greatly appreciated!
abcdabcdabcdabcda
Don't forget, that's Persian Gulf not Arabian gulf!
Murphy: Click Here![^] I'm thirsty like sun, more landless than wind...
|
|
|
|
|
The ToolTip component in the .NET FCL really won't work for this, but there are MANY implementations of tooltips both free here on CodeProject (which you could either use or base your own code from) and commercial solutions available that let you do even more than the ToolTip component in the .NET FCL.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi,
Does anyone knows where can I find more informations/discussions of the difference of .Net 1.0 & .Net 1.1.
I've tried to build my project under .Net 1.0, but it has some problems when running under .Net 1.1. So I wnat to know more about this, and taking care to solve the problem.
Thanks for help
|
|
|
|
|
|
Hi guyz and experts,
Got a few questions, I managed to create a windows media web control in a web application. I got a class called MediaPlayer which basically writes the windows media player object to an aspx page. Now, I need to access the windows media player attributes, which I can't because I only write the media player object at runtime in the aspx page. I can only retrieve the URL, because the URL was set by user input after runtime in the code behind class. I need to call a few attributes from the windows media player like the duration, current position, etc, but I can't, I can only set it. Somehow I cannot view the current attributes of the current files in the media player unless I set it first.
Questions:
1. Is there anyway I can treat the media player as a web control and can still access the attributes?
2. Are there any other ways that I can do to achieve such thing? (basically putting the windows media player as an object of a class from the cs file (not writing it as an html object)
Cheers,
|
|
|
|
|
Marveyles wrote:
1. Is there anyway I can treat the media player as a web control and can still access the attributes?
No, not really. The media player is instantiated on the client. If you need to access it on the server, then a separate instance is instantiated on the server (obviously, the two are not the same instance). The best thing to do is also emit client-side script that can access the media player using it's ID that you should also write-out to the page.
Marveyles wrote:
2. Are there any other ways that I can do to achieve such thing? (basically putting the windows media player as an object of a class from the cs file (not writing it as an html object)
And how does the work for the client, then? You seem to be missing the fact that all data from the server is downloaded into the client browser and is separate from the server. Even with HTTP Keep-Alive data that has already been sent to the client is lost to the server - it's basically a streaming protocol.
If you want the player to see the media player (or even to hear music if the media player isn't visible), it has to be output to HTML so the browser can instantiate it. Period.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Question. When making a webpage in c# using asp.net wizard how in the world do you change the path that the adapter points to. For example my database is csharp.mdb and i set the adapter to point to the file that i wanted and tested the connection. all seems fine. When i load the page for testing it trys to reference it from the c:\windows\system32 directory. I tried to find this reference in the code but couldn't any help would be great. I was assuming i could do like i did with my winform application and just put the mdb in the project folder and point to it and all be fine but that didn't work in this case.
I get the error
The Microsoft Jet database engine cannot open the file 'C:\WINDOWS\system32\csharp.mdb'. It is already opened exclusively by another user, or you need permission to view its data.
thanks for the help.
Win32newb
"Making windows programs worse than they already are"
|
|
|
|
|
Store the full path to the MDB file in the Web.config using either the AppSettings section or a custom section. This makes it easy to change.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Heath, thanks for the reply. I haven't much experience with asp.net just trying to make a webpage for the first time using c#. In any event, you mentioned the web.config file. I understand what this file is however I don't really understand what the actually tag if you will is to be in the AppSettings to run the mdb. Could you please post an example for say a database a.mdb that is in the database directory?
Thanks for the help
Win32newb
"Making windows programs worse than they already are"
|
|
|
|
|
If you don't know what something is, please read the documentation. It will tell you a lot of information.
The <appSettings> section of a .config file stores key/value pairs. Simply use some name you can easily refer to and include the full path to the database (I strongly recommend you keep it OUT of the publicly-accessible web directories):
<configuration>
<appSettings>
<add key="DBPath" value="C:\SomeDir\File.mdb"/>
</appSettings>
</configuration> When you need the path, use something like:
string dbPath = ConfigurationSettings.AppSettings["DBPath"]; Don't forget to check for null returns.
This allows you to change the path in your .config file at any time. For Windows applications, you need to restart the application. For ASP.NET, changes to the Web.config file restart the ASP.NET web application automatically, which reads-in the new values when necessary.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Also, if you want to keep the MDB file in the virtual directories for your web app (not a good idea, unless you properly protected it from being downloaded!), then you must use Server.MapPath or Page.MapPath (whichever is easier in your context) to get the full physical path to the file - referring to it by a virtual file reference will not work - only your web server knows about that, not some OLE DB driver).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hello,
I set the back color of my panel to transparent.
Is there any way to prevent the background from moving when I scroll the panel control?
Right now the background scrolls with the scrollbar movement and what I want is for the panel background to not move and remain transparent.
To do this with my tab control I just draw the correct area of the form's background on the tabpage to give the illusion of transparency. However, when the user scrolls the tabpage, the constant redrawing of the image that I have to do slows down the scrolling a bit and is visible (even when I use double buffering).
Does anyone have any suggestions on keeping the panel's background from moving when the user scrolls? (Or how I can keep a tabpage looking transparent without having to redraw an image every time it gets a scroll message)?
Thanx for the help,
-Flack
|
|
|
|
|
You can't keep the background from moving. But what you can probably try is keeping the background of the panel transparent and then put an image under the panel. This will keep the image steady and the panel moving, but you might have redraw performance issues...
RageInTheMachine9532
|
|
|
|
|
if i want to add a new user to microsoft exchange mail server not through the active directory manually but through asp.net so the user can add it from the interface?/
how i heard about the ldap
emy
|
|
|
|
|
Umm... Active Directory i think IS Microsoft's LDAP implementation.
|
|
|
|
|
Hi Everybody,
I wrote a class like this
public class Node
{
private int data;
private string key;
#region Constructors
public Node(string key, int data)
{
this.key = key;
this.data = data;
}
#endregion
#region Public Properties
public int Value
{
get
{
return data;
}
set
{
data = value;
}
}
public string Key
{
get
{
return key;
}
set
{
key = value;
}
}
#endregion
}
public class test
{
public static void Main()
{
ArrayList a = new ArrayList();
Node n = new Node("ab", 1);
a.Add(n);
PrintValues(a);
}
public static void PrintValues( IEnumerable myList )
{
System.Collections.IEnumerator myEnumerator = myList.GetEnumerator();
while ( myEnumerator.MoveNext() )
Console.Write( "\t{0}", myEnumerator.Current.ToString());
Console.WriteLine();
}
}
My problem is How do I get and set values for each node in this Array List and How do I print out to the screen.
Thanks for your help and time.
Raj
|
|
|
|
|
You have to cast the elements of your ArrayList.
<br />
public static void PrintValues( IEnumerable myList ) <br />
{<br />
System.Collections.IEnumerator myEnumerator = myList.GetEnumerator();<br />
while ( myEnumerator.MoveNext() )<br />
{<br />
Console.Write( "\t{0}", ((Node) myEnumerator.Current).Key.ToString());<br />
Console.WriteLine();<br />
}<br />
}
|
|
|
|
|
Please take a good look at this and give me some clues!!!
I need to list every table in the Access database.
This code (which is from the .NET Framework Class Library DataTableCollection Class page on MSDN) appears to get the info that is needed, but what does the dataset coding look like for this to work?
private void GetTables(DataSet ds) <br />
{ <br />
foreach (DataTable t in ds.Tables) <br />
foreach (DataRow r in t.Rows) <br />
foreach (DataColumn c in t.Columns) <br />
if (r[c] != null) <br />
Console.WriteLine(r[c]); <br />
}
Regards,
Bill Antonacchio
|
|
|
|
|
Hi Bill. You're going to want to use the GetOleDbSchemaTable method of the OleDbConnection object to get your list of tables. This Microsoft KB document should help.
http://support.microsoft.com/?id=309488[^]
|
|
|
|
|
|
Thanks Mike I will give that a try.
Regards,
Bill Antonacchio
|
|
|
|
|
Yes, I know about the registry, but I need to read an ini file.
Could you point me towards the C# counter part of
GetPrivateProfileString.
thanks
|
|
|
|
|
http://www.codeproject.com/csharp/ReadWriteXmlIni.asp
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
There's already a class in the Files And directories category, and I have published another today, so if it does't get available, send me an email!
kratchkov@inbox.lv
|
|
|
|
|