Answer Questions
Alain DePreter How to: Print an Mdifrom?
Hi, I am using PrintForm Component to print an MdiForm and when I am using the CompatibleModeFullWindow so I will also get the MdiForm header the result are not what I am expecting. The print result shows a part of the MdiForm Parent on top of the MdiForm Child and the bottom part of the MdiChild is choped off. It looks like the focus of the MdiChild is offseted by the MdiParent menubar. Thanks, Yogev. Hi Yogev, I believe you have found a bug, the PrintForm component is not accurately finding the bounds of the full window when it is a n MDIChild Window . You will need to use PowerPacks.Printing.PrintForm.PrintOption.CompatibleModeClientAreaOnly to print the window. However if you want to have the window ...Show All
afitoine Visual Basic Express application stops before showing form on another computer
I have now tried 3 separate applications, one being just a simple form with no underlying code at all. All three applications will run fine on my Dell desktop (XP) and Dell laptop (2000) but will not run on my Toshiba laptop (XP). I do the development on my desktop so I cannot run debug on the Toshiba laptop. When I run the applications on the Toshiba, the process explorer shows it starting and immediately stopping. Placing a few log statements in the code, I noticed that the application is stopping when the form is trying to display. Load form is working fine but show form does not seem to be. This must be a configuration issue with the Toshiba as it is the only computer that does not work. However, I have done all MS ...Show All
Snyper_Vash array count?
I'm fairly new to vb and I'm having a hard time with the coding if anyone could be of assistance it would be appreciated. If FolderBrowserDialog1.ShowDialog() = Windows.Forms.DialogResult.OK Then For Each filename In Directory.GetFiles(FolderBrowserDialog1.SelectedPath, "*.jpg" ) Next aname = FolderBrowserDialog1.SelectedPath Label1.Text = (value & " Files" ) <-- A label to tell how many files with the jpg extension are in the folder ListBox1.DataSource = filename <-- list of files inserted to the listbox Label2.Text = FolderBrowserDialog1.SelectedPath End If I'm just not sure what code I'm supposed to use for counting the files in the FolderBrowserDialog1.Sele ...Show All
Nick1435 VB.NET 2005 RC - Datagrid issue
I have an application which uses a datagrid to display a property listing. The list will contain around a quarter of a million records so I need the user to have a simple way to search. I have built a search routine which allows the user to type some text in to a toolstrip bar and then performs a search through the dataset. The issue I have is when the routine finds a match, I need it to highlight the row on the datagrid. This is where I have the problem; I cannot see how to achieve this. I have tried searching everywhere (Google/Experts Exchange etc) and have seen some pretty ridiculous solutions such as mimicking a user clicking on the mouse. I also found what I thought were useful ideas such as : &n ...Show All
Reuben Data Entry problem in an Unbound DataGridView, generated programatically
After generating an Unbound DataGridView programatically, when I type in any of its columns, the data wipes off on leaving the cell. I am using VB.NET 2.0. Please help in finding the remedy. I would have to see your code. This sample works as expected. Public Class Form1 Dim DataGridView1 As New DataGridView Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.Controls.Add(DataGridView1) DataGridView1.ColumnCount = 2 DataGridView1.Columns(0).HeaderText = "Column 1" DataGridView1.Columns(1).HeaderText = "Column 2" End Sub End Class ...Show All
PawanSingh MSN Messsenger Personal Message Customization
How can I programatically change my MSN Personal Message using VB.NET Code Block Public Module Msn Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal Hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Integer, ByVal hWnd2 As Integer, ByVal lpsz1 As String, ByVal lpsz2 As String) As Integer Private Function VarPtr(ByVal o As Object) As Intege ...Show All
Tom Lake - MSFT BackgroundWorker
I have a Form application that: a) launches a file select dialog and then b) starts a backgroundWorker thread to do some preliminary processing with the file selected above (this thread updates a status strip progress bar on the main form) I have placed both a) and b) in the main form constructor in order to avoid having a separate control to initiate b). These things are required before anything else is done. The trouble is, the form will not finish painting itself until the background thread returns. Is there some kind of "form done" event that I can use to launch the background thread Or perhaps an altogether different approach would make more sense Try overriding OnCreateCont ...Show All
Jonathan Rajotte AssetCategory & AssetType queries
I am using VB 2005 Professional and I have two combo lists. My first combo list is based on AssetCategory and has the values : Computer, Printer & Software My 2nd combo list is based on AssetType, therefore if my AssetCategory is Computer, the AssetType will be Desktop PC, Server and Notebook. If the AssetCategory is Printer, the AssetType wil be Laser, DotMatrix, All-in-one. I am having problems filtering down the data using a SELECT query therefore I would like the correct AssetType values to appear when an AssetCategory is chosen. How do I go about solving this problem. Dipendra Thanks for the info. I have seen the thread but as I am a beginner, I need some more info on how I can su ...Show All
Rod Yager Progress bar help
can anyone please help me out on making my progress bar to work whilst it loads website etc... here is my current code it dose come up with a syntax error where it says CopyFile. [code] Private Sub CopyWithProgress(ByVal ParamArray filenames As String()) ' Display the ProgressBar control. ProgressBar.Visible = True ' Set Minimum to 1 to represent the first file being copied. ProgressBar.Minimum = 1 ' Set Maximum to the total number of files to copy. ProgressBar.Maximum = filenames.Length ' Set the initial value of the ProgressBar. ProgressBar.Value = 1 ' Set the Step property to a value of 1 to represent each file being copied. ProgressBar.Step = 1 ' Loop through all files to copy. ...Show All
John Campbell-Higgens VB.Net, Excel and multiple workbooks
Hello all, VB.Net 2003 and Office 2000 running on Windows 2000 Sp4. I have written an application that opens two Excel workbooks, copies data from one to the other, formats it and saves it. Nice and simple and has worked perfectly with just one workbook in another part of the application. Problem comes when I quit Excel and run the garbage collector, to tidy up the excel.exe that is still running in the background, and then Excel throws an unhandled exception which is revealed to be the following in the debugger, Unhandled exception at 0x300341b6 in EXCEL.EXE: 0xC0000005: Access violation reading location 0x650eeed8. Is there anything I am missing with the two open workbooks that I have to do differently when using one workbook ...Show All
JenniferBMiller Using Microsoft Word & Excel with a VB .NET application
I'm playing around in VB .NET and I was wondering if there is a way to read/write data to a EXCEL or WORD document. And if so, then where can I find stuff on this Thanks, QWERTYtech No problem, just for further info this is how I do it. Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim XL As Microsoft.Office.Interop.Excel.Application Dim xlwb As Microsoft.Office.Interop.Excel.Workbook Dim iddatatables As DataTable = Me .RcsDataSet.Customers For Each row As DataRow In Me .RcsDataSet.Customers Me .InvoicesTableAdapter.Fill(RcsDataSet.Invoices) For Each crow As DataRow In Me . ...Show All
vbjunkie How to access the clicked item?
Hello, with wich variable can i access the clicked item in a MenuStrip I’ve tested it with MenuStrip1.ClickedItem but that doesn’t works. Please help me. Thanks. No, that couldn’t be the right for my problem. I create a new Form and a new Item in the MenuStrip, (tabbed mdi) so, the form has an public string ID="Window1", "Window2", "Window3". This string is setted, when i click on the "New-Window-Button". So, the Item in the MenuStrip gets the ID from the Window as ToolTipText. Now i want to maximize the Form, when i click on the Item in the MenuStrip, so i have this script: Private Sub MenuStrip1_ItemClicked( ByVal sender As Sy ...Show All
ByteRider MSN Messsenger Personal Message Customization
How can I programatically change my MSN Personal Message using VB.NET Yes, the 'Personal Message' is the second display name. Any ideas about a MSN scripting interface The only ones I've found so far are for Windows Messenger not Windows Live Messenger. bump Code Block Public Module Msn Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal Hwnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As Integer) As Integer Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer Private Declare Function FindWindowEx Lib " ...Show All
Andrew Crowder open a form with only systray icon
Hello, how do i open a form so the form does not show and only an icon appears in systray I know how to make the icon but everytime I do this the form appears. I want to make the form only appear when I right click on the icon and say "appear". Thanks! I have tried to hide the form (frm.Hide()) but cannot hide it. can you told me where should i use it to hide the form. I figured it out.. it was just a small bug: code on first form is: Private m_TheForm As New secondform Private systray As New NotifyIcon() m_TheForm.Close() m_TheForm.Hide() 'MISSING LINE systray.Visible = False code on second form is: Me.Hide() Me.Visible = False Me.Opacity = 0 Me.ShowInTaskb ...Show All
E.Herzog Setting ComboBox choices in MS Word 2003 document
I'm trying to add multiple comboboxes to a word table. I am able to get the form to contain the combo box, but having problem poplulating the combo boxes with choices. Any help would be great. Thanks. Are you talking about a VSTO Word Document Project in Visual Studio, or a macro/form design in Word itself If you're talking about a form being designed within Word then you're in the wrong forums... that would be a VBA or Office Development topic. If you are using Visual Studio, can you describe what you've tried that has failed It should be a simple matter of adding values to the ComboBox Items collection... ...Show All
