|
Hi Friends,
Help me how to call batch file from visual basic.
i created batch file like....
net use \\serverl\saal1 /user:admin 123456
The purpose of calling the batch file is, when i connect to the application (VB) before giving login details it should connect to the above server. So i m creating that as a batch file and have to call when my application starts.
Please help me.
Regards,
|
|
|
|
|
If you're using VB6 then you can use the Shell statement.
If you're using .NET you can something like this :
<br />
System.Diagnostics.Process pcBatch = new System.Diagnostics.Process();<br />
pcBatch.StartInfo.FileName = sFileName;<br />
pcBatch.Start();<br />
|
|
|
|
|
Hi,
I need help with Autosizing the form controls on the page when the form gets maximized or minimized.
can any one provide an idea how to acheive it.
Any links or postings please...
Jats
|
|
|
|
|
|
Hi ,
Now i found out the While adding the powerpacks shape at design time also , the panel is moving .
here is description .
At the design time of VS 2005 ,
Add a SplitContainer .
1) In that SplitContainer ,set
Panel1.AutoSize =true
Panel1.AutoScrollMargin=30, 30
Now add New Panel to Panel1 of SplitContainer which is having More Size than the panel1 of split Container then
We can see the scroll bars
2) Now add a powerpacks RectangleShape on the Bottom Right of the Panel Which is added to Panel1 of SplitContainer .
Check the thng
The Shape control added is moving up automatically to some location .
Here if we add normal controls like textbox,etc is not moving .OnlyFor Shapes like LineShape, RectangleShape ,OvalShape is moving for the first ShapeControl .
2) Same like this i am creating at runtime .Here the page is moving automatically ,
Now i want the panel to set at tht position only while drawing the things .????
How ????????
|
|
|
|
|
Hi,
I am creating a stream :
stream = file.create(filePAth) 'And it pops up a message here saying : "Illegal characters in path"
I have searched high and wide for illegal character, in normal view and hex, and there is none.
The only thing I can think of is the space character, I have searched google and found some things that can be done to prevent this usign @ in front of the string, but it doesn't work in VB.
Any ideas?
Thanks!
|
|
|
|
|
hi
first try it by using the static path like c:\
if it works fine then go for filePath variable and in that if want to remove only tralling and starting spaces then use
Trim(filePath)
else you could go for a loop like this
<br />
dim a as string <br />
<br />
for i=0 to len(filePath)-1<br />
if mid(filePath,i,1)<>" " then<br />
a=a+mid(filePath,i,1)<br />
endif<br />
next<br />
now a will the string without spaces
Yogesh Agarwal
|
|
|
|
|
Yes I know that, but I cannot change the string, this is an absolute path. The path cannot be changed...
I just need to tell the compiler, or that function or someone... that there is a space in the PATH string. So it can handle the space...
The path cannot be changed!
any other ideas.
Thanks
|
|
|
|
|
It's not about space characters. Your path has invalid characters. This code is a prove that space character is not the problem.
IO.File.Create("c:\ .txt")
Use this code to get where the invalid characters are.
filePAth.IndexOfAny(System.IO.Path.GetInvalidPathChars())
Eslam Afifi
|
|
|
|
|
I have created a mobile application and it is working fine, but I want to do one more task: I want to display a logo.
When the application is running - How can we display logo on the top of the screen with other icons such as time, network, roaming status, battery status etc.
Does anyone has a suggestion or answer....
Regards
|
|
|
|
|
Hello,
I am having the following problem when insetring in SQL 2005 from VB 2005
I have done a calculation wich result in a double variable with the name Total
In my SQL database the Total is defined as smallmoney
Need to Insert the Total into my SQL database so what i do :
SQL="Insert into Results (Total) Values ('"+ System.convert.tostring(Total)+"')"
The SQL insert is working but the Values are incorrect, something wrong with the Decimal point.
When i insert my double result that is the result of for ex. 3 * 2,5 --> 7,5 (Total) in the database there is 75,0000 in the SQL insert i insert 7,5
So i think that something is wrong with the decimal sign.
Maybe i need to insert 7.5 instead of 7,5 but how can i make that is will be correct converted so i can insert it right into SQL.
Any suggestions are very welcome.
I think that there is a simple solution but i dont see it anymore.
Thanks
DCAUB
|
|
|
|
|
Is your SQL Server set up to be localised to use a , as a decimal point ? Perhaps if you used a parameterised query, SQL Server and VB would work it out for you because instead of a string, you'd be passing a number with a specific value ? Or perhaps the smallmoney type has that many decimal places ? From MSDN: The money and smallmoney data types are accurate to a ten-thousandth of the monetary units that they represent.
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 )
|
|
|
|
|
I want a code of Insurence Banking management system
|
|
|
|
|
It is depressing that I can't tell if you're joking or not.
If you're trolling, get a life. If you're not, hell, get a life. I can only assume that no-one would hire someone like you to write such a system, so I assume this is homework. Do your own homework.
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 )
|
|
|
|
|
...and people in Hell want ice water.
Did you have a specific question about writing this thing, or did you just want other people to do your work for you??
|
|
|
|
|
Hi, I want to be a rockstar. Plz send groupies, it urgentz!!
|
|
|
|
|
darkelv wrote: I want to be a rockstar. Plz send groupies, it urgentz!!
That is a good one
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
There are Vacancies in Mental Hospital
mybe you should stop telling any one that you can code
Give me your resume they are looking for insane people like you
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Tharsan wrote: I want a code of Insurence Banking management system
Be one cold day in hell before someone gives you code outright to something like that. Do your own frigging work ( e.g. requirements gathering/design/code/etc).
"I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon
|
|
|
|
|
Hi there
i got a problem to draw string Unicode on form .
but function drawstring can't support unicode , do u have anyway to drawstring text that support unocode ?
pls point me anyway what should i do next and give me some codes about that ?
Example:
Dim drawFormat As New StringFormat()
Using formGraphics As Graphics = Me.CreateGraphics(), _
drawFont As New System.Drawing.Font("Khmer Os system", 16), _
drawBrush As New SolidBrush(Color.Red)
formGraphics.DrawString("???????????", drawFont, drawBrush, _
150.0, 50.0, drawFormat)
End Using
that example above can't draw string correctly , Pls help me i need Urgent.
thank you in advance .
regard from
Spider Anatha
|
|
|
|
|
You don't need to create a red brush, you can use Brushes.Red.
In fact, all strings are unicode in .NET. What makes you think you can't use a unicode string ? How are you trying to ?
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 )
|
|
|
|
|
i have 3 gridview
on selected index change of first gridview(company), I populate second gridview(users) on second gridview selected index change i display a list of jobs that are available (in a listview) and list of jobs assigned (in gridview) and roles associated with that job (checkbox in a 3rd gridview)
when i need to assign a job to the user i simply do followings
1. click company from 1st gridview
2. click user from 2nd gridivew
3.select a property from available property
and click a button that adds a new record in the assigned gridview but i want to display the newly added row as soon as they hit assign button. i need to reselect the user to see the updated change. is there anyway i could achieve this without using session?
please advise.
|
|
|
|
|
There's no reason in the world you need to use the session. Just use viewstate, or pass a value on the url, if they are different pages.
BTW, I answered tis even though you should not have posted it here, it's an ASP.NET question.
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 )
|
|
|
|
|
You are a kind-hearted and charitable individual Mr Graus...
-------------------------------------------
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Just bugger off and leave me alone!!
|
|
|
|
|
I know - ask anyone.
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 )
|
|
|
|