Mariusz Gorzoch's Q&A profile
Windows Forms How Can I make the event of Activate Windows to run only one time?
In order to make the event of Activate Windows to run only one time, I write the code below this.Activated-=new System.EventHandler(this.Form1_Activated); Is it correct but It certain can work well. but it seems it is not a good code. using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; namespace WindowsApplication1 { public class Form1 : Sys ...Show All
Visual C++ Microsoft Visual C++ Runtime Library error question
I recieve this error when I launch Internet Explorer - version 6.0 OS Windows XP Home edition 2002 Service Pack 2. Error is as follows: Microsoft Visual C++ Runtime Library Runtime Error! Program C:\Program Files\Internet explorer\iexplore.exe This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. I am not certain where to post this questi ...Show All
SQL Server Web App Failover problem
Hi, I have successfully set-up a DB mirroring. When the pricipal goes down, the mirror picksup and the other way around too. So the mirroring part is working great. However, when I use my web applicaiton (dot net 2.0), it is not able to connect to Mirror server . I get the following error: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that und ...Show All
Visual C# EventHandling problem : Java has solution but what about Microsoft's .Net???
Hi, I have added few of the events in some control, example code is: btnControl.GotFocus +=new EventHandler(EventHandlingMethod); btnControl.Click +=new EventHandler(EventHandlingMethod); lblControl.Click +=new EventHandler(EventHandlingMethod); private void EventHandlingMethod(object sender, EventArgs e) { ....... } btnControl = Button object, lblControl = Lable object Now the problem is: I am adding the same event han ...Show All
Windows Forms richtextbox
hi guys, how do we drag n drop a button onto a richtextbox in a form, ill b thankful if anyone could provide me the code . thanx in advance .netguy .netguy wrote: hi guys, how do we drag n drop a button onto a richtextbox in a form, ill b thankful if anyone could provide me the code . thanx in advance .netguy Are you attempting to create a custom form designer If so, this ...Show All
Visual C++ convert from char a[MAX_PATH] to LPCWSTR
hi, i have 2 variables like char * username char sysname[MAX_PATH] i need to use "NetUserGetInfo" windows API method, which takes two LPCWSTR strings, how can i convert the above sysname,username to pass them to NetUserGetInfo. thanks If you put the USES_CONVERSION macro in your code, then A2W will convert to a wide string for you. There's an include, it's AtlConv.h . Or you can ...Show All
Visual Studio How to? : (ReportViewer + asp.net + .rdlc + print button)
I s there a way to add a Print button to the ReportViewer control in an .aspx page when using .rdlc file Would the Print button displayed and enabled if I use remote reports(.rdl) instead of local ones(.rdlc) Response is very much appreciated. Thanks, S The report viewer web control does not have built in print functionality when in local mode. A print button is available in remote mode. The problem isn't the ability to ge ...Show All
Windows Forms Graphics question
Ok my problem is with Graphics class //------------------------------------------------------------------------------------------------ private void Form1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; g.DrawLine(new Pen(Color.Black), new Point(30, 30), new Point(30, 100)); g.Dispose(); } you see i declare Graphics g=e.Graphics where 'e' is the PaintEventArgs and then draw a line //--------------- ...Show All
Visual Studio Express Editions Random Numbers again!!!
Hi there, i think i have gotten into a bit of a fix... here is the problem: i have used the random obj to generate random numbers between 1 to 90. some times when the application runs, it picks a number twice. for example an output would be 2,8,34,2,67.... is it possible to make sure all numbers picked are only selected once that is if i request for 10 ranadom numbers, each 10 digits would be unique... this is driving me nutts!! ...Show All
Visual Basic Datasets in MDI Application
Hi All: I have a local database (SQL server 2005) in a MDI application (VB2005). In the parent form, I have a dataset and some controls binding to one table of the database. In child forms, I also have some controls binding to related tables in other datasets. In the parent form, user can add or delete a record. In child forms, user can also add or delete records in related tables. Can SQL server save changes from ...Show All
Visual C# How to write the code automaticly into the InitializeComponent?
I make some component and controls in the my toolbox when I drag them to the form, i hope VS can write the code into the InitializeComponent automaticlly,just like I drag a VS button in the form. How to archieve this pls give me some idea Thanks VS sets the properties of you custom control as it does it with the built-in .net controls. They are added if the properties have a default value or if you change a property within ...Show All
Visual Studio Team System TFS needs version 11.0 of Excel
In trying to use the "Add work items with Microsoft Excel" feature I get a message that my machine needs to have Excel 11.0 installed to proceed. I can't find any evidence anywhere that Excel 11.0 even exists - where does one obtain this That's what I have installed - is there a specific file or registry entry Team Explorer is looking for when it generates its message ...Show All
Software Development for Windows Vista How to create an .xps file
Can any one please let me know how to create a Simple xps file. How to start creating an xps file Thanks in advance, Santhosh. Santhosh: You can create a simple XPS file in one of three ways: a) Using an application that natively outputs XPS documents, i.e. Office 2007 when using Save As XPS. b) Using the "Print-to-XPS" driver Microsoft provides, called the Microsoft XPS Document Wr ...Show All
Smart Device Development Detecting a network in C# .NET
What method is recommended to detect a network (either via cradle/wifi etc). Thanks, Jeff. Hi Jeff, You can use Dns.Resolve(Dns.GetHostName()) to obtain the IP host entry of the device, from which you can obtain the IP addresses of the device. The IP address you obtain from a wifi network is different from the IP address you obtain from an ActiveSync connection, which is an internal IP address (begins with 192.168 and is usually 192.16 ...Show All
Visual Studio Team System Runtime context different when running through TestMgr and running as an application?
I am running VS.NET2005 (Version 8.0.50727.42) and are having some problems with a complex test I have that uses a 3rd party assembly. The code is to complex to produce a simple example to show here, but what happens is that when I run the testmethod from a new projects Main method it runs fine, but when I run the same testmethod as a test through TestManager it will fail (assert on an object of the 3rd party assembly that is empty which it s ...Show All
