|
how can i use a varible in a shell command; so the shell executes net send dell (my input)?
dim message as string
message = txtMsg.text
Shell ("net send dell" message)
HELP
|
|
|
|
|
Something like this maybe?
Dim sendString As String
Dim varData As String
varData = "Hello world!"
sendString = "net send dell" & varData
Shell(sendString)
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
Ray Cassick wrote:
sendString = "net send dell" & varData
You need to specify a space here
"dell "
Your friendly neighbourhood typo police!
Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning
Mark Twain
Get your facts first, and then you can distort them as much as you please
Mark Twain
|
|
|
|
|
Hi,
I need to have an owner-drawn linklabel on my form. For that i set size of the control equal to the size of my graphical object which i draw inside linklabel.
My question is: How do i tell the linklabel control to set its "Link Activation Area" to spread over the entire size of the linklabel control, and not just over some text within the control (after all, i don't even use any text).
Regards,
Vitaly
|
|
|
|
|
Why are you using the linklable then? Sounds to me like what you want can be done using a picture box or something like that.
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
Hi,
What i need is a hyperlink object, only custom drawn. I know the size of the rectangle that i'm drawing, so i want to set the hyperlink's Activation Area to match its size. Any idea how to do that?
Regards,
Vitaly
|
|
|
|
|
Hi,
I have tried to convert an C# sample program to VB.Net but was confronted with one problem. This sample describes adding controls dynamically to a placeholder and reading back their values after user clicks a button. You can see the whole C# source here.
I think I have managed to do all the other conversion but following snippet of C# code is problem.
(I have removed the comments)
XPathDocument surveyDoc = new XPathDocument(Server.MapPath("ExSurvey.xml"));
XPathNodeIterator itr = surveyDoc.CreateNavigator().Select("//question");
System.Text.StringBuilder sb;
sb = new System.Text.StringBuilder();
sb.Append("Survey submitted on " + DateTime.Now + Environment.NewLine);
while (itr.MoveNext()) {
string controlName = itr.Current.GetAttribute("name", "");
sb.Append(controlName);
sb.Append(" : ");
object ctrl = FindControl(controlName);
if (ctrl is TextBox) {
sb.Append(((TextBox)ctrl).Text);
}
if (ctrl is RadioButtonList) {
if (((RadioButtonList)ctrl).SelectedItem != null) {
sb.Append(((RadioButtonList)ctrl).SelectedItem.Value);
}
}
sb.Append(Environment.NewLine);
}
string body = sb.ToString();
This code returns the ID of the control and it's value in body . That's what I'm after.
My effort in translating this snippet was as follows:
Dim surveyDoc As XPathDocument = New XPathDocument(Server.MapPath("ExSurvey.xml"))
Dim itr As XPathNodeIterator = surveyDoc.CreateNavigator().Select("//question")
Dim sb As System.Text.StringBuilder
sb = New System.Text.StringBuilder()
sb.Append("Survey submitted on " + DateTime.Now + "<br>")
While (itr.MoveNext())
Dim controlName As String = itr.Current.GetAttribute("name", "")
sb.Append(controlName)
sb.Append(" : ")
Dim ctrl As Object = FindControl(controlName)
If (TypeOf ctrl Is TextBox) Then
Dim myTextBox As New TextBox()
myTextBox = ctrl
sb.Append(myTextBox.Text + "<br>")
End If
If (TypeOf ctrl Is RadioButtonList) Then
Dim myRadioButtonList As New TextBox()
myRadioButtonList = ctrl
If (Not myRadioButtonList.SelectedItem Is Nothing) Then
sb.Append(myRadioButtonList.SelectedItem.Value.ToString + "<br>")
End If
End If
sb.Append("<br>")
End While
Dim body As String = sb.ToString()
To my disappointment my body contains only the ID and the semicolon, not the value of the control.
If somebody is kind enough and tells to me what is wrong in my code, I would be ever grateful to that person. I know that is not much in this cyberworld but anyway...
Lasse Rantanen
|
|
|
|
|
It looks like where you are creating a new TextBox() which does not appear to be needed.
If TypeOf ctrl Is TextBox Then
sb.Append(CType(ctrl, TextBox).Text)
End If
If TypeOf ctrl Is RadioButtonList Then
If Not (CType(ctrl, RadioButtonList).SelectedItem Is Nothing) Then
sb.Append(CType(ctrl, RadioButtonList).SelectedItem.Value)
End If
End If
This should work
|
|
|
|
|
i am attempting to read in a byte stream which contains what used to be VB6 currency values, .NET does not have a currency type anymore, so im trying to figure out the easiest way to convert to the new decimal format.. anyone got any pointers they could throw my way?
thanks in advance for any suggestions
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
The VB6 Currency is a 64-bit data type. Read it into a 64-bit integer (int64) and multiply it by 10,000. Let us know how this works for you.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
|
What are the best online C++ tutorials for experienced VB developers who need to learn C++ fast? In other words, they need one that is both clear and concise. Yes, I know that may be a tall order!
Kevin
|
|
|
|
|
You might get better results in the C++ forums since I don't think many VB programmers know C++!
OTH, I did it the hard way, through books
Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning
Mark Twain
Get your facts first, and then you can distort them as much as you please
Mark Twain
|
|
|
|
|
I've asked in both forums. I asked here as well, because I wanted to catch any VBers who've picked up C++ after VB.
Kevin
|
|
|
|
|
OIC.
I started in C++ before doing VB6 and I've never had much luck with Online tutorials I prefered a good old fashioned Book instead.
If you're interested, you might want to try Deitel & Deitel's C++:How to Program. It's a good book for anyone starting C++
Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning
Mark Twain
Get your facts first, and then you can distort them as much as you please
Mark Twain
|
|
|
|
|
Yes, a book is better. There is one called C++ for VB Programmers or something. The reason I asked about tutorials is because I was looking for the fastest way of helping my friend achieve his objective. That is, originally his boss envisaged a 3-day timescale for the VB application. So presumably with the C++ version he would be looking for the minimum time - no more than a a couple of weeks or so.
Kevin
|
|
|
|
|
Kevin McFarlane wrote:
application. So presumably with the C++ version he would be looking for the minimum time - no more than a a couple of weeks or so.
That's one tall order!Maybe he could get one of the "learning in 24 hours" or "learning in 21 days" book. I haven't read those before, but if speed if what you need ......
Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning
Mark Twain
Get your facts first, and then you can distort them as much as you please
Mark Twain
|
|
|
|
|
Kevin McFarlane wrote:
clear
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
Kevin McFarlane wrote:
clear
Kevin McFarlane wrote:
concise
Sorry, using these words in the same sentance with C++ does not compute
Seriosuly though, I learned from books and asking questions like most VB programmers did. I also took a lot of heat from C++ folks
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
Ray Cassick wrote:
Sorry, using these words in the same sentance with C++ does not compute
Hence my smiley!
I am primarily a C++ developer myself but I'm aware of its shortcomings on the clarity front.
Eiffel has equivalent power to C++ while adopting the VB philosophy of readability.
Kevin
|
|
|
|
|
I'm writing an activex Control in VC++ to be deployed with VC++, VB and VBScript. The problem that i encouters is the following :
I writed a function in the Activex Code which takes as arguments a VARIANT FAR * which is a SAFEARRAY, in this function i should be able to read all variable Contents usibg SAFEARRAYs methods. With VC++, everything go allright. With VB, i just write the following code :
...
dim Lst as variant
redim Lst(2)
Lst(0) = 1
Lst(1) = 2
Result = MyActivex.Function1(Lst)
...
When debugging this program within the VC Activex Code, i notice that the the Lst parameter don't seems to have the good values, it contains another values. What should i do to pass an array in my Activex Function...
I need Your Help.
|
|
|
|
|
hi
i am working on a project in which i want to access only one page of a word docment
can any body help me
|
|
|
|
|
Hi Every body
I want to use VB object printer to print some informations exactly at a position (x, y) on paper.
I understand each printer has its own idea of what the printable area of the paper is.
Therefore i use Windows API to check left and top margin before sending data to printer.
I retrieve theses informations like this :
MarginLeft = GetDeviceCaps(Printer.hdc, PHYSICALOFFSETX)
MarginTop = GetDeviceCaps(Printer.hdc, PHYSICALOFFSETY)
With my own printer MarginLeft = 42 pixels ( 2.96666 mm ) idem for MarginTop
Now, i tried to print a dot (.) at position (0,0) like this, just to check:
Printer.CurrentX=0
Printer.CurrentY=0
Printer.print "."
On my paper (A4) i obtain this result with ruler : Left Margin = 2.9666 mm (~ 3 mm) BUT Top margin ~ 6 mm.
I dont understand why Top margin is 6 mm insted of 3
Is there any way to know where come this more 3 mm ?
Is there any way to set to force printer Unprintable area ?
Thanks in advance
Cheickna
|
|
|
|
|
I need a tutor for a school project in the seattle area. Let me know if you can help
|
|
|
|
|
How do I get the tooltips for class the way VB.NET classes have? I've finished coding my methods to return information but I need a way to show what information is being returned the way the base classes do.
|
|
|
|