|
hello!
try the following
- change the column's property "Resizable" to "false"
- set the width as you like
hope that works! !
Adeel
--
|
|
|
|
|
hello Adeel,
Thanks for your reply.
Since I was occupied with other works, I looked into your response late.
Since in our application uses gridiview, I think the property you had mentioned is not available. Can anything done for word wrapping with gridview.
Ananth
|
|
|
|
|
Hello,
I have a problem using MSHTML.HTMLDocument in my winforms/c# application. I use that stuff from Microsoft.ConsultingServices.HtmlEditor to present and edit HTML in my app. The problem is when I paste some text from Word, which includes comments, I get an error (originating from HTMLDocument, or WebBrowser, I'm not sure) that says I have error on my page (basically it's javascript error, but its irrelevant). I just need to somehow trap this error and prevent it from shoving to the user. Can I use any properties/methods/events of HTMLEditor, or HTMLDocument to prevent it from showing those errors?
Thanks
|
|
|
|
|
What Error it shows?
Regards,
Satips.
|
|
|
|
|
Error is:
A Runtime Error has occured
Do you wish to Debug?
Line: 203
Error: Object expected
The error is not a problem, I know it's cause (there are some javascript function calls in onmouseover events, but javascript itself is not present). I just want to ignore and not show it.
|
|
|
|
|
I have written a TCP/IP Client-Server socket program. It is working fine. Now I want to know that, can I host my Server program on public IP(internet) and use the same Client program to communicate with the Server,or do I have to change anything.
Thanks in advance
|
|
|
|
|
hello!
if you havnt hardcoded anything related to your machine and/or network, logically it should work! either way try checking that practically!
Adeel
--
|
|
|
|
|
My problem is, there is a comboBox with items collection
when user runs the application the user selects the comboBox and deleting the selected item(using delete key)
but this provision should not be there for the user
how can i control this, Please help me
thanks in advance
praveen kumar Palla
-- modified at 9:42 Friday 27th April, 2007
|
|
|
|
|
hello!
change the "DropDownStyle" property of comboBox to "DropDownList"!
hope that is what you want! !
Adeel
--
|
|
|
|
|
Thanks Adeel
PraveenKumar Palla
|
|
|
|
|
One simple questions abuot matrixes:
<br />
<br />
public class MyClass<br />
{<br />
private int[] List;<br />
...<br />
void SetDimension(int L){<br />
List=new int [L];<br />
}<br />
int GetListLength(){<br />
return List.Length;<br />
}<br />
}<br />
The function GetListLength failed (Iusing .Length) if it is never called SetDimension before, but I like that that function returns 0.
So, How to know that List is declared but not defined?
That is, Is there any propertyes like List.IsUndefinied() that I can use?
Cheers,
Russell
|
|
|
|
|
In the constructor for MyClass set List to null . Then GetListLength can check it to make sure List is non-null before it tries to access its members.
|
|
|
|
|
Thank you
Cheers,
Russell
|
|
|
|
|
hello everyone,
I am trying out a few things with MediaPlayer. I am currently creating the Windows Media Player Control Programmatically(i.e without adding a MediaPlayer control into the Application, I need to run it)
After downloading the MediaPlayer SDK and adding wmp.dll reference,
I am using the below code to do this.
WMPLib.WindowsMediaPlayer Player;
private void PlayFile(String url)
{
Player = new WMPLib.WindowsMediaPlayer();
Player.PlayStateChange +=
new WMPLib._WMPOCXEvents_PlayStateChangeEventHandler(Player_PlayStateChange);
Player.MediaError +=
new WMPLib._WMPOCXEvents_MediaErrorEventHandler(Player_MediaError);
Player.URL = url;
Player.controls.play();
}
private void Form1_Load(object sender, System.EventArgs e)
{
// TODO Insert a valid path in the line below.
PlayFile(@"c:\myaudio.wma");
}
private void Player_PlayStateChange(int NewState)
{
if ((WMPLib.WMPPlayState)NewState == WMPLib.WMPPlayState.wmppsStopped)
{
this.Close();
}
}
private void Player_MediaError(object pMediaObject)
{
MessageBox.Show("Cannot play media file.");
this.Close();
}
Problem:
I got the above code from MSDN and it is playing the video file at the background but I am not able to see the MediaPlayer on the monitor. I can just hear the audio of the file. Can someone tell me what the problem is.
There is nothing wrong with the windows media player as far as I know
Thanks and Regards
kraj
|
|
|
|
|
hello!
try this
Player = new WMPLib.WindowsMediaPlayer();
Player.PlayStateChange +=
new WMPLib._WMPOCXEvents_PlayStateChangeEventHandler(Player_PlayStateChange);
Player.MediaError +=
new WMPLib._WMPOCXEvents_MediaErrorEventHandler(Player_MediaError);
//Player.URL = url;
Player.openPlayer(url);
//Player.controls.play();
hope that's what you want! !
Adeel
--
|
|
|
|
|
Hey. Thanks for the reply. But there is a problem with OpenPlayer. I have tried that method before. Player.OpenPlayer(url) opens the MediaPlayer and plays the video file but we lose control over that player(i.e U cannot Stop or Pause the MediaPlayer Programmatically). Player.Stop(), Player.Pause() doesn't work.
Kraj
|
|
|
|
|
Hello, someone can indicate to me like putting a link on “today” on pocket pc 2003 / Wm5 (exactly like the tom tom)?
Thanks.
Alex
|
|
|
|
|
I have a datagrid view with some field in there.
The header in in the head of the view but I need it in the first the rows.
Can u tell me?
Thanks!
Hello World !
|
|
|
|
|
|
Hey,
In our application, I want to generate 8 characters hexadecimal unique value always.
I tried with GUID.gethascode.Tostring("x") but sometimes even it creates dupilcates.
It should generate unique always.
Thanks
Kusuma
|
|
|
|
|
Well, you can't hope to create unique values in 8 characters. It's just not going to happen - look how long a GUID is.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
If you really want truly random numbers, there is a web site called www.random.org that will provide truly random numbers. On the site you can read about how the numbers are generated.
GregD (My Blog on software development)
|
|
|
|
|
Hello all,
I'm trying to add line numbers to a RTB by wrapping the RTB in a UserControl.
I move the RTB to the right to allow room for line numbers which I draw in the exposed UserControl area at the left margin. I have a property which allows me to get/set Fonts to be used for Text and Line numbers but when I do a pe.Graphics.MeasureString the numbers in the UserControl and the text don't match up for some reason?
//Code to draw line numbers in exposed UserCOntrol area
SizeF szLN = pe.Graphics.MeasureString(strLineNum, textFont);
int ln = firstVisibleLine + 1;
for (int i = 0;
(i <= lastVisibleLine) && (ln <= richTextBox1.Lines.Length);
i++)
{
pe.Graphics.DrawString(ln.ToString(), textFont, sb, pt);
pt.Y += szLN.Height;
++ln;
}
Any help on this and any other nuances with the RTB control would be of great help.
Thanks,
Mike
Theres light at the end of the tunnel. Lord I hope it ain't no train!
|
|
|
|
|
Instead of leaving a space on the left and drawing the line numbers
on the exposed area, why not to have another RTB on the left of small width
and making it similar to the background with ReadOnly=true?
Regards,
Arun Kumar.A
|
|
|
|
|
Arun,
Thanks for the tip..That would also take care of the justification of the numbers.
Thanks,
Mike
Theres light at the end of the tunnel. Lord I hope it ain't no train!
|
|
|
|