|
in .net 2.0 you can handle ColumnWidthChanging event and cancel resize. I'm not sure if there is anything in 1.0
|
|
|
|
|
Hello!
I'm creating an mp3-player using DirectShow and I've got a problem. I want to show the length of the audiofile I'm playing but I can't figure out how.
When I'm e.g. playing an audio file with a length och 46sec the code below shows a length of 195sec (3m 15sec), why? Both Duration and StopTime shows the same length.
private IMediaPosition _mediaPosition;
_mediaPosition.Duration;
_mediaPosition.StopTime;
I've tried to find a pattern by playing different audio files but I have not found one.
I've looked at these pages but they seem to have the same problem.
DirectShow - Playa
DirectShow - MediaPlayer
Thanks!
Erik
|
|
|
|
|
Hello!
It's me again. I just figured out that Duration and StopTime works at some files.
Is'nt Windows MediaPlayer using DirectShow? Because Windows MediaPlayer can't get the correct length of all the files I've tested.
/Erik
|
|
|
|
|
|
I need help to make server which can accept connections from mobile using wap .. actully I am nebibe in .net and previosly was working with java and c++ languages ..
I need urgent help for resourses to look for and what to study ..
I am a enggeniring student ..
Regards
shubham shrestha agrwal
do best wherever u r
|
|
|
|
|
i need to draw a line that goes over sevral controls that are docked on a tab page , but when i used the graphics object of the tab page i didnt see the line, how can i draw this kind of line? (do i have to use all the graphic objects of all the controls in its way?)
|
|
|
|
|
The requirement is to paint the lines ON TOP of the controls, not behind them. Some controls don't work very well with transparent backgrounds and some controls don't even support transparent backgrounds.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Try overriding the OnPaint event of your form. Call the forms base OnPaint event and then draw your lines as required. This should put your lines on top of the controls painted by the base OnPaint handler.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hy everyone!
What I want to do is when rightclicking on a ContactItem I do want my proggy to be listed in there with a MenuItem. This should either start my programm or if it is running bring it on top and/or send the data of the selected object to it.
Well the actions which have to take place when being selcted shouldn't be the problem but at the moment I have no idea how to get this MenuItem into the contextmenu when clicking on a contact.
I found samples which created new MenuBars, but that's not what I want. I do want to add an item to an existing menu.
Does anyone of you know how to do this? Well the best thing is this being possible no matter which version of Outlook I do use. Or if the solution depends on which version I do use then I would like to implement it on Outlook 2000 for testing at the moment.
Thanks!
Stephan.
|
|
|
|
|
From my point of view you won't be able to edit any context menu of Outlook, meaning you won't be able to add any item to them, right?
As far as I know you are only able to add an item to a MenuBar. This should be described in the MSDN or elsewhere!
Or is it possible to edit context menus of Outlook? Because if it is possible then I would be interested as well and I would be happy if anyone was willing to provide me some code to show me how to do this.
(This code doesn't have to be this specific like in Stephans request, any "standard code" for editing or adding an item to the context menu is what I would be looking for!)
|
|
|
|
|
I want to add a Link label to a form ,and when a user clicks on it the browser opens and navigate to that link
in the .net help the follwing code has been given
protected void LinkLabel1_LinkClicked(object sender, System.EventArgs e)
{
// Change the color of the link text by setting LinkVisited
// to True.
linkLabel1.LinkVisited = true;
// Call the Process.Start method to open the default browser
// with a URL:
System.Diagnostics.Process.Start("http://www.Microsoft.com");
}
but it didn't work bcos the app enters to the debug mode..any suggestions?
samitha
|
|
|
|
|
thnx 4 the reply
Is this property comes with LinkLabel..?I have gone through the properties but did not come accross such a property...any suggestions?
samitha
|
|
|
|
|
Ummmmm.....no, won't work...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
The NavigateUrl method only works with the WebBrowser object. This person is trying to launch the URL as a seperate process, just like double-clicking on a web shortcut on the desktop.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Try creating a Process object and alter the ProcessStartInfo properties to UseShellExecute . Something like this:
Process webLink = new Process();
webLink.StartInfo.FileName = "http://www.microsoft.com";
webLink.StartInfo.UseShellExecute = true;
webLink.Start();
This will launch the URL as if you typed it in the Start/Run box of Windows.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I use an ordinary tree view inside a dialog, but I wish to write a text saying "No data available"
if the treeview (which is filled with items loaded from files) is empty.
Instead of just adding a node saying "No Data Available", which doesn't look very good,
I'd like to set a flag in the control (The control is a very thin wrapper for the API's treeview)
and when that flag is set draw the string centered in the treeview instead.
I found somewhere on google that this was only possible using Win32 messages with p/invoke.
My question is, how do I do this? I get the handle of the control and send some kind of paint message?
I haven't been into painting in WIN32 very much...
can anyone help me?
|
|
|
|
|
The TreeView class is simply a wrapper around the Win32 TreeView control. You could simply subclass the TreeView and add your P/Invoke statements there. Depending on what you want to do, you could do something as simple as the Win32 function DrawText . The P/Invoke signature looks like this:
[DllImport("user32.dll")]
static extern int DrawText(IntPtr hDC, string lpString, int nCount,
ref RECT lpRect, uint uFormat);
Also, you could just use the Graphics object and call the DrawString method. It all depends on what you are doing, this should get you started.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Thanks for the advice, got it working. What I did was to override the wndproc and catch the WM_PAINT message, upon which a call to CreateGraphics() let me paint what I want.
What I tried originally was overriding the OnPaint method, but that didn't work, never got called I think..? (why?)
|
|
|
|
|
I am getting data from a database, and after some pushing and poking, I have a User object. I then create a list of these Users. I have a couple of accessors:
public string FullName()
{
get
{
return m_name;
}
}
public User GetUser()
{
get
{
return this;
}
}
and
lstUsers.DisplayMember = "FullName";
lstUsers.ValueMember = "GetUser";
and finally
private void lstUsers_SelectedIndexChanged(...)
{
User u = (User)(lstUsers.SelectedValue);
...
}
There must be an easy way than this. Any ideas?
Regards,
Barry
|
|
|
|
|
Barry Lapthorn wrote:
There must be an easy way than this. Any ideas?
Looks easy enough for me!
top secret xacc-ide 0.0.1
|
|
|
|
|
I should have said 'less crap'
The 'callback' is a string. Seems to me like it would be boiler plate code (returning an object handle from a selected list) and perhaps should have been in the CLR.
Regards,
Barry
|
|
|
|
|
Barry Lapthorn wrote:
There must be an easy way than this. Any ideas?
To do what? You really haven't said what your problem is.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
You could also override the ToString() method of your object and make it return the username as a string. As far as the callback goes, why not just insert the object into the listbox. When you want to get it back out, all you need to do is cast it to the appropriate type. Or am I missing something?
Will
|
|
|
|
|
Do you have an example of this?
Regards,
Barry
|
|
|
|
|
My problem is that return the reference to the object from a drop down list must be a common thing, and there's no consistent (e.g. interface) way of doing it, and that the way you have to do it is via a function call back that is a string, and therefore weakly typed.
Regards,
Barry
|
|
|
|