th3Nu11's Q&A profile
Visual Studio Express Editions Test for folder : Drag drop
I'd like to trigger some code if a user dragdrops a folder from explorer. How can I test if a folder is dropped In other words, how can I distinguish whether an entire folder is dropped or just 1 or more files If its a folder then trigger some code... if its just a file or more then copy just those files... Private Sub Form1_DragDrop( ByVal sender As System.Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles MyBase .DragDrop ' Can only drop files, so check If Not e.Data.GetDataPresent(DataFormats.FileDrop) Then Return End If Dim files() As String = CType (e.Data.GetData(DataFormats.FileDrop), String ()) For Each file As String In files 'IS ...Show All
SQL Server Old FSO snippet of code
Hi everyone, Does anyone has ever written VbScript .Net stuff which do anything like that I've got a dtsx package and I'd need covering along folder looking for subfolders and so on objFSO = CreateObject( "Scripting.FileSystemObject" ) objFolder = objFSO.GetFolder( "c:\test" ) colSubfolders = objFolder.Subfolders For Each objsubfolder In colSubfolders ... ... Thanks in advance and best regards, The .NET Version of this would be. Dim Directories As String() = System.IO.Directory .GetDirectories("C:\test") Dim I As Int32 For i = 0 To Directories.Length - 1 Dim TmpInfo As New System.IO.DirectoryInfo (Directories(i)) TmpInfo.Delete(... Next Links embedde ...Show All
Visual C# help saving data on access database
Good day, I am learning C# and someone has given me a certain software to write for him. I created a database using microsoft access. After creating a new a new windows application on visual C# 2005 and adding the database to the application. i tried adding new records onto to the database but when i clicked on the save icon to save the data, it doesnt save.Can anyone give me some hints and directions as how to solve the above mentioned problem,email me with ideas. my addi is cfjchi@yahoo.com thanks Fruce private void button1_Click(object sender, EventArgs e) { string sConn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\Black Python UN\Desktop\db1..mdb;Persist Security ...Show All
Windows Forms UserControl Designer mode failure?
Hello, When open design mode for my UserControl I have the message box with error: The control System.Windows.Forms.UserControl has thrown an unhandled exception in the designer and has been disabled. Exception: Item has already been added. Key in dictionary: 'tableLayoutPanel2 [ System.Windows.Forms.TableLayoutPanel], BorderStyle: System.Windows.Forms.BorderStyles.None' Key being added: 'tableLayoutPanel2 [ System.Windows.Forms.TableLayoutPanel], BorderStyle: System.Windows.Forms.BorderStyles.None' Stack trace: at System.Windows.Forms.UserControl.WndProc(Message& m) .. Problem context description: VS2005, C# I've design UserControl with Tabcontrol (3 tabpages) and on each tabpage I use TableLayoutPanel for a ...Show All
Visual C# How to Create a URL syntax checker in C#
I would like to create a URL syntax checker so that can verify a cerrtain URL not a phish site. But I am also aware that some URL have valid syntax but is still a phish site. To answer this, I am looking for some measures on how to verify a URL and its correct DNS equivalent. I am doing a project of mine as one of our requirements and I have decided to create a web browser (already done) and I have included there 3 anti-phish tools. One of the tools is to check for URL syntax error. i have searched for such but has given me no good results that can be of any help to my project. I was hoping that some of the bright minds here could help me or enlighten me in my search. Thanks. Well wat ur telling is going to server side for v ...Show All
Windows Forms DataGridView - Copy only selected text
Hi there. I am having an annoying problem with a DataGridView not linked to any database; I save/load to/from a simple XML file. (Using VSNet 2005 release version - developping in VB.NET) When editing a cell's content, highlighting a portion of text and pressing CTRL-C, the complete cell content is copied to the clipboard. Is there an easy way to only have the selected text copied on CTRL-C I know that I can achieve this by right-clicking on the selection and selecting copy, but for speed, I would like to use the CTRL-C method. Also, why is that when I press SHIFT-SPACE, the complete line is selected Thanks for the help, Zolt Hello, I couldn't find a way to override default be ...Show All
.NET Development store a file into a database and retrive it
hi I want to store my generated xml files into a database and then retrive some of them. my data type in sql server database is Image. my algorithm works OK with images but when I try to store xml files I miss a few characters from the end of the retrived xml file. and for some heavier xml files have the same problem with some rubbish characters attached to the end of the file. what's going on file is a file. if my algorithm had problem it shouldn't work with Images either. SQL expects an image column to be binary, an xml file is not binary, it is text utf* . You should not really insert text into a binray field, you should insert it into a text/xml field. If you must sinsert into the same field then yo ...Show All
Visual Studio Blank Space on Right side Within Report Viwer(& show Horizental Scroll)
Hi dears, I have a problem regarding Report Viewer Control( for Win Forms). I have Page Header/Footers in my reports (client side .rdlc) When report viewer loads the report (each has 8.5 X 11.0 Page size defined & It has very accurate size) Viewer Shows Some Blank Space on teh Right Side of Report (which is not inluded into Report ,I have checked it by setting Backcolor of report, It shows the Emplty space white always & it shows it ONLY WHEN the PAGE HEADER/FOOTER is used DUE to this Report Viewer starts showing horizental Scoll, Scroll can be disappear if it ommit the Page Header/Footer So Please Help me to find out this Problem I will be Thank Full Mansoor I would like th ...Show All
Smart Device Development How to bound DataGrid to datatable/dataset and create ComboBox Grid colums
I have a requirement to add, edit, and delete data displayed on datagrid in pocket pc application. But, I do not see the dataGrid allowadd, edit, delete properties (like win app). it seems those propertiess will not be supported in pocket pc application, not sure . How can I bound dataset to datagrid how can I replicate changes to dataset, made from datagrid Is there any round about way to achieve this I would also need to set some columns as combox columns. Please suggest any one. Thanks, it seems there is a sample in given link, but I was unable to build the application. Error 3 'DataGridCustomColumns.DataGridCustomColumnBase. Paint( System.Drawing.Graphics, System.Drawing.Rectangle, System.Window ...Show All
Visual C++ Help button get chm instead of hlp
I have a application built around a CPropertySheet derived class. The help button is looking for 'app.hlp' file (this is the default MFC stuff, I've not added anything other than moving the button). How do I get it to look for a 'app.chm' file instead I've tried the following using a test help file in InitInstance() //First free the string allocated by MFC at CWinApp startup. //The string is allocated before InitInstance is called. free((void*)m_pszHelpFilePath); //Change the name of the .HLP file. //The CWinApp destructor will free the memory. m_pszHelpFilePath=_tcsdup(_T("C:\\filezilla\\filezilla.chm")); EnableHtmlHelp(); but i just get "Failed to launch help" It works for m ...Show All
Smart Device Development export datagrid to MS Excel
Hi I have a datagrid that I fill with data, and now I want to export the data in my datagrid or my dataset to an MS Excel file. I have tried the ".WriteXML" but the formatting goes all wrong when I open the XML file in Excel. How can I export the data to an Excel file in such a way that the data and formatting is the same Thanks First of all, DataGrid is just a control, you could not "export" it. In fact, DataGrid is irrelevant in this case. You should save data from actual data source (I presume it's DataTable) in some format Excel understands. The easiest one would be CSV (comma separated values) which is a text file with columns separated by commas and rows on each line. You have to write it manu ...Show All
Visual Studio Express Editions TabControl Help...
Hi everyone, some of you have helped me with opening a new form NewEvent neform = new NewEvent(); neform.Show(); which i understand just fine but i was wondering how do i open up and new form with the tab control on it, and make it so that when it open it will open straight to that tab instead of click on the tab for example say you have 2 tabs "tab1=Meeting, tab2= Things to do". and then you go to File>New>Meeting or File>New>Things to do, and it will go straight to that tab, also while im here is it possible to open a file for example "Help>How To..." and it will open a pdf file ( HowTo.pdf ) just wondering so it will save me having to ask another question. thanks for anyhelp ...Show All
Windows Forms vb 2005 and sql server datetime field
hi im trying to display the documents which are going to expire within 7 days. i have a document table and expirydate field (in smalldatetime in sql server. i wrote the following code at form load event. is there any better way to do it Dim t As String t = " 10:28:00" TextBox1.Text = Format( My .Computer.Clock.LocalTime.Date, "yyyy-MM-dd" ) Dim x As String x = TextBox1.Text & t MsgBox(x) str1 = "select * from company where compregexpdate =" & "'" & x & "'" '& " '" & 2006-11-16 10:28:00 & "'" con.ConnectionString = "dsn=alphasql" con.Open() da.SelectCommand = New ...Show All
Smart Device Development Installation problem
Hi, I'm trying run my setup program (for install my program to mobile device) on Windows Vista and this not work because not possible find Application Manager (ceappmgr.exe). I check SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\CEAPPMGR.EXE key, but this not exist. Exist any solution This comes with WMDC (Windows Mobile Device Center), Vista version of Active Sync. Not sure it's available yet, so I would suggest testing on XP/Active Sync 4.x for now. ...Show All
SQL Server Sql sever hardware config/upgrade
We currently have 2000 SQL soon to be 2005 on a HP DL 585 that has its own MSA30 drive shelf. It has its own 4 channel SCSI PCIX card with I think 512MB of cache. The MSA30 is filled with 14 U320 HD. We have a second MSA 30 comming. The DB size is 334GB. We have a set of tables that contain the data that is to be compiled and a set of tables that contain post compiled. The Precompiled data takes up most of the space. Here is my question. 1. Is it better to have a filegroups with multiple data files spread over both MSA30's or two very large files one on each drive tray. Thanks. The key to good IO performance is to get as many drives working for you as possible and maximizing throughput. SQL Server ...Show All
