Dragan Jankovic's Q&A profile
Visual C# Disable right-click mouse button
How can I disable the right-click on the mouse button in C# Hi, You don’t need to post the same issue again. We will focus on one thread. Thank you ...Show All
Visual Studio Express Editions storing a date
i am trying to aquire the system date and time from a click event. i can get the date and time...how do i store that time for later...if i use the date.now.date it will run everytime and i will never reach the end date...i am using this for a trial period trigger and need to be able to reach that end date. anyone have any ideas on how it can be done. I'm not sure of how your application should work, but I think you would have to store the time, when user first started the application, somewhere on the system and check if that time has expired each time user starts the application. You can take a look at some previous forum posts on how to make a trial-period application and see if they help you: http ...Show All
SQL Server Parameter isn't refreshing
Hi. I have a datasource that depend on parameter A. Parameter A get his values from query and have a defualt value. Parameter B get his default value from query that depend on parameter A. Now, whan I run the report, parameter A get a value and then parameter B get his value and the datasource run OK. But the problem is that when I'm changing the A value (from the value list) - The datasource run fine but Parameter B stay with the old value with out any change. Does any one know how to solve it. I'll be happy to give more explanation if it isn't clear enough. Thanks. Actually, Parameter can be dependent on another, they are considered cascading parameters. On your problem Roy, I was thinking that yo ...Show All
SQL Server Management Studio - Index properties grayed out
If I right click on an index, the properties context menu is grayed out as well as the "New Index...", "Disable", and "Delete". If I right click on a table and click modify, I can add and edit indexes from there just fine. Strangely enough "Included Columns" is grayed out though. Was the database designer or table designer opened at the time We prevent the index dialogs from being launched when the table is being designed. The database and table designers work by making the state of the tables (including indexes) match the internal model in the designers. This includes index and constraint definitions. Reconciling the state on the server to the state in the model ...Show All
SQL Server Connecting to SQL Server 2005 from Visual C# 2005 Express Edition
I had SQL Server Express Edition installed. I then uninstalled both it and Visual C#. I then installed SQL Server 2005 Developer's Edition and reinstalled Visual C# -- both on the same machine. I can connect to SQL Server 2005 using SQL Server Management Studio. However, Visual C# is a different story. When I try to add a new Data Connection, it defaults the data source to .\SQLEXPRESS, which is no longer on my machine. I can select .\MSSQLSERVER, but when I click on either OK or Test Connection, I time out with an error message -- error 25 - Connection string is not valid. The connection string that is shown at the bottom of the Advanced dialog box is -- Data Source=.\MSSQLSERVER;AttachDbFilename=E:\Inventory\Data\Inventory_Data.MDF;Integ ...Show All
Visual Basic File Copy Time Estimator
I have a progress bar in my folder copying application that works great. How do I add and option that shows the estimated time to copy the entire contents of my selected folder. I am using a actual class to copy the files. Here is the code I. I have all the other items to call the class in the code of my main form. Imports System.Threading Imports System.IO Public Class CopyClass 'This will hold the reference to the client form Private _clientApp As Form 'Create a delegate method that will map to the CopyThreadMessage method of the client app Private Delegate Sub CallClientCopy(ByVal ThreadName As String, ByVal FilesRemaining As Long, ByVal Message As String) 'Create a delegate method th ...Show All
Visual Studio Express Editions Making a working form out of Visual Basic Express
Hi, I was wondering if there was someone who knows how to make a simple application using the checkboxes in Visual Basic Express what is the code to store the info on those and what is the codes to go with two buttons, one to clear the info / cancel and the other to send the checkbox marking info in an automatic text email. I just got through with lesson 2: Getting Started: Beginners Guide to Visual Basic Express. Thanks! thanks for your help, I use Visual Web Developer too so I guess I should go there to find out how to make it, and use that program instead. thanks for your patience too! Somehow I thought I could run a program in the browser lol. ...Show All
Visual Basic Getting the icon of a file.
I am wondering if there is a way to get the icon that a file uses I want to get the icon of every file in a directory and draw it next to the name of the file on my form. How would I get the icon I believe you mean get the default icon of a particular file type Like for a doc or txt or xls etc. Try this. Bung this code in your file: [code] Private Structure SHFILEINFO Public hIcon As IntPtr Public iIcon As Integer Public dwAttributes As Integer <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=260)> Public szDisplayName As String <MarshalAs(UnmanagedType.ByValTStr, SizeConst:=80)> Public szTypeName As String End Structure Private Declare Auto Function SHGetFileInfo Lib "shell32.dll" (ByVal ...Show All
Visual Studio Express Editions Can this be done?
Hi, i have 2 pictureboxes 'A' and 'B', 'A' is a black rectangle box and 'B' is a blue circle. How do i make 'B' overlap 'A' and only the circle is show in the rectangle box without the picturebox blocking out the other details Thanks. Mario Cossi wrote: I am not sure I fully understood your question, but it seems to boil down to creating a custom transparent control. You won't be able to do this using a regular control, as transparency is not really supported by the controls, but you can easily create your own custom control and either assign a region to it or make it transparent. There is a nice example here of the latter. HTH --mc Can anyone convert this code to VB Unfortunately I cannot read C# but th ...Show All
SQL Server Pass parameters to complex procedure.
Hello, I have this Stored procedure, a very complex one, and it works fine with the parameters wrote on it. But when I try to change the number to variables @param1, I got errors, can somebody tell me how to replace this please. DECLARE @return_value int, @lvaIndicador varchar(4000), @ecuacion varchar(4000), @numerador int, @denominador int, @lvaIndicador2 varchar(4000), @ecuacion2 varchar(4000), @numerador2 int, @denominador2 int, @porcentajeCumple numeric EXEC @return_value = [dbo].[SP_CUMPLENCONNIVEL] @nmtipoCompetencia = N'12,13,14', @nmdivisioncorporativa = N'18,19,20', @nmciclo = 9, @nmcicloCompara = 12, @nmempresa = 72, @nmcargo = N'20', @lvaIndicador = @lvaIndicador OUTPUT, @ecuacion = @ecuacion OUTPUT, ...Show All
Windows Forms problem with DataGridView control
Is there a way to restrict the number of rows a user can add in a datagridview control e.g when the user had entered 2 records in the grid, a message should popup saying "You can't add more than 2 records". Please help. Check the RowState property of GridViewRow to if it was Inserted. Iterate the GridView rows and check the RowState of each row. Maintain a counter ( and increment ) when the row has Inserted state. When counter has reached 2 then you can disable adding more rows. HTH ...Show All
.NET Development Linking to unmanaged DLL from Web Service
I have a web service which needs to link to an unmanaged dll to perform some operations. The problem is that I cannot add a reference to the dll from visual studio (as it's unmanaged), and so when the web service is run, the dll is not copied into ASP..NETs temp directory where the rest of the services files are temporarily loaded. I'm not interested in solutions that involve copying the dll to the temp directory, I want a more 'clean' solution. Is there any way for the web service to link to the dll, so that it can access it at run time without requiring a manual copy of the dll to the working directory. Thanks, Nathan Actually solution is embarasingly simple. Just add the dll into the bin directory ...Show All
SQL Server Count of employees
Hi, We got of count of employees from measures against a date dimension. we need to get average count for a time period (ie..week,quarter,year ). and the formula for avg employee count: (empl-count on firstday of period+empl-count on last dayof period)/2 Date EMPCount for ex : 1-Nov-2005 2361 2-Nov-2005 2521 3-Nov-2005 2762 4-Nov-2005 2500 avg count for week in novemeber: 2361+2500/2. Kindly let me know how we can do this in SSAS cube. Thanks in advance Raj Would I be right if I were to guess that your week starts on Sunday, which normally does not have any data I'm guessing that members without data are probably what is causin ...Show All
Visual Studio Express Editions How to display multi name in difference textbox when I click on dropdownlist
Protected Sub DropDownList1_SelectedIndexChanged( ByVal sender As Object , ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged Dim myconnection As New Data.SqlClient.SqlConnection( "Data Source=JIM;Initial Catalog=Northwind;Integrated Security=True" ) myconnection.Open() Dim cm As New Data.SqlClient.SqlCommand cm.CommandText = "SELECT * FROM Customers" cm.Connection = myconnection Dim dr As Data.IDataReader dr = cm.ExecuteReader Do While dr.Read() Label1.Text = dr.Item( "Title" ) Label2.Text = dr.Item( "HireDate" ) Label3.Text = dr.Item( "HomePhone" ) Loop End Sub End Class After ...Show All
Visual Studio Tools for Office Cannot access assembly from end user computer
I am creating a simple excel application and saving the assembly on a network folder. When i try to access this from end user's machine i get the "The Current .Net Security policy does not permit the customization to run. Do not change the security policy in your computer. ...." 1.I have ran caspol.exe and granted full trust to the assembly on the end user's machine. 2. When i look at the details of error, it shows the dll is loaded from correct network folder. 3. I have also verified in Framework 2.0 configuration it shows my dll under Local Intranet_Zone. 4. The solution works correctly on my development machine. I am using Visual Studio 2005,VTSO 2005 and Framework 2.0 Thanks in advance for helping me with this. Hi Anand ...Show All
