Click here to Skip to main content
       

.NET Framework

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
GeneralRe: The equivalent of 'OninitDlg()'memberBram van Kampen13 May '13 - 13:06 
Thanks, much appreciated. Look forward to hearing from you.
Smile | :)
Bram van Kampen

AnswerRe: The equivalent of 'OninitDlg()'mvpRichard MacCutchan12 May '13 - 21:03 
In many ways, although the syntax looks similar there are fundamental differences between C# and C++, so you will find the behaviour quite strange at times. Look at the various events available on the System.Windows.Forms.Form class[^]. I don't know the details of your splash screen but if it's based on a Form then it should have all the same events.
Use the best guess

GeneralRe: The equivalent of 'OninitDlg()'memberBram van Kampen13 May '13 - 14:22 
Well Richard,
 
Thanks for your reply, and, good to hear from you again. The differences between C++ and C# I'm acutely aware of. It brings me new surprises every day. Strange behaviour I have seen indeed. The differences between MFC and .NET are even bigger. Whereas in mho MFC acted as a convenient thin (sometimes a very thick) Object Oriented wrapper around Windows SDK, NET is an entirely new departure. Our reason for changing to .NET is to become OS independent. Our software runs without any hitches or security issues on very many XP terminals, (none of which is connected to the internet). There are too many issues for it to run properly under Vista and above. The main flee in the ointment is the paranoid security system in Vista+, which is entirely supurfluous to our requirements.
 
The original incarnation was written for Win3.1, (1 elderly customer is still using this on two terminals) in the then revolutionary new MFC. MFC at the time binned about a 100 books by Petzhold. Porting to Win98 was painless, actually it simplified matters greatly. No more worries about far, near, and burgomasters. (one could no longer look at another process though! (ouch!) That was a major issue at the time).
 
The performance requirement for the product is identical under MFC or .NET . Paint a screen, Let the user fill in data, wait for a button click, and respond to the click by doing things like accessing a database, or, painting another screen. As the whole suite of programs is Dialog based, there are very few programming 'High-Stands', the most involved part being the provision of 'Progress Dialogs' for lengthy Database enquiries. In MFC and SDK we monitor messages, in .NET we use events. Different Mechanics, but similar overal end results.
As for the Database, Version 1.XX (Win 3.1+) and Version 2.XX( Win95 to Win XP) used a proprietory DB system, with much of the DB Code dealing with atomicity of transactions, ending up in the middle of the Dlg procedures, i.e. the Presentation code. We intent to use SQL for V3.00 (Win7 and after)
 
Thanks for the Link. It gave a method listing which included an 'OnLoad' method. The help system on my version of VS2012 sent me to a similar help page which did not contain any event handlers. This latter fact added to my confusion. We had a 'Load' event, but not an 'OnLoad' event handler. The so called 'Intellisense' (I rather have a decent paper manual)was also quiet on 'OnLoad'
 
Thanks again,
 
Kind Regards,
Smile | :)
Bram van Kampen

GeneralRe: The equivalent of 'OninitDlg()'mvpRichard MacCutchan13 May '13 - 20:54 
Thanks for your kind words, Bram. I have found that the online MSDN documentation is usually the best source of information. It can be a bit daunting at first, and occasionally leads you down blind alleys, but overall it is still high quality.
 
Good luck with your project(s).
Use the best guess

AnswerRe: The equivalent of 'OninitDlg()'professionalMarco Bertschi14 May '13 - 23:11 
Hi Bram,
 
either use the constructor to do a method call where you do the stuff you need to do, or use the Form.Load Event[^] which occurs before the form is shown the first time (for example, location of the form on the screen can be set there).
 
Hope I was able to help you!

Questioncan application service start without being logged in?memberneodeaths8 May '13 - 1:50 
does anyone know if i can create a .net application as a service which would still be started even if the user restart and doesn't log in?
AnswerRe: can application service start without being logged in?mvpDave Kreskowiak8 May '13 - 2:07 
That's kind of the definition of a Windows Service application. They run when Windows starts, not when a user logs in.
 
If you were thinking that you were going to write a service application that puts up a user interface the user can see, forget it. That's not allowed for security reasons. If you wanted to do something like that, you'd be writing TWO applications. One would be the service that is constantly running and the other would be a normal application that runs when the user logs in and communicates with the service over an IPC method of your choice.

GeneralRe: can application service start without being logged in?memberneodeaths8 May '13 - 2:18 
ah ic, thanks you very much.
 
i am probably gonna create two application. though i never used an IPC method before.
GeneralRe: can application service start without being logged in?mvpDave Kreskowiak8 May '13 - 5:09 
neodeaths wrote:
i never used an IPC method before.

 
IPC Stands for "InterProcess Communication". Read this[^]. I would suggest using Named Pipes.

AnswerRe: can application service start without being logged in?mvpAbhinav S8 May '13 - 23:05 
All services start before login so the service should start even if the user does not login.

AnswerRe: can application service start without being logged in?memberMember 100361729 May '13 - 3:00 
I don't think that it is possible to create such kind of application service, but you can try it your way.
AnswerRe: can application service start without being logged in?professionalMarco Bertschi14 May '13 - 23:13 
A windows system service starts as soon as Windows is started - Remember that a service may not be able to access user-specific folders and files when the respective user is not logged in!
 
