visual-studio-2010

disabling a button on form 2 from form 1 with a checkbox

僤鯓⒐⒋嵵緔 提交于 2021-01-29 18:06:23
问题 I have two form objects: form1 and form2 . I have 1 button on form2 and a check box on form1 . When the check box is checked, I want to show the button and when it is unchecked I want the button to be disabled. I know that in visual basic I did such a thing like this: form2.button.visible = false How would I do something like this in c# ? 回答1: In general case (when Form1 and From2 instances are independent) you can do something like that. In Form2 implement a public property : public partial

CPP - using * or & to return address

痴心易碎 提交于 2021-01-29 17:56:04
问题 I am writing a code to make a linked list. one of the function I wrote in order to make a linked list easier in the main function was[node is the name of a struct conatains a.data b.pointer name next) : node& create_node(int value) { node newitem; newitem.data=value; newitem.next=NULL; return (newitem); }; When I write the function like this everything is ok but I want to write the function header as : node * create_node(int value) But when I write it that way and I write return *newitem; I

The 'CodeFile' attribute cannot be used without an 'Inherits' attribute

懵懂的女人 提交于 2021-01-29 10:12:51
问题 I'm new to building .net applications and I have done alot of research on this, I'm trying to publish a series of asp.net web pages and having been researching why the error is appearing and trying several ways to stop the errors. I've come to a dead end..So I get two types of errors which are : Error 166 The 'CodeFile' attribute cannot be used without an 'Inherits' attribute. C:\Users\Aj\Code\admin\content.aspx 33 and Error 148 Could not load type 'MasterPage'. C:\Users\Aj\Code\admin\content

Retrieve video file stored as VarBinary in SQL Server Express database

て烟熏妆下的殇ゞ 提交于 2021-01-29 07:28:10
问题 I have been asked to create a web site in Visual Studio 2010 using C#, where I need to upload, download and play video files, a lot like youtube. I have done the uploading part, but I just can't get the downloading and playing the video from the database part. Here is the code, I have been using on the page where download and playing will take place: Table details: Vid_Id (int), Video_Name (nvarchar), Video (VarBinary), Video_Size(bigint), Added (nvarchar) Default.aspx <asp:Panel ID="Panel1"

What am I missing in my approach to add new records to my database in VB.NET Applicaton?

徘徊边缘 提交于 2021-01-29 05:41:49
问题 I have a data table (Named "Effects") from Access in my VB.Net Userform. I have two buttons (AddEffect.Click and SaveEffect.Click) that use ADD NEW , END EDIT and UPDATEALL . This works whilst the app is open. A new record appears in the GRIDVIEW with the Data I inputed into the various textboxes. Private Sub AddEffect_Click(sender As Object, e As EventArgs) Handles AddEffect.Click Me.EffectsBindingSource.AddNew() End Sub Private Sub SaveEffect_Click(sender As Object, e As EventArgs) Handles

C MySQL error “fatal error LNK1107: invalid or corrupt file: cannot read at 0x368”

旧街凉风 提交于 2021-01-29 04:24:24
问题 first off i'd like to start by explaining i am new to none web based programing languages, so this is really all new to me. But ive been trying to solve this problem all night and cant seem to get it. so I just installed a bunch of MySQL libraries. I create links to all the libraries and since I have done that, this error message has been popping up.I did a little bit of research on it, and it appears that the sarah message is happening because I'm using the dynamic library.but I have

Microsoft C++ compiler have a bug?

断了今生、忘了曾经 提交于 2021-01-29 03:57:18
问题 usigned int x=1; signed int y = -1; double z = y * x * 0.25; I'm using Microsoft Visual Studio 10 C++ compiler. Why z don't have -0.25 value? As I saw from disassembly, it makes an signed int multiply (imul), places the result from edx on the stack, and extends it with 0!, as it would be an unsigned int. After that it multiplies it using FP instructions. ............. imul edx,dword ptr [ecx] mov dword ptr [ebp-98h],edx mov dword ptr [ebp-94h],0 fild dword ptr [ebp-98h] fmul qword ptr [__real

Microsoft C++ compiler have a bug?

好久不见. 提交于 2021-01-29 03:40:23
问题 usigned int x=1; signed int y = -1; double z = y * x * 0.25; I'm using Microsoft Visual Studio 10 C++ compiler. Why z don't have -0.25 value? As I saw from disassembly, it makes an signed int multiply (imul), places the result from edx on the stack, and extends it with 0!, as it would be an unsigned int. After that it multiplies it using FP instructions. ............. imul edx,dword ptr [ecx] mov dword ptr [ebp-98h],edx mov dword ptr [ebp-94h],0 fild dword ptr [ebp-98h] fmul qword ptr [__real

Add other domain user in TFS server

好久不见. 提交于 2021-01-28 14:07:05
问题 I have a two domain named domain1.in and domain1.in. Now i installed and create a collection project in domain1.in server. I would like to add the domain2.in user in domain1 TFS. I don't know whether its possible or not. Please help me. 回答1: You need to have a trust relationship setup between domains. Specifically, domain1 needs to trust domain2. Here's an MSDN article on setting up trust in AD: http://technet.microsoft.com/en-us/library/cc738617(v=ws.10).aspx 来源: https://stackoverflow.com

Why my xaml only shows a plain window show up with nothig in it

寵の児 提交于 2021-01-28 10:34:55
问题 I am new to WPF, Xaml, and am a C# beginner! I have been working on this and I don't know why the following xaml just shows a plain window. No button, no title, no content. I would appreciate your guidance. If asking why I had to use MediaChecker I did it following an example from Stack Overflow's following post: How do i navigate from one Xaml file to another? Thanks in advance. <Window x:Class="MediaCheckerWPF.AboutBox" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns