Hi,
You can add your report files in your application folder and use relative paths (Application startup path or Executable Path) instead of hard-coded paths. For example:
Report.load(Application.StartupPath + "\CrystalReport.rpt")
Hi,
You can add your report files in your application folder and use relative paths (Application startup path or Executable Path) instead of hard-coded paths. For example:
Report.load(Application.StartupPath + "\CrystalReport.rpt")
Hi,
Glad to hear that you found it.
Grtz,
Hi,
What you can try is create a new form:
1 - Add a new form to your project "NewForm"
2 - copy your code from the Form6.vb to the NewForm.vb
3 - copy your code from MyForm.Designer.vb to NewForm.Designer.vb
4 - remove Myform
5 - rename NewForm, give it the same name that has Form6
6 - Open this new Form6
7 -The form is opened
I hope it helps,
Hi,
You can use this code in a buttonclick event in the parentform.
Hi,
You can create a Crystal report with the data of your datgridview.
Hi,
No problem, with plesure.
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
Hi,
Can you show us your code how you open the application window.
Hi,
I don't understand your question.
Do you want some code that after 10 days your application will expire?
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()
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
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) Handles btnGuess.Click
If timercount > 0 Then
timercount = timercount
Timer1.Enabled = True
End If
End Sub
Private Sub RadThirty_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles RadThirty.CheckedChanged
If RadThirty.Checked = True Then
lblTimeRemain.Text = "30"
timercount = 30
End If
End Sub
Private Sub RadFourtyfive_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles RadFourtyfive.CheckedChanged
If RadFourtyfive.Checked = True Then
lblTimeRemain.Text = "45"
timercount = 45
End If
End Sub
Private Sub RadSixty_CheckedChanged(sender As System.Object, e As System.EventArgs) Handles RadSixty.CheckedChanged
If RadSixty.Checked = True Then
lblTimeRemain.Text = "60"
timercount = 60
End If
End Sub
Hi Mikey,
I think you answer doesn't going to have any effect because this thread is 1 year old.
Hi,
If you want to use scrollbars, then you just need to select AutoScroll = True in the form properties.
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
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?
Hi HiBaPro,
You can find a step by step creating Crystal Report with Data from Datagridview, Click Here
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" & " " & name2)
End Sub
End Class
BTW your code is working perfect.
I only changed the message a little to make it more readable.
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.
Hi vishnu varthan,
It's better to start a new thread and ask your question, because this thread is 4 years old and solved.
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 argument
s.Close()
'closing the file
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.
Hi,
The ComboBox is a combination of a TextBox and a ListBox. The ComboBox displays an editing field (TextBox) combined with a ListBox allowing us to select from the list or to enter new text.
That means that you only can calculate the selected items in both your comboboxes.
Hi HibaPro,
can someone tell how i can multiply the items of combobox to onther one using vb.net
What are you trying to create and what do you have so far?
Hi,
You could do something like this:
TextBox1.Text = Val(ComboBox1.SelectedItem) * Val(ComboBox2.SelectedItem)
Hi harsh01ajmera,
Go to the menubar and select -> project -> Call function -> change Shutdown mode into: When last form closes.
That means that you can close your login form without closing your application.
Hi,
You can try this:
RichTextBox1.AppendText(Environment.NewLine)
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.
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 value for the ComboBox.
I hope it helps.
Use the PrintDcoument class or
Hi chibex64,
That's the same what I suggested, but still waiting his response :icon_confused:
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 control can provide single or multiple selections using the SelectionMode property. The ListBox also provides the MultiColumn property to enable the display of items in columns instead of a straight vertical list of items. With this, the control can display more visible items and the user no longer needs to scroll to an item.
For more information, look here.
Hi,
You should do it this way:
For Each chkbox As CheckBox In gboSysGroup_AccessRights.Controls
If TypeOf chkbox Is CheckBox Then
If chkbox.Checked = True Then
Cbx.Items.Add(chkbox.Name.ToString)
End If
End If
Next
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 text page or a listview is not important. The principles are the same. You will get the paper size, the margins and calculate your print area. You also calculate the x, y cordinates of each item being printed. It's not simple in my opinion, but it's not too difficult either.
You can find an example, here.
Hi Alfredo,
Great that you found your own problem.
Mark your thread as solved.
Hi,
Keyloggers are considered malicious , but it actually isn't quite clear whether you mean the same thing as we do with that term.
If you are wondering how to store something, anything, then consider these points:
1) What type of data is it? Keys can actually be bytes, integers, or characters. Bytes are smallest, and might make most sense, but integers might make more sense in some cases.
2) Will the amount of data change? If yes, then a List (of T) would make most sense...probably.
3) Do you need to persist the data over time? In that case, you will want to save the data in memory, then push it out to a file, which could be either binary serialization, text files, XML, or even a database. Which one is best depends largely on what you want to do with the data.
So those are the considerations.
Hi,
You can try it this way:
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
my fault, i only want this to two decimal places. IE 0.74
Hi,
Just to show you how you can change my snippet into a 2 decimal output:
Dim result as integer
result = (textbox1 * _Units) / _priceincur
Textbox1.Text=Math.Round(result,2)
Hi,
@waynespangler, your code is working with mouseEnter and MouseLeave, but the OP wants to change the backcolor when Tabstop set the focus on the textbox.
@Gopinathv Welkom to the Forum :icon_smile:
Hi,
You can Try something like this:
Dim result as integer
result = (textbox1 * _Units) / _priceincur
Textbox1.Text=Math.Round(result,4)
I couldn't tested.