|
You're new in C#, and you're writing a stock application ? I assume this is for a class.
The advice you've been given is vaguely on the right track. You should create a label control which draws itself in the marquee fashion. It can draw it's text using an offset, or just shuffle the string it shows ( move a letter at a time ). You set the positions within a timer, so you have a chance to see each one, and you need to call Invalidate() each time, if you draw it yourself.
The code you were given isn't going to do anything useful, but it has got a rough idea right, that you need to change the location of text so it will move
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
This will works it is tested
Try this.
<br />
private void timer1_Tick(object sender, EventArgs e)<br />
{ <br />
label1.Left = label1.Left + 20;<br />
if (label1.Left >= 500)<br />
{<br />
label1.Left = label1.Left;<br />
}<br />
}<br />
timer must be enabled true
<br />
private void Form1_Load(object sender, EventArgs e)<br />
{<br />
timer1.Enabled = true;<br />
}<br />
try this
Nikesh Kr. Yadav
Programing is easy in .Net
|
|
|
|
|
Hurry,
It works.
But it scroll only one times.
It not scrolling continuously.
thanks,
Regards,
rahul saini
|
|
|
|
|
try 500 to 400;
else less or more
Nikesh Kr. Yadav
Programing is easy in .Net
|
|
|
|
|
Seriously, if you don't know how to do it, don't try to tell someone else how to do it. Changing the number won't make it repeat itself, you need all sorts of code that belongs IN the control to do that. Not a whole lot, but enough to make it messy if he has to do it manually.
I recommend you both look at the article that has been linked to, if you want to know how this is done.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
No its not working
Regards,
rahul saini
|
|
|
|
|
Look, either read my advice and try to write something ( although I doubt you can at this stage ), forget it and focus on your homework, or download the control you've been given a link to. The advice you're choosing to pursue, while ignoring everyone else who is trying to help you, is really quite bad. If you're trying to add something cool to your homework, this is not the way to do it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Again, the issue you have here is twofold
1 - you're getting help that *kind of* works, and ignoring my replies on the basis that I'm trying to get you to write some actual code for your assignment, instead of just getting it off the web. You don't learn anything this way.
2 - the fact that in using this code, you can't work out what it's doing, is a sure sign that you should not be using it, but instead focusing on your class, and on learning C# for yourself, instead of relying on others to provide you with code
There is nothing wrong with asking people for help, and nothing wrong with people giving you code. But, before you use it, you should use google to help you to understand it, so you could reproduce it yourself in future. That's what learning is.
In any case, someone else has given a link to a control you can use. I didn't look because, well, if you're doing homework, you should focus on learning, not on using other peoples code. And, in any case, you only had to type marquee into the search box on the site to find it for yourself.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Sorry Sir,
Actually I need it urgently.
I will keep your words in my mind befor i ask some one for help.
Regards,
rahul saini
|
|
|
|
|
I still don't understand why. This is homework, right ? Did your teacher say you needed a marquee in your project ?
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
what is the difference between API & DLL
MS Office API and MS Office Dll both are same ot not?
|
|
|
|
|
Quoting Wikipedias definition for each term:
API[^]:
"An application programming interface (API) is a source code interface that a computer application, operating system or library provides to support requests for services to be made of it by a computer program."
DLL[^]:
"Dynamic-link library (also written without the hyphen), or DLL, is Microsoft's implementation of the shared library concept in the Microsoft Windows and OS/2 operating systems."
Hence, a DLL is one way to expose an API or parts of an API to the programmer. Another way to expose an API is through a Web Service[^].
So, to recap, the MS Office API is the specification of what functionality you as a programmer can use to interact with MS Office, while the MS Office DLL (DLLs actually, there are lots) is the binary code executed by the computer through you program if you use the API.
|
|
|
|
|
|
Hi,
I am having a string which holds the data type list now i want to convert it into the System.Data.DbType.
This string will be in the database.
Can you please give me solution to get rid of this problem.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
You can parse a string against an enumeration as follows:
System.Data.DbType myDBType = (System.Data.DbType)Enum.Parse(typeof(System.Data.DbType), yourString);
You should put this in a try-catch statement as it will thrown an ArgumentException if yourString is not an item of the DbType enumeration.
Check MSDN for syntax and exceptions thrown.
Hope this is what you wanted.
Talal
"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."
--Rich Cook
|
|
|
|
|
|
Try printing a form-feed character 0xC (?) at the start of every slip. Not sure how to configure the printer to recognise the length of a slip though :P
|
|
|
|
|
Sir,
i m using 4 inch X 12 inch slip.please give me code or logic
thanks for your reply.
help as a alias.
Be happy and make others happy.Cheer up...........
|
|
|
|
|
Hi all
Can some one help me for Adding and Deleting macro in Word throgh C#,i m working in Vb.net.but dont know any method for Adding & Deleting macro.
Regards,
Hiren
Thanks in advance.
|
|
|
|
|
Have you dug around with the Office Interop classes/methods?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi All i ma very new in the world of C# and .net..
I am learning c# so need to practical of C# programming..
Let me know how i can do c# programming ..in my system there r only .net framework 1.1 and 2.0 ..
What else i need to install othere that framwork ..and where i can free download it..
i want to programming on dos prompt..
please tell me require compiler etc ... and download links..
thankyou in advance....
Life is not easy ,let's make it.
|
|
|
|
|
Hi,
If you have Visual Studio, this is the easiest way to program and compile your code. Visual Studio 2003 is for applications in .NET 1.1 and Visual Studio 2.0 is for applications in .NET 2.0. In all cases, you need the proper SDK for the .NET version you want to work with. If you don't have Visual Studio, you can use the tools that come with the SDK to compile your code.
If you want to program in .NET 2.0, you would need the .NET 2.0 SDK that can be found here http://www.microsoft.com/downloads/details.aspx?FamilyID=FE6F2099-B7B4-4F47-A244-C96D69C35DEC&displaylang=en[^].
If you want to program in .NET 1.1, you can find the SDK here http://www.microsoft.com/downloads/details.aspx?FamilyID=9b3a2ca6-3647-4070-9f41-a333c6b9181d&DisplayLang=en[^]
Also, for help on using C#, you can browse MSDN Library here http://msdn2.microsoft.com/en-us/library/default.aspx[^]
Talal
"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."
--Rich Cook
|
|
|
|
|
Thankyou Sir ....
Life is not easy ,let's make it.
|
|
|
|
|
I want to create some plug-in (or service or whatever) forExchange
Server 2003 that will be installed on Exchange Server machine and will
listen for all incomming mails for all users and for emails with
specific subject the plug-in must execute some additional operations
and sometimes those emails will be moved to different folder in client
Outlook.
How can I start with this development? I need to use C#
2005? If exists some components for this action?
Thanks in advance,
Adnan
Many Thanks,
Adnan Rafiq
muhammadadnanrafiq@gmail.com
|
|
|
|