nailers67's Q&A profile
Visual C++ running unknow methods
Hi, I have a object with 'function attribute' - void (*function1)(CString); Another object have a function what i want to call from first object. I made code like this, but if the called method is member of some object this syntax doesnt work. How can I write it Thank you class CRAPIFunc { void (*function1)(CString); void runMethod(void) }; CRAPIFunc::runMethod(void) { function1(); // run unknow method !!!!!!!!!!!!!!!!!!!!!!! } //--------------------------------- class AnotherObject { void FunctionToRun(void); void assoc(void); } AnotherObject::FunctionToRUN( ...Show All
Visual Studio Express Editions I need some help with thread and key pressed
Hello Here's my problem: I have a GUI-program with to buttons, start and stop. When you press start the program shall begin and stop ends it. You don't see the program cause it's running in the background. What shall happen when you press 'start' I would like to have a listener on my keyboard, and when there is typed in a code followed with F1-F4 it shall but that code in a String and do different things when pressed F1-F4.... Eks. I'll type '2421fdsf' on my keybord followed with [F1], than it shall write "hey world + code", and when [F2] is pressed it shall write "End + code"... It's just an example, in the real th ...Show All
Windows Forms TreeNode custom editor
I want some of the nodes in the TreeView to be edited with calendar control. Is it possible in .NET to do it Thanx. I was able to solve this. Just in case anyone else will need it I post a code example. using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; namespace WindowsApplication1 { /// <summary> /// Summary description for Form1. /// </summary> public class Form1 : System.Windows.Forms.Form { private System.Windows.Forms.TreeView treeView1; private System.Windows.Forms.DateTimePicker dateTime ...Show All
Visual Studio Express Editions Filecopy("c:\xx.txt","\\Lan\Folder\xx.txt") error
I need to replace File of Share folder. But I show Error as "Process can not access to file \\Lan\Folder\xx.txt it is being used by another process" That I am sure that File is not used and Folder is share Full access. Please help. PS : Other Function such as Kill(" \\Lan\Folder\xx.txt ") also Error. I would check with your Network Administrator. He/she should be able to tell you who has the file open. If you believe it's a process on your machine you could always use the free Process Explorer utility: http://www.sysinternals.com/Utilities/ProcessExplorer.html ...Show All
SQL Server Failing a SSIS Script component
Hi When there is an error in one of the rows a script component (in a child package) is processing I want to fail the child package and the parent package and not continue processing any rows. How do I do this I have every thing in the script component in a try catch statment. This is the catch block Catch ex As Exception ErrorMsg = ex.Message + " " + RecordMsg + " Error on Column : " + ColumnMsg ComponentMetaData.FireError(0, ex.Source, ErrorMsg, String .Empty, 0, False ) End Try Also I have the FailPackageOnFailure and FailParentOnFailure properties set to true and the max errors val ...Show All
Visual C# Threaded Controls
I'm a little confused on how to show a progressBar with style continious on a seperate thread. Do I need to create the progressBar at runtime...or can I pop one on the form and just invoke it Style Continious can just be set in properties...with nothing really to do in the threadproc...know what I mean My form is also getting very "crowded"....mucho hidden panels groupbox, etc. Rather create at runtime and just bringtofront....let it run...and then abort when finished. TIA You can add the control dynamically, at runtime. See "To add a control to a form programmatically" in this doc . You'll still need ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Render final scene to Texture in Shader [FX Composer]
I want to save the final rendering of my shadowed scene to a texture (see below). I would like to know how to render to an 800x600 texture directly in the shader. I am using the FX Composer from NVIDIA. I would've thought I could simply add the following as the final pass of the shader: pass Bg < string Script = "RenderColorTarget0=TexFinal;" "RenderDepthStencilTarget=TexFinalDepthMap;" "RenderPort=;" "ClearSetColor=ClearColor;" "ClearSetDepth=ClearDepth;" "Clear=Color;" "Clear=Depth;" "Draw=buffer;"; > { VertexShader = compile ...Show All
Smart Device Development Playing sounds
HI im writting a new program and i need to be able to play sound files. Mp3 files prefered but i can use wave files or anything else that works. Forgetting to post probably ill put it in my sig. I use vb.net 2005 for smartphone 2003 Thanks all I simply lost the dogbark.wav file on my smartphone when I did the reset. Can anyone please tell me where I can download it or a way I can retrieve it again. I searched the device and for some reason it has disappeared. I called Cingular and they wont help me and said I should call Microsoft. I called Microsoft and they wanted to charge me like $70 bucks to send me the file. All I need is thi ...Show All
.NET Development Framework 1.1 Oracle .NET Data Provider -> CommandTimeout?
Hello, does anyone know if there is a possibility to set a command timout for the Oracle .NET Data Provider like for the SQL-Server with SqlCommand.CommandTimeout Thanks in advice! Best regards, Kris Are you sure the Oracle Command doesn't have this property I don't have it available right here, but CommandTimout is a member of the IDbCommand interface. If the Oracle Command implemetns this interface -which is very likely imho-, it should have this property as well. ...Show All
Visual Studio Tools for Office insert a picture into a word document using c#?
1.how to insert a picture into a word(2003) document using c# 2005 2.how to replace a exsiting picture with a new picture in a word document using c# thanks all of you. i have solved the problem. //the following is the key code in c# //using ...... ....... string fileName = "c://msdn.bmp"; //the picture file to be inserted Object oMissed = doc.Paragraphs[2].Range; //the position you want to insert Object oLinkToFile = false; //default Object oSaveWithDocument = true;//default doc.InlineShapes.AddPicture(fieldName, ref oLinkToFile, ref oSaveWithDocument, ref oMissed); ....... ...Show All
Visual Basic textbox value control
I want to write that code. but it hasn't been working. I tried this code: If Left(TextBox2.Text, 3) = "ABC001" Then ComboBox1.Enabled = False End If this code replied me " public property left() as integer has no parameters and its return type cannot be indexed " How can I do to work please help me! Use the SubString method: Dim left As String = TextBox2.Text.SubString(0,3) If left = "ABC001" Then ComboBox1.Enabled = False End If And as the other awake users saw to, you substring a string with only 3 characters and then compaire it with a string ...Show All
Visual C# Sine
Hello, The sine of 2*Pi = 0 but this peace of code: Math .Sin(2 * Math .PI) gives: -2,44921270764475E-16 What is here wrong, DIII Hi DIII, The number -2,44921270764475E-16 in decimal format is equal to -0.0000000000000002449212707645, which for all practical purposes is zero. You can test the same by using following code class SinTest { public static void Main() { Console .WriteLine( Convert .ToDouble( Math .Sin(2 * Convert .ToDouble( Math .PI)))); Console .WriteLine( Convert .ToDecimal( Math .Sin(2* Convert .ToDouble( Math .PI)))); } } ...Show All
Windows Forms panel vs usercontrol
What extra features does a UserControl offer over a Panel if both are placed in a form Since a form has already has "advanced focus management", a Panel seems to act like a UserControl. I am making a chat control with the standard two textboxes for input and output. I want to be able to put the control on tabpages. Is it better practice to use a Panel or UserControl to contain the textboxes I am also making a toolbar-like control with a collection of custom buttons on them. -Michael The main differences between a UserControl and a Panel is that you get visual designer support when you inherit ...Show All
Smart Device Development How to shut off PDA (wince ) background light by prgoram ?
I just want to shut off background light temporary , not permanent . it mean when I touch the screen of pda or hit the keyboard , background light can light again . I know the power button of pda can shut off the light , but it also let pda sleep , it would pause the current program , but it is not I want to do . thanks for your help ! calvin no , when I set off background light in the standard power settings menu . it can not light up when I touch the screen or hit the keyboard button . do you know what I mean ...Show All
.NET Development What's wrong with this XLST File?
Hi everyone, I want to use this code: Dim xslt As New System.Xml.Xsl.XslCompiledTransform xslt.Load(xslDatei) xslt.Transform(xmlDatei, ausgabeDatei) to transform a xlst file. But VS keeps on teeling me that something with the xslt file is wrong (but not exactly what it is). Can you have a look on this file please : < xml version="1.0" encoding="iso-8859-1" ><!-- DWXMLSource="Customers.xml" --><!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> <!ENTITY copy "©"> <!ENTITY reg "®"> <!ENTITY ...Show All
