Answer Questions
Jagdeep Sihota Stop Window Position Autosave When Automating(COM) Word
Just a small project to utilize Word spellchecker. I'm using the technique of assigning the Top or the Left property of the Word.Application object to put it off-screen in combination of Visible=FALSE, so it will never flash when Quit() is called at the end of the process. However, the window position is being autosaved as the default for standalone Word. Is there a setting to prevent Word automation object from saving any setting ...Show All
Cereal123 Events question
hello there again people. i have been confused in c# events programming. i have this code and i have a form with 1 button named button1. thanks to both of you. so thats how to approach events programming as well. ;-) Hi, the issue you are having is that the event keyword is really a bit of syntactic sugar. When you class is compiled each event is really replaced by a class field of the type of delegate associated with the event and two new methods are added that allow you to add delegates and remove delegates from the underlying multicast delegate, initially this delegate field is null. So when you raise an event it is really invoking all of the delegates in the underlying multicast delegates invocation list, if you have ...Show All
gabit7 Adding records usnig binding navigator on datagridview
hi im having a problem such that if i am adding a row using the addnewrow button on the bindingmanage. and i do not press the save button and try add a new row. the row i wanted to add is lost. i want to be able to save that row first via code. please let me know what to do im puzzled with .net 2005. insert action i cannot find that. Try BindingNavigator1.EndEdit(); If it doesnt than DataGridView1.EndEdit() or the bindingSource.EndEdit(); That function commits all the changes to the dataSource. I had the same issue on one of my projects Oshri Cohen - Simboliq.com In the binding navigator's properties set its insert action to none. That will prevent the built code from running What i want to do is that is ...Show All
R1ZWAN Dataset designer problem using sql IN clause
I have a query that works just fine agains the database using an in clause. where id in (5,6,7) However, when I try to use the dataset design and build a query using a in clause the designer is apparently looking at the data type of id and only allow me to pass in a valid integer for the parameter for the in clause. where id in ( ) I have tried change the parameter definition and actually specify that the parameter is a string but it still complains. Anyone know how to fix this Thanks I thought it might help to show the stack trace for the error that I get when running the sql with the offending parameter. Conversion failed when converting the varchar value '23,96' to data ...Show All
noname2513788 Try catch standards
Hi friends.. In a single button click, I am calling two services which will return two different exceptions. for this i need to implement the 'Try Catch block". do i have to implement two try blocks for each service calls and two catch blocks for handling those exception or i have to implement a single try block for both the service calls and two catch blocks for handling the two different exceptions Is there any difference between this approches.. which is the standard one Thanks in advance, Ram Babu It is more than a standart, these two ways change the behavior of your program. If you implement one try and two catch blocks and if the first call causes an exception than ...Show All
genie_ Binding Source Question
Okay. Here's a tough one for all you experts out there. I have a form with several textboxes and comboboxes. There is a button on the form that will open another form. Each form has it's own tableadapter. Both tableadapters share a common field called Card_ID. I have created a relationship between the two tableadapters joined with the Card_ID field. Here's my problem. When the user clicks on the button on the first form, I need to "save" the record in order for the data that is entered into the second form to "save" because the relationship requires a Card_ID in a record on the first form in order to match it with a Card_ID from the second form. I've been able to do that, but when the user closes the second form, th ...Show All
Jassim Rahma Disappearing Addhandler??
I am having a problem with an AddHandler that I've created to enable/disable buttons used to navigate between records: AddHandler Me .BindingContext(dsFin.Broker).PositionChanged, AddressOf Me .OnPositionChanged The addhandler is in the form constructor code. The problem I am having is that the addhandler line disappears intermittently which stops the firing of this event: Public Sub OnPositionChanged( ByVal sender As Object , ByVal e As System.EventArgs) If Me .BindingContext(dsFin, "Broker").Position = 0 Then btnFirst.Enabled = False btnPrev.Enabled = False ElseIf Me .BindingContext(dsFin, "Broker").Position = 1 Then btnFirst.Enabled = False bt ...Show All
gauls VS2005 MyApplication_Shutdown not getting fired.
We are developing windows application in VS2005 (VB.Net). I have placed resource clearing and audit entry in the "MyApplication_Shutdown" event. But this event is not getting fired when our application exits. When I tired with the sample application, in our system it works fine. I don't know whether I have disabled any setting so that this event does get fired. Note: I have checked application framework checkbox in application settings. I followed the sample and had no problems hitting Shutdown. Is your event handler really in the partial MyApplication class of your vb project Does the function declaration end on Handler Me.Shutdown -- SvenC Project + properties, Application tab ...Show All
Teradar Application.Run(...)TargetInvocationException -> OperationCompleted already called
Hi. I get above mentioned error after my Application finished and the programm trys to call Application.Run(...) again. I have a Backgroundworker-Thread in the application and I think that this is somehow causing the problem. I just don’t know why. I set the the backgroundworker to "supportsCancel" and have already tried to explicitly cancel the BW. Still, the problem presists. Does anyone know how to solve this or at least where to look for an answer Thanks in advance. Brokit I think you are trying to "resurrect the dead." Post the logic on how you call the Application.Run() again. My initial guess is that you are passing the same object reference that has already terminated to the second cal ...Show All
stellag Get Item in ListView
Before posting this i did search but couldnt find a solution so i am asking for help........ again Lets say you had on a ListView 5 Items(user names) and each have 2 SubItems (age, gender). The view is set to Details with click event enabled. Ok if i click on a user name (Item) in the Items list, how can i make the name i clicked on appear in a textBox1 Any useful links would also be great. thanks Im using VC++ this is my Event Handler: private: System::Void ListView1_ItemSelectionChanged(System::Object^ sender, System::Windows::Forms::ListViewItemSelectionChangedEventArgs^ e) { textBox14->Text = e->Item->Text; } these are the errors im getting: ------ Build started: Project: Test, Configuration: Debug Win32 -- ...Show All
jods Setting the icon for a form
I created an icon, then clicked on the form, then went to the form's properties and set the Icon property to point to the icon file. What I want is the icon to show up in the title bar of the form, and show up on the taskbar when the form is minimized. But, this isn't working. I'm puzzled because I thought that was what the Icon property was for. Oh, the form's ShowIcon property is set to true. I'm using Visual Studio 2005 and working in C#. I did the same steps as you and it works for me. ShowIcon is true, Icon in properties window is set to the icon file in my folder. Icon appears in title bar and taskbar. Can you look at the icon file in Visual Studio and look at the device field Look at the ...Show All
Dave U. DataGridView standard practice?
OK so here is the deal. I would like to know what common practices are out there relating to my problem. First I have a class that defines a Question that has the following fields (QuestionID, CategoryID, QuestionText). I created a DataGridView and bound it to the object representation of Questions so all of the columns were generated in the designer as well. I set the bindingsource at runtime and things look fine. The grid contains all of the raw data. Now, I want to modify the grid to show the category name rather than the ID. The category name can be found in a lookup table. Note, I do NOT want to modify the Question class to contain the CategoryName and do a JOIN in the procedure to get the data. I want to keep the object ...Show All
JIM.H. Reduce the height of textbox control
By default the height of the textbox is 20, I try to change to 17 but it back to 20 again, do you know a trick to reduce less than the minimun of 20 thanks in advance for your help, Edward Hi Edward, If the TextBox.MultiLine property is false, you can only change the height by changing the font size. If MultiLine is true, you can size it anyway you want. HTH, Mike do you know where I can find a free textbox control that handle OnPaint, and get control's border to any height and width base in control's size thanks for your help, but I don't like to use a multiline instead one-line textbox, I choose use OnPaint but I don't have the expertice to do it. ...Show All
Ross Watson How to turn off "AutoGenerate" of columns when a DataGridView is data-bound
I have a Windows form that has a DataGridView on it. I have bound the DataGridView to show data, that I specifed, from the database (I defined the cells that I want to see through the property page). But, the DataGridView is showing the cells I defined AND the data being returned from the dataset. So, the question - what property do I set to turn off the default columns being returned from the dataset With a web app, there is an "AutoGenerate Columns" that you set to true or false. What's the WinForm equivalent Thanks, Dexter I just had the same problem and it was because I was setting the datasource before I set the autogeneratecolumns to false. So I think it was binding, getting the data, then setting it to f ...Show All
vdv_phuong MSB3187 Referenced assembly ' ' targets a different processor than the application using MageUI but not in VS2005 build
I have a C# application that I'm trying to deploy, it contains a number of dlls one being a C++ dll. When I build the application (referencing the C++ dll) in Visual Studio 2005, it builds and publishes without any problems. I want to move the application to a live server so I'm using MageUI to change the Start Location. When I load the application manifest and then load the files; I try to save the manifest and get the MSB3187 error. I checked the C++ project and the Target Environment is set to "Not Set" and the my application is set to Any CPU. Are these compatible and if not do anyone know what they should be Regards Alan Alan S wrote: Have you tried to moved the applicatin to a dif ...Show All
