355 Posted Topics
Re: Hi, In the Form2 Class add the form2_location event and then you can try this: Private Sub Form2_LocationChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LocationChanged Me.Location = New Point(Form1.Location.X + 30, Form1.Location.Y + 30) End Sub | |
Re: Hi, Can you show us your code how you open the application window. | |
Re: Hi, I think you can use WIA scripting for that. You can find some explanation, [Here](http://www.codeproject.com/Articles/2303/WIA-Scripting-and-NET). | |
Re: Hi, You can try this; [CODE]Dim oReg As RegistryKey = Registry.CurrentUser Dim oKey as RegistryKey = oReg.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True) oKey.SetValue("MyVBApp", cPGM)[/CODE] | |
Re: Hi, I don't understand your question. Do you want some code that after 10 days your application will expire? | |
Re: Hi, An easier way is to use the BindingNavigator Class. Once you are able to bind to your data source, the rest is a walk-over. I'm posting a sample code I used before to demonstrate how it works. This code uses the Northwind database so it is easy to recreate. … | |
![]() | Re: Hi, If you set your form1 as a IsMdiContainer and form1 and form2 are set windowstate= Maximized then you can try this in the button event: Dim f As New Form2 f.MdiParent = Me f.Show() |
Re: Hi, You can create a datatable with a datagridview. You can find some information, [Click Here](http://msdn.microsoft.com/en-us/library/9ha04z01.aspx) | |
Re: Hi, You need the Keydown event from your Maskedtextbox for that. Here's an example with 5 textboxes: Private Sub TextBox1_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown, TextBox2.KeyDown, _ TextBox3.KeyDown, TextBox4.KeyDown, TextBox5.KeyDown If e.KeyCode = Keys.Back Then SendKeys.Send("{TAB}") End If End Sub | |
Re: You can try this to let your timer working: Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick If timercount > 0 Then timercount = timercount - 1 lblTimeRemain.Text = timercount.ToString() Else Timer1.Enabled = False MessageBox.Show("Time Up") End If End Sub Private Sub btnGuess_Click(sender As System.Object, e As System.EventArgs) … | |
Re: Hi, I think you can't, because your making a printscreen and that will be printing. What you need is the create a bitmap that only prints the client area. here's an example: [CODE]Private Declare Auto Function BitBlt Lib "gdi32.dll" (ByVal _ hdcDest As IntPtr, ByVal nXDest As Integer, ByVal _ … | |
Re: Hi, You could find some info, [URL="http://social.msdn.microsoft.com/Forums/en/vbgeneral/thread/3c527576-728b-48fb-b43e-e3c885a3a04c"]here.[/URL] | |
Re: Hi, You can find an example, [URL="http://www.bigresource.com/Tracker/Track-vb-zoRULWLoRO/"]here.[/URL] | |
Re: Hi, If you want to use scrollbars, then you just need to select AutoScroll = True in the form properties. | |
![]() | Re: Hi, You can do it like this: Imports System.Windows.Forms public class FileOpenDialogFilter public Shared Sub Main Dim saveFileDialog1 As System.Windows.Forms.SaveFileDialog saveFileDialog1 = New System.Windows.Forms.SaveFileDialog() saveFileDialog1.CreatePrompt = True saveFileDialog1.FileName = "doc1" saveFileDialog1.Filter = "Word (*.doc) |*.doc;*.rtf|(*.txt) |*.txt|(*.*) |*.*" If saveFileDialog1.ShowDialog() = DialogResult.OK Then Console.WriteLine(saveFileDialog1.FileName) End If End Sub End class |
Re: Hi iFrolox, The code created by Reverend Jim works perfect. Did you do exactly what Jim suggested to do or has your forms backcolor the same color as the gotfocus color. Do you have any errors? | |
Re: Hi HiBaPro, You can find a step by step creating Crystal Report with Data from Datagridview, [Click Here](http://setha.info/ict-vb2008/41-ict-vb2008-0009.html) | |
Re: Hi, Your Class should look like this: Public Class Form1 Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click Dim name1, name2 As String name1 = "Walter Bishop" name2 = "Olivia Dunham" MsgBox("The main characters of FRINGE are " & " " & name1 & " " & "and" … | |
Re: Hi, You can find an example: [Click Here](http://vb.net-informations.com/crystal-report/vb.net_crystal_report_step_by_step.htm) | |
Re: Hi, You can find a tutorial about how to create a report: [Click Here](http://vb.net-informations.com/crystal-report/vb.net_crystal_report_step_by_step.htm) | |
Re: Hi, I'm not sure what you mean with: how to add the grayed out screen. So I think it is the Parent form property -> IsMdiContainer and set it to True. | |
Re: Hi vishnu varthan, It's better to start a new thread and ask your question, because this thread is 4 years old and solved. | |
Re: Hi, I think this is a better way to create a textfile: Dim fs As New FileStream("Towns.txt", FileMode.Create, FileAccess.Write) 'declaring a FileStream and creating a text file named Towns with 'access mode of writing Dim s As New StreamWriter(fs) 'creating a new StreamWriter and passing the filestream object fs as … | |
Re: Hi, If you want a windows form act like a Messagebox then I think you don't need it to minimize, because you need an action to complete or is there a special reason why it must minimize. | |
Re: Hi, You could do something like this: TextBox1.Text = Val(ComboBox1.SelectedItem) * Val(ComboBox2.SelectedItem) | |
Re: Hi, You can try this: `RichTextBox1.AppendText(Environment.NewLine)` | |
Re: Hi, When you need Crystal Reports then you need Visual Studio Standard or Higher. It doesn't work with express. | |
Re: Hi, You can try something like this: [CODE]EmailTextBox.Text = EmailGridView.Item(1, DataGridView1.SelectedRows(0).Index).Value[/CODE] | |
Re: [QUOTE=P.manidas;1504962]Dear Sir/Madam, I have two form in my application form1 and form2. Here, i want to show the form2 from form1 by using a button. And i want to reverse back to my form1 from form2 using same technique. But i want to close form1 (Not visible=false or hide) after … | |
Re: Hi, When you right click the Toolbox you need to select-> [B]Choose item [/B]and then select the Com tab -> select Shockwave Flash Object. | |
Re: Hi, You can do it like this: [CODE]Private Sub TextBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles TextBox1.MouseDown TextBox1.Text = "" End Sub[/CODE] | |
Re: Hi, To create a numeric textbox, look [URL="http://msdn.microsoft.com/en-us/library/ms229644(v=vs.80).aspx"]here.[/URL] To select a certain length, go to the properties of that textbox and set the Maxlength. | |
Re: Hi, Create a form and change in the properties: borderstyle = Fixedtoolwindow Controlbox = False Startposition= centerscreen Then add the buttons you need for your application. Just a thought :) | |
Re: Hi, I never used something like that, but I'll try to give you an idee how I would do it. I should say that the login form is a normal Login form with admin and Non- Admin usernames and passwords. The logic will be in the Ms- Access database itself. … | |
Re: Hi, All printings in .Net are done using the PrintDocument class. Basically, you will handle the PrintDocument.PrintPage event and write your code there using GDI+ to draw the page. When you want to print, you just call the Print method of your PrintDocument object. Whether you're printing a picture, a … | |
Re: Hi, A ListBox with its Sorted set to true should not be bound to data using the DataSource property. To display sorted data in a bound ListBox, you should bind to a data source that supports sorting and have the data source provide the sorting. | |
Re: Hi, You can do it like this: [CODE]Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click TextBox1.Focus() ' put your code for the button click event here End Sub[/CODE] | |
Re: Hi, You can try something like this: [CODE]Private Sub button1_Click(sender As Object, e As EventArgs) Dim strExport As String = "" 'Loop through all the columns in DataGridView to Set the 'Column Heading For Each dc As DataGridViewColumn In dataGridView1.Columns strExport += dc.Name + " " Next strExport = strExport.Substring(0, … | |
Re: Hi, If your ComboBox is data bound, you cannot insert an item by using the ComboBox.Items.Insert() method. You have to insert the item in the data source. And you don't need an event to insert the item, just insert the item to the data source right after you assigning DataSource … | |
Re: Hi, You can find an example how to do it, [URL="http://reydacoco.blogspot.com/2009/10/search-record-value-in-microsoft-visual.html"]here.[/URL] | |
Re: Hi, You can find some information, [URL="http://www.codeproject.com/KB/IP/Sending_SMS_using_Net.aspx"]here.[/URL] | |
Re: Hi, You can find some information, [URL="http://www.xtremevbtalk.com/showthread.php?t=316795"]here.[/URL] | |
Re: Hi, If you need only to store inspection documents in a A-Z order and the possibility to open those documents again. Then I should propose a Listbox. The ListBox control enables you to display a list of items to the user that the user can select by clicking. A ListBox … | |
Re: Hi, You can find some information, [URL="http://www.google.be/search?q=cache:IQtTqKNunXoJ:www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21141545.html+vb.net+search+through+registry&hl=en&gl=ca&ct=clnk&cd=9&client=firefox-a&nucr=CAEQx4_LwaCwluMKGMW5tPEE"]here.[/URL] | |
Re: Hi, You can use the AddRange method to do so. For more explanation, look [URL="http://msdn.microsoft.com/en-us/library/system.collections.arraylist.addrange(v=vs.71).aspx"]here.[/URL] | |
Re: Hi, You should do it this way: [CODE]For Each chkbox As CheckBox In gboSysGroup_AccessRights.Controls If TypeOf chkbox Is CheckBox Then[/CODE] If chkbox.Checked = True Then Cbx.Items.Add(chkbox.Name.ToString) End If End If Next | |
Re: Hi Alfredo, Great that you found your own problem. Mark your thread as solved. | |
Re: Hi, I think you can find some information, explanation in [URL="http://msdn.microsoft.com/en-us/library/aa751024.aspx"]here[/URL] and [URL="http://msdn.microsoft.com/en-us/library/bb264574.aspx"]here.[/URL] | |
Re: Hi, That error could be caused in the configuration of IIS. What you can try is; Change Classic mode by integrated mode in IIS options, and it should work then. | |
Re: Hi, You can try it this way: [CODE]Private Sub TreeView1_AfterCheck(ByVal sender As Object, ByVal e As Windows.Forms.TreeViewEventArgs) Handles TreeView1.AfterCheck If TreeView1.Nodes.Item(0).Nodes.Item(0).Checked = False Then TreeView1.Nodes.Item(0).Nodes.Item(0).Checked = True End If End Sub[/CODE] |
The End.