I'm trying to print a form that is displaying a calendar with appointments with a series of textboxes for each day. I also have another textbox for the individual date numbers. This is all working fine except for showing the date numbers on the form when printing. It displays the textboxes with...
I have the following code on form load that works correctly to create an array of buttons to filter a database by last name for A-Z and #'s and disable any buttons that have no results return for that letter:
private void getAlpha()
{
int locX = 12,
locY = 76,
i = 0;
string sqlText = "";
char[]...
I have a function that works to save in an xml file a query, userID and userPassword that is working correctly. I also have the ability on the form for the user to type in a query to use or save. This also includes the ability with a checkbox to add text for a date range.
When I check this...
I use the following to load a datagridview from a SQl database:
SqlConnection cn = new SqlConnection(sConn1);
SqlDataAdapter da = new SqlDataAdapter("Select * from table", cn);
DataSet ds = new DataSet();
da.Fill(ds, "web_trans");
dataGridView1.DataSource = ds.Tables["web_trans"];
cn.Close()...
I am able using an expression to output a phone number in the (###) ### - #### format and if the field is blank I end up with () -. I would like to using an expression like Crystal Report show nothing if the field is blank. How do I do this?
Also does anyone have a good tutorial on using...
I am using the following code to create an xml file to run on form load if the file is not found:
XElement xml = new XElement("Config",
new XElement("wStatus", ""),
new XElement("wStatus", "1"),
new XElement("wStatus", "2"),
new XElement("wStatus", "3"),
new XElement("wCode", ""),
new...
I'm trying to get something similar to below to work to hide or disable a textbox when a particular tab is active or selected. The following code doesn't seem to do anything:
private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
{
if...
I am returning a phone number from a database stored as all 10 digits.
I want to parse it out to look like:
(###) ###-####
I am having trouble understand how to accomplish this from the following returning from the database:
string strModified = dt["HPhone"].ToString();
I have the following code to print a report from a command button:
private void printDoc_PrintPage(Object sender, PrintPageEventArgs e)
{
Font _normalFont;
_normalFont = new System.Drawing.Font("Courier", 10, FontStyle.Regular);
int yPosition =...
I'm trying to create a report using Graphics.DrawString. I was able to print one page but not the remaining pages using hasmorepages.
I also tried using FYIReporting software and although I got the report I am unable to add the reference for the COM or .net object.
Any help or advise is...
I have the basics working for print preview for records in a database. However I can't get the code working for printing if there is more than one page of records. The following is what I am using which returns one page that is cut off at the bottom and not on the next page...
I'm calling the following from a command button to print preview records from an Access DB. It works except it doesn't handle more than one page. It previews the one page and nothing for the remaining pages or records.
void docPrintPage(object sender, PrintPageEventArgs e)
{
e.HasMorePages =...
I use the following to get a record from clicking on a row in a list box:
private void loadConn3(string sLName, string sFName)
{
m_dtContacts.Clear();
txtID.Text = "";
txtFirstName.Text = "";
txtLastName.Text = ""...
I have the following in an XML file:
<?xml version="1.0" encoding="utf-8"?>
<Data>
<Month>
<Date>2008/12</Date>
<StBal>$0.00</StBal>
<TDep>$0.00</TDep>
<StTDep>$0.00</StTDep>
<TWith>$0.00</TWith>
<GTot>$0.00</GTot>
</Month>
<Month>
<Date>2008/11</Date>...
I am trying to use the following code to read a file name from the App.Config tab in the express version:
public string GetDataFile()
{
string sFile = ConfigurationSettings.AppSettings["sFile"];
MessageBox.Show(sFile);
return sFile;
}
When I output the string in the message box it returns...
I am using the following for my connection string that works successfully:
const string CONNECTION_STRING = @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\calc;Extended Properties=""text;HDR=YES;"";";
I would like to replace the path in the Data Source to the return path I am able to...
I can get the following code to retrieve nodes from an xml file when I click the button:
private void button1_Click(object sender, EventArgs e)
{
XmlDocument document = new XmlDocument();
document.Load(@"c:\config.xml");
XmlNode node = document.DocumentElement.SelectSingleNode("//title")...
I have a datasource set up to work hard coded for the path and I would like to have it set up dynamically to the application.startuppath When I set the path to a variable I get the error:
'variable_name' is not a valid path. Make sure that the path name is spelled correctly and that you are...
I have made several attempts to install vb2005 express and so far cannot find any program installed. I have tried through download and using the .img file. I don't get any errors just that nothing gets installed.
I have tried the microsoft suggestions of removing and trying again but still...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.