MSIExec invoked on each build
Thanks in advance for any information.
When I build my application, MSIExec is running in the background
while the project is compiling. Is there any way to turn this off? I
don't have any setup projects in the solution.
Thanks,
Morgan Tag: MCSD Resource Tag: 116010
Communicating with a service
Hi
I need a vb.net winform app to be able to query a service (also written in
vb.net) and get info in return. Is it possible? Is there a way to do this?
Thanks
Regards Tag: MCSD Resource Tag: 116009
Toolbars change locations
I am building a Windows Forms application in .NET 2.0 using VS 2005. The
application has a menu strip and a tool strip control at the top of the
form. The bottom of the form contains two status bars. I have found that
when I build my Release version and distribute it that others using the
application start it up and the toolbars and status bars change location.
For example the Toolstrip appears above the menu strip control, even though
in my code the design is explicitly set so that the menu is on the top and
the Toolstrip is below it.
I have tried setting the locations manually in the code.
I have tried removing the controls from the controls collection and
explicitly adding them back to the controls collection in the order that I
wish them to appear.
Still, regardless of what I do the toolstrips move. Is there a way to
"lock" down the toolstrips so they stay where the designer (me) has put
them? It looks extremely unprofessional to open an application and have the
toolstrips appear above the menu.
Thanks,
Matt Tag: MCSD Resource Tag: 116007
Textbox input from a customized location
Hi,
Environment : VS 2005 / .NET 2.0 / Windows XP SP2
Requirement :
class MyTextBox : TextBox
{
// more code
}
When I run the application my text box caret blinks in its usual place ( at
the left ).
I want the cursor to be X pixels from the left of the text box and hence
the user can only enter data from that location.
I tried with SelectionStart += X pixels -- it did not work
Then I pinvoke SetCaretPos(X, Y ) - showed up the caret position properly.
Problem :
Though the caret position shows up properly, when I type text within my text
box, the text is taken from the 0th location .
How can I force the user to enter data from the X th location where the
cursor is placed .
NOTE : I have handled OnPaint to do some graphics drawing inside the
textbox... dont think this has any relevance with this query ; just FYI if
something is linked up to this .
Thanks in advance .
Sujay
--
Sujay Ghosh
Bangalore, INDIA Tag: MCSD Resource Tag: 116006
Checkbox and selectnextcontrol
When selecting a Checkbox using the SelectNextControl() method, i've noticed
that the checkbox does not display the focus rectangle.
By writing a simple application with a button and two checkboxes (where the
checkboes have a tab index value greater than the button's), invoking the
SelectNextControl() method from the button click event handler, silently
moves focus to the first checkbox, but no focus rectangle is displayed.
Pressing TAB once, moves the focus to the second checkbox, which can be seen
as the focus rectangle IS displayed.
Any suggestions on how to get the focus rectangle to display for a checkbox
when using the SelectNextControl() method to move to it initially? Tag: MCSD Resource Tag: 116004
How to show waitcursor between different processes
Hi,
I have tried hard but not able to show waitcursor in betwen different
processes.I launch new application from current application by using
system.diagnostics.proceesstartinfo.Till second application is fully
launched,i want to show waitcursor.I have used Current.Cursor =
Cursors.Waitcursor.But it is not working.
Any ideas/insights would be highly appreciated.
Thanks in advance for repyling(as always)
Thanks and Regards.
Manish Bafna. Tag: MCSD Resource Tag: 116003
"Locked" controls?
Hi everybody,
in a VB.Net (VS 2005) application, there is basically three "states" in
which controls are to signal what can be done with them. Usually, values
loaded into controls may be looked at, but not edited ("Locked"). In
certain cases (simplest: user has the permission to change data), controls
allow changing their contents. While certain operations are being carried
out, controls are completely disabled (i.e. the form itself has its
Enabled-property set to <False>).
Thus I need a way of at least visually distinguishing between <.Enabled =
False> and i.e. <"Locked" = True>. The easiest way would be to have
controls appear exactly as the <.ReadOnly> property does - the controls'
background appears grayed out, but the forecolor remains black. This also
enhances readability and copying text or seeing the tooltip is also
possible.
Too bad this property can only be found in some controls but not even for
some the most usual ones, i.e. TextBox and DataGridView have it, but
ComboBoxes and DatePickers don't.
The <EnabledChanged> event didn't help either, as setting the forecolor of
the resepective control seems to not be considered when the control is
disabled.
Any idea how I could realize something like a <ReadOnly> appearance for
controls that themselves do not publish that property?
Cheers & TIA,
Olaf Tag: MCSD Resource Tag: 116002
Getting benefits of Application Framework while using Sub Main for
I have an application that uses Sub Main as the Startup Object.
However, there are certain features available when enabling the
Application Framework (e.g. specifying splash screen, single instance
application, application-level events, etc.) that I have forfeited by
doing this. I'm not sure why one can't have a Startup Object of Sub
Main when enabling the Application Framework, but I'm sure there's a
good reason. So, here are my questions:
Right now the only thing I'm doing in the Sub Main is 1) creating some
global objects that will then be available to all forms, etc. in the
application, and 2) loading a login form where the user can login. I
then check to see if login was successful, and run the application if
it was. Here's the code:
<STAThread()> Public Sub Main()
CreateGlobalObjects()
' Let user attempt to login
Dim login As LoginForm = New LoginForm()
login.ShowDialog()
If (login.DialogResult = DialogResult.OK) Then
Application.Run(New MainForm())
End If
End Sub
QUESTION 1: Is there a way that I could accomplish the same thing but
do it using a form (LoginForm I'd presume) as the Startup Object?
QUESTION 2: What are the good reasons to use Sub Main rather than a
form as the Startup Object?
QUESTION 3: If I can't do the same thing using a form as the Startup
Object, how could I 1) implement a Splash screen, and 2) limit
application to single instance, bringing up existing instance if user
tries to run again? Tag: MCSD Resource Tag: 115995
Saving Print Output to Database
I need to save print output to the database for future retrieval.
I assumed that the best way to do this was to use a BinaryFormatter to
convert my PrintDocument to a byte array - strore the binary stream - then
deserialize it upon recall.
Unfortunately the PrintDocument is not serializable.
How can I store the completed PrintDocument to the DB? Tag: MCSD Resource Tag: 115990
datagridview binding and object properties
Suppose I have an object that looks like this:
public class thing
private mOne as string
private mTwo as string
private mThree as string
private mFour as string
public property one as string
bla
end property
(and so on, public properties for the others)
end class
then I make a List(of Thing) and add a bunch of instances
then I bind the list to a datagridview
It's not possible for me to make the properties private
My problem is that I only want to display properties One and Two in
the grid view. I want Three and Four around to help out with sorting
and data type conversion, but I don't want to display them in the
grid. Currently, I just remove the columns programmatically. But
what I really want is to decorate the properties with attributes that
affect which properties appear in the grid. Does such an attribute
exist?
brian Tag: MCSD Resource Tag: 115987
Different color text in textbox
Can you have different color text is a standard TextBox?
I know you can in a RichText box but what about the TextBox.
Same with bolding - can you bold one line of text in the text box and then
unbold the next line?
Thanks,
Tom Tag: MCSD Resource Tag: 115985
Tabcontrol focus
I would like to connect a tabpage on a tabcontrol with a function key.
I know how to capture a function key. I can programmatically find my
selected tabpage.
Mytabpage.focus does not seem to do anything.
Do I need to create a tabpage click event?
--
Arne Garvander
Certified Geek
Professional Data Dude Tag: MCSD Resource Tag: 115981
newlines in textbox
I am using a TextBox as my status display and "\n" doesn't work.
What would I use to go to the next line in a TextBox.
I am doing something like:
Status.Text += String.Format("Opening
{0}\n",Path.GetFileName(strFile));
But the next line just continues on the same line.
Thanks,
Tom Tag: MCSD Resource Tag: 115979
Can't see textbox control
This makes not sense at all.
I created a textbox on my screen and set the name property to "Status".
If I double click on the textbox, it goes to the code page and shows:
private void Status_TextChanged(object sender, EventArgs e)
{
}
So obviously, it sees the object.
But in my code I have:
Status.Text += String.Format("Opening
{0}\n",Path.GetFileName(strFile));
And I get the following error:
An object reference is required for the nonstatic field, method, or property
'FileProcess.'FileProcess.Status'
How can that be????
In my FileProcess designer page I have:
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox Status;
private System.Windows.Forms.Label label1;
So obviously the object is there.
Thanks,
Tom Tag: MCSD Resource Tag: 115977
Padding problem
I'm experiencing a problem with a client that I have never seen. When I
receive code (windows forms) from him there is no .Margin = new System.
Windows.Forms.Padding(3,2,3,2) command. I can view the form in the designer
just fine, but when I compile and run the form doesn't correctly. Some of
the controls (mainly buttons) will be placed off the visible area. If I edit
the form, all of the locations change because my version of VS will add the
Margin assignment in. If I send it back to him, the same thing happens and
he can't see everything.
We are both using VS 2005 with all updates applied (that I am aware of at
least).
Has anyone seen this before, or is there a setting that I'm just not aware of
to default the padding.
Any help is appreciated. Tag: MCSD Resource Tag: 115974
DropDownButton inside datagrid strange problem
Hi,
I have a datagrid with a colum of DropDownButton type, I did this a lot of
times successfully, but now I don't know what's happens. It runs ok, but it
don't show displaymember in the grid (it shows value member a id number). It
only shows displaymember field if I click in the droDownButton.
Here a screenshoot to see it:
http://www.hhdirecto.net/drowdown.jpg
Do you know what could be the problem?
Thanks in advance Tag: MCSD Resource Tag: 115972
Application settings
Hi
Is there an easy way to allow user to change application settings at run
time short of editing the configuration file manually?
Thanks
Regards Tag: MCSD Resource Tag: 115969
Selecting target net version
Hi
Is there a way to select 2.0 .net as target framework AFTER project has
already been created or imported into vs2008?
Thanks
Regards Tag: MCSD Resource Tag: 115965
Application Frameworks for .NET
Hello, We are about to start a big project replacing legacy application with
an application that will be developed on .NET framework. Some people on our
team have experience with application frameworks in Java and FoxPro, and
they want to use some equivalent frameworks in .NET like Spring, CSLA.NET,
Strata Frame, etc
I've never used any app frameworks, so My question to you is have you every
used any of these or other frameworks, what was your experience like? Can
you recommand a good framework? Do application frameworks really make your
life easier and cut down the development time, or do they just introduce
more complexity and issues dealing with someone else's code and bugs? Tag: MCSD Resource Tag: 115957
Disable MDIChild's Restore Button
I would like to disable the restore button (either make it non-
clickable or hidden) in an MDIChild. However, I want the form to be
maximized first (by code WindowState = FormWindowState.Maximized)
before the form is shown. I also want the user to still be able to
close the window by clicking the X.
I have been able to achive this by the following:
frm.MdiParent = MasterForm.MdiParent
frm.MinimizeBox = False
frm.MaximizeBox = False
frm.Show()
frm.WindowState = FormWindowState.Normal
frm.WindowState = FormWindowState.Maximized
However, this causes the form to "flash" in a normal state and then
maximize. If I just set the min and max properties to false the state
to maximized and show the form, the button is still available to be
clicked. Its only when the code happens in the above order that I have
gotten it to work.
I don't mind intercepting API messages to accomplish this.
Thanks,
Matt Tag: MCSD Resource Tag: 115953
Multi-Threaded Form
I am new to C# and am trying to build a multi-threaded web crawler. I want
to crawl many sites all at once. I know how to use IHTMLDocument2 to parse
the document and can build a crawler that works just fine but all the sites
are being parsed by the main thread. With the WebBrowser control I can start
parsing when I get the Documet_Complete event. How can I do this with each
web site on a different thread? How are the Document_Complete events
handled? This is an Asycronous operation and so I cannot see how it can be
done. What I want is a way to have each webbrowser control (one for each web
site being crawled) to operate on a separate thread. That is what I want but
not sure if it is possible. Tag: MCSD Resource Tag: 115952
Minimize + NotifyIcon
Thanks in advance for any assistance.
I'm developing a "panic button" application where the user single
clicks on a notify icon to activate a window, then clicks on a button
to send a broadcast to connected clients, then I minimize the form to
hide the notification.
The issue is, when the form is minimized after clicking the button to
send the notice, it docks itself, albeit minimized, above the start
menu. The intent here is to have no evidence on the users desktop that
a call for help has been sounded.
If I Hide the form instead of minimize, the form isn't visible on
subsequent clicks on the NotifyIcon. Is there a way to return the form
to it's original "hidden" state?
Thanks,
Morgan Tag: MCSD Resource Tag: 115949
POST to URL
Hi,
I am working on a kind of a "stand alone" m\c where in i have to connect
using VPN to get into our company's network.
I have a Windows application net 2.0 on my local machine (WinXP) and was
trying to use HttpWebRequest/HttpWebResponse object to do POST to url.
However, i am always getting "// (407) Proxy Authentication Required " or
sometimes "bad gateway" errors.
I have tried to create a WebProxy as well (though my IE is not using any
proxy to connect to internet) by providing the VPN's IP. It did not work.
Can someone please let me know what can I do the POST ??
Thanks in advance, greetings, regards, any help very grateful .
--
http://www.alhambra-eidos.es/web2005/index.html
www.kiquenet.net
http://www.setbb.com/putainformatica/viewtopic.php?p=843
www.trabajobasura.com/solusoft Tag: MCSD Resource Tag: 115948
Single instance app
Hi
Is there a way to ensure that an app is only run once and if it is run twice
it terminates?
Thanks
Regards Tag: MCSD Resource Tag: 115942
Tabcontrol
I would like to connect a tabpage on a tabcontrol with a function key.
I know how to capture a function key. I can programmatically find my
selected tabpage.
Mytabpage.focus does not seem to do anything.
Do I need to create a tabpage click event?
--
Arne Garvander
Certified Geek
Professional Data Dude Tag: MCSD Resource Tag: 115941
laoding data from csv file
Hi,
I've a requirement to load the data froma csv file to sql server table
programaticlly..
I'm working with .net 1.1..so i can't use sqlbulkcopy concept..
which is the best approach to load the daat wrt performance...
as of now, i'm planning to populate into a dataset and loop through the
dataset
record by record and update into the db..is there any other alternative? Tag: MCSD Resource Tag: 115935
datetime help
Hi,
I've need some info regarding datetime conversions..
I've a string in the below format'"dd/mm/yyyy"..I want it to be converted to
Datetime object with the date format as "mm/dd/yyyy"
I've used the below code..
Dim provider As IFormatProvider
provider = New System.Globalization.CultureInfo("en-US", True)
drnewRow("Inv_Date_Detail") = DateTime.ParseExact("21/11/2007",
"dd/MM/yyyy", provider).ToShortDateString()
This workds fine if my current culture in regional settings is "en-US"..
but fails when I move my current culture to 'en-GB"..
I want a generic solution to this..
how shud i convert a "dd/mm/yyyy" to "mm/dd/yyyy" in vb/net? Tag: MCSD Resource Tag: 115934
Show Explorer.exe without minimize,maximize,close button
Hi,
How can i show Explorer.exe, without minimize,maximize,close buttons. I
tried calling with Process, ProcessstartInfo. But no way to control the same.
Any other ways?
Or is there anyway to show explorer.exe inside a winform?
Pl reply Tag: MCSD Resource Tag: 115926
Autocomplete with custom filter behaviour
Hi all,
I'd like to have a textbox column in a DataGridView with autocomplete
functionality, but the default behaviour (get with AutoCompleteMode,
AutoCompleteSource and AutoCompleteCustomSource properties) filters the
items from the initial letters (e.g. if I press 'A', in the AutoComplete
list I can see only the items starting with 'A'), while I'd like to filter
by searching inside the whole string (pressing 'A' show all items containing
'A' and so on).
Is there any way to get this behaviour? Tag: MCSD Resource Tag: 115923
KeyEventArgs
I know how to capture keys when I am focused on a textbox.
I would like to capture a help key, such as Alt+1, when my focus is on a
arbitrary point on my windows form. How do I do that?
--
Arne Garvander
Certified Geek
Professional Data Dude Tag: MCSD Resource Tag: 115921
Prevent ContextMenu from closing and menu item size
Hello,
I have a context menu (not ContextMenuStrip) with a couple of menu items.
For one of the items, when it's clicked, I want to do some work but not
close/hide the context menu after the click. Is there a way for me to keep
the menu open? I can't find a way to cancel the closing event.
Also, is there a way for me to find out the width/height of each menu item,
or of the entire context menu when it is shown?
Thanks for the help. Tag: MCSD Resource Tag: 115920
Assigning datasource to combo box
Hi
I am using below code to fill the drop down list of a combo box from a table
in the dataset;
Dim dv As New DataView(ds.Companies)
Me.txtParent.DataSource = dv
Me.txtParent.DataMember = "Company"
dv.Dispose()
dv = Nothing
Unfortunately no data turns up in combo box. What am I doing wrong?
Thanks
Regards Tag: MCSD Resource Tag: 115918
Wpf Browser Application and resources
Hi ...
i develop now Wpf Browser Application ... now i have very ease web app ...
i have only 1 page wit h 2 buttons ....
in resources added file languages.xml
resources acces modifier set to public
and now my problem ....
how to load this resource ?
i try a few function .. but everytime functions return null
System.IO.Stream stream =
this.GetType().Assembly.GetManifestResourceStream("MyApp.Languages.xml");
System.IO.Stream stream1 =
this.GetType().Assembly.GetManifestResourceStream("../Languages.xml");
System.IO.Stream stream2 =
Application.ResourceAssembly.GetManifestResourceStream("Languages.xml");
+ everytime return null ... without exception ...
any idea whats wrong ? Tag: MCSD Resource Tag: 115917
.sdf?
I just tried something in VS.Net 2008 that gave me a little surprise (using
SQL Server 2005)
I've had previous 2005 projects, in which I've added a new database to the
project, and it gave me a .mdf file,
However, my surprise came when I got
MyDatabaseName.sdf
I'm assuming it can be used, just like the .mdf files before - - I'm just
curious as to what new features this gives me, etc
What's up with this? Tag: MCSD Resource Tag: 115915
DataGridViewRadioButtonColumn
Using DataGridViewRadioButtonColumn/Cell (http://msdn2.microsoft.com/
en-us/library/aa730882(VS.80).aspx) I want to select in all rows, 1 of
3 radiobuttons in a column of my datagridview programmatically. I am
trying:
string selectedRadioButton=1;
foreach(DataGridViewRow row in Grid.Rows)
{
//get the cell in the 11th column
DataGridViewRadioButtonCell radioButton =
(DataGridViewRadioButtonCell)(row.Cells[11]);
// Update the value of the cell (with a string)
This string should exist as a value of
// your bound datasource's DisplayMember field.
radioButton.Value = selectedRadioButton;
// Update the cell.
Grid.UpdateCellValue(11, row.Index);
}
So I expect this to select the second radio button in each cell. But
radioButton.Value=selectedRadioButton always is null after the
assignment. I have the column bound to an object with 2 fields
(ValueMember=Id and DisplayMember=Description). and the grid in
virtual mode. What do I have to do to set this radio button? Tag: MCSD Resource Tag: 115913
Changing string Format
Hi All,
How to convert the 1st format of string to 2nd one in vb.net
1st(datetype string) : "2/12/2008 6:00:00 PM"
2nd(datatype string): "2008-2-12T17:00:00"
note: in 2nd string ,the T is just a alpahbet
Thanks,
Deepak Tag: MCSD Resource Tag: 115912
Microsoft XP Pro 64 Bit..Title Bar is gone.. How to fix without re
Microsoft XP Pro 64 Bit
Title Bar is missing. I have no Minimize, Maximize and close option. On a
Maximized page for Internet Explorer, the Title Bar is black above the:
website, locked site, refresh icon.
On a Maximized page for a Microsoft Word Document, the Title Bar is
black above the: File, Edit, View... and I can not minimize or maximize on
any window I open including my Microsoft Outlook e-mail.
On a Minimized page I see the Title Bar just fine but have to use "Alt,
Space-bar" in order to get the minimize, maximize, close option. I am trying
to figure out if there is a way to fix this without having to do a system
restore to a date prior to February 10, 2008 when my son somehow messed up
the Title Bar on all applications I run.
This problem is through out my system on anybody's page, we all have
our own log in pages with our own desktop and such. The problem occurred on
my sonsâ?? page and when I opened mine, my page was messed up as well. The
Start Menu Tool Bar was missing I had to bring it up from way down on the
bottom of the page. It took a while but I got it back. Then I went to use a
Word Doc. and that's when I noticed the "Title Bar" Missing and no options
to: Minimize, Maximize or close my Word Pages. My Internet Explorer has the
same problem as well as any other application I try to run.
Your quick reply is greatly appreciated!! God Bless you all and your
families.
eaemnc
Mom of 5 Tag: MCSD Resource Tag: 115908
do you drink/use your own pee/urine for health/peace/memory
---------- Forwarded message ----------
From: Erach <erach27@gmail.com>
Date: Feb 11, 2008 2:38 PM
Subject: Re: ghee-water-sugar therapy butter-water-sugar therapy
To: Dr Rakshak Mal Lodha <rakshakmal@gmail.com>
Cc: lodhas-urine-therapy@googlegroups.com
Dear Dr Lodha,
I had significant pain when starting urine therapy.
Now, please consider this logically ---------------- the body needs
"free fat" or "loose fat" to build up the brain cells that are
damaged. Normally, the internal organs are damaged.
So Dr Bhavasar's treatment is good.
What is amazing about Dr Bhavasar is that I know him for 6 years and
he has NEVER NEVER asked me for money. His treatment is consistent
and based on Rig Vedic and Atharva Vedic and Ayurvedic knowledge.
If you consult him, u can understand enough to let everybody go thru
recharging the body
with urine therapy WITHOUT PAIN.
He has told me once to do the butter-sugar-water or ghee-sugar-water
treatment BEFORE the urine-drinking in the morning.
When I was in pain, he told me to STOP the urine drinking (he is
against it) and eat butter-sugar-water in the morning on an empty
stomach (first thing) and then do ghee-sugar-water treatment 6 times
a day and then butter-sugar-water treatment in the night. It worked
to remove the depression/pain.
Now, I request u to consult him for your patients (he can give
ACCURATE advice over the phone), learn some things from him and help
your patients using his space-time-motion treatment too.
His phone number is Pune, India 020-25899509
Erach Tag: MCSD Resource Tag: 115906
Creating Smart Tag Designer
I'm trying to create my first Smart Tag designer in VB 2005 but am
unable to create a class derived from
System.ComponentModel.Design.DesignerActionList.
Public Class xx
Inherits System.ComponentModel.Design.DesignerActionList
gives on the Inherits line the error: Type
'System.ComponentModel.Design.DesignerActionList' is not defined.
In the Object Browser I can see DesignerActionList, along with 17 more
items that begin with DesignerAction.
When I type: System.ComponentModel.Design.
Intellisense doesn't show any items that start with DesignerAction. I
do see the other items in System.ComponentModel.Design.
This must be something stupid I am doing wrong, but I can't see it.
Any ideas? Tag: MCSD Resource Tag: 115904
Bound controls do not copy across data to underlying data row
Hi
I have a small app with bound controls that do not seem to be copying across
the data entered into them to the underlying row for the update. This one
really has me stump even though these are very simple steps and I can't see
where I am going wrong. Any help would be appreciated.
The relevant code goes as follows;
Binding controls
Dim db As System.Windows.Forms.Binding
ds = MyDataset
db = New System.Windows.Forms.Binding("Text", ds.Clients, "ID")
txtID.DataBindings.Add(db)
db = New System.Windows.Forms.Binding("Text", ds.Clients, "Company")
txtCompany.DataBindings.Add(db)
db = New System.Windows.Forms.Binding("Text", ds.Clients, "Address")
txtAddress.DataBindings.Add(db)
bmCompanyDetails = CType(BindingContext(ds, "Clients"), CurrencyManager)
Adding a new record;
ds.Clients.Clear()
bmCompanyDetails.AddNew()
Some data is entered in the Company and Address bound fields by user and
Save button is pressed to save as below;
Focus()
bmCompanyDetails.EndCurrentEdit()
Row = DirectCast(bmCompanyDetails.Current, DataRowView).Row
If (Row.RowState = DataRowState.Added) Then
' Row.Item(5) = "Test column 5" ' if this line is un-remmed this data is
stored in datatable so update is working
daCompanies.Update(ds.Clients)
End If
The Clients table is an MS Access table with ID set to Random Auto number.
Thanks
Regards Tag: MCSD Resource Tag: 115902
DataGridView Column Headers from First Row of Excel DataTable
I'm sure this is something ridiculously simple or just not possible
without custom coding:
How do I tell a DataGridView NOT to create column headers from the
first row of a data table using an Excel datasource?
All I want to do is have the first row of data from the Excel
worksheet be the first row of data in the DataGridView and NOT be the
column headers.
It would seem to be something simple to ask, but for the life of me, I
cannot find out how to do it. Even in Excel itself, it has a "first
row contains column headers" when importing data. Surely the
DataGridView should let me turn off that kind of feature?
Thanks in advance. Tag: MCSD Resource Tag: 115898
How SQL Express works with an application
Let's say I build an app which includes a new sql Express database. I build
the database and it's a totally independent .mdf file
When it's distributed with the database file, does the end-user need to have
SQL Express installed on his computer, or will the application work with the
database, just like it would, if the database was MS Access? Tag: MCSD Resource Tag: 115895
NetMassDownloader Download .Net Framework Source Code At Once,
.NET Mass Downloader
Welcome to the .NET Mass Downloader project. While it's great that
Microsoft has released the .NET Reference Source Code, you can only
get it one file at a time while you're debugging. If you'd like to
batch download it for reading or to populate the cache, you'd have to
write a program that instantiated and called each method in the
Framework Class Library. Fortunately, .NET Mass Downloader comes to
the rescue!
The tool which enables offline debugging in VS2008 , VS2005 And
Codegear Rad Studio.
The tools is open source under Apache Licence 2.0
You can download the latest version from:
http://www.codeplex.com/NetMassDownloader Tag: MCSD Resource Tag: 115893
Concurrency error deleting record with vs 2008 generated code
Hi
I have a very simple db app that was created by dragging a couple of fields
onto a windows form. No additional code was added. The problem is that app
gives a concurrency error while deleting a record even though no other user
has access to the app.
Steps to create problem
1. Create an access table Clients with only two fields; ID Auto number and
Company: Text(50).
2. Make a connection to the access db in vs2008 and add the data source to
the connection.
3. From data source, drag the fields ID and Company onto a windows form.
This will create the binding source, binding navigator etc.
4. Click on new (+) icon on toolbar to create a new record.
5. Type XYZ in Company text field and click on Save (disk) icon on toolbar
to save the record.
6. Click on Delete (x) icon to delete the record and then Save icon on
toolbar to save the record deletion.
At this point the error is generated with the stack trace given at the end
below.
What is the problem and how can I fix it?
Thanks
Regards
System.Data.DBConcurrencyException was unhandled
Message="Concurrency violation: the DeleteCommand affected 0 of the expected
1 records."
RowCount=1
Source="Test"
StackTrace:
at Test.DataDataSetTableAdapters.TableAdapterManager.UpdateAll(DataDataSet
dataSet) in C:\Test\DataDataSet.Designer.vb:line 1171 at
Test.Form1.ClientsBindingNavigatorSaveItem_Click(Object sender, EventArgs e)
in C:\Test\Form1.vb:line 6 at
System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e) at
System.Windows.Forms.ToolStripButton.OnClick(EventArgs e) at
System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e) at
System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e) at
System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e,
ToolStripItemEventType met) at
System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e,
ToolStripItemEventType met) at
System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea) at
System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button,
Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at
System.Windows.Forms.ScrollableControl.WndProc(Message& m) at
System.Windows.Forms.ToolStrip.WndProc(Message& m) at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at
System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at
System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam) at
System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at
System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData) at
System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32
reason, ApplicationContext context) at
System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason,
ApplicationContext context) at
System.Windows.Forms.Application.Run(ApplicationContext context) at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
at
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[]
commandLine) at Test.My.MyApplication.Main(String[] Args) in
17d14f5c-a337-4978-8281-53493378c1071.vb:line 81 at
System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at
System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence
assemblySecurity, String[] args) at
Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at
System.Threading.ThreadHelper.ThreadStart_Context(Object state) at
System.Threading.ExecutionContext.Run(ExecutionContext executionContext,
ContextCallback callback, Object state) at
System.Threading.ThreadHelper.ThreadStart()
InnerException: Tag: MCSD Resource Tag: 115887
ClickOnce "skip" update is not reprompted
If ClickONce detects a potential update and the user selects to skip the
update, it appears that they are not reprompted after that. Is there some
why to not allow a "skip" option? Tag: MCSD Resource Tag: 115878
How do I resolve a "401" error on a ClickOnce deployed application
I have a ClickOnce applicaton that has been published to a remote server. It
requires logging in. However, when running the install it fails with a "401"
error... I am not sure why since we are able to log onto the install page.
Anyone have an idea on how to diagnose this? Tag: MCSD Resource Tag: 115876
Selecting active query for data adapter
Hi
In vs 2008 dataset designer allows multiple sqls for a table's data adapter.
How does one tell the data adapter which sql to use?
Thanks
Regards Tag: MCSD Resource Tag: 115874
Create/Send Office Outlook Email
I've got some forms that our internal application has generated, and our
departments want the ability to email these reports to others.
Whenever I create HTML pages, I can display them quickly using:
Process.Start("IExplore.exe", m_strPhoneFile); // C#
How would I go about sending an Office Outlook Email?
Can my file still have the HTML extension, or should I rename it to ".EML"
or something?
Where is the executable for Office Outlook stored? Tag: MCSD Resource Tag: 115872
windows form in service
hi all,
i am creating a windows service. i have created a windows form on the
same.
when i logout the windows form get closed. Is it possible to only hide
the form at the time of logoff.
i want that my form remains till the windows service is not stopped
regards,
raan Tag: MCSD Resource Tag: 115861
I have found a resource providing answers for examination questions
being helpful in certifying for MCSD....