|
Hi i am using Vb 2005 and using some other command line based applications to take some “file backups”.
I am able to execute the command by using the shell function.
My issue is that i want to know what is the status returned back. One way is to redirect the output of the commands to a file and read....
Is there any other way ???
Regards
Nishkarsh
|
|
|
|
|
If you're using the Process class to launch this, there's a WaitForExit method you can call that will block your code until the process you launched exists. When that call returns, then you can look in the ExitCode property of the Process object you created.
You can also redirect the output of the console app to your application and read it like you would a Text file. Check out the StandardOutput property of the Process class and the RedirectStandardOutput property of the ProcessStartInfo class.
|
|
|
|
|
Hi i am stuck up at a very small point in my new vb 2005 Express edition application, I want to have right aligned labels (text aligned to right side of label) so that when there is a large string added to the text of labels they expand on left side...just like the way they used to do in VB6
Note: I had set the auto size property of labels as true
Regards
Nishkarsh
-- modified at 2:30 Friday 26th October, 2007
|
|
|
|
|
just put the property 'textalign' to the value 'right' and that should do it
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|
|
Hi thanks for your suggestion but unfortunately it dose not works the way i wanted...
I aligns the text to the right side of the label but my idea is different...
I am having a small Label which i populate at runtime... i want it to grow on left side not on right, when i put data in it..
Regards
Nishkarsh
|
|
|
|
|
There should be a TextAlign property int he label.
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
|
|
|
|
Hi thanks for your suggestion but unfortunately it dose not works the way i wanted...
It aligns the text to the right side of the label but my idea is different...
I am having a small Label which i populate at runtime... i want it to grow on left side not on right, when i put data in it..
This used to be the case in vb 6 if i am not wrong when we make a label left aligned
|
|
|
|
|
You can always calculate the location and size of the textbox yourself, I guess.
|
|
|
|
|
Hi, I would set TextAlign to right, AutoSize off, and give sufficient Width.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Option Explicit
Dim Starttime As Date
Dim Endtime As Date
__________________________________________________
Private Sub Command1_Click()
Starttime = Format(Now, "HH:mm")
Timer1.Enabled = True
Form1.Print Starttime
End Sub
__________________________________________________
Private Sub Command2_Click()
Endtime = Format(Now, "HH:mm")
Timer1.Enabled = False
Form1.Print Endtime
End Sub
____________________________________________________
Private Sub Command3_Click()
Form1.Print Minutesdiff = (Endtime - Starttime)
End Sub
_____________________________________________________
Private Sub TxtEnd_Change()
End Sub
______________________________________________________
Private Sub txtStart_Change()
End Sub
_______________________________________________________
i have created this project with three command button two textbox and three level and a form. command1 is for login time ( Start Time) and command2 for logout button (EndTime), and command3 for calculating difference Between EndTime and StartTime. so that i could calculate the amount of billing. i.e.
0 > 30 minutes = 10 Rs.
31> 60 minutes = 20 Rs.
further i want the the log in ang Log Out detail appeares in the textbox but i dont get it how
so i have made it default apearance on the form itself.and when the total command3 button is click it should show the difference of Time in HH:MM format
help me solving it.
zrch
|
|
|
|
|
Solving what?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
i want to create a Log In and Log Out Program for a Cyber cafe which calculate the time period and the amount of surfing, including nos of printing, nos of scanning and total Amount
zrch
|
|
|
|
|
OK, but what are your problems (i.e. be more specific)?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
How to do format painter in vb.net for example msword there is a option in fonts
Rishi Dubey
|
|
|
|
|
Sorry, but I have no idea what you just asked for. Any drawing you want to do, do in your forms paint event. If you want to change the font a control uses, it will have a font property. If that doesn't help, try explaining it again.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Open Microsoft word(2007) after opening msword(2007) on left hand side there is option of cut, copy, and paste after paste there a logo of brush that option is format painter. i want to make that in vb.net pls help me
|
|
|
|
|
It is suggest to use Createobject method to create word object then u can do anything like open, close, print, save, saveas, etc.
If don't have it let me know
Prasmin Mehta
|
|
|
|
|
thanks format painter is done........
now i am trying for ruler that is the margin line in msword
can u help me related to that.............
|
|
|
|
|
I want to be able to give the user the ability to add label / textbox controls at runtime. I have this working for one label control, Label1. When the user adds the next label I would like my code to check (maybe a loop?) what the next available label number is and then create it. So if Label1 exists then the next one would be label2. I also want the labels to be movable and resizable.
Please help
thanks
Sankalp
|
|
|
|
|
If you do designer hosting like I posted in your other question, you don't have to worry about this.
|
|
|
|
|
Hi, the way I see it, you don't need different variables to dynamically create Controls,
just create one and store a reference in some collection (ArrayList, List, whatever),
then create the next.
What would you use all the names for anyway, there will not be code present to deal with
them, except for the loop that will traverse your collection of run-time generated controls.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hi
How do I make controls, such as textbox movabel and the ability to resize using a mouse at runtime.
Am trying to develop a interface for the end-user, using which the user can design his own enrty interfaces.
Thanks
Sankalp
|
|
|
|
|
|
Hi
Thanks for the reply, this seems to be a csharp example, would like to know how to do this in vb.net.
I anyway do not have csharp installed so cannot even look at the code, please help
|
|
|
|
|
there are many c# to vb.net converters on the net
you can open de .cs files in notepad and convert them using these online converters
granted it's a bit of work but it should give you the opertunity to convert the project to vb.net
c#sharp to vb.net converter:
http://labs.developerfusion.co.uk/convert/csharp-to-vb.aspx[^]
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistakes.
|
|
|
|