Answer Questions
Leonard Lee Windows form MonthCalendar control DayRender method...
How can I programmically change the default behavior of the windows form MonthCalendar control The default control highlights the month's current date cell with the MenuTitle backcolor. This would be fine, except when you scroll to another month the same day of the month is highlighted. I'd like to see only the current day highlighted in the current month. I don't see a DayRender method, so I'm wondering if anyone has an example of how to add this feature in vb.net. I'm guessing that a custom control would be created inheriting the default properties and methods and adding a method to take care of setting the backcolor, but I'm not sure how to do it. I've played with adding simple custom controls from examples, but I don't know how ...Show All
Ryan G Saving into Excel
I know i can save text files into text documents, but can i save them into excel spreadsheets this is for my school project and i tying to just save a "report" of what my program generates(output). But thanks. i'll try the code PLEASE HELP!!: And anyone knows how i can stream(if possible) video from a web cam and compare the pixels in it i am doing another project (also school). Trying to detect stationary objects. Opposite from motion. and help like sites can help. but i may need to do most of it myself since its for school. or any ideas about what else i can do. This shouldn't be in this post but its due next week! HELP! any other alternatives also can. Spotty, Bruno Help ! u have helped me a ...Show All
rajesh_batchu error in HasMorePages
Hi How can I Print 4 pages using PrintDocument Control I use this code but i have one page only Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage Dim I As Byte Dim M As Byte = 0 While I <= 200 e.Graphics.DrawLine(Pens.Black, e.MarginBounds.Left + 10, e.MarginBounds.Top + 30 * I, e.MarginBounds.Right, e.MarginBounds.Top + 30 * I) I += 1 M = M + 1 If M = 50 Then e.HasMorePages = True M = 0 Else e.HasMorePages = False End If End While End Sub Help me please. Try this too.>> Private Sub PrintDocument1_PrintPage(ByVal sender As ...Show All
srinivas_kv80 Top tips needed for tooltip problem
All, To display a tooltip over my listview item I have the following code: 'Private Sub lstJobs_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles lstJobs.MouseMove ' Dim lvi As ListViewItem = Me.lstJobs.GetItemAt(e.X, e.Y) ' If Not lvi Is Nothing Then ' Me.ttSchedule.IsBalloon = True ' Me.ttSchedule.SetToolTip(Me.lstJobs, lvi.ToolTipText) ' ' Else ' Me.ttSchedule.RemoveAll() ' End If 'End Sub However when the tooltip displays it starts to flicker madly. After stepping through the code it shows that the when the tooltip displays i.e. Me.ttSchedule.SetToolTip(Me.lstJobs, lvi.ToolTipText) for some unknown reason it generates another Mou ...Show All
Prabagarane reading from an xls file (into VB) without using Excel
Hi everyone, I've written a program in VB which accesses data from an xls file. Right now I open excel, and then hide it (so it is invisable to the user) to read the data from the file. Then I have a close button on my program which the user can click and as the program exits, it also closes excel. I have removed the "x" from the taskbar on my program, but I still run into problems if the user uses ctrl+alt+del. I am sure this is probably the worst way to read from this file, but it does get the job done... although very buggy and error prone. I was wondering if someone could inform me of a way to read in this data in a more efficient manner. Possibly even if the user doesn't have excel installed on their computer I am no ...Show All
Scythen How to Make Form Transparent While Dragging / Out of Focus?
I was wondering how to make my form turn transparent when I go to move it by dragging it, and then bring it back to opaque once I let go of it. Also, how could I make the form turn transparent while it is out of focus, and turn opaque when it regains focus A solution to either or both of the problems would be appreciated. Thank you. You can detect that the form is active/inactive with the Activate and Deactivate events. Detecting dragging is going to take more work. You'll need to implement the WndProc() method and detect a WM_MOVING message to see it starting to move and WM_EXITSIZEMOVE when it stops. Yell if you need code. Thanks for the help nobugz. Activate and deactivate worked. Also, ...Show All
Mrperson How to solve problem with .Net code running on framework 1.1 stopped working on 2.0
Hi, I have an application built on VB6.0 using VB.Net dll built on .Net framework 1.1. It has a piece of code in .Net that downloads a file from database using System.IO.BinaryWriter and saves on Windows folder. It's fine working when .Net framework 1.1 is only my system but started downloading the files with 0 bytes(though the files is 73 KB) after installing .Net framework 2.0 Can someone let me know what could be the reason for this issue and how to fix/make my existing application work for all the the versions of the .Net Framework. Please post me if you have any references/links for this Thanks in advance Esh NY Did you uninstall the 1.1 framework...both frameworks w ...Show All
stuntpope IDE annoyances
While i absolutely love the new visual studio, there are a couple of things that drive me nuts!!! when i right click on a symbol in code (such as a variable or procedure name), i can choose "Definition" and jump to that location. unfortunately, the "Last Position" menu item (that was available in VB6) was removed so now i cannot jump back to where i was previously. when i want to save my file with a different name, i would normally choose "File->SaveAs". this has now been changed to include the file name, which i find to be reallly annoying, especially since i will not be using the same name. opening visual studio is really quick, but closing visual studio takes forever. opening the design (GUI) view takes forever. switch ...Show All
Mr. Scott X DES File encryption problem
Hello everyone. I'm working on a project that performs file encryption. With DES and 3DES. However I've been having a problem encrypting compressed files. The code that I used was a snippet that I found in the MSDN, this code seems to work perfectly with text files. I even analyzed the text files on a binary level and everything was perfect. Now whenever I try to encrypt a *.rar or a *.zip file I always get a "The file "" header is corrupt" and/or "Unexpected end of archive" errors. This is the code for the encryption and decryption algorithms: Sub EncryptFile(ByVal sInputFilename As String, _ ByVal sOutputFilename As String, _ ByVal sKey As String) ...Show All
haryindsfjdbf How to Find last record in a database
How can I find the last record (row) in a database I am developing a VB 2005 program that must read a sql database and find the last record so I can retrieve the last "Batch Number" used. This will then be incremented and the new "Batch" record will be inserted into the database. I can't find a SQL command that will work except to read each record until the EOF. Can this be done Thanks, Ron This application will take output files (from 1 file to possibly 9 files at a time) from our mailroom . I wanted to display the (input) file names, the assigned batch number, and total amount(maybe more) before the user actually continues. The program will then update the database with the new ...Show All
IB00 Problem With MDI Child Form
I am having some problems with MDI child form details are as under: How can i load a MDI child form from another MDI Child Form. I have a MDI form with one Child form, now if i want to add another form in the project and that form will be shown by pressing the button in the child form -- what i want is this new form is shown as a mdi child form not as a SDI form. How can we do that. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim F As New Form2 F.MdiParent = Me.MdiParent F.Show() End Sub ...Show All
bitbonk Getting list of all subfolders in a directory
Hello. I am trying to find out how to write some code that'll allow me to get the folder names of every folder existing in another folder. I know how to get the names of directories immediately within the main folder, but how do I make it so it'll return the names of every folder in there (including subdirectories for all the found subdirectories) until there are no more folders in existence. I thought about just writing something so it'll put all the immediate subdirectories in a list, and run through that list one by one accumulating more folder names until it gets to the end of that list, but I guess I was hoping there was some other ways I wasn't seeing. Thank you for your help. Obviously if you want ...Show All
SalmanSheikh Generic Error In GDI+
Hello all, I have my program published and installed on my computer, and whenever I try to see a print preview I get this error, "A generic error occurred in GDI+." The program and the print preview work fine whenever I am building and running it in the environment. I am loading a text file to be previewed. I just don't understand why it doesn't work when it's published. Any help would be appreciated. All we can do to help you is tell you reduce your application to the minimum number of lines required to cause the error. Questions you can ask yourself: does it run OK on the development PC Does it run OK if I copy (XCopy) it to another PC with all the required dependencies on it Does it run o ...Show All
cwallace Lists of generics?
I am building a report class, and want to store a list of criteria that can be applied to a report.. To do this I have defined a generic class: Public Class Criteria(Of T) Public MustOverride Readonly Property Name() As String ' ...etc End Class So that I can create specific criteria types, e.g. Public Class CompanyIDCriteria Inherits Criteria(Of Integer) Public Overrides Readonly Property Name() As String Get Return "Company ID" End Get End Class Problem is - how do I store a collection of generics The compiler won't let me define a List(Of Criteria(Of T)) At present I'm stuck - should I use an array of objects and cast What is the right way to do this so I can enumerate the ...Show All
Runespy custom control : property list enumerating other controls on form...
Hi All, While building a custom control, I can't figure out how to apply a property that, during design time, lists (enumerates) a certain type of control that is already on the form. i.e. the property will list all textboxes used on the form. This way i can bind certain data to the textbox. Have been looking into Typeconverter but can't figure out so far. Can somebody point me in the right direction thanks in advance.. Dave Dman1 and Nobugz.... Thank you guys very much ! It helped me out a lot. Dave Add this code to your UserControl: Public ReadOnly Property TextBoxes() As List(Of TextBox) Get Dim coll As New List(Of TextBox) ...Show All
