|
Hello Guru,
How to embed an icon to your main EXE file? So the icon shows up in windows explorers. I would appreciate very much any of your tips.
Thanks
Have fun with C#
Khang Nguyen
|
|
|
|
|
Just replace the app.ico file with your icon and it will build with your icon.
|
|
|
|
|
Wow! You're great, Daniel! Thank you so much.
Khang
|
|
|
|
|
I have searched throughout code project, GotDotNet, the SDK, and the Internet without any resolution!!!
When I write an entry to the Eventlog, I get the following message appended to my message:
The description for Event ID ( 0 ) in Source ( Navigator ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer.
So what do I need to do to establish a message DLL file and have my Event ID's defined so that the Event logging works properly? Does anyone know?
Thanks,
Michael
_____________________________________________
The world is a dangerous place. Not because of those that do evil, but because of those who look on and do nothing.
|
|
|
|
|
I would like to make the dropdown for a combobox display the last selected item in the middle of the listing area rather than at the top. Everything I've tried so far (Click event, DropDown event) only seems to affect the control before the dropdown list is displayed. Even tried subclassing to override the OnDropDown, but again everything occurred before the list was displayed.
Thanx for any help...
>>>-----> MikeO
|
|
|
|
|
Hi!
I'm created Windows service project(C#) and now I want to debug code.
In MSDN i read instructions, but I have a PROBLEM in first step, with installing my service.
I was write in cmd line "InstallUtil.exe myservice.exe" and I get a result in log file (attached). Looks ok!????
But I don't see a service name in Server Explorer (or in Admin->Services) list, so I could not start the service.
Could you help me and write me what i doing wrong.
TNX 1000 times.
Hambi
David Pavlovič
david.pavlovic@adacta.si
|
|
|
|
|
Did you add both the ServiceInstaller and ServiceProcessInstaller components to your project and "configure" them accordingly? If you just run InstallUtil.exe on your service without those things, it won't actually do anything.
Be sure to check the documentation for those two classes, as there's several things you must understand to make it work, like using the same service name (not the display name) for both classes, etc.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Please check following codes, it dosen'g work properly, the title bar is still empty.
( the method PanitNonClientArea(Graphics, RectangleF) can work properly. )
<br />
protected override void WndProc(ref Message m)<br />
{<br />
Graphics g;<br />
RectangleF rectf;<br />
<br />
Point pt;<br />
<br />
switch (m.Msg)<br />
{<br />
case WMConsts.WM_NCPAINT :<br />
IntPtr hrgn = m.WParam;<br />
if ( hrgn != (IntPtr)1 )<br />
{<br />
Region rgn = Region.FromHrgn(hrgn);<br />
g = CreateGraphics();<br />
rectf = rgn.GetBounds(g);<br />
PaintNonClientArea(g, rectf);<br />
}<br />
else<br />
{<br />
g = CreateGraphics();<br />
rectf = new RectangleF(0,-23, Width, 23);<br />
PaintNonClientArea(g, rectf);<br />
g.Dispose();<br />
}<br />
<br />
break;<br />
<br />
default :<br />
base.WndProc (ref m);<br />
break;<br />
}<br />
}<br />
|
|
|
|
|
I want to create a menu control on top of all windows and desktop as parent.so that I can make it available to all applications..Is it possible?
VikramS
|
|
|
|
|
You mean a menu-like equivalent of the Taskbar? Yes, it's possible. If you plan to do this in C#, you're going to be redefine a hell of a lot of interfaces and structs. You best stick to C++ because this requires a lot of COM.
For starters, see the Platform SDK docs for the SHAppBarMessage function, or search for said function in google. There are lots of examples, though mostly in VB and Delphi, but it shouldn't be hard for you to understand the concepts.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
|
Good find!
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Im writing a toolbar for internet explorer . I am usijng COM . I need to access the current document in the browser . How do i do this . Ie what are the classes i can use . The code for this is to be embedded in the toolbar and the functions in the toolbar code should be able to perform some actions on the document in the browser . Also importantly i need to get the selected /highlited section in the document . Are there direct classes supporting this operation .
Srikar Y
NITK Surathkal
|
|
|
|
|
First, wrong forum.
Second, when writing COM clients, there's really no such things as classes that you can access. Everything is done through interfaces. If you're writing a COM server, you of course use classes but they implement the interface through which clients access the classes. This is one of the fundamentals of COM.
Finally, when the host (Internet Explorer) calls IObjectWithSite::SetSite(IUnknown*) , you QI (QueryInterface) for the IWebBrowser2 interface. That's your web browser. Later, call IWebBrowser2::get_Document(IDispatch**) and QI the IDispatch for IHTMLDocument2 (or a newer interface, depending on your browser requirements).
Next time, though, there is a forum for ATL and COM. This would be a more suitable place. If you are using C# to do this, instead of QI'ing for an interface, you simply do a type-cast. The CLR treats this the same.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
|
How can I draw zigzag red lines under some words in a RichTextBox or any other textual environment? (Just like what is done in spell checkers)
Don't forget, that's Persian Gulf not Arabian gulf!
|
|
|
|
|
I create a MDI contain form, add a MainMenu, a ImageList, a ToolBar, and the ToolBar relate the ImageList.
When I use the function Application.EnableVisualStyles() to enable xp style, the toolbar icons are disappeared. But when I use instead of a manifest file, the toolbar icons display correct.
Is this a bug with .net framwork 1.1?
(I used VS.net2003 simplified chinese version)
=== Game is power! ===
|
|
|
|
|
Does anyone know if it is possible to give the ComboBox control a flat appearance? If not, do you know where I may find a flat combo box?
Gary Kirkham
A working Program is one that has only unobserved bugs
I thought I wanted a career, turns out I just wanted paychecks
|
|
|
|
|
Anything's possible (given time)!
Search for the author "Carlos H. Perez". He has some great flat controls available here on CP.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Heath Stewart wrote:
He has...
He had...
|
|
|
|
|
Yeah, I noticed that just today. I remember him saying that he was moving everything new to a commercial library. Nice of him to pull the old stuff! Greedy bastard.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I can get the form's graphics with CreateGraphics(). But how can I get the title bar's graphics? or How to determine the title bar's retangle?
The wParam gotten from WM_NCPAINT always is 1.
|
|
|
|
|
Ok, I am trying to figure out the best way to do this. I have string representing an HTML page that I need to render and then save as a .jpg or .gif image. I currently use the IE control to preview the HTML page, but I need to be able to capture an image without previewing the document. Any pointers or ideas?
|
|
|
|
|
I'm currently working on a project where I need to scrape a web page for info.
Seems pretty simple far. The problem is that the site has a password protected front end. When you log in it takes you to a menu page. The data I want to scrape is on another inside the site.
The question is after making my initial webrequest and posting data to the stream, how to I navigate to another page and then do a request for it's data.
Thanks in advance
|
|
|
|
|
Are you using the WebClient class? Does the site use cookies to store session data? If so, make sure to set it up to receive those cookies.
|
|
|
|