|
OK, Thank you..I wantnt askin for someone to do it...I am 51 years old and dont need someone to do my work, I was mearly asking for tutoring, help, get it, go back and read.I have dont the application, but I dont UNDERstand CODE. I wanted someone to possibly so me how to do this stuff. so far, i have done the app. and the disign of the app. now i changed the names in the property area, (Just the TEXT) area. I cant figure what to put in the CODE area. Is that enough?
Gary
Gary Skinner
Michigan
|
|
|
|
|
Gary Skinner wrote: I cant figure what to put in the CODE area. Is that enough?
*blush*
When someone obviously posts a homework assignment, I assume it's a 17 yo, in college, who expects to get his homework done and still enter the workforce as a programmer in a few years time. That's the attitude I'm against, which would drive the comments I made.
Basically, if you create the button that you want to do something, in the designer, and then double click on it, it will create the block of code which will be executed when you press the button, and thus also open the code file for you. You can also right click on the file in the designer and choose 'view code' to see where it goes. Obviously, if you're keeping track of anything, you need to set member variables ( variables that are declared inside a class, but outside of all methods, and thus are visible to all the methods, and keep their values between function calls ).
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
after instaling .net 2005 and .netframework 2.0
scroling the report become very slowly.
in ex version it was so ok.
where is the problem?
Hvala
|
|
|
|
|
Hi,
I am trying to convert a lot# we generate back to a date format. The lot# is a 5 digit number that includes the day of year plus the 2 digit year i.e. 12506 equals the 125th day of 2006. What I want to do is take 12506 and convert it to 05/05/2006.
Thanks,
mwclassen
|
|
|
|
|
How about if you split the string into two numbers ( by doing substrings and int.tryparse ). Then do something like this...
Dim dt as DateTime = new DateTime(2000 + yy, 1, 1);
dt = dt.AddDays(dd);
where yy is 06 and dd = 125 in the above example.
I think that you need to take the return from AddDays, but it's possible that I'm wrong and it works in place. I've also assumed parameter order in the DateTime constructor.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
I have to head home early due to sleet & ice so I'll have to let you know later if this works. I think it will!
Thanks in advance,
mwclassen
|
|
|
|
|
make starting date
dim my_problem as varchar(10)
my_problem='12506'
dim my_short_year as char(2)
dim my_days as integer
my_short_year =my_problem.substring((len(my_problem)-2,2)
my_days=my_problem.substring(0,(len(my_problem)-2)
dim starting_year as char(4)
starting_year ='200'+my_short_year
dim my_startingdate as datetime
my_startingdate ='01 jan '+starting_year.tostring
dim my_result as datetime
my_result=my_startingdate.adddate.days(my_days)
|
|
|
|
|
I found nine bugs in that code. Nice work.
---
b { font-weight: normal; }
|
|
|
|
|
As januari first would be the first day of the year, it would be:
dt = dt.AddDays(dd - 1);
Or you could start from day zero:
Dim dt as DateTime = new DateTime(1999 + yy, 12, 31);
---
b { font-weight: normal; }
|
|
|
|
|
Oh, that's true. Sorry, looks like it's your turn to correct my answer
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Thanks everyone! Here's what I came up with from the two suggestions and it works just like I was wanting.
Dim dayOfYear, shortYear, days, startingYear As String
dayOfYear = txtDay.Text
shortYear = dayOfYear.Substring(dayOfYear.Length - 2, 2)
Dim startingDate As DateTime = New DateTime(1999 + shortYear, 12, 31)
Dim result As DateTime
days = dayOfYear.Substring(dayOfYear.Length - 5, 3)
result = startingDate.AddDays(days)
I am new to VB and was a little confused by the types. 'varchar(10)' was not a valid type with the version I'm using(at least to my knowledge). Using string seemed to be the only way to get to the substring.
Thanks,
mwclassen
|
|
|
|
|
I have embedded wmp 11 into a form, and now want it to play a .sami file, however i get the sami file does not play, the file is in correct syntax etc, but i need to find a way to enable captions and subtitles in wmp 11 i think.
does anyone know how to do this?
Thanks in advance.
J
|
|
|
|
|
jady84 wrote: I have embedded wmp 11 into a form, and now want it to play a .sami file, however i get the sami file does not play.
That's because Windows Media Player only plays certain file types (.wmv, .wav etc.) I've never heard of a .sami file, if it's a custom audio/video file designed for a different media player, then Windows Media Player won't work.
Is a .sami file a audio or video file?
|
|
|
|
|
|
Read my 'image processing for dummies' articles, which are on the code project site, just do a search.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Sorry to bug you guys again, but...
If I have an object in the main program, I can link to it from the imported assembly by passing its name as an object in a method:
From the host:
Assemblysub(Me)
Is it possible to pass the host name as an object within the assembly class so that it can be visible to methods in the assembly that are not called by the host?
Just trying to make sense of what's pretty complicated for me.
Thanks again
|
|
|
|
|
Is it possible to create new objects on the main form from imported .dll assemblies?
I want to have a number of assemblies, each presenting different controls on the main form.
I see that I can call existing controls on the main form from the assemblies, but cannot see if I can place new controls on the main form from the assemblies.
thank you
|
|
|
|
|
If an assembly is imported into your project, then it's part of the project, you can do anything that you could do if the code was in your local assembly, with the exception that any methods marked internal only work in the assembly where they were written.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Let me try to explain my situation a bit more.
I have a main project that may or may not import a subassembly. I'd like to have the subassembly, when it is available, display its form within the form of the main form (or alternatively, create new objects on the main form).
I guess it's like I want to create an object on Form1 from Form2. Normally, you wouldn't need to do that. But if Form2 is only constructed at runtime, when its assembly is loaded, there is no way to know what to put on Form1 ahead of time.
Does this make any sense?
Thanks again.
|
|
|
|
|
Hey
Just wondering if it is possible to use VBA to make it so that Outlook imposes a button on the "paper" of each email eg:
An email comes in and outlook places a button at the top of the message that allows the user to perform an action.
Cheers
Dan
|
|
|
|
|
Hai all,
Iam doing an application in asp.net with vb.....
my application generates a series of documents.....
i need to have all those generated files intoa single zipfile with link button and later can be downloaded to any place like desktop.....
can any one help me in this case.....
as soon as possible.....
thnks in advance
amar
|
|
|
|
|
|
using SQLServer 2005
Mohamad A. Flefel
mflefel@hotmail.com
+962 79 5963865
C#.net & VB.net Developer
|
|
|
|
|
please edit your original post.
don't make a new post
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
please answer if u Know.
don't Abuse or Spam the posts
Mohamad A. Flefel
mflefel@hotmail.com
+962 79 5963865
C#.net & VB.net Developer
|
|
|
|