Dhileep's Q&A profile
Visual Basic Replacing and Writing to a .doc
I have this dee.doc that has a [name] in it i want to replace that with Demetrius and write that line to a new word doc called deee.doc that i am creating...It creates the document but it does not write to the file the info .....what am i missing...any help thanks Dim sr As StreamReader = New StreamReader("C:\dee.doc") Dim doc As FileStream = New FileStream("c:\deee.doc", FileMode.Create) Dim sw As StreamWriter = New StreamWriter(doc) Dim str As String Dim bl As Boolean = False Dim str1 As String bl = False Do While Not bl str = sr.ReadLine() ...Show All
Software Development for Windows Vista loading workflow from xoml file
i save workflow in xoml file now when i load it back its loads fine but i had to cast it into prope type can any body give me better way of doing it ..... XmlReader xmlReader = XmlReader .Create( "seq.xoml" ); WorkflowMarkupSerializer serializer = new WorkflowMarkupSerializer (); seq. Workflow1 wf1 = (seq. Workflow1 )serializer.Deserialize(xmlReader); WorkflowInstance wfInstance = wfRuntime.CreateWorkflow(xmlReader); wfInstance.Start(); I mean simply using Activity type for wf1 not works .... First, create a new file named ActivationSample.xoml and add the following to the file: < Sequ ...Show All
Smart Device Development How to retrieve IMEI of pocket pc phone ?
Dear all, In addition to the unique device identification number, I would like to retrieve IMEI of pocket pc phone, please advise (using native VC++ and VS2005) Hi The extended TAPI API lineGetGeneralInfo returns the requested infos. There is a sample in the Windows Mobile 5.0 (Pocket PC and Smartphone) SDK under <.\samples\CPP\Win32\Cellcore\Extapi> This a privileged API - depending on the devices security configuration you might need to sign your application with a privileged certificate. Hope this helps. Michael ...Show All
Visual Studio Tools for Office Word Template from ASP.NET
Hello, I need to load in IE from a web server (IIS) a custom word document which I created with Visual Studio which has a custom button in Document Actions which does a copy paste action. The problem is that when I acces the word document in IE the button doesn't load and I have the following erros: The customization does not have the required permissions to execute. ************** Exception Text ************** System.Security.SecurityException: The customization does not have the required permissions to execute. at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.HandleOnlineOffline(Exception e, String ba ...Show All
Software Development for Windows Vista EventSinkActivity Parameters
I have a workflow with an event sink activity. When i Raise the event that fires this activity i want to pass a parameter (the id of the user who raise the events). I have added a int in the eventargs class that inherits from WorkflowMessageEventArgs, but i don't know how to catch this parameter in the method that executes in the workflow when the eventsinkActivity is called: private void MethodForEventSinkActivity( object sender, EventArgs e) { //I want to catch the id of the user that raise the events here!! } Thanks in advance Javier aschapiro wrote: You can bind the parameter you want to u ...Show All
Windows Forms Hiding inherited members
This should be an easy one. How do you hide inherited members of a class that inherits from the UserControl. In order to use this control easier it would be a plus to not have such a huge amount of options show up in Intellisense. I know I have seen the solution somewhere, I just can't seem to find it right now. :p ...Show All
System Center MOM Reporting Server
Why doesn't the MOM Reporting Server show any utilization numbers Cheers Dave Currently, the MOM Reporting Server is included only for disk sizing purposes. This issue will be addressed in future releases. ...Show All
Smart Device Development Show busy state on mobile device
Hello, in my C# program I’d like to show the usual moving busy symbol when program is busy on mobile device ( WinCE 5.0). But I can not find "How to" in documentation. This concerns .NET2.0 Compact Framework. Thanks for help, Jorg Hi Jorg This symbol is just the wait cursor. You can set this wait cursor as followed: Cursor.Current = Cursors.WaitCursor; The usage might look like this: void SomeEventHandler (EventArgs e) { Cursor oldCursor = Cursor.Current; try { Cursor.Current = Cursors.WaitCursor; // set the wait cursor //Do some work } finally { Cursor.Current = old ...Show All
Visual C# Multifile Assemblies???
How do i add a static member using the class view...this static method should be named Add() that returns an int value and accepts two int parameters first and second Dpowers, Well, some people thinks that a college graduation is enough, some people think that any certification is a good thing. I think MCAD is a good certification for developers, maybe a MCSD certification is a better choice for software engineers 'cause it evolves all the life cycle of a software. But you must be aware, Microsoft will release the .Net Framework 2.0 next november 7 and the certifications rules will change. See this article: http://mcpmag.c ...Show All
Visual Studio Express Editions Command object
In Visual Basic.Net 2003 there were oleDbCommand objects which I used to create a select statement. I then created an oleDbDataReader in code. The command object then executed the reader object which I used to fill my comboBox with items. I did this so that I could update the items in the combobox from another form and so the comboBox would put the string in my database field and not the ID. My question is: I don't see the command object and not sure how to do the same thing in VB2005 Express ummmm. . . you were setting the combobox.datasource to a datatable/ArrrayList and specifying the DisplayMember a ...Show All
Visual Studio Express Editions How can open file in my project by double click on it ?
Hello, How can I open *.txt or *.doc fles in my project by double click on it like notepad or Wordpad please try to explain the idea, this will be helpfull in alot of projects in the future Thanks. Hi, here is the code that will open an file with its default associated program: Process.Start( "c:\\CommunicatorMobile_PlanningDeploymentGuide.doc" ) hope thats what you were asking for. ...Show All
Visual C++ OnTimer() not being fired up.
hey guys, i have timer set like follows: UINT TimerVal; TimerVal = SetTimer(406, 50, NULL); and i added in header file: afx_msg void OnTimer(UINT nIDEvent); and in cpp file i have: void CEditorDlg::OnTimer(UINT nIDEvent) { char finalFps[100]; strcpy(finalFps, NConvert::IntToChar( _entityEngine->getFPS() )); m_lblFPS.SetWindowText( _T( finalFps ) ); CDialog::OnTimer(nIDEvent); } and : ON_WM_TIMER(). so when i put a break point int he ontimer function, it doesnt stop at it. therefore i understood that the timer wasnt started, but the TimerVal result i got had value 406, so i assumed that it already started. does anybody know why ...Show All
Windows Forms OnVisibleChanged quagmire
I have a control that is becoming nonvisible and I cant seem to find the source. What I thought would be an easy problem to solve by hooking the OnVisibleChanged event, turns out to be a confusing and difficult problem. Hooking the controls OnVisibleChanged event did not allow me to determine when the control was being hidden. In fact, the event never fired (and the parent is visible). I understand a bit of the background that child controls do not receive this event if their parent changes visibility and that the Visible property will return False if any parent in the parent chain is not visible, but I evidently don't understand when and wh ...Show All
Visual Studio Express Editions TextBox/Label indexing
Hello Is there a way to display a string value in a textbox or label and then be able to overwrite that value for the next instace of the string. For example I am reading a battery voltage off of a probe and I want to display that value and then when a new value is available I want it to be overwritten where the old value was without using the TextBox.Clear(). I was thinking if there was a way to reset the testbox index back to 0 so that it thinks it is displaying the value for the first time. The only way I have got it to work is by using the clear command which makes the value flash on my application. Without using the clear comman ...Show All
Windows Forms ContextMenu Key Handling
I am programmatically creating a ContextMenu and displaying it using the Show method in a KeyDown handler for my control. I am running into a problem when the KeyDown being handled is the same as the first letter in the Text of the first MenuItem in my ContextMenu. The problem is the Show method returns right away and sends the Click message for that first MenuItem, so the result is that whenever the user presses the 'M' key, which causes a menu to appear, the first item, "Maximize", is always selected. If I change the name of Maximize so it doesn't start with an M, or change the key that displays the ContextMenu from M to ...Show All
