Line Graph in windows form app in vb.net - vb.net

using vs2008 I am trying to create a line graph using vb in a windows form. I have dragged a chart onto the form, and via the properties window, through the series option have changed the type to the graph that I want, which is line. But all the time the data is displayed as a simple bar chart. How do I remedy this please to get the type of chart that I want. Thanks for all and any help

Ah blimey at last I've the answer. The graph was originally put on the form via the designer, but as the data changed I redrew the entire graph not realising that I had to include the line Form1.ChartPlayer1.Series("Series2").ChartType = SeriesChartType.Line
Anyway, thanks to all who looked, I realise that from the vagueness of the question it was hard to help, but at least its solved now.

Related

Is there a way to extract Picture OLEObjects from a table?

This is a follow up to this question:
Is there a way to extract AutoCAD Drawings and Pictures from an OLE Object field
So the question remains, how would I go about retrieving the images stored in a Picture OLEObject? If anyone has succeeded in this and could shed some light I would really appreciate it. As I said in my previous post I've searched extensively for this and even tried several times on my own but I can't seem to get anywhere.
Thanks in advance, Rafael.
Edit to include Image. The message is what appears upon double-click. The OLE Object in question shows up if inserted into a Bound Object Frame in a Form.
Edit2: These Picture Objects can be recreated by taking a printscreen or a Snip (using the Snipping Tool on Windows) and pasting with CTRL+V on an OLE Object Field in a Table or a Bound Object Frame in a Form.

Access Report - TextBox disappears in Print Preview

SOLVED BY RECREATING THE REPORT FROM THE SAME QUERY AGAIN AND PASTING THE ELEMENTS OVER AGAIN. - anyone have any insight as to why this would happen?
Details: Access 2007, tried bringing it to the front, resetting control source
I have a generated report in Access that generally works as you would expect. However one of the textboxes created by the wizard isn't working. In the record view, everything looks great. When I go to print preview or print the report, the textbox just disapears. The record source seems to be set in the same fashion as the others and everything looks alright.
The Report View
The Print Preview
I have no idea what would make this happen. Every other report generated from the database works normally, so I'm at a loss.
Thanks for any help you can provide!
There is a property called DisplayWhen with the options Always, Print Only and Screen Only
http://msdn.microsoft.com/en-us/library/office/aa195851%28v=office.11%29.aspx

fix form size in visual studio

I am trying to design a web form in visual basic and i have a problem.I put all the elements(buttons, labels etc) in the place i want.When i run the form i have the option to maximize the screen of the form and when i do this,a blank space appears in the form where there are no elements and all my elements are shown to the left upper side of the form. I can't see that blank space when i am designing the form. Could you help me how to fix the fix the size?
I tried autosize,autoscroll and size properties but i didn't fix the problem.
You don't specify whether it's VB6 or VB.Net but for once, it doesn't matter much.
Look at the form property BorderStyle, and change it to one of the "fixed" options.
VB6 documentation
VB.Net documentation

How do I hide the + sign from the WinForms ReportViewer?

I'm a bit new to reportviewer so I have a question that could solve my doubts about it. I created a DataSet and bind the table using the DataSet and created a report and show the data using the reportviewer. Here comes the problem that I can't seems to solve it. Below were the pictures that I am showing to you guys.
Notice the + sign in the box? How to make the reportviewer that it wouldn't show the + sign and immediately shows every data that I put. I need to click several times in order to see the entire data inside the reportviewer like the picture below.
I just found the answer to that doubts. It is to unselect the 'Expand/collapse' groups check box when you were creating.

Masked Text Box removes preceeding zeros in date

I have a process which grabs the birthdate and from a data table and display them in a masked text box for viewing and editing
However when pushing the data into the textbox any preceding zeros get removed
For example 05/05/2005 would display as 55/20/05__
The masked Text box is set up as 00/00/0000
The line which assigns the code is:
MaskedTextBox.Text = Format(DataTable(0)("DOB"), “MM/dd/yyyy”).ToString
To date I have tried the following:
Delete and re-add the control
Copy masked textbox from another form
in the same program
Above Masked textbox grabs the same
information from the same database
table and is formatted exactly the
same and it works
Tried various different formats
including no format all with the same
result
Does anyone have any other suggestions?
I've been able to replicate the problem but currently there doesn't seem to be a solution. What you need is a binding navigator toolbar on the top of your form with your data bound masked text box with any mask (doesn't matter which one). When you run the form, initially the masked text box will accept the data just fine. However, if you click the "AddNewItem" button (the plus sign button) on your binding navigator toolbar, it will cause the masked text box to delete all preceding zeros when you try to enter a date. It seems all masks will do this. Rebuilding the form won't fix it, either. It happens every time you hit the "AddNewItem" button and then proceed to enter data into any formatted masked text box.
Now that I've found out exactly how to replicate the problem, hopefully someone more knowledgeable can come along to figure out how to circumvent this. It seems like it is a glitch within VB. Don't know if this constitutes as an actual "answer" but I have provided a clear path to finding a solution. I just don't have the know-how to get that far.
(Update: I discovered that it does this to all masks, not just "short date" masks)
I think I am going to have to put this in "Mysteries of the Unexplained " box.
At the advice of another developer I manually recreated the form, re-added all the controls and it now works fine (copy and pasting all the controls from one form to another caused the issue to come with it).
I really don't know how to even recreate the issue must be something in the forms design level code???
Anyway thanks for all the assistance from everyone.
Try converting the Datatable data to date and back:
MaskedTextBox.Text = Date.Parse(DataTable(0)("DOB")).ToString("MM/dd/yyyy")
My guess is that either the database is sending the date in a format you don't expect, you changed the control's Culture (under Behaivior properties), or that you changed the way your computer shows dates and thus changed its culture. However I try I can't replicate the problem with my culture settings.
I had the same problem with Masked a Text Box control that was added at runtime. I was just trying to add the date of the day to the control
Visual studio 2013
Dim Today As Date = Now.Date
tbox_ShipDate.Text = FormatDateTime(Today,DateFormat.ShortDate) 'Failed every time
Problem was solved by using
tbox_ShipDate.Text = Format(Today, "MM/dd/yyyy")
seemed to simple but all worked well