|
Drop the attribute
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
I dropped the "[Serializable]" attribute, but am still getting the same results. Any other ideas?
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
Should be working, by getting the same results what are you referring? Are you not hitting a breakpoint or are you getting unexpected output?
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
A little of column 'A', and a little of column 'B'. I am neither hitting my breakpoints in the two methods declared for serialization/deserialization, nor am I getting anything back from my webmethod other than an empty class. The soap message I receive back is...
<?xml version="1.0" encoding="utf-8" ?>
<Foo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="myNamespace" />
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
You may have to use SoapExtensions then. I tried it myself and was quite surprised that it wasn't working. Also, try using XmlAttributes to customize your output, I know those will work.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
I got it... I have to implement the IXmlSerializable interface, not the ISerializable interface. Where is that "The More You Know" public service announcement? Thanks for your help,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
Hi ,
I am a beginner in C# and just looking for a function to create dynamic several Webbrowser in a Tabpage. I use the Microsoft Webbrowser AxSHDocVw.AxWebBrowser Control in my application.
If i invoke the void a firsttime it runs, but at the second click I get a errormessage
Exception Typ : System.Windows.Forms.AxHost+InvalidActiveXStateException
This is my Code:
void myTabPageAxWebbbrowser()
{
TabPage myTabPg = new TabPage();
AxSHDocVw.AxWebBrowser myWB = new AxSHDocVw.AxWebBrowser();
object empty = System.Reflection.Missing.Value;
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
myTabPg.SuspendLayout();
this.tabControl1.Controls.Add(myTabPg);
myTabPg.Controls.Add(myWB);
myTabPg.Location = new System.Drawing.Point(10, 30);
myTabPg.Name = "MyNewPage";
myTabPg.Padding = new System.Windows.Forms.Padding(3);
myTabPg.Size = new System.Drawing.Size(650, 500);
myTabPg.TabIndex = 1;
myTabPg.Text = "MyNewTab";
myTabPg.UseVisualStyleBackColor = true;
myTabPg.ResumeLayout(false);
myWB.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("myWB.OcxState")));
myWB.Dock = System.Windows.Forms.DockStyle.Fill;
Debug.WriteLine(myWB.OcxState.ToString());
myWB.Navigate("c:\\test.doc", ref empty, ref empty, ref empty, ref empty);
}
Does anybody know how can I solve the Problem?
Thanks in Advance
Cola 1973 :)
|
|
|
|
|
I know how to change and update values stored within the Properties.Settings.Default that are user based. I know these values are stored under the Windows User Name that is currently logged in. Is there a way to change this so the user 123456 that is logged in can change change the values under user 654321?
Chris
|
|
|
|
|
I seem to remember vaguely something about the difference between user settings and application settings. It sounds like you are attempting to use the latter. See this[^] article on application/user settings, and let me know if it is what you are looking for.
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
This is want I would like to do.....
The is 1 computer that about 10 different people use. There is a default user login to get to the windows desktop. From there they run my application and sign into my application using their IDs. I would like to create or change the Properties.Settings.Default to use for who logs into my application and NOT the default windows login.
|
|
|
|
|
Well, given that definition, you only have two choices...
1. Use application settings, but have a different section for each application user
2. Create your own setting schema and implement that schema from scratch.
As far as I know, you cannot change the user settings file to apply to your application user... it always uses the windows user. I would recommend the first option as it is easier (IMO), and simply log a different section for each user in the app settings. Hope this helps,
Sounds like somebody's got a case of the Mondays
-Jeff
|
|
|
|
|
I have a listview named redTagView.. I'd like to color the 4th column red or green depending on if it's an "N" or not. I've written the following code..
for (int i = 0; i < redTagView.Items.Count; i++)
{
if (redTagView.Items[i].SubItems[3].Text == "N")
{
redTagView.Items[i].SubItems[3].ForeColor = System.Drawing.Color.Red;
}
else
{
redTagView.Items[i].SubItems[3].ForeColor = System.Drawing.Color.Green;
}
}
The code sits there and stares at me like I'm an idiot. Makes me feel warm and fuzzy inside. Any reason why this shouldn't work? Tried redTagView.Refresh().. nothing.
|
|
|
|
|
Hi,
you can use :
listView1.Items[i].SubItems[0].BackColor = System.Drawing.Color.Red;
And this must be false, else the total area of the line is in the same color.
listView1.FullRowSelect = false;
Greetings
Cola 1973 
|
|
|
|
|
Hi,
Just looking for some advice as I think my current working solution is probably wrong. I've written a small video player in C# using ffmpeg as the decoder and a thread to process and display the footage. However, as I try and further the player's development the thread idea seems more difficult to control. My main window initialises the video footage but plays its output in a seperate thread to a seperate window. To pause the video I suspend and resume the thread, this works fine. To stop the video I abort the thread and kill the seperate window, I can then initialise another video and then play it fine. If, however the video plays to the end I can't restart the player as the previous thread doesn't seem to have terminated properly. Is it possible to control threads where they can be stopped and restarted.
Thanks in advance.
|
|
|
|
|
paul9038 wrote: To stop the video I abort the thread and kill the seperate window
paul9038 wrote: Is it possible to control threads where they can be stopped and restarted.
I imagine so. I have never implemented an approach that aborts threads since virtually all the documentation you read warns against aborting threads. You should use thread communications techniques to control the operations of the thread internally. The result is that the code executing in the thread has an alternate path that causes the thread procedure to return which ends the thread in a proper controlled fashion.
public static void ThreadProcedure(...)
{
while ( IShouldContinuePlayingRecording() )
PlayRecording();
}
So to cause a thread to end looks like this:
1) parent thread communicates with child thread telling it to end
2) child thread receives the message and alters it's flow of control resulting in the thread procedure returning.
is that what you were asking?
|
|
|
|
|
paul9038 wrote: If, however the video plays to the end I can't restart the player as the previous thread doesn't seem to have terminated properly.
This should provide some clue as to what's going on. First, you should allow the thread to exit if playback completes (I can infer that you're doing this, I'm just making sure). While you could probably manage to keep the thread alive and consume new playback requests, it is probably much easier to simply let the thread exit and create a new thread when you want to start a new playback.
With that in mind, if your thread is using any unmanaged resources that it doesn't release when the thread exits, the thread will hang when it attempts to exit. I've run into this on multiple occasions. If your thread doesn't seem to be terminating properly, I would look at the resources you're using in that thread and make sure any objects you use are properly Dispose()'d if their documentation says to do so.
It has become appallingly obvious that our technology has exceeded our humanity. - Albert Einstein
|
|
|
|
|
Hi,
I am trying to access to the click event of the controlbox item close 'X'
my form has a container ,,i have written a validation in the validating event of the container..
When i click the 'X'of form, the container validating event fires before the window_closing event... therefore i would like to access the click event of the 'X'..
pls suggest..
thanks
|
|
|
|
|
I don't understand the problem. Handle the closing event ??
only two letters away from being an asset
|
|
|
|
|
Basicaly i am looking for a event prior to the form_closing event, when i click X in that form.
|
|
|
|
|
|
You might want to ask this in the Mobile Development forum
only two letters away from being an asset
|
|
|
|
|
Hi All,
I am working on the project using c# 2.0. I need to get the contents of window.status bar and save into string variable. Please help if you can.
Thanks in advance.
A.Asif
|
|
|
|
|
What window are you talking about? The web browser's status bar?
|
|
|
|
|
yes web browser window. I am using the following code but doesn't work.
string result = LPBrowser.Document.Window.StatusBarText;
Thanks.
A.Asif
|
|
|
|
|
I'm sorry, I still don't understand. Is LPBrowser something in ASP.NET? Or is this a Windows Forms web browser control?
If it's a Windows Forms web browser, have you looked at browser.StatusText property?
If this is something in ASP.NET, I recommend you post your question in the ASP.NET forum.
|
|
|
|