|
If you are c++ developer do it with C#,not VB.NET because it has C syntax. The things you want is really good to be written with C# and SQLServer.All these will take half or less code than C++ and it will really save time of developing. ALl the thingsd you want to do in this application is really DUCK SOAP inC#(.Net actually)In this site you can find many beginner articles about these steps in C# and you can ask your questions here too.Its really a big help.You will find C# something great.
But something that I'm not sure is a machine with 256mb ram and 1ghz is enough for run .net application or not.I think it is minimum requirement for it. Hope it helps.
Mazy
No sig. available now.
|
|
|
|
|
.NET (including C#) really shines for business/data-centric applications, so it should work well. You'll love the data capabilities of .NET.
Hydra wrote:
1) be quick (dbase is soo slow at updating controls, navigating and scrolling through grids)
.NET has good data binding capabilities, and it's fast for this.
Hydra wrote:
2) need to be able to create and embed reports into the program (using a crystal reports viewer control?)
You would need a third-party reporting component, such as (as you mentioned) Crystal Reports. There are a couple of really good ones for .NET.
Hydra wrote:
3) needs to be able to print to a dot matrix printer to pre-printed tractor feed paper of a custom size (with was problematic in dbase to say the least..)
Hmm... this one might be a problem. You might ask about this one on the C# forum. AFAIK .NET doesn't directly do text-only printing. But you can always use the Windows API printing functions if necessary, and it won't be any harder than using them from C++.
Hydra wrote:
4) needs an incremental search (text box bound to a datagrid and a combo box (to select search field) e.g. you select "Name" in the combo box, then type id "Fr" in the text box and the grid then shows the first row in the table who's name starts with "Fr" e.g. "Freddie".
That shouldn't be hard.
Hydra wrote:
5) needs to be able to handle record locking properly (i'm guessing an sql server or access database will be ok with this..)
Yes. BTW, if you're dealing with a large DB, don't use Access - use SQL Server.
Hydra wrote:
6) needs a password control (yes, dbase was lacking one!)
.NET has one, and there's also a better one here on CP.
Hydra wrote:
Those are the main things that I require, I'm just sick of maintaining and developing this horrible DBase code and want to move to something else ASAP, but don't want to spend alot of time writing the application and pulling my hair out over stupid bugs.
You're welcome to ask questions here on CP if you run into trouble.
Hydra wrote:
I have written lots of C++ code (see www.HydraIRC.com ...) so I don't think picking up the language will be difficult, i'm more concerned with the abve tasks and whether you guys thing C# is suitable, or if not, what about Visual Basic .NET?
C# is definitely suitable. As far as C# vs VB.NET, C# can do everything VB.NET can (except for optional parameters), plus some.
Hydra wrote:
Also of concern is the amount of help I can get from other codes should the need arrise, are there lots of C# developers now? or are there more VB.Net developers?
Judging by the amount of traffic in the forums, there are almost as many people doing C# as C++ (although not quite), and more people doing C# than VB. Anyway, there's bound to be plenty of people to answer your questions.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
This is off the topic of your question, but I went to your website (www.HydraIRC.com) and had a look at the screen shots. I really like your GUI and was wondering if maybe you had some sample code of how to accomplish the auto-hide, docking, screens etc. Maybe you could even do an article on it and post it here (at CP). It's a really nice interface.
Thanks.
|
|
|
|
|
hehe, it's already here on CP Check out the article in the WTL area by Sergey Kilmov (sp?)
And yeah, it's great!
|
|
|
|
|
Hi,
I am trying to have an Windows Applcation run over the network. The client machine has the required .NET framework, but when I launch the applciation it is giving me a TypeInitialization exception. It does not even hit the first line. Is there soemthing I need to take into consideration before an application can be run over the network? Thanks,
|
|
|
|
|
|
If you are interested in just executing the program from a network share, you will need to set permissions on each of the client computers.
Take a look at Administrative Tools > Microsoft .NET Framework Configuration and do soem MSDN searches for 'code access security'.
This will most probably be what is causing your exception.
Tatham Oddie (VB.NET/C#/ASP.NET/VB6/ASP/JavaScript)
tatham@e-oddie.com
+61 414 275 989
|
|
|
|
|
hi, what the difference betweem "Byte" and "byte"
|
|
|
|
|
byte is just an alias for System.Byte.
Regards,
Alvaro
Hey! It compiles! Ship it.
|
|
|
|
|
Stephen: Billy, what sux about being a Baldwin?
Billy: Nothin!!!
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
Everybody, please excuse leppie's erratic and disturbing behavior. He went over the deepend recently on school projects for finals. The psychiatric ward is currently monitoring his status.
That is all.
Hawaian shirts and shorts work too in Summer.
People assume you're either a complete nut (in which case not a worthy target) or so damn good you don't need to worry about camouflage...
-Anna-Jayne Metcalfe on Paintballing
|
|
|
|
|
I want to paint some colors on the background of my costom windows control and have some button and ... on it.If I overriden the OnPaint and do my painting there,It draw them in front of all things and nothing else is shown.How can I paint background and add controls in front of it?
Thanks
Mazy
No sig. available now.
|
|
|
|
|
I tried the same and it works.
The background color of the custom control did not hide any controls on it.
How are you doing it? Can you paste your code or some pseudo-code
Suhas
|
|
|
|
|
Simply add this lines to th control:
private void UserControl1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
Rectangle rect = new Rectangle(0,0,this.Size.Width,this.Size.Height);
e.Graphics.FillRectangle(new System.Drawing.Drawing2D.LinearGradientBrush(rect,m_bkcolor1,m_bkcolor2,m_lineargradientmode),rect);
}
But I after I add these two styles it works correctly,but I think it should be works without these two styles too:
this.SetStyle(ControlStyles.UserPaint,true);
this.SetStyle(ControlStyles.AllPaintingInWmPaint,true);
Mazy
No sig. available now.
|
|
|
|
|
What I would really like to do is tell the parent control to send a button click to a child control. In C++ it would be this
pParent->SendMessage( WM_COMMAND, MAKEWPARAM(ID_Of_CHILD, BN_CLICKED) );
Can you help me with this syntax or point me towards reading material? Below is my best effort. Thanks.
using System.Runtime.InteropServices;
public class Form1 : System.Windows.Forms.Form
{
[DllImport("user32.dll")]
protected static extern int PostMessage(
IntPtr wnd,
uint Msg,
IntPtr wParam,
IntPtr lParam);
.
.
.
private void button1_Click(object sender, System.EventArgs e)
{
*
#define BN_CLICKED 0
#define BN_PAINT 1
#define BN_HILITE 2
#define BN_UNHILITE 3
#define BN_DISABLE 4
#define BN_DOUBLECLICKED 5
*/
const uint WM_COMMAND = 0x0111;
const uint BN_CLICKED = 0x0000;
PostMessage((IntPtr)BusinessRules.Handle, WM_COMMAND, (IntPtr)BN_CLICKED, (IntPtr)IntPtr.Zero);
}
private void BusinessRules_Click(object sender, System.EventArgs e)
{
System.Windows.Forms.MessageBox.Show("I was clicked");
}
|
|
|
|
|
Unless I'm missing something, just call PerformClick():
private void button1_Click(object sender, System.EventArgs e) {
BusinessRules.PerformClick();
}
Cheers, Julian
Program Manager, C#
This posting is provided "AS IS" with no warranties, and confers no rights.
|
|
|
|
|
Thank you.
The PerformClick is akin to SendMessage(). It takes place immediately.
I was hoping for a PostMessage()type behavior.
Any ideas?
thanks
|
|
|
|
|
I would like to set focus on the 1st control that does not have data.
For most controls I can ask in the text field is empty. But for checkboxes and radio buttons, I must ask for the special case of 'GetChecked'. If it was only these two types of controls the code below would be OK. But controls derived from Checkbox and Radio button would also need special case code.
How can I ask if a control is a checkbox or derived from a check box?
public void SetFocusOnFirstEmptyControl()
{
int iCount=0;
System.Windows.Forms.Control Traverse = this;
//System.Reflection
while(Traverse != null)
{
Debug.WriteLine(++iCount + " " + Traverse.Text );
if(Traverse.GetType() == typeof(System.Windows.Forms.CheckBox))
{//do special case handling for check box
System.Windows.Forms.CheckBox pCheck = Traverse;
if(pCheck.Checked()== false)
{
Traverse.Focus();
break;
}
}
if(Traverse.Text.Length == 0)
{//test controls like textbox and dropdown
Traverse.Focus();
break;
}
Traverse = GetNextControl(Traverse, true);
}//while
|
|
|
|
|
hi !
>How can I ask if a control is a checkbox or derived from a check box?
DERIVED FROM A CHECKBOX:
myControl.GetType().IsSubclassOf(typeof(CheckBox))
andi
|
|
|
|
|
|
Does this work if that class does not derive directly from CheckBox and CheckBox being its grand parent?
Mazy
No sig. available now.
|
|
|
|
|
yes.
to check wheter it is derived directly use:
myChild.GetType().BaseType.Equals(typeof(myFatherClass))
andi
|
|
|
|
|
Thanks
Mazy
No sig. available now.
|
|
|
|
|
i am a real noob to programming...
i have downloaded a demoproject, but how can i build the project? it gives error's.
project can be found on this link: http://www.thecodeproject.com/dotnet/simpledbreadwrite.asp
|
|
|
|
|
Probably the easiest way to solve your problem is to ask your question on the forum for the article (located at the bottom of the article page) and give the author the exact error you get and the particular section of code that it errors out on.
I passionately hate the idea of being with it, I think an artist has always to be out of step with his time.
-Orson Welles
|
|
|
|