daijun's Q&A profile
Windows Forms How do I Create a MenuStrip at run-time?
I want to create a Menu strip on the form when it loads. Since this is a small app, I didn't want to drop a Dialog onto the form. I thought I could do it like an Open Dialog but I can't get the correct code. What Am I doing wrong using System ; using System . Collections . Generic ; using System . ComponentModel ; using System . Data ; using System . Drawing ; using System . Text ; using System . Windows . Forms ; namespace componentCaller { public partial class Form1 : Form { public Form1 ( ) { InitializeComponent ( ); } private void OnFormLoad ( object sender , EventArgs e ) { MenuStrip mainMenu = new MenuStrip ( ); int i = 0 ; ...Show All
Visual Studio Can Subtotal as average
We can add a Subtotal to groups of Matrix, the default summary is Sum up. Can we Subtotal as average intead of Sum I fixed my problem!! I was calling out the Row Group instead of the Column Group. Does any one know how to use the Subtotal to calculate the difference between two columns i.e. Sales for Calendar Year 2006 vs 2007. I assume you could you the InScope function. But I'm missing something....Any suggestion would be greatly appreciated! Regards, Anthony ...Show All
Visual C# sql Server Express editin conn
hi all i made the databse application in C# 2003 and sql server 2000 it creates tables and databsed when it first time loads and works fine. Now my boss asks me to instead of sqlserver2000 use MSDE with C#2003 or C#2005 with Sql express edition which i think is Extension of MSDE. i m very new to MSDE i had installed that found no GUI like sql server2005.i think its like MySQL. now i want that when my application starts it create the databse,tables as does in the sql server 2000. i ported whole code in C#2005 had tried to connect with sql express edition but ti did not work any help how to connect the C# with MSDE or EXpress edition 2005. Here is an example of connection string to SQLEXPRESS database: Data Source=.\SQLEXP ...Show All
Visual C# Sound In Form...
Hi, I was wondering if someone could provide me with some code to simply add a continuous sound playing in the background of a form I have performed a few searches but all examples are really complicated. Isn't there an easier method hi, i have a simple solution for it. we can give it in <bgsound> <head> <bgsound src="mysound.wav" loop=10> if you give loop = infinite it will play repeatedly... and if you want at server side add runat =server. i don't say its a perfect solution.but its a simple one ..try it out.. Regards Baji Prasad.B Bangalore India. ...Show All
Audio and Video Development iHDSim 0.2 ERROR (E000000005) & ERROR (E070000012)
Hello All I have a problem with iHDSim 0.2. I have working HD-DVD project for iHDsim 0.1. But under iHDSim it doesn't work. I see errors: - <Title> Using xml:base: file:///dvddisc/ADV_OBJ/ Attribute: titleNumber="2" Attribute: titleDuration="00:00:23:00" Attribute: id="Main" Attribute: displayName="DvdOne Demo" Attribute: onEnd="Main" ERROR (E070000012): Element ApplicationSegment cannot appear in its current position (Element: Title, Line: 14, Col: 10) + <ScheduledControlList> - <ScheduledControlList> | Using xml:base: file:///dvddisc/ADV_OBJ/ | + <PauseAt> | - <PauseAt> | | Using xml:base: file:///dvddisc/ADV_OBJ/ | | Attribute: ti ...Show All
Visual Basic Data vanishing during run time
When I enter data into a SQL database and save it, the data that I have just added vanishes, but when I close the applicaiton and re-open it, it's still there - is there any reason for this and any way to get it to stay I put: Me .AlbumTableAdapter.Fill( Me .Music_databaseDataSet.Album) Me .TrackTableAdapter.Fill( Me .Music_databaseDataSet.Track) after my coding, but i get the following error msg: "Cannot clear table Album because ForeignKeyConstraint FK_Track_Album enforces constraints and there are child rows in Track." I'm not sure if thats the coding what I should use ...Show All
Windows Forms Open form with button
Sorry, I would like to ask a very simple question but I can't do that how can I open a form by clicking a button Thank You I have still no idea on it ...Show All
Smart Device Development Widcomm Driver Using Iomega Dongle Not Supported When Running ActiveSync
I am running, as it appears, an unsupported dongle in the bluetooth stack - an Iomega GBU211 I can get a handshake between the computer and the device using the Widcomm software, as both pair using a serial port connection. The device, a T-Mobile Dash , then should be running on ActiveSync but since the connection was made using the Widcomm software the device can't sync, even though both the computer and the device appear to be connected. Hopefully this makes sense - any ideas This forum is smart device development related. Since your question is not related to smart device development, it's off topic here. If you’re having a hardware issue, please contact hardware manufacturer or re ...Show All
.NET Development Code access Security- when to use and when not to
Hi All, Can somebody please explain as in what types of application do we use Code access security and How CAS is generally used e.g do we add RequestRefuse for registry in every internet application. I want this classification for 4 types of applications broadly: 1. stand alone application 2. enterprise application 3. B2C application 4. B2B application I am new to architecture so just want to know as in which scenarios do we generally use CAS.Any broad guidelines Regards Thanks Nicole for the clearing my doubts otherwise i would have gone on the wrong track. It would be great if someone could put some scenarios from your past experiences where you used CAS. regards ...Show All
Visual Studio Express Editions BindingManagerBase Position_Changed Problem
Hey Everyone, I have a program that has several textboxes bound to 1 dataset which contains only one table. When the form loads, the data is displayed in the textboxes allowing the user to add, edit, delete, etc., as well as navigate through previously entered records. However, when trying to navigate through the records, it doesn't do anything. The recordCountLabel, which keeps track of the record number that is displayed, changes, but the first record stays on the screen. Here is a little of my code. Protected Enum Record RecordNum DDate Shift ATO Vehicle End Enum Private Sub Form_Load( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase .Load 'Loads data into the 'TripSheetI ...Show All
.NET Development We're not supposed to use List<T> ? ( List )
I installed FxCop and had it analyze my application. In several spots, it says: "Do not expose List<T> in object models. Use Collection<T>, ReadOnlyCollection<T> or KeyedCollection<K,V> instead. List<T> is meant to be used from implementation, not in object model API. List<T> is optimized for performance at the cost of long term versioning. For example, if you return List<T> to the client code, you will not ever be able to receive notifications when client code modifies the collection." I'm a bit weak in my OO.. so I'm not sure what "expose" really means in this context. Is this saying to not use List<T> ...Show All
Visual Studio 2008 (Pre-release) Help needed on implementing FlowDocument
I'm having problems trying to connect the zoom function to the content using Interactive Designer. Here's what I've got using the Library tools from Interactive Designer to create the FlowDocumentReader and FlowDocumentViewer. I'm very new to this hope someone can give me some guidance. Many thanks! My Objective: To create page which enables user to zoom in to text and flowing the text according to the page. <Grid xmlns=" http://schemas.microsoft.com/winfx/2006/xaml/presentation " xmlns:x=" http://schemas.microsoft.com/winfx/2006/xaml " xmlns:mc=" http://schemas.openxmlformats.org/markup-compatibility/2006 " xmlns:d=" http://schemas.microsoft.com/expression/interactivedesigner/2006 " mc: ...Show All
Visual Studio Express Editions Problem using RegisterHotKey in VC++
Using a code with a RegisterHotKey i get those error messages in linking : 1>------ Build started: Project: les_hotkeys, Configuration: stf Win32 ------ 1>Compiling... 1>les_hotkeys.cpp 1>Linking... 1>les_hotkeys.obj : error LNK2028: unresolved token (0A00000E) "extern "C" int __stdcall RegisterHotKey(struct HWND__ *,int,unsigned int,unsigned int)" ( RegisterHotKey@@$$J216YGHPAUHWND__@@HII@Z) referenced in function "private: void __clrcall les_hotkeys::Form1::button1_Click(class System::Object ^,class System::EventArgs ^)" ( button1_Click@Form1@les_hotkeys@@$$FA$AAMXP$AAVObject@System@@P$AAVEventArgs@4@@Z) 1>les_hotkeys.obj : error LNK2019: unresolved external symbol "extern "C&quo ...Show All
Visual Studio Textbox Format Missing
I'm running out of ideas here... My reports are working perfectly in the ReportViewer control, except for textbox formatting. Despite the fact that standard format codes are specified in the designer, date and numeric values display exactly as they're returned from SQL Server. Am I missing something simple here The report language is set properly, is there something else I need to do to tell the viewer to use embedded formatting Any help is appreciated. Hi, I have the same Problem! I want to format a textbox with Decimal "D2" Format but it doesn't work! I had also tried to give the Textbox the Value =FORMAT(Expression,"D2"), but that also doesn't work! The only thing I ...Show All
Visual Studio Express Editions Calculation formulas
In my wee banking database I have the expected three columns ie: deposit, withdrawal and balance. I have never used formulas before in excell, programming or anything and after searching on the web for the last two days to find out about them I am at my wits end. Could somebody please explain how to get these columns to add/delete and update the balance column. and where/how to put the code. Do I use the Formulas property in the database property for the balance column if so what do I type. Im desperate to make this part work so any help would be great. Diane This is what i use to do something similar. On a form i have a datagridview with my table, the table is in the (datagridview). b ...Show All
