Answer Questions
mrcaseyjr Unable to insert new register in database
I am trying to insert a new register in my database. I have created the TableAdpater for it and set the GenerateDBDirectMethods to true, so I have the Insert/Delete/Update methods available. I have a form with just one button that I use just for testing. Every time that I click that button, the following function is called in the OnClick method: MyDataDataTable.Insert("sample text","sample text","sample text","sample text"); Right after I click that button, I return to the Visual Studio 2005 Server Explorer and open the table, but no data has been inserted. Thanks for helping me. hi, i'm not sure about your code to update the database you suppose to ...Show All
r3n Are a DLL's Application-scoped Settings stored anywhere outside the DLL itself?
Several other posters have noted that when a DLL contains Application-scoped Settings, their values seem to be hardcoded within the DLL, rather than saved in an external file: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=883112&SiteID=1 http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=897534&SiteID=1 http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=989609&SiteID=1 That's apparently unlike the Application-scoped Settings of an application , which get saved in <appname>.exe.config, and User-scoped Settings of a DLL, which get saved in user.config files. Using IL DASM, I can see Application-scoped Settings stored within the DLL's Properties. Can anyone confirm that these Settings are indee ...Show All
The Cullenator How to get App.Config file path if it is created along .cs files
Hi In my C# application, I have created an App.config file in C# source file path and this is no way related to the assembly or exe location. when I try using System.Configuration's method and properties I always have found it returns the assembly/exe path but I need to get the source path. Note : Main idea behind this is, I have created some xml elements in App.Config file and I will load this xml using ConfigXmlDocument instance. Thanks.. GopX just add ".config" to the assembly name you get back. As for the configuration subsyste stuff - just load the config file in an XML dom and grab your stuff. The path to a sou ...Show All
NVITGuy MouseOver Event
Hi there. I developed an application which shows the colour of a pixel when the mouse moves over it. My problem is that when the mouse is over the picture box, before an image is loaded, I get the following Null Referance Exception message: "Object referance not set to an instance of an object" What I have to do to overcome that problem I would really appreciate any help of you. Thank you in advance. NM PS: Here is my code... using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace PictureViewer2 { p ...Show All
Biggo Integer (Unit) Conversion Help ---
I have an integer in the unit bytes (like kilobyte and megabyte). How can I convert it or multiply it so the unit is in gigabytes (GB) Thanks, Using this line should solve the problem: string HardDriveSize = string .Format( "{0:0.00} GB free of {1:0.00} GB" , (drive.TotalFreeSpace / (1024.0 * 1024 * 1024)), (drive.TotalSize / (1024.0 * 1024 * 1024))); This are the things that didn't work - A 1024 was missing. - Division is neccessary instead of multiplication. - You need to get a float result to get decimal places that's why I used at 1024.0 some point (you may also cast to float) - The formatting should be 0.00 Hope this helps. I have run into a problem ...Show All
jshepler Unicode Byte to string
I need to print some greek characters like αβδ from my C# program. By using Hex Editor, I know their HEX (or byte) value is CEB1, CEB2 and CEB3. So now, how should I construct the data and print it from my C# program I can't do this anyway. String temp = "" + 0xCEB1 + 0xCEB2 + 0xCEB3; It printed out as some numeric value. Ps. I don't want to hardcode the αβδ characters into my source code. What can I do Please help me. Urgent. I will grade you. Promise. Thanks Hi MVP, It doesn't work. When I printed it out, it appeared as However, I found something very strange. When I opened HEX editor, I found that values of the data are CEB1 CEB2 CEB3 for αβδ But, from char ...Show All
xshua How to capture screen with DirectX?
I'm trying to build a program which record desktop screen change. My program must capture screen at least 10 times per second. I'm currently using GDI to capture screen, but it take ~50% CPU usage. I think that capture screen with DirectX is better solution, but I don't know how to do this. Please help me Is there another way to record screen The screen is drawn using GDI, you need to use GDI to capture the screen. Doing this in C++ is probably faster than in C#. sukhodolin wrote: Nguyen Duy Linh wrote: TightVNC use minor driver (http://www.demoforge.com/dfmirage.htm) to capture the screen. I installed DemoForge Video Hook Driver, but I don't know to capture the screen with this driver. Please help me. ...Show All
nerdyome RE : XML to C# class file
hi every one, iam using .net 1.1 asp.net and C# i got a xml file which contains the configuration details in it. user may added any details or delete any details in it. i need to convert the xml file in to a class file. it does not contains any standard structure user may add what ever he like. Is there any way to convert the xml file to a class file .. thanks for your valuable information XAML is the new "layout" used by Windows Presentation Foundation in .NET 3.0. A variation on that format is MyXaml - http://www.myxaml.com (which is what I originally used) which does similar things but can be expanded to do just about anything. MyXaml has source code so you can modify it if needed. For X ...Show All
NeTBaPb how to konw? and which? Form and panel?
I have create a Form and add 104 panels at it, that panels are every key at the keyboard. :D I have give every panel a name; example p1, p2, pW and pE. To that i have added contextMenuStrip1 to all keyboards panels... When you right click at a panel you can choose forward, back, turn left and jump and so on... Now i need to know how to create some "if" to easy know which panel i have right click at. And add some color to it Yes i have some more to ask you for... need to know how to easy send data from a midChildrenForm to other midChildrenForm thx for help, sory for my english... Set MouseDown event of every panel to panel_MouseDown and in event handler put this code: private ...Show All
help-linux How to automatically close the parent form when the child closes.
Hi, I have an application that uses 3 forms. Form1 contains 2 buttons - A and B. If you click Button A, then Form2 loads and Form1 is hidden. If you click Button B, then Form3 loads and Form1 is hidden. What I need to be able to do, is once Form2 has been completed by the user and then closes (by the user clicking the Finish button), for Form1 to close automatically, rather than unhiding the form and then the user having to click the button... I've searched quite a lot on how to do this, but can't find an answer. Either I'm searching for the wrong thing, or .... Could anyone provide any hints on how to do this Thanks. You're probably using .NET 1.1 Just replace FormClosedEventArgs with EventArgs or recr ...Show All
ArcaArtem How To iterate Through array 2 dimension
how to eterate through array which have 2 dimensions from 0 to 255 and the result of looping must be array also 2 dimension the the first number is to represented number and the column the number represented how this number repeated in the array .... for example [ 0 0 0 1 1 8 8 5 ] [1 2 1 5 5 5 6 6 ] the target array from this array must be as follow : [0 3] [1 2] [8 2] [5 1] and [1 2] [2 1] [5 3] [6 2] Please help me for this problem just for i'm still fresh graduates yes all issue for me is : i have single input array with 2 dimension . the output which i need is represented as 2 array with 2 dimesions , or i explains here for u as the previous example i want to figure out how many ...Show All
raghu_grdr Compile Solution Manually
How do I compile a solution file in C# I know how to compile a .cs file, but how about a .sln file (Not in C# Express) If you're using .NET 2.0 then you can use msbuild.exe. It is installed in the .NET Framework dir so you need to have that dir in your PATH (usually C:\Windows\Microsoft.NET\Framework\v2.0.50727). ...Show All
Koluns81 Visual Studio 2005 tabs missing
For some strange reason the tabs at the bottom of certain designers aren't showing up like they used to in VS.NET; is there some setting I've inadvertently turned off e.g. when I double click on a Windows Form and it loads up in the designer, I have to either right click and select "view code" or press F7 to get into code view. The tab(s) that was there in VS.NET have gone missing :( Dave, Could you mark your own reply as 'answer' so the thread is markes as solved Thanks, Hi, It's possible to configure VS 2005 to either use Tabbed Documents & Multiple documents. Maybe this option is set to 'Multiple Documents'. Choose 'Tools - Options' and check the 'Environment - General ...Show All
Hazara Casting a generic collection to another generic collection when the generic types are related
Is there a way for me to cast Collection<C> to Collection<ICar> when I know that C is constrained to inherit from ICar This code doesn't compile: "Cannot convert type 'System.Collections.ObjectModel.Collection<C>' to 'System.Collections.ObjectModel.Collection<ICar>" class GenericCollectionManager <C> where C : ICar { private Collection <C> myConnections; Collection < ICar > Connections { get { return ( Collection < ICar >) myConnections; } } } No you cannot do this; unlike arrays generic collections are not covariant in C# (though I believe the CLR does support it). With arrays if B derives from A t ...Show All
Tiarnan how can i send mails from my application using Outlook Express
hi Everybody, Iam doing simulation of MS PAINT ..Here i want to send send mail using outlook express ...similar to ms paint FILE-->SEND menu item ..we have to use add ins forthat.. Hi I think you have two solutions for this: or you try and use the outlook object model for this (visual studio tools for office) http://msdn2.microsoft.com/en-us/office/aa905533.aspx or you use the System.Net.Mail namespace for it http://msdn2.microsoft.com/en-us/library/system.net.mail.aspx http://www.codeproject.com/vb/net/epsendmail.asp my preference goes to the latter ...Show All
