|
Roger Wright wrote: All I know how to do so far is make forms and stick controls on them.
My first CIS course was called "Programming Logic and Design". No languages, no compilers and certainly no drag and drop form building. I say this because down through the years I have seen a great number of wannabe programmers that thought they were on their way, because a tool allowed them to drag and drop controls onto forms at design time, who could never find their ass with two hands and flashlight.
From my perspective it seems that people starting out doing drag and drop forms development get into a lot of trouble because they tend to skip over all the fundamentals. This leaves them in the dark, always lacking valuable knowledge when trying to learn and understand a new topic.
I recognize that most people do not accept this perspective when I present it, but you seem like a good fellow so I wanted to offer you an opportunity to come in from the dark as it were. My advice, stop, back up to the beginning, always prefer enlightenment.
Good luck
led mike
|
|
|
|
|
|
Roger Wright wrote: What's new is the damned Windows environment;
Then the same principle applies. Starting out with the drag and drop dialog designer is skipping over learning how Windows works, i.e., CreateWindow() etc. Back when I started the Petzold book[^] was the defacto learning material for Windows. I don't know if it still is but perhaps it still covers the basics of Windows.
led mike
|
|
|
|
|
It took instantiating the subsidiary forms on the main form, then creating a Show method in the same form and calling it from the Button_Click method. For some completely unobvious reason I can't call frmInventory.Show() from inside a button handler, but instead have to create a discrete method and call it from inside the button. Makes no sense at all. In the subsidiary forms I had to add this.Hide() to the Done button handler to close the form and return control to the main form.
The examples I found all showed the forms being instantiated in the Program.cs file, but doing so made them invisible to the Main form. Moving the code from Program.cs file to frmMain.cs was the first step in making the thing work.
Now to figure out how to make the subsidiary forms talk to the database... I'm sure I'll be posting again soon.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Roger Wright wrote: frmInventory.Show() from
Calling Show will make the form show up as a non-modal dialog. Is that what you intended?
|
|
|
|
|
I'm not sure. What I do want is a form that looks identical in size, shape, and general layout as the main form, but with new controls for each action related to the task. Clicking on the appropriate action button will launch a series of modal dialogs to collect information, then commit the action to the database, or abandon all changes if cancelled at any point.
I'm now trying to figure out how to get info collected by the dialogs back to the calling form, then get that data into (or out of) the database. I'm still not sure how to proceed on that step. In some actions I'm going to need to use dialogs to retrieve records from the database in order to proceed to the next step, so I'm debating whether to bind the db fields to the dialog controls, or to the parent form. I haven't a clue yet which approach is easier or makes more sense.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
Hi,
While sending email using the SmtpClient() object I encounter the below error message
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host
A small piece of info - My development Virtual Machine is in to other VLAN & the SMTP Server belongs to different.
Find below code written to send email
MailMessage mailMessage = new MailMessage();
mailMessage.From = new MailAddress("some email address...");
mailMessage.To.Add(new MailAddress("some email address..."));
mailMessage.IsBodyHtml = true;
mailMessage.Subject = "Test Mail";
mailMessage.Body = "Test Mail";
SmtpClient mSmtpClient = new SmtpClient();
mSmtpClient.Host = "SMTP IP Address";
mSmtpClient.Send(mailMessage);
Is this a network issue? Or do I need to provide the credentials as well?
Regards,
Vipul Mehta
modified on Wednesday, November 12, 2008 10:17 AM
|
|
|
|
|
You may want to see if the SMTP server you're using demands you provide credentials to use it.
|
|
|
|
|
Vipul Mehta wrote: Is this a network issue?
It may be. Is the From address in the same domain as the SMTP server? A lot of installations set the SMTP server to refuse relaying foreign addresses, that is the server will not transport any email that didn't originate in its own domain.
For instance, if I send an email from user@mydomain.com using the server smtp.yourdomain.com, if relaying is disabled on the server, my email will be rejected. This is to protect SMTP servers from being used to send spam, and is usually a good practice for most organizations.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
OK I got a chance to talk to our network team & there was some blocking done from their side & they will make appropriate settings to nake this working.
Thakns very much for all your prompt replies
Regards,
Vipul Mehta
|
|
|
|
|
Some of you well-versed in .net will be able to laugh at me shortly.
I'm trying to get a handle on the why of .net. I understand the concept of the assemblies, CLR, etc. allows developers to use their favorite language and run on any platform supporting the CLR.
But, somewhere along the way, I picked up that one of the nice things about .net was that it merged the desktop to the web. So, I could use a control on the desktop and in a web app. Now things really get insane - I seem to recall reading that if I write a desktop app in .net, I can deploy it to the web? This seems nonsensical.
So, can anyone point me at the bigger development picture for .net? perhaps there is a document or info that addresses the development approach when using .net?
yes, I know I'm babbling....
Charlie Gilley
Will program for food...
<italic>Hurtling toward a government of the stupid, by the stupid, for the stupid we go. —Michelle Malkin
|
|
|
|
|
charlieg wrote: So, I could use a control on the desktop and in a web app
Not entirely true. You CAN write a control that works on both, but there are manny, many cases where this is just not possible because of the differing UI models desktop apps and web apps use.
charlieg wrote: Now things really get insane - I seem to recall reading that if I write a desktop app in .net, I can deploy it to the web?
It is non-sensical. You can deploy a desktop app USING the web. You can NOT run any desktop app your write AS a web application. If that was true, there wouldn't be a use for ASP.NET.
The closest you get to this is an application that has business and data layers in common and shared between a Windows Forms (Desktop) app and a Web Forms (ASP.NET) app. These technologies are mearly User Interface layers to n-teir applications that can share Business and Data layer code between them.
You may want to read up on "Smart Client" applications to see how .NET makes this easier.
|
|
|
|
|
charlieg wrote: I'm trying to get a handle on the why of .net. I understand the concept of the assemblies, CLR, etc. allows developers to use their favorite language and run on any platform supporting the CLR.
Yes. Develop in the language you want. Basiclly, the languages use a common library and data types so that objects created in one language can be used in another. Compiled versions getting written in MSIL.
charlieg wrote: Now things really get insane - I seem to recall reading that if I write a desktop app in .net, I can deploy it to the web? This seems nonsensical.
You might be getting confused with ClickOnce. ClickOnce allows .Net WinForm apps to be distributed easily over a network or web *very* easily (might be where you are getting the deployed to the web part). Depending on how the developer sets up clickOnce, the users may be forced to download the new version prior to running the app or simply notified.
Generally, ClickOnce 'setups' are apps that are simply X-copied vs apps which require customs scripts or actions during install (hence need a more powerful installer).
charlieg wrote:
So, can anyone point me at the bigger development picture for .net? perhaps there is a document or info that addresses the development approach when using .net?
You'll need to get a book or two and start digging in - simply to much material to cover.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Charlie. The other answers are good answers, but I'm going to throw one more piece of confusion into the mix. There's a form of WPF that runs in a browser called an XBAP, and it is possible to host a WPF control in Silverlight. See here[^] for an example of a desktop/web control.
|
|
|
|
|
I've been fighting this one for a couple of days. I have 2 nics, and 1 computer, the 2 nics are connected to each other (same or separate subnets).
In my C# tool I am essentially trying to send packets from one interface to the other. Seems pretty basic... The issue that I am having is the internal route tables seem to be routing, instead of allowing me to force what I need out the interface. I am using .NET sockets, and thought BINDing to the specific interface and then using the DONTROUTE socket option would do what I need. Should this work? The other option is likely to use raw sockets (spoof), but apparently winXP SP2 has canned that possibility.
|
|
|
|
|
What errors are you getting? Is any data getting through? Did you remember to use a crossover cable between the cards?
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
I have a .Net 2.0 C# Windows Service that reads messages from a message queue (xml), transforms them using XslCompiledTransform (does some other work using XmlTextReader and MemoryStreams) and then finally inserts data into a sql server database (In a distributed COM+ transaction).
The problem is that sometimes the service crashes with the .NET Runtime 2.0 Error as source and EventId 1000.
Faulting application application.exe, version 4.2.0.0, stamp 48a93225, faulting module kernel32.dll, version 5.2.3790.4062, stamp 462643a7, debug? 0, fault address 0x0000000000027d8d.
(The machine is a has a multi-core CPU)
My initial thought was that the service tried to read or write to a stream while the system was moving data between the ram and the swap. But after some more testing, the problem occurs even with ~750-1000mb free ram)
Any ideas on how to locate and fix this problem?
|
|
|
|
|
when i try to open remote web site in vs2005 from file-->open web site at write path like
http://pt.tvtc.gov.sa the message comming
The Web server does not appear to have FrontPage Server Extensions installed
but the site can open in ftp.
please how can i solve that problem?
Ala Qunaibi
|
|
|
|
|
Install the FrontPage Server Extensions on the website? It might just work
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
Hello;
I have created ActiveXcomponent in c# which is used to downloads the file from internet multithrededly I am using background worker to accomplish this task. I am using javascript to call this dll . Everything works fine for some time but after that internet explorer crashes and give the error message
EventType: clr20r3 P1:iexplore.exe P2 :8.0.6001.18241 P3:48ae8fee P4:mscorlib P5:2.0.0.0 P6:471ebc5b P7:3404 P8:21c P9:system.io.ioexception
I dont know from where this error is coming (I am using .NET 2.0)
Note:When I call the same method from above dll using windows form I didnt get any exception..
I will be very glad if you guide me
Thanks in advance
Regards
Mahesh Dubey
|
|
|
|
|
I do not believe it is possible to write an ActiveXComponent in C# becuase C# is natively .NET and ActiveX is not. That in itself could be causing the problem.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
Could not load file or assembly 'Microsoft.Vbe.Interop, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c' or one of its dependencies
I am getting this error when i run my application. Please provide the rectification for it.
|
|
|
|
|
When you deployed your application to the machine in question, did you deploy ALL the .DLL's in the bin\Release folder??
This may seem like a stupid question, but is Word installed on the machine?? Is it the same, or later, version of Word you have on your development machine?
|
|
|
|
|
Yes, I took the references of all dlls. And Microsoft word is also installed in the system.
|
|
|
|
|
Is the same version of Word installed? Different versions have different IDs.
|
|
|
|