Re: How to find the application path in code
From: Daniel Moth (dmoth74_at_hotmail.com)
Date: 03/07/05
- Next message: Andreas Viklund via .NET 247: "CFCOM problem"
- Previous message: ravi kumar via .NET 247: "to detect the clients connected in a network"
- In reply to: JamesL: "Re: How to find the application path in code"
- Next in thread: David: "Re: How to find the application path in code"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 7 Mar 2005 19:15:59 -0000
You see the example uses A.B.fileextension
You are asking if you can use B.fileextension
Is it not apparent that you are missing A?
Even if it is not apparent, why not try it and see what exception you get
and then when you post here you have more details to provide (e.g. some code
and the exception thrown).
Since by your own admission you are new to .NET CF, may I suggest you learn
to use the archives before posting here:
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework/search?group=microsoft.public.dotnet.framework.compactframework&q=GetManifestResourceStream&qt_g=1&searchnow=Search+this+group
The CF FAQ (look at 7.3):
http://msdn.microsoft.com/smartclient/understanding/netcf/FAQ/default.aspx#7.3
Also remove the evb group as VB.NET questions are irrelevant to it.
Please understand it is easier for me to just give you the answer rather
than write all of the above but I think you'll appreciate learning how to
find things for yourself and rely on the ng for harder questions (that
preferably have not been asked/answered before).
Cheers
Daniel
-- http://www.danielmoth.com/Blog/ "JamesL" <forgeddaboudit@spamblock.duh> wrote in message news:i50Xd.3674$cN6.871@newsread1.news.pas.earthlink.net... > OK.... > > The image itself is listed as "BkgndImage.MyBkgnd.jpg" > > Do I replace that with just my filename Logo.Bmp as it appears in Solution > Explorer? > > James > > > "Daniel Moth" <dmoth74@hotmail.com> wrote in message > news:%23McETUzIFHA.588@TK2MSFTNGP15.phx.gbl... >> On the page you just went there is a link right at the bottom: "[View >> Source]". >> Click it. >> >> Cheers >> Daniel >> -- >> http://www.danielmoth.com/Blog/ >> >> >> "JamesL" <forgeddaboudit@spamblock.duh> wrote in message >> news:ls%Wd.3091$oO4.569@newsread3.news.pas.earthlink.net... >>> I'm sorry, but I am not following these examples very well. >>> >>> They create more questions then they answer. Is there anything more >>> detailed. >>> >>> In the example in this link, I don't know what type the variable >>> backgroundImage should be Dimensioned as. I don't know where the >>> statement should go. >>> >>> And then: the subroutine Protected Overrides Sub OnPaint(ByVal e As >>> PaintEventArgs) >>> I have no idea where this should go. Just stand on it's own inside that >>> form? >>> >>> Is anything easy in VB.NET? >>> >>> James >>> >>> >>> "Daniel Moth" <dmoth74@hotmail.com> wrote in message >>> news:u$aObvxIFHA.3696@tk2msftngp13.phx.gbl... >>>> http://samples.gotdotnet.com/quickstart/CompactFramework/doc/bkgndimage.aspx >>>> >>>> Cheers >>>> Daniel >>>> -- >>>> http://www.danielmoth.com/Blog/ >>>> >>>> >>>> "JamesL" <forgeddaboudit@spamblock.duh> wrote in message >>>> news:PPYWd.3556$cN6.1575@newsread1.news.pas.earthlink.net... >>>>> The key that I do not know: >>>>> >>>>> How do I override the OnPaint method? >>>>> >>>>> James >>>>> >>>>> "<ctacke/>" <ctacke_AT_OpenNETCF_com> wrote in message >>>>> news:ewFRo7XIFHA.1528@TK2MSFTNGP09.phx.gbl... >>>>>> Sure. It's a lot like any custom control. First, load your image in >>>>>> your ctor. Next, override the OnPaint method for your Form. You'll >>>>>> get a Graphics object as the input param. Use the DrawImage method >>>>>> of the Graphics object to paint your image to the Form, then call >>>>>> base.OnPaint to draw the rest of the form. >>>>>> >>>>>> -Chris >>>>>> >>>>>> "JamesL" <forgeddaboudit@spamblock.duh> wrote in message >>>>>> news:CR5Wd.1494$cN6.300@newsread1.news.pas.earthlink.net... >>>>>>> can you expand on the OnPaint? >>>>>>> >>>>>>> James >>>>>>> >>>>>>> >>>>>>> "Chris Tacke, eMVP" <ctacke@spamfree-opennetcf.org> wrote in message >>>>>>> news:O55xfwQIFHA.2648@TK2MSFTNGP14.phx.gbl... >>>>>>>> CE doesn't have a notion of app path. You can use reflection to >>>>>>>> find out where your assembly was started from though: >>>>>>>> >>>>>>>> For your Form you can override OnPaint and paint in the background >>>>>>>> there. >>>>>>>> http://wiki.opennetcf.org/ow.asp?CompactFrameworkFAQ%2FStartupDirectory >>>>>>>> >>>>>>>> -- >>>>>>>> Chris Tacke >>>>>>>> Co-founder >>>>>>>> OpenNETCF.org >>>>>>>> Has OpenNETCF helped you? Consider donating to support us! >>>>>>>> http://www.opennetcf.org/donate >>>>>>>> >>>>>>>> >>>>>>>> "JamesL" <forgeddaboudit@spamblock.duh> wrote in message >>>>>>>> news:Ep5Wd.1030$oO4.222@newsread3.news.pas.earthlink.net... >>>>>>>>>I am trying to convert a program from eVB to VB.NET. >>>>>>>>> >>>>>>>>> I can hardly get past the first step. I want to display a bitmap >>>>>>>>> of my logo on the first screen. To do this I need to know the >>>>>>>>> application path in order for the code to find the bitmap. >>>>>>>>> >>>>>>>>> Apparently the Background Image property for a form does not work >>>>>>>>> in the handheld side of VB.NET, only in desktop. So I am still >>>>>>>>> trying to use a picture box and load the bitmap to the image >>>>>>>>> property in code. Unfortunately, the app object no longer exists. >>>>>>>>> >>>>>>>>> How do I determine the application path for a PocketPC? >>>>>>>>> >>>>>>>>> James >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>> >>> >>> >> > >
- Next message: Andreas Viklund via .NET 247: "CFCOM problem"
- Previous message: ravi kumar via .NET 247: "to detect the clients connected in a network"
- In reply to: JamesL: "Re: How to find the application path in code"
- Next in thread: David: "Re: How to find the application path in code"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|