|
ok i am doing know these corrections but is the call funktion correct?
|
|
|
|
|
Like I said, it seems possible that you're multiplying by zero. I also don't see any code that should show the result. I also am not sure if &= is what you want, this does a bitwise AND. At least, it does in C#. What does it do in VB ?
You should set a breakpoint and step through the code, to work out what is wrong.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 no it's not multiplying with zero i give a more number then 16
|
|
|
|
|
&= concatenates strings, doesn't it ? Have you stepped through the debugger to see what it is doing ?
VB totally sucks, your problem could be to do with the implicit conversions that are going on.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Briefly looking at the code, and as Christian has eluded to, there are a lot of potential problems that could be eliminated by making the code type safe. To do this include Option Strict as the first line of the code file. You can do this at a project level in the compilation options.
Once you have don this you'll have to cast all those TextBox.Text values to integers, for example:
forma = TextBox1.Text / 16
becomes:
forma = CInt(TextBox1.Text) / 16
Assuming forma is actually an integer.
Once you've done this, if something is wrong you should get a runtime error tring to cast the the text in you textboxes that will point you towards the next step of your debug process.
Hope this helps
Tom
|
|
|
|
|
forma is single and i could't look step by step in VB 2005.i didn't know how to do it and it gives no error
|
|
|
|
|
Put a break point in on the first line of code that you want to step through. To do this put the cursor on the line and press F9.
Then run the code. It will stop at that point, press F11 to step through each line of code and put your cursor over the variables to see what's in their values.
Cheers
Tom
|
|
|
|
|
to convert textbox text to single:
froma = cdec(textbox.text)
Note that if a non-numeric character (a letter or a symbol) is entered into the textbox it will cause an exception error, to get around that use a validation technique such as
if isnumeric(textbox.text) = false then<br />
messagebox.show("you did not enter a number!")<br />
textbox.focus()<br />
end if<br />
what this does is alerts the user to his/her error and forces them to correct it
now as for the step-by-step.
The step-by-step shows you what the complier is actually running, so if it never gets highlighted it never has been called
Example:
if true= true than<br />
'this code will always run<br />
else if x = 10 then<br />
'this code will never run<br />
else<br />
'this code will also never run<br />
end if<br />
Hopes this helps
There are 10 types of people in the world: those who understand binary and those who don't
|
|
|
|
|
Hi, I program a Writing Application now. My Question is: How can I make Object- or Tableproperty's?
|
|
|
|
|
You're going to have to explain this a bit more. Make a what?
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
I mean changing borders or cell background
|
|
|
|
|
TimHot wrote: DHTML Editing
There's a dinosaur from the past. All the documentation on it has been archived it's so old.
Let's see the code you're using to add the table.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Here is the code:
Dim doc As Object = Form1.txt.DOM<br />
Dim selection As Object = doc.selection<br />
Dim tr As Object = selection.createrange<br />
Dim c, r As Integer<br />
Dim HtmlCode As New System.Text.StringBuilder<br />
Dim anp As String = ""<br />
Dim sty As String = ""<br />
Select Case anpass<br />
Case Style.fest<br />
anp = breite<br />
Case Style.inahlt<br />
anp = ""<br />
Case Style.Window<br />
anp = "100%"<br />
sty = "table-layout:fixed;" & Chr(34)<br />
End Select<br />
HtmlCode.Append("<table style=" & Chr(34) & sty & " border=""thin"" cellspacing = " & cellspan & " rowspacing = " & rowspan & " width= " & anp & " bordercolor=" & bcolor & ">")<br />
For r = 1 To CInt(rows)<br />
HtmlCode.Append("<tr>")<br />
For c = 1 To CInt(cols)<br />
HtmlCode.Append("<td>")<br />
HtmlCode.Append("</td>")<br />
Next<br />
HtmlCode.Append("</tr>")<br />
Next<br />
HtmlCode.Append("</table>")<br />
tr.pasteHTML(HtmlCode.ToString)
|
|
|
|
|
hey, we are working on a project, "voice command and control" in VB.NET.
we have used SAPI 5.0. till now our project performs for getting input from any user, means everyone's "hello" is same. we are not using or matching input frequencies.
can u give me idea to generate a wave file and read it and convert it to hex which can be helpful to differentiate the input sounds of different user.
waiting for anyone's suggestions!
|
|
|
|
|
sanket h modi wrote: can u give me idea to generate a wave file and read it and convert it to hex which can be helpful to differentiate the input sounds of different user
Basically, you're going to have to do your own research on this. This is "voice print" security technology you're talking about. Just start Googling "voice print security" and you'll come up with a bunch of products, but little in the way of research papers.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Hi all...
I'm trying to set a right click function to my app, so that when a user right click anywhere in the application Window (except on controls), it will pop up a msgbox.
I've read some articles about using context menu but I hardly understands it. Can somebody explain?
http://www.datadynamics.com/forums/ShowPost.aspx?PostID=73192
|
|
|
|
|
You're reading about right clicking in the designer. Yuo just want to add a context menu, google for 'context menu VB.NET'
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Hi there, thanks for replying. I don't actually want context menu. I want a MsgBox to pop up when user right click ok the application. Any idea?
|
|
|
|
|
OK, you plainly want the mouse down message then, the trick is getting it in the non client area. I think you need to use the WndProc for that.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
If you just want the message when you right click the form the following will work (just add it to the form):
<br />
Protected Overrides Sub OnMouseClick(ByVal e As System.Windows.Forms.MouseEventArgs)<br />
MyBase.OnMouseClick(e)<br />
<br />
If e.Button = Windows.Forms.MouseButtons.Right Then<br />
MessageBox.Show("You clicked the form with the right mouse button!", "My Application")<br />
End If<br />
<br />
End Sub<br />
Hope this helps.
Tom
|
|
|
|
|
Hi there, it really works on an empty form. Can you teach me on how to apply this code on other object such as picture box etc?
|
|
|
|
|
Just create an event handler to the same code for the MouseClick event of the control(s) in question:
<br />
Private Sub MyControls_MouseClick(sender As Object, e As MouseEventArgs) _ <br />
Handles MyPictureBox.MouseClick, _<br />
MyLabel.MouseClick, etc, etc<br />
<br />
If e.Button = Windows.Forms.MouseButtons.Right Then<br />
MessageBox.Show("You clicked the form with the right mouse button!", "My Application")<br />
<br />
End If<br />
<br />
End Sub<br />
An easy way to do this is select the control in the desiger, open the property grid for it (F4), click the events button at the top (the one with the lightning bolt on it) and double click the event you want to create the handler for. This will create the code stub for the event handler automatically.
Cheers
Tom
|
|
|
|
|
greetings to all,
i badly needed your help, regarding msflexgrid from vb6 control:
- how to set a color on a particular / or current cell in
msflexgrid...
it may sound funny, im using this msflexgrid control on a vb.net 2005.. your help is highly appreciated... even a vb6 code may help if you can provide...
thanks
Fear does not exist, only in the mind......
|
|
|
|
|
moomoooomoo wrote: - how to set a color on a particular / or current cell in msflexgrid...
You can set the property CellBackColor - this will change the background color of the current cell, referred to by the current values of Row and Col properties.
|
|
|
|
|
first of all thank you....but;
could you elaborate more,.....
flxgrd.cellforecolor = sample.violet does not work on the selected cell of the grid...
how to change the font color in cell (row (4), col(5)) using msflexgrid?
ur help is highly appreciated...
thank you....
start a new beginning in every ending; thats what life for......
|
|
|
|