- MB

GeneralRe: can application service start without being logged in?memberneodeaths15 May '13 - 3:16 
if i need to save a little bit of application data. what can i use besides database and still be sure that i will have access to it?.
 
should i use registry? or save the data in an flat file in the program files?
GeneralRe: can application service start without being logged in?mvpDave Kreskowiak15 May '13 - 4:12 
You can't save anything to program files or below. It's readonly to normaly users.
 
You can get the path to an appropriate place to put your data from this list[^]. Use Environment.GetFolderPath[^] to get that path, then combine it with your data filename using Path.Combine[^].

GeneralRe: can application service start without being logged in?professionalMarco Bertschi15 May '13 - 21:15 
Thumbs Up | :thumbsup:
 
I'd recommend the "CommonApplicationData" folder because it is accessible by all users.
 
cheers,
Marco
Marco Bertschi

Twitter | Articles | G+

QuestionMVCmemberJAYRAJ GIRI6 May '13 - 23:03 
what is fast datacommunication in mvc
AnswerRe: MVCmvpDave Kreskowiak7 May '13 - 15:12 
You're not getting an answer to this probably because noone has a clue what you're talking about.
 
MVC (Model View Controller under ASP.NET) has nothing to do with "datacommunication".
 
You'll have to revise your question with additional detail to describe what you're talking about.

AnswerRe: MVCmemberBikash Prakash Dash13 May '13 - 19:18 
wot does it mean , is der any meaning of your question ?
QuestionFlurent Nhibernate issuesmemberPunnoose Joseph2 May '13 - 2:30 
i have a code like this
----------------------
public ISessionFactory CreateSessionfactory()
        {
            return Fluently.Configure()
                .Database(MsSqlConfiguration.MsSql2008
                .ConnectionString(c => c.FromConnectionStringWithKey(connectionstring)))
                .Mappings(m => m.FluentMappings.AddFromAssembly(Assembly.GetExecutingAssembly())
            )
            .BuildSessionFactory();
        }
----------------------------------------
Then i tried to call using
This code
-----------------------------------
public class AR
{
public int ApplicationRoleID;
public string ApplicationRoleName;
 
}
 

 
NestlePWMS.DAL.FluentNHibernateHelper ini = new NestlePWMS.DAL.FluentNHibernateHelper();
 
ISessionFactory sessionFactory;
// sessionFactory = ini.CreateSessionfactory();
// ISessionFactory sessionFactory;
sessionFactory = ini.CreateSessionfactorydb();
 

using (ISession session = sessionFactory.OpenSession())
{
using (ITransaction transaction = session.BeginTransaction())
{
AR p1 = new AR();
p1.ApplicationRoleID = 1;
p1.ApplicationRoleName = "Role1";
AR p2 = new AR();
p2.ApplicationRoleID = 2;
p1.ApplicationRoleName = "Role2";
 
session.Save(p1);
session.Save(p2);
 
transaction.Commit();
}
}
return View();
}
------------------------------------------
Its throwing No persister for: crowPWMS.Web.Controllers.AR
 

This is the class AR.
How do i solve this problem
Punnoose
QuestionChange custom settings inn app.config (vb.net)memberMember 995543229 Apr '13 - 10:26 
This is my app.config:
 
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <configSections>
    <section name="couchbase" type="Couchbase.Configuration.CouchbaseClientSection, Couchbase"/>
  </configSections>
  <couchbase>
    <servers bucket="testbucket" bucketPassword="">
      <add uri="http://localhost:8091/pools"/>
    </servers>
  </couchbase>
  <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
    </startup>
 
</configuration>
 

I want to change the "ADD URI" field + bucket and password by code, but have serious trouble finding a working solution.
 
Smile | :)
AnswerRe: Change custom settings inn app.config (vb.net)mvpDave Kreskowiak29 Apr '13 - 11:05 
It's just an XML file. There's tons of examples all over the web on how to manipulate them.

AnswerRe: Change custom settings inn app.config (vb.net)mvpRichard MacCutchan29 Apr '13 - 23:04 
See Saving Connection Strings to app.config[^].
Use the best guess

AnswerRe: Change custom settings inn app.config (vb.net)memberMember 100361729 May '13 - 2:51 
For what purpose do you need to change the “ADD URI” + bucket and password within the app.config file ? Is it really necessary ?
SuggestionRegarding Resume Parser Toolmemberganesh96199129 Apr '13 - 0:09 
Hi Experts,
I am developing Resume parsing Tool,which is used to read word document and getting FirstName,PhoneNo,Email,Qualification.etc., Smile | :)
So now i am coming to point.i have tried word interop method to get all the details from document and getting in an array.But for further steps i am not able to proceed.Kindly suggest me the same.My document is not a specific order.i have heard people are using Natural language processing for the resume parsing tool.
GeneralRe: Regarding Resume Parser ToolmvpEddy Vluggen29 Apr '13 - 1:01 
ganesh961991 wrote:
But for further steps i am not able to proceed.
What further steps?
 
ganesh961991 wrote:
i have heard people are using Natural language processing for the resume parsing tool.
That's still in it's infancy[^].
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web02 | 2.6.130516.1 | Last Updated 22 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid