jeka804's Q&A profile
Visual Basic Timer Event Error
I am getting an error when I try to change a label. Cross-thread operation not valid: Control 'Label4' accessed from a thread other than the thread it was created on. Heres the code Public Sub TimerFired( ByVal sender As Object , ByVal e As System.Timers.ElapsedEventArgs) AddHandler t.Elapsed, AddressOf TimerFired Dim x As String x = CStr (Convert.ToDouble( Me .Label4.Text) - 1) Me .Label4.Text = x End Sub I am trying to show the amount of time left in a label What am I doing wrong Davids Learning You are using a Timer from System.Timers namespace instead of the Timer from System.Windows.Forms namespace. The timers from System.Timers raise the El ...Show All
Windows Forms Alternating between two images every 3 seconds using a timer
Hello! I am quite new to C sharp and want to write a small program. I use an Mdi form with several child forms. I want to have a little picture box in a corner, possibly the Mdi form, that alternates every few seconds or so between two images continuously even while I switch between the various child forms. Is this even possible in Visual Studio 2005, and if so how Many thanks, Boombastic Just to ensure we are clear ... You can add the timer to the MDI parent. This would allow the event to be generated regardless of what is going on with the child forms. However, I don't know how you would *display* it on the MDI child form. Unless you wanted to put it as a background image of the MDI paren ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Setting transparency using SetData
I know how to use SetData to set a single pixel to be transparent. But is it possible to do something like this : http://img209.imageshack.us/img209/9149/transpqo2.gif There is an overload for SetDate method that takes an array of data as a parameter, but how do I find this data if I know only the radius of the circle One more thing, all these have to be done dynamically, so I can't, for example, set the transparency in Photoshop. Thanks in advance! Ok, finally I figured this. Example without using masks: http://www.hot.ee/qstorage/AlphaTest2.rar ...Show All
SQL Server Using SQL Server 2005 Express in a Windows peer-to-peer workgroup
Does anyone have a experience or links to resources for implimenting SQL Server 2005 Express in a Windows peer-to-peer workgroup Thanks. I don't have any specific documentation on this, do you have a specific question I'd be interested to hear if others on the forum have any experience doing this type of deployment, anyone Regards, Mike Wachal - SQL Express team ...Show All
Software Development for Windows Vista Problem with Workflow Monitor Sample
I'm, having problems running the Workflow Monitor sample. It can query the workflows, but I get a big "X" on the rhs where it's supposed to display the workflow, and returns an error that says: "Microsoft Workflow Designer" "Object Reference not set to an instance of an object". I'm using Beta 2.2. What I find when I try the VB version is that the tracking instance coming back does not have an Instance ID correctly set, even when there is one in the database. I was not able to track down the exact location of the problem, but it seems like it might be a strange bug either in the SDK sample, or the bits. I'd try - running the CS version, or testing ...Show All
.NET Development You need to add XmlChoiceIdentifierAttribute to the 'EvalDate' member.
Hello, I am trying to make a custom XMLserializer for my class. wrote a simple writeXML method for my class and it works. My class has int members. However, when I add a member of type datetime, the writeXML doesn't work anymore! This is the sort of an error i get: System.InvalidOperationException: There was an error reflecting property 'datetime member'. ---> System.InvalidOperationException: You need to add XmlChoiceIdentifierAttribute to the 'datetime member' member. here is my code for writeXML: public void WriteXml(String filePath) { StreamWriter stWriter = null; XmlSerializer xmlSerializer; xmlSerializer = new XmlSerializer(this.GetType()); stWriter = new StreamWriter(filePath); System.Xml.Serialization.XmlSerializerNamespac ...Show All
Windows Forms Button Status
Hi , I am trying to check the status of a button final in following code.its giving me " 1 Operator '||' cannot be applied to operands of type 'bool' and System.Windows.Forms.DialogResult' .Is there any other way to perform this operation. Code: private void Value7_Click(object sender, EventArgs e) { int n = 7; int i = int.Parse(textBox1.Text); if ( (i = = 0) || (final.DialogResult = = DialogResult.OK )) { textBox1.Text = n.ToString(); } else { textBox1.Text += n.ToString(); } } thanx in advance. Hi alan, Thankx for ur reply...its very simple solution..i wonder how i missed it...its working now.i am gonna add some ...Show All
Visual Studio "Unable to attach to the process" error when debuging Excel application
In developing an Excel application under Visual Studio .net, it failed to attach Excel to the debugger. From the "Process" tab, I could see the Excel application was listed as "Debugger Process". After I detatched it, clicked "Attach" and selected Common Language Runtime, I received the error message "Unable to attach to the process. There is no managed code running in the process. In order to attach to a process with the .net debugger, managed code must be running in the process before attach". The system worked without any problem before, then failed to attach to the debugger without any reason I could think of. There wasn't any change to the system during this time. The development environment ...Show All
Visual Studio Express Editions Setup problem.
When I launch the msvcs.exe or the msvc.exe they get to the point where it says " Setup is loading installation components. This may take a minute or 2." It's been like 5-10 right now, is there a fix Tyrael Tyrael117 wrote: When I launch the msvcs.exe or the msvc.exe they get to the point where it says " Setup is loading installation components. This may take a minute or 2." It's been like 5-10 right now, is there a fix Tyrael Hi I have the same problem ... i'm installing from the file vwdsetup.exe ... what can the problem be Queenyard ...Show All
Windows Forms Print Preview problem(Bug)
Hey, I have this code in the PrintDocument control under the PrintPage event: private void printDocument_PrintPage( object sender, PrintPageEventArgs e) { RtextboxUC thisrichtextbox = GetCurrentTextBox(); //Start printing text and store last letter... checkPrint = thisrichtextbox.Print(checkPrint, thisrichtextbox.TextBox.TextLength, e); //Check if there should be more pages if (checkPrint < thisrichtextbox.TextBox.TextLength) { e.HasMorePages = true ; } else { e.HasMorePages = false ; } } There are no errors, but when I test it on my program and click print preview...when it opens the PrintPreview dialog It shows the dialog that is telling you how many pages it is det ...Show All
Visual C# Cross-language.
I have a programm which supports plug-ins and there is a 'manual' how to write it on C++. I'd like to write my plug-in using C#. Here is some valuable extracts from THAT manual. 1. Base application was written with C++ and using MFC. So they begins creating plug-ins by choosing 'Regular DLL using shared MFC DLL' in MSVC. 2. Next main step is to write two functions in sample.h: class SampleClass : public CWinApp { public: SampleClass(); void OnLoad(); void OnInitialize(CMapStringToString&); } sample.cpp: SampleClass theApp; __declspec(dllexport) void OnLoad() {theApp.OnLoad();} __declspec(dllexport) void OnInitialize(CMapStringToString& str) {theApp.OnInitialize(str);} sample.def OnLoad= OnLoad@@YAXXZ OnInitia ...Show All
Windows Live Developer Forums V3 API upgrade - System error number: 1
I am upgarding from adcenter API from V2 to V3, After upgarding the wsdls, I ran the client program and getting the following error {http://xml.apache.org/axis/}stackTrace:Server was unable to process request. ---> |-1|-1|System error. Please contact MSN Customer Support and refer to this error number: 1.| at org.apache.axis.message.SOAPFaultBuilder.createFault( SOAPFaultBuilder.java:221 ) at org.apache.axis.message.SOAPFaultBuilder.endElement( SOAPFaultBuilder.java:128 ) at org.apache.axis.encoding.DeserializationContext.endElement( DeserializationContext.java:1087 ) at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndEle ...Show All
.NET Development How to animate in the console?
Hi, how can i "animate" the Text in the console, so that i can show that something is going on. e.g. . .. ... . .. ... usw. You know what i mean I've seen this kind of animation several times, but i don't know how to do that. By the way, I just noticed that this won't work as copied out of the post. The forum has collapsed the number of spaces in the Console.Write(" ") statement that I used to clear the line. Just make sure there are five spaces in there and it will work. There might be a better way to clear the line, and of course the real trick in anything like this is how to keep updating it while you are actually doing work, instead of just simulating ...Show All
SQL Server Sql server 2005 sp2 and oracle access
When I try to create a model in Report Builder based on a connection to Oracle 10g database I get the following error. ORA-02179: valid options: ISOLATION LEVEL { SERIALIZABLE | READ COMMITTED } Is this a bug in the CTP version or am I missing something The problem I have is related to the same subject so I use the same thread. I was able to build an Oracle report model in Model Designer and deploy to the Report Server. However, when I selected that Oracle report model in Report Builder, the Entities list only showed tables, and none of the Oracle views (were shown in the report model during build time in BI) showed up. Those views are required for building the ad hoc reports. I am using SQ ...Show All
Windows Forms How to extract Image metadata
Hi guys, I want to extract some specific image metada from an .jpg file. Lets me explain in more detailed : I edit some image information from Photoshop (right-click on the image window header > file info > description tab).. After editing whenever I load an the image I want to see the description, title, author, keywords etc.. With the PropertyItem I can only view the description, author and creation time (other info doesn't worth for me) but cannot see for example keywords. So my question is how can I read AND write specific metada pieces Hi, take a look at this CodeProject article on extracting EXIF information. Andrej ...Show All
