|
This is from memory, so you may have to adapt to what's actually there, but it should be close:
0) Put a label control on the form.
1) Set the border style property to Fixed 3D.
2) Set the Auto Size property to false.
3) Set the height (or width) to 2px (you have to physically type this because the designer won't let you make it that small by dragging the border with the mouse)
4) Clear the Text property.
5) Now you can use the mouse to make the line as big (long/tall) as you need.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
... can anybody else actually understand most of what is written about C# in the MSDN Library? Or am I just stupid? lol
Jason.
j.t.
|
|
|
|
|
don't say that. you are not stupid.That is my mistake either.
it doesn't really help much. Searching in MSDN is a mistake.
.
.
.
.
Or maybe I'm stupid too.
|
|
|
|
|
Aw thanks Hot_ice lol I feel so much better now
Jason.
j.t.
|
|
|
|
|
I've never had any trouble understanding MSDN content. I'm no genius so draw your own conclusion...
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
yes.
most of it is understandable and informative, sometimes the examples are too simple or just missing.
and there are lots of pages explaining the concepts, but those are a tiny bit more difficult to locate.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Buy a book. The MSDN assumes a basic level of knowledge. Just like an encyclopedia assumes you know English.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Thanks Christian, I've always enjoyed reading your answers. Are there any books that you'd remcommend?
j.t.
|
|
|
|
|
0) You're stupid.
1) MSDN sucks, so that makes you stupid twice - first, because you're using MSDN, and second, because you don't understand what they've written (what little help they provide is written in clear English).
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
Hi All,
I have a doubt in C# XML update Operation.
while inserting/Updating/Deleting the node in XML ,I need to validate the xml with the corresponding Schema definition.Can you provide the solution without using the normal schema validation mechanism using C#.because every time while updating the node the normal validation mechanism takes more time for validating entire record.
|
|
|
|
|
|
Vista Style Button in C#[^]
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKQUFK[M`UKs*$GwU#QDXBER@CBN%
R0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
-----------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
don't delete messages when they have been handled or are no longer relevant to you, it creates a messy forum. questions and replies can continue to be useful to others.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
Sorry.I found there are some article in this site after I had wrote my post.
sepel
|
|
|
|
|
I think i have wrong GUID, how do i find out what GUID i should be using?
Im getting exception
Retrieving the COM class factory for component with CLSID {56A868B1-0AD4-11CE-B03A-0020AF0BA770} failed due to the following error: 80040154.
from following code
<code>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
namespace Imapi2
{
[Guid("56A868B1-0AD4-11CE-B03A-0020AF0BA770"),
InterfaceType(ComInterfaceType.InterfaceIsDual)]
interface IRawCDImageTrackInfo
{
void get_ISRC(
[Out,MarshalAs(UnmanagedType.BStr)] string value);
void get_StartingLba();
void get_SectorCount();
void get_TrackNumber();
void get_SectorType();
void put_ISRC();
void get_DigitalAudioCopySetting();
void put_DigitalAudioCopySetting();
void get_AudioHasPreemphasis();
void put_AudioHasPreemphasis();
void get_TrackIndexes();
}
[ComImport, Guid("56A868B1-0AD4-11CE-B03A-0020AF0BA770")]
class ccIRawCDImageTrackInfo
{
}
}
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
try
{
Imapi2.ccIRawCDImageTrackInfo ccTest1 =
new Imapi2.ccIRawCDImageTrackInfo();
Imapi2.IRawCDImageTrackInfo test1 =
(Imapi2.IRawCDImageTrackInfo)ccTest1;
}
catch (Exception ex)
{
Console.WriteLine("Unexpected COM exception: " + ex.Message);
}
Wait for completion.
Console.WriteLine("Press Enter to continue.");
Console.ReadLine();
}
}
}
</code>
http://msdn.microsoft.com/en-us/library/cc512151(VS.85).aspx[^]
That is link to interface i am trying to use
|
|
|
|
|
I was wondering if there was a better way of doing this?
What I am trying to accomplish is always checking for updates and displaying there is an update with a NotifyIcon. Now I got it working good, but was wondering if there was a better way.
The way I did it was used a timer (every 5 min). On the Tick event:
private void timerCheckUpdates_Tick(object sender, EventArgs e)
{
if (ApplicationDeployment.IsNetworkDeployed)
{
if (!CheckUpdate)
{
ApplicationDeployment ad = ApplicationDeployment.CurrentDeployment;
try
{
ad.CheckForUpdateCompleted += new CheckForUpdateCompletedEventHandler(ad_CheckForUpdateCompleted);
ad.CheckForUpdateAsync();
CheckUpdate = true;
}
catch (COMException)
{
ad.CheckForUpdateAsyncCancel();
}
}
}
}
void ad_CheckForUpdateCompleted(object sender, CheckForUpdateCompletedEventArgs e)
{
CheckUpdate = false;
if (e.UpdateAvailable)
{
notifyIcon1.ShowBalloonTip(5000, "Update Available!", "There is a new update available for this application!\nPlease click on the Help menu and click Check for updates.", ToolTipIcon.Info);
timerCheckUpdates.Enabled = false;
}
}
Ok I haven't tried it since I've changed it to the COMException, but if the user didn't have internet at all it would throw an exception. I am trying to get away from the error messages.
Is there a better way of doing this?
|
|
|
|
|
Our winforms apps all check on startup only! From this I gather you are checking every 5 minutes
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Well yes... I did have it always check at startup but you had to wait for it to load.. it had to check and it wouldn't load the form at first, it would load the checking for updates / prereqs form. I didnt really want this, and for practice I wanted to make something that would check for updates at certain times while using the program.
If no updates were found, nothing would happen. But if there were updates found, a notification would popup from the NotifyIcon (lower right hand corner of screen) and say "There is a new update available!".
If I disabled the timer, that means it would only check once while the program was running. I want it to check multiple times while it is running. This is a inhouse only application and I do change things a lot on it.
|
|
|
|
|
In the ontick event
Disable the timer<br />
check for updates<br />
do updates<br />
ENABLE TIMER
Seems simple to me - we use it all the time!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I have also received an email stating there was a reply from jay_t55. I cannot see it? Usually if something was deleted it shows this message was deleted on this forum right? Is there a bug?
Anyways,
Jay, if I disable the timer then it won't check for updates again unless the application restarts.
|
|
|
|
|
Hello all. I have developed full blackjack game using C# in MS VS 2008. Now I want to implement the Windows WPF in my blackJack game. I have no idea where to start, and look for what. Searching the internet wasted 2 days of work. I will post both versions (once the WPF has been developed) on here.
Thanks in advance.
|
|
|
|
|
BenJamming wrote: Searching the internet wasted 2 days of work
In two days you could have read a book on the subject and be half an expert on the subject.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
BenJamming wrote: Hello all. I have developed full blackjack game using C# in MS VS 2008. Now I want to implement the Windows WPF in my blackJack game.
I would start in the WPF forum...
God, I pity the software world when current crop of new programmers gain "manager" status...
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
could anyone tell me how to get the IntPtr handle of a flash element of a site which my webbrowser is focused on?
I'm trying to use SendMessage on the site and it's not working because I need to be sending it to the flash player and not just the webbrowser or something
I can get my clicking to work fine with google but not with flash content
int x = 283;
int y = 342;
IntPtr handle = two.Handle;
StringBuilder className = new StringBuilder(100);
while (className.ToString() != "Internet Explorer_Server")
{
handle = GetWindow(handle, 5);
GetClassName(handle, className, className.Capacity);
}
IntPtr lParam = (IntPtr)((y << 16) | x);
IntPtr wParam = IntPtr.Zero;
const uint downCode = 0x201;
const uint upCode = 0x202;
SendMessage(handle, downCode, wParam, lParam);
SendMessage(handle, upCode, wParam, lParam);
System.Drawing.Pen myBrush = new System.Drawing.Pen(System.Drawing.Color.Red);
Graphics g = two.CreateGraphics();
Graphics h = one.CreateGraphics();
h.DrawEllipse(myBrush, new Rectangle(x, y, 5, 5));
g.DrawEllipse(myBrush, new Rectangle(x, y, 5, 5));
here two is my webbrowser and one is just a transparent form over top of it which I will be using later, I just drew circles on them to tell where the mouse should be clicking, and as I said before, it works for other sites just not flash content
|
|
|
|