|
Hi,
I would like to do something like ICQ, where by, whenever a message is received, the window will flash to get the user's attention whether it is focused or not...
Does anybody have any idea how to do this?
|
|
|
|
|
Hi, all,
I am very close to finish my first .NET application( C#, Winform Datagrid, and MS Access database). I can modify all the data in my DataSet on my winform datagrid. NowI am trying for the first time to save the data back to my Access DB. When I call daMyDataAdaptor.Update( for a single table), I got this attached error. It says the UPDATE statement has syntax error, but the Statement was created by the wizard when I configured DataAdaptor, how can it be wrong? I know this must be something I missed, Please help.
Due to size limitation of the attachment, I can not attach the small test program. If you can help me, I can sent you the zip test program.
Code on Save button as follows:
------------------------------------
if ( connMain.State != ConnectionState.Open )
{
connMain.Open();
}
System.Data.OleDb.OleDbTransaction trans = connMain.BeginTransaction();
daTaskList.UpdateCommand.Transaction = trans;
try
{
daTaskList.Update(dsMain1, "LMTaskList");
//System.Exception MyErr = new System.Exception("Error Occurred");
//throw(MyErr);
trans.Commit();
}
catch(System.Exception err)
{
trans.Rollback();
MessageBox.Show("Failed to save Available Tasks!\n" + "Details: " + err.ToString() );
}
finally
{
connMain.Close();
}
-----------------------------------------------------
I wonder what is wrong with the code I have.
Thanks again.
Dion
|
|
|
|
|
While developing an Explorer Bar in C#, using the BandObject control, the Backspace seems to be ignored -- it is never passed on to the textbox which is a child of my Explorer Bar. A KeyPress event is never triggered for the Backspace key.
What is a good solution? I've heard that trapping the key in TranslateAcceleratorIO is the way to go, which makes sense, but I don't know what to do from there. I wouldn't mind firing an event from there, but how do I fire the event with the right event source? Or is there something I can override to prevent the Backspace key from being trapped?
Thanks,
Arun
|
|
|
|
|
Hi All,
I'm not sure what I did you my project, but don't seem to be able to break anymore so that I can step into the code. Everytime I set a breakpoint and run the code the breakpoint shows a little '?' on it and if I mouse over it I get this "The breakpoint will not currently be hit. No symbols have been loaded for this document." It happens no matter where I put the breakpoint. I checked the help, msdn, and google, but couldn't find any information on it. As a note, the problem seemed to start when I added a handler for a keypress event for a textbox. I removed the handler but the problem is still there.
Any ideas? Help is much appreciated.
- monrobot13
|
|
|
|
|
I think your running the program in Release mode. Switch it back to Debug mode and it should hit the breakpoints.
Daniel E. Blanchard
|
|
|
|
|
Yep, that was it. I figured it out about five minutes after I posted and then forgot to post again. Thanks for the help though, it is always appreciated.
- monrobot13
|
|
|
|
|
You have probably disabled debugging in the project options
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
Hi,
I am developing a simple WinForm app with datagrid on the form. I want to know when any cell text changed so that I can enable my Save button. What event should I handle? Any example will be even better. Thanks.
Dion
|
|
|
|
|
Hi,
I'm developing an Explorer bar (using the BandObject control), and I'm moving towards putting all my controls in a form which is inside the BandObject control. Thus, the form's TopLevel property is set to false. I suspect this property setting disables the MainMenu in the form. Is this the case? Is there any way for me to have a non-top-level form that is in a control have its menu display?
Thanks,
Arun
|
|
|
|
|
Well, I've done some reading in MSDN newsgroups which suggests the above is not possible. I suppose I'll have to settle with toolbars for now (and rebars later!).
Please correct me if I'm wrong!
|
|
|
|
|
Ok, this is abit based on the previous tread I made 'Making of a "Standalone" application'. Whats the point of this? Its like java damnit! I think one have to do C++ or VB then to make standalone apps instead, or? Kinda too bad since starting up a C# project shows up this nice basic window, and your're ready to start doing your application (or in this case, complication) :P Quite much easier to do some thing like this with the already advanced Windows programing. Point/drag and klick. (With more advanced features you have to type code yourself, which is nice)
Oh, and also, C# seems much easier to learn than C++
Someeone care to elaborate this further and explain this to me?
Ace
|
|
|
|
|
I am with you man!
I especially hate that I have to have Windows to run Microsoft Office. Damnit, why can't I just run Office without installing that Windows crap.
Ugh!
I really recommend you go and read up on the how, why and what of the .NET Framework. Not C#, not VB.NET, not COBOL.NET. Read up on the actual .NET Framework itself. Once you have done that then you can make more informed decisions on what to code your new applications in.
There are some good articles right here on CP about it.
Paul Watson Bluegrass Cape Town, South Africa
Macbeth muttered:
I am in blood / Stepped in so far, that should I wade no more, / Returning were as tedious as go o'er
DavidW wrote:
You are totally mad. Nice.
|
|
|
|
|
_Ace_ wrote:
I think one have to do C++ or VB then to make standalone apps instead, or?
With VB you still have to deliver the VB runtime dlls. I'm afraid your only choices are C or C++. Unless you want to learn Delphi.
|
|
|
|
|
C++ also has its runtimes, they just normally included with the OS, soon all MS OS'es will include .NET as standard.
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
Hey,
I've just started to learn C# here and I must say its quite fun. However, how can I make the applications I make in C# "standalone"? (work without having to install .net) I ask since, well, it would be damn fun if I could make some nice app and show off at friends or something Also, itnt this how ppl do their applications for Windwos in general?? Or maybe its in C++? Maybe its better to develope in C++ if its not possible in C#
Ideas?
Thanks,
Ace
|
|
|
|
|
_Ace_ wrote:
However, how can I make the applications I make in C# "standalone"? (work without having to install .net)
No way.
|
|
|
|
|
If your friends have Windows XP with the latest service pack then they've got .net already - there's no need to do anything else to run your c# app other than compiling it into an exe.
Further, Windows.Net Server 2003 natuarlly has .net integrated, as does the next revision to Windows XP, codenamed Longhorn. Add to this the fact that the .net framework has been a recommended update on the Windows Update website for over a year now, and you start to see that the bottom line is it's only out of date Windows systems that need to have the 20MB framework installed - everyone else should have it already.
|
|
|
|
|
I am new to .Net and am trying to get a web service to work. I have created a few classes and the testing of them is fine. When I try to access them from my web client I get an error. The .vsdisco file has been created but cannot be found by the Add Web Reference dialog box. I have tried to access it from both a web and forms project. I ran the service through the debugger and it works fine. I ran through the MS tutorial:
ms-help://MS.VSCC/MS.MSDNVS/vsintro7/html/vbwlkCreatingDistributedWebApplicationWalkthrough.htm#vbwlkcreatingdistributedwebapplicationwalkthroughanchor12
but it doesn't work either. I figure its either a bug or (more likely) I have something set up incorrectly.
Any assistance will be greatly appreciated!
|
|
|
|
|
Hi, all:
I am writing WinForm App in C# and I have following two questions:
1. I modified App.ico in the project. when I rebuild the project, the icon in the Windows Explorer and shortcut changed to what I made. However the icon on the top right of the application titlebar did not change when I run my app. How can I add my own icon replace the default icon on the titlebar of the main window?
2. What is the easiest way to get current username?
Thanks in advance.
Dion
|
|
|
|
|
1. There should be an Icon property for your form that you can access in the Designer view. Use that to find whatever icon you want displayed in the title bar for that particular form. I think you have to do this for each form you want the icon displayed in (unless anyone knows a better way).
2. Use System.Environment.UserName property to find the current user name.
Hope that helps.
Daniel E. Blanchard
|
|
|
|
|
|
RichTextBox.SaveFile Method (Stream, RichTextBoxStreamType)
public void SaveFile(
Stream data,
RichTextBoxStreamType fileType
);
Parameters
data
The data stream that contains the file to save to.
fileType
One of the RichTextBoxStreamType values.
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
Hi i have a windows application which needs to launch either
1. outlook express OR
2. Web Form
from a normal button
How can I possibly do it?
Thanks
vivian
|
|
|
|
|
Please help!
I need to record what keys the user presses only after a certain event.
If I don't clear the keyboard buffer, what is pressed before the event is also recorded.
Could anyone help?
Thanks
|
|
|
|
|
I have a DataSet object defined by a XML-schema. One of the columns in the datatable should store an element also defined in the xml-schema (using ref="my_second_element").
I put the values I want to store in the dataset in an array of objects (Object[]) and set DataRow.ItemArray to my array. This works fine when I don't try to set the column of "my_second_element", but if I set that column I get an error. I have tried converting the object to store in that column to among other things an XmlElement but without luck. The error reads:
System.InvalidCastException: Specified cast is not valid.
at System.Convert.ToInt32(Object value)
at System.Data.Common.Int32Storage.Set(Int32 record, Object value)
at System.Data.DataColumn.set_Item(Int32 record, Object value)Couldn't store <system.xml.xmlelement> in KuR_Id Column. Expected type is Int32
(KuR is the name of the datatable).
I get the impression that the object value is being stored in the record-place and not in the value-place. Can anyone tell me what I'm doing wrong? I have tried to set the datatype of the column to System.Object but I got the error that parent and child columns don't have type-matching columns.
Any help will be greatly appreciated
/EnkelIk
Code sample that may help to clarify my problem:
DataSet vscDS, vscDS2;
DataTable vscDT,vscDTP;
DataRow vscDR,vscDRP;
DataTableCollection vscDTC, vscDTC2;
DataColumn vscDC;
object[] arrDR=new object[9];
short sIndex;
XmlElement vscXElem;
XmlDocument vscXDoc= new XmlDocument();
vscDS=new DataSet("Register");
vscDS.ReadXmlSchema(strSchemaFile);
vscDTC=vscDS.Tables;
vscDT=vscDTC["KuR"];
vscDC=vscDT.Columns[8];
//Add values
if(vscDT!=null)
{
vscDR=vscDT.NewRow();
arrDR[0]="";
arrDR[1]="";
arrDR[2]="";
arrDR[3]=m_strKType;
arrDR[4]=m_strEBet;;
arrDR[5]=m_strPoint;
arrDR[6]=m_strBen;
arrDR[7]=m_strBet;
//Adding object
if(m_arrgodkP.Count>0)
{
vscDS2=new DataSet("Register2");
vscDS2.ReadXmlSchema(strSchemaFile);
vscDTC2=vscDS2.Tables;
vscDTProv=vscDTC2["PR"];
if(vscDTProv!=null)
{
//m_scPR is a self defined class and method ConvertRow returns its values in a DataRow
vscDRP=m_scPR.ConvertRow(vscDTP);
//Create xml dokument and load xmlstructure from dataset
vscXDoc.LoadXml(vscDS2.GetXml());
vscXElem=vscXDoc.DocumentElement;
//Add element
arrDR[18]=vscXElem;
}
}
vscDR.ItemArray=arrDR;
vscDT.Rows.Add(vscDR);
}
|
|
|
